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:
parent
ac2c0fdac8
commit
7febd080c9
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user