diff --git a/Makefile b/Makefile index bc10f84..9a13b98 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,21 @@ export LIBPYTHON_LOC=$(shell cocotb-config --libpython) +TIMESTAMP := $(shell date +%Y%m%d%H%M%S) + test_%: + mkdir -p build make compile iverilog -o build/sim.vvp -s gpu -g2012 build/gpu.v - MODULE=test.test_$* vvp -M $$(cocotb-config --prefix)/cocotb/libs -m libcocotbvpi_icarus build/sim.vvp + cd test && mkdir -p runs + cd .. + MODULE=test.test_$* vvp -M $$(cocotb-config --prefix)/cocotb/libs -m libcocotbvpi_icarus build/sim.vvp > test/runs/test_$*_$(TIMESTAMP).out + +clean: + rm -rf build/* + rmdir build + rm -rf test/runs/* + rmdir test/runs compile: make compile_alu @@ -17,7 +28,7 @@ compile: mv build/temp.v build/gpu.v compile_%: - sv2v -w build/$*.v src/$*.sv + ./sv2v/sv2v -w build/$*.v src/$*.sv # TODO: Get gtkwave visualizaiton