File tree Expand file tree Collapse file tree 4 files changed +24
-12
lines changed Expand file tree Collapse file tree 4 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -450,21 +450,24 @@ async def run_test_overflow(dut):
450
450
451
451
tb = TB (dut )
452
452
453
+ depth = dut .DEPTH .value
454
+ byte_lanes = tb .source .byte_lanes
455
+
453
456
await tb .reset ()
454
457
455
458
tb .sink .pause = True
456
459
457
- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
460
+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
458
461
test_frame = AxiStreamFrame (test_data )
459
462
await tb .source .send (test_frame )
460
463
461
- for k in range (2048 ):
464
+ for k in range (( depth // byte_lanes ) * 2 ):
462
465
await RisingEdge (dut .s_clk )
463
466
464
467
tb .sink .pause = False
465
468
466
469
if dut .DROP_OVERSIZE_FRAME .value :
467
- for k in range (2048 ):
470
+ for k in range (( depth // byte_lanes ) * 2 ):
468
471
await RisingEdge (dut .s_clk )
469
472
470
473
else :
Original file line number Diff line number Diff line change @@ -447,21 +447,24 @@ async def run_test_overflow(dut):
447
447
448
448
tb = TB (dut )
449
449
450
+ depth = dut .DEPTH .value
451
+ byte_lanes = min (tb .source .byte_lanes , tb .sink .byte_lanes )
452
+
450
453
await tb .reset ()
451
454
452
455
tb .sink .pause = True
453
456
454
- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
457
+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
455
458
test_frame = AxiStreamFrame (test_data )
456
459
await tb .source .send (test_frame )
457
460
458
- for k in range (2048 ):
461
+ for k in range (( depth // byte_lanes ) * 2 ):
459
462
await RisingEdge (dut .s_clk )
460
463
461
464
tb .sink .pause = False
462
465
463
466
if dut .DROP_OVERSIZE_FRAME .value :
464
- for k in range (2048 ):
467
+ for k in range (( depth // byte_lanes ) * 2 ):
465
468
await RisingEdge (dut .s_clk )
466
469
467
470
else :
Original file line number Diff line number Diff line change @@ -236,21 +236,24 @@ async def run_test_overflow(dut):
236
236
237
237
tb = TB (dut )
238
238
239
+ depth = dut .DEPTH .value
240
+ byte_lanes = tb .source .byte_lanes
241
+
239
242
await tb .reset ()
240
243
241
244
tb .sink .pause = True
242
245
243
- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
246
+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
244
247
test_frame = AxiStreamFrame (test_data )
245
248
await tb .source .send (test_frame )
246
249
247
- for k in range (2048 ):
250
+ for k in range (( depth // byte_lanes ) * 2 ):
248
251
await RisingEdge (dut .clk )
249
252
250
253
tb .sink .pause = False
251
254
252
255
if dut .DROP_OVERSIZE_FRAME .value :
253
- for k in range (2048 ):
256
+ for k in range (( depth // byte_lanes ) * 2 ):
254
257
await RisingEdge (dut .clk )
255
258
256
259
else :
Original file line number Diff line number Diff line change @@ -236,21 +236,24 @@ async def run_test_overflow(dut):
236
236
237
237
tb = TB (dut )
238
238
239
+ depth = dut .DEPTH .value
240
+ byte_lanes = min (tb .source .byte_lanes , tb .sink .byte_lanes )
241
+
239
242
await tb .reset ()
240
243
241
244
tb .sink .pause = True
242
245
243
- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
246
+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
244
247
test_frame = AxiStreamFrame (test_data )
245
248
await tb .source .send (test_frame )
246
249
247
- for k in range (2048 ):
250
+ for k in range (( depth // byte_lanes ) * 2 ):
248
251
await RisingEdge (dut .clk )
249
252
250
253
tb .sink .pause = False
251
254
252
255
if dut .DROP_OVERSIZE_FRAME .value :
253
- for k in range (2048 ):
256
+ for k in range (( depth // byte_lanes ) * 2 ):
254
257
await RisingEdge (dut .clk )
255
258
256
259
else :
You can’t perform that action at this time.
0 commit comments