File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55SIM ?= icarus
66TOPLEVEL_LANG ?= verilog
77SRC_DIR = $(PWD ) /../src
8- PROJECT_SOURCES = project.v
8+ PROJECT_SOURCES = project.v testchain.v cinv.v
99
1010ifneq ($(GATES ) ,yes)
1111
Original file line number Diff line number Diff line change @@ -25,16 +25,30 @@ async def test_project(dut):
2525
2626 dut ._log .info ("Test project behavior" )
2727
28- # Set the input values you want to test
29- dut .ui_in .value = 20
30- dut .uio_in .value = 30
28+ # scan mode
29+ dut .uio_in .value = 0
30+
31+ for l in range (0 ,9 ):
32+ dut .ui_in .value = 255
33+ await ClockCycles (dut .clk , 1 )
34+ dut .ui_in .value = 0
35+ await ClockCycles (dut .clk , 1 )
3136
32- # Wait for one clock cycle to see the output values
33- await ClockCycles (dut .clk , 1 )
37+ # test mode
38+ dut .uio_in .value = 1
39+ dut .ui_in .value = 255
40+ await ClockCycles (dut .clk , 1 ) # arming cycle
41+ await ClockCycles (dut .clk , 1 ) # measuring cycle
42+
43+ # scan out
44+ dut .uio_in .value = 0
45+
46+ for p in range (0 ,12 ):
47+ dut ._log .info (f"uo_out = { dut .uo_out .value } " )
48+ await ClockCycles (dut .clk , 1 )
49+ dut ._log .info (f"uo_out = { dut .uo_out .value } " )
50+ await ClockCycles (dut .clk , 1 )
3451
35- # The following assersion is just an example of how to check the output values.
36- # Change it to match the actual expected output of your module:
37- assert dut .uo_out .value == 50
52+ assert 1 == 1
3853
39- # Keep testing the module by changing the input values, waiting for
40- # one or more clock cycles, and asserting the expected output values.
54+
You can’t perform that action at this time.
0 commit comments