aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 909f0ae..6976538 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ test_sp: testbench_sp.exe firmware/firmware.hex
test_axi: testbench_axi.exe firmware/firmware.hex
vvp -N testbench_axi.exe
+test_synth: testbench_synth.exe firmware/firmware.hex
+ vvp -N testbench_synth.exe
+
testbench.exe: testbench.v picorv32.v
iverilog -o testbench.exe testbench.v picorv32.v
chmod -x testbench.exe
@@ -23,6 +26,13 @@ testbench_axi.exe: testbench.v picorv32.v
iverilog -o testbench_axi.exe -DAXI_TEST testbench.v picorv32.v
chmod -x testbench_axi.exe
+testbench_synth.exe: testbench.v synth.v
+ iverilog -o testbench_synth.exe testbench.v synth.v
+ chmod -x testbench_synth.exe
+
+synth.v: picorv32.v scripts/yosys/synth_sim.ys
+ yosys -qv3 -l synth.log scripts/yosys/synth_sim.ys
+
firmware/firmware.hex: firmware/firmware.bin firmware/makehex.py
python3 firmware/makehex.py $< > $@
@@ -48,8 +58,8 @@ tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h
clean:
rm -vrf $(FIRMWARE_OBJS) $(TEST_OBJS) \
- firmware/firmware.{elf,bin,hex,map} \
- testbench{,_sp,_axi}.exe testbench.vcd
+ firmware/firmware.{elf,bin,hex,map} synth.v \
+ testbench{,_sp,_axi,_synth}.exe testbench.vcd
.PHONY: test test_sp test_axi clean