2022-03-04 21:12:52 +01:00
|
|
|
watchall
|
2022-03-04 13:11:34 +01:00
|
|
|
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
|
2022-03-04 13:11:34 +01:00
|
|
|
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
|
2022-03-04 13:11:34 +01:00
|
|
|
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
|
2022-03-04 13:11:34 +01:00
|
|
|
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
|
2022-03-04 13:11:34 +01:00
|
|
|
assert t.q 1
|
2022-03-04 21:12:52 +01:00
|
|
|
system "echo '[3] tested d = 1, clk rise and fall'"
|