From af447f50c2d6551968da1933209b6b3cc045f1d9 Mon Sep 17 00:00:00 2001 From: Advait Date: Sun, 5 May 2024 09:51:28 +0200 Subject: [PATCH] added timestamped output directory in test/runs. - also included 'clean' command to remove build and output directories --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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