Skip to content

Commit af447f5

Browse files
committed
added timestamped output directory in test/runs.
- also included 'clean' command to remove build and output directories
1 parent 02b6c2c commit af447f5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Makefile

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
export LIBPYTHON_LOC=$(shell cocotb-config --libpython)
44

5+
TIMESTAMP := $(shell date +%Y%m%d%H%M%S)
6+
57
test_%:
8+
mkdir -p build
69
make compile
710
iverilog -o build/sim.vvp -s gpu -g2012 build/gpu.v
8-
MODULE=test.test_$* vvp -M $$(cocotb-config --prefix)/cocotb/libs -m libcocotbvpi_icarus build/sim.vvp
11+
cd test && mkdir -p runs
12+
cd ..
13+
MODULE=test.test_$* vvp -M $$(cocotb-config --prefix)/cocotb/libs -m libcocotbvpi_icarus build/sim.vvp > test/runs/test_$*_$(TIMESTAMP).out
14+
15+
clean:
16+
rm -rf build/*
17+
rmdir build
18+
rm -rf test/runs/*
19+
rmdir test/runs
920

1021
compile:
1122
make compile_alu
@@ -17,7 +28,7 @@ compile:
1728
mv build/temp.v build/gpu.v
1829

1930
compile_%:
20-
sv2v -w build/$*.v src/$*.sv
31+
./sv2v/sv2v -w build/$*.v src/$*.sv
2132

2233
# TODO: Get gtkwave visualizaiton
2334

0 commit comments

Comments
 (0)