Skip to content

Commit

Permalink
test_iostream.test_skid: fix assert message
Browse files Browse the repository at this point in the history
  • Loading branch information
purdeaandrei authored and whitequark committed Sep 11, 2024
1 parent f2c0ecb commit d8a1cd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions software/tests/gateware/test_iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ async def testbench(ctx):

await ctx.tick()

assert ctx.get(dut.i_stream.p.port.data.i) == 0b0101, f"{i_stream_p.port.data.i:#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b0101, f"{i_stream_p.meta:#06b}"
assert ctx.get(dut.i_stream.p.port.data.i) == 0b0101, f"{ctx.get(dut.i_stream.p.port.data.i):#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b0101, f"{ctx.get(dut.i_stream.p.meta):#06b}"

ctx.set(dut.o_stream.p.meta, 0b1111)
ctx.set(port.i, 0b1111)
Expand All @@ -186,15 +186,15 @@ async def testbench(ctx):

await ctx.tick().repeat(10)
# The skid buffer should protect the input stream from changes on the input signal
assert ctx.get(dut.i_stream.p.port.data.i) == 0b0101, f"{i_stream_p.port.data.i:#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b0101, f"{i_stream_p.meta:#06b}"
assert ctx.get(dut.i_stream.p.port.data.i) == 0b0101, f"{ctx.get(dut.i_stream.p.port.data.i):#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b0101, f"{ctx.get(dut.i_stream.p.meta):#06b}"

ctx.set(dut.i_stream.ready, 1)

await ctx.tick()

assert ctx.get(dut.i_stream.p.port.data.i) == 0b1111, f"{i_stream_p.port.data.i:#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b1111, f"{i_stream_p.meta:#06b}"
assert ctx.get(dut.i_stream.p.port.data.i) == 0b1111, f"{ctx.get(dut.i_stream.p.port.data.i):#06b}"
assert ctx.get(dut.i_stream.p.meta) == 0b1111, f"{ctx.get(dut.i_stream.p.meta):#06b}"

sim = Simulator(dut)
sim.add_clock(1e-6)
Expand Down

0 comments on commit d8a1cd4

Please sign in to comment.