Vela is a statically-typed, compiled programming language targeting a custom 16-bit ARM-like CPU architecture. It is a companion project to the DE1 CPU ISA - Vela compiles .vl source files into .de1 assembly that the CPU's encoder assembles into machine code for simulation on the Verilog hardware model.
This repository contains:
- the Python compiler in
src/; - the Vela standard library in
stdlib/; - example programs in
examples/; - automated tests in
tests/; - full documentation in
docs/.
- Python 3.12 or newer.
pytest, only for running the test suite.- The
CPUproject in the sibling../CPUdirectory, only for running generated.de1files on the simulator.
Compile a program:
python -m src.main examples/hello.vl -o examples/hello.de1Run the generated assembly with the CPU simulator:
cd ../CPU
python run.py ../Vela/examples/hello.de1Run the compiler tests:
pytestSee LICENSE.