actlib_dataflow_neuro/test/unit_tests/flipflop/test.prsim

29 lines
398 B
Plaintext
Raw Normal View History

2022-03-04 21:12:52 +01:00
watchall
system "echo '[0] start test'"
2022-03-07 16:36:01 +01:00
set Reset 0
2022-03-04 21:12:52 +01:00
set t.d 0
set t.clk 0
cycle
status X
mode run
2022-03-04 21:12:52 +01:00
assert t.q 0
2022-03-07 16:36:01 +01:00
2022-03-04 21:12:52 +01:00
cycle
assert t.q 0
system "echo '[1] reset completed'"
set t.clk 1
cycle
assert t.q 0
2022-03-04 21:12:52 +01:00
system "echo '[2] tested d = 0, clk rise'"
set t.clk 0
cycle
set t.d 1
cycle
set t.clk 1
cycle
2022-03-07 16:36:01 +01:00
set t.d 0
2022-03-04 21:12:52 +01:00
assert t.q 0
set t.clk 0
cycle
assert t.q 1
2022-03-04 21:12:52 +01:00
system "echo '[3] tested d = 1, clk rise and fall'"