Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down