Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added output directory for tests #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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