1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Use FIFO depth in overflow test

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2023-08-14 16:58:22 -07:00
parent ac2c0fdac8
commit 7febd080c9
4 changed files with 24 additions and 12 deletions

View File

@ -450,21 +450,24 @@ async def run_test_overflow(dut):
tb = TB(dut)
depth = dut.DEPTH.value
byte_lanes = tb.source.byte_lanes
await tb.reset()
tb.sink.pause = True
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), 2048))
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), depth*2))
test_frame = AxiStreamFrame(test_data)
await tb.source.send(test_frame)
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.s_clk)
tb.sink.pause = False
if dut.DROP_OVERSIZE_FRAME.value:
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.s_clk)
else:

View File

@ -447,21 +447,24 @@ async def run_test_overflow(dut):
tb = TB(dut)
depth = dut.DEPTH.value
byte_lanes = min(tb.source.byte_lanes, tb.sink.byte_lanes)
await tb.reset()
tb.sink.pause = True
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), 2048))
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), depth*2))
test_frame = AxiStreamFrame(test_data)
await tb.source.send(test_frame)
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.s_clk)
tb.sink.pause = False
if dut.DROP_OVERSIZE_FRAME.value:
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.s_clk)
else:

View File

@ -236,21 +236,24 @@ async def run_test_overflow(dut):
tb = TB(dut)
depth = dut.DEPTH.value
byte_lanes = tb.source.byte_lanes
await tb.reset()
tb.sink.pause = True
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), 2048))
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), depth*2))
test_frame = AxiStreamFrame(test_data)
await tb.source.send(test_frame)
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.clk)
tb.sink.pause = False
if dut.DROP_OVERSIZE_FRAME.value:
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.clk)
else:

View File

@ -236,21 +236,24 @@ async def run_test_overflow(dut):
tb = TB(dut)
depth = dut.DEPTH.value
byte_lanes = min(tb.source.byte_lanes, tb.sink.byte_lanes)
await tb.reset()
tb.sink.pause = True
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), 2048))
test_data = bytearray(itertools.islice(itertools.cycle(range(256)), depth*2))
test_frame = AxiStreamFrame(test_data)
await tb.source.send(test_frame)
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.clk)
tb.sink.pause = False
if dut.DROP_OVERSIZE_FRAME.value:
for k in range(2048):
for k in range((depth//byte_lanes)*2):
await RisingEdge(dut.clk)
else: