beepo/tests/Makefile

30 lines
693 B
Makefile
Raw Normal View History

2023-11-17 02:02:40 -06:00
ICARUS_FILES = inputs.txt
# Used in all tests
build:
mkdir -p $@
release/slapper:
cargo build --manifest-path ../slapper/Cargo.toml -r
slapper: release/slapper
cp ../slapper/target/release/slapper $@
# Addition tests
build/adding: | build
mkdir -p $@
build/adding/program.bin: adding/program.rhai | build/adding
./hbasm $< > $@
build/adding/spmem_gen.v: build/adding/program.bin slapper | build/adding
./slapper $< spmem.v $@
build/adding/out: ${ICARUS_FILES} build/adding/spmem_gen.v | build/adding
iverilog -o $@ -c $< -s tb_adding
build/adding/dump.vcd: build/adding/out | build/adding
vvp $<
adding-wave: build/adding/dump.vcd | build/adding
gtkwave build/adding/dump.vcd