flipflop test updated

This commit is contained in:
Michele
2022-03-04 21:12:52 +01:00
parent c30a46d6d8
commit 8dabc59a03
4 changed files with 62 additions and 33 deletions

View File

@@ -1,21 +1,28 @@
set t.d 0
set t.clk 0
set Reset 0
cycle
assert t.q 0
watchall
system "echo '[0] start test'"
set Reset 1
set t.d 0
set t.clk 0
cycle
status X
mode run
assert t.q 0
set Reset 0
cycle
assert t.q 0
system "echo '[1] reset completed'"
system "echo '[2] setting d to 1'"
set t.clk 1
cycle
assert t.q 0
system "echo '[3] setting clk to 1'"
system "echo '[2] tested d = 0, clk rise'"
set t.clk 0
cycle
set t.d 1
cycle
set t.clk 1
cycle
assert t.q 0
set t.clk 0
cycle
assert t.q 1
system "echo '[4] Finished'"
system "echo '[3] tested d = 1, clk rise and fall'"