diff --git a/.gitignore b/.gitignore index 8586c55..1d5040d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,7 @@ test/logs/* gds/**/*.gltf .DS_Store -results.xml \ No newline at end of file +results.xml + +*.vcd +*.gtkw \ No newline at end of file diff --git a/Makefile b/Makefile index bc10f84..8923e86 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ compile: compile_%: sv2v -w build/$*.v src/$*.sv -# TODO: Get gtkwave visualizaiton +.SECONDEXPANSION: -show_%: %.vcd %.gtkw +# A .gtkw file is optional +show_%: %.vcd $$(wildcard $$*.gtkw) gtkwave $^ diff --git a/src/gpu.sv b/src/gpu.sv index e3d8fcd..7d8099a 100644 --- a/src/gpu.sv +++ b/src/gpu.sv @@ -72,6 +72,11 @@ module gpu #( reg [NUM_FETCHERS-1:0] fetcher_read_ready; reg [PROGRAM_MEM_DATA_BITS-1:0] fetcher_read_data [NUM_FETCHERS-1:0]; + initial begin + $dumpfile("gpu.vcd"); + $dumpvars(0, gpu); + end + // Device Control Register dcr dcr_instance ( .clk(clk), diff --git a/test/helpers/setup.py b/test/helpers/setup.py index 5370eb2..58adf26 100644 --- a/test/helpers/setup.py +++ b/test/helpers/setup.py @@ -13,7 +13,7 @@ async def setup( threads: int ): # Setup Clock - clock = Clock(dut.clk, 25, units="us") + clock = Clock(dut.clk, 10, units="ns") cocotb.start_soon(clock.start()) # Reset diff --git a/test/test_matmul.py b/test/test_matmul.py index 4cc14f7..392802b 100644 --- a/test/test_matmul.py +++ b/test/test_matmul.py @@ -6,7 +6,7 @@ from .helpers.logger import logger @cocotb.test() -async def test_matadd(dut): +async def test_matmul(dut): # Program Memory program_memory = Memory(dut=dut, addr_bits=8, data_bits=16, channels=1, name="program") program = [