Skip to content

Commit

Permalink
Use .value in asserts in example code
Browse files Browse the repository at this point in the history
This is not strictly necessary, but easier to understand for beginners.
  • Loading branch information
cmarqu committed Jan 23, 2021
1 parent f65e08a commit eb40f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def test_dff_simple(dut):
val = random.randint(0, 1)
dut.d <= val # Assign the random value val to the input port d
await FallingEdge(dut.clk)
assert dut.q == val, "output q was incorrect on the {}th cycle".format(i)
assert dut.q.value == val, "output q was incorrect on the {}th cycle".format(i)
```

A simple Makefile:
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_dff/test_dff.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ async def test_dff_simple(dut):
val = random.randint(0, 1)
dut.d <= val # Assign the random value val to the input port d
await FallingEdge(dut.clk)
assert dut.q == val, "output q was incorrect on the {}th cycle".format(i)
assert dut.q.value == val, "output q was incorrect on the {}th cycle".format(i)

0 comments on commit eb40f27

Please sign in to comment.