Skip to content

Commit

Permalink
Add back GL_TEST to src/tb.v
Browse files Browse the repository at this point in the history
  • Loading branch information
robbertvanginkel committed Apr 23, 2023
1 parent 9b323ee commit 2260c19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/tb.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ module tb (

// instantiate the DUT
robbertvanginkel_hamming74 robbertvanginkel_hamming74(
`ifdef GL_TEST
.vccd1( 1'b1),
.vssd1( 1'b0),
`endif
.io_in (io_in),
.io_out (io_out)
);
Expand Down
4 changes: 2 additions & 2 deletions src/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
async def test_hamming74_encode(dut):
for word, codeword in WORD_CODEWORD_MAPPING.items():
dut.io_in.value = FLAG_ENCODE | word
await Timer(10, units="step")
await Timer(1, units="step")
dut._log.info(
f"in: {dut.io_in.value}, out: {dut.io_out.value}, expect: {codeword:08b}"
)
Expand All @@ -46,7 +46,7 @@ async def test_hamming74_decode(dut):
for mutation in [0] + [1 << x for x in range(0, 7)]:
expect = word | FLAG_ERROR if mutation else word
dut.io_in.value = FLAG_DECODE | (codeword ^ mutation)
await Timer(10, units="step")
await Timer(1, units="step")
dut._log.info(
f"in: {dut.io_in.value}, out: {dut.io_out.value}, expect: {expect:08b}"
)
Expand Down

0 comments on commit 2260c19

Please sign in to comment.