2022-03-04 21:12:52 +01:00
|
|
|
watchall
|
2022-03-04 13:11:34 +01:00
|
|
|
system "echo '[0] start test'"
|
2022-03-30 15:01:50 +02:00
|
|
|
|
2022-03-07 16:36:01 +01:00
|
|
|
set Reset 0
|
2022-03-04 21:12:52 +01:00
|
|
|
set t.d 0
|
2022-03-30 15:01:50 +02:00
|
|
|
set t.clk 1
|
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 13:11:34 +01:00
|
|
|
system "echo '[1] reset completed'"
|
2022-03-30 15:01:50 +02:00
|
|
|
|
|
|
|
system "echo '[2] tested d = 0, clk rise'"
|
|
|
|
set t.clk 0
|
|
|
|
set t.d 1
|
|
|
|
cycle
|
|
|
|
|
2022-03-04 13:11:34 +01:00
|
|
|
set t.clk 1
|
|
|
|
cycle
|
2022-03-30 15:01:50 +02:00
|
|
|
set t.d 0
|
|
|
|
cycle
|
|
|
|
|
|
|
|
assert t.q 1
|
|
|
|
|
|
|
|
set t.clk 0
|
|
|
|
cycle
|
2022-03-04 13:11:34 +01:00
|
|
|
assert t.q 0
|
2022-03-30 15:01:50 +02:00
|
|
|
|
|
|
|
set t.d 0
|
2022-03-04 21:12:52 +01:00
|
|
|
set t.clk 0
|
|
|
|
cycle
|
2022-03-30 15:01:50 +02:00
|
|
|
|
|
|
|
assert t.q 0
|
|
|
|
|
2022-03-04 21:12:52 +01:00
|
|
|
set t.d 1
|
|
|
|
cycle
|
2022-03-04 13:11:34 +01:00
|
|
|
set t.clk 1
|
|
|
|
cycle
|
2022-03-04 21:12:52 +01:00
|
|
|
assert t.q 0
|
2022-03-30 15:01:50 +02:00
|
|
|
|
|
|
|
system "echo '[3] tested d = 1, clk rise and fall'"
|
|
|
|
|
|
|
|
set t.d 1
|
|
|
|
cycle
|
2022-03-04 21:12:52 +01:00
|
|
|
set t.clk 0
|
|
|
|
cycle
|
2022-03-30 15:01:50 +02:00
|
|
|
set t.d 0
|
|
|
|
cycle
|
|
|
|
|
|
|
|
assert t.q 1
|