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):
450450
451451 tb = TB (dut )
452452
453+ depth = dut .DEPTH .value
454+ byte_lanes = tb .source .byte_lanes
455+
453456 await tb .reset ()
454457
455458 tb .sink .pause = True
456459
457- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
460+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
458461 test_frame = AxiStreamFrame (test_data )
459462 await tb .source .send (test_frame )
460463
461- for k in range (2048 ):
464+ for k in range (( depth // byte_lanes ) * 2 ):
462465 await RisingEdge (dut .s_clk )
463466
464467 tb .sink .pause = False
465468
466469 if dut .DROP_OVERSIZE_FRAME .value :
467- for k in range (2048 ):
470+ for k in range (( depth // byte_lanes ) * 2 ):
468471 await RisingEdge (dut .s_clk )
469472
470473 else :
Original file line number Diff line number Diff line change @@ -447,21 +447,24 @@ async def run_test_overflow(dut):
447447
448448 tb = TB (dut )
449449
450+ depth = dut .DEPTH .value
451+ byte_lanes = min (tb .source .byte_lanes , tb .sink .byte_lanes )
452+
450453 await tb .reset ()
451454
452455 tb .sink .pause = True
453456
454- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
457+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
455458 test_frame = AxiStreamFrame (test_data )
456459 await tb .source .send (test_frame )
457460
458- for k in range (2048 ):
461+ for k in range (( depth // byte_lanes ) * 2 ):
459462 await RisingEdge (dut .s_clk )
460463
461464 tb .sink .pause = False
462465
463466 if dut .DROP_OVERSIZE_FRAME .value :
464- for k in range (2048 ):
467+ for k in range (( depth // byte_lanes ) * 2 ):
465468 await RisingEdge (dut .s_clk )
466469
467470 else :
Original file line number Diff line number Diff line change @@ -236,21 +236,24 @@ async def run_test_overflow(dut):
236236
237237 tb = TB (dut )
238238
239+ depth = dut .DEPTH .value
240+ byte_lanes = tb .source .byte_lanes
241+
239242 await tb .reset ()
240243
241244 tb .sink .pause = True
242245
243- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
246+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
244247 test_frame = AxiStreamFrame (test_data )
245248 await tb .source .send (test_frame )
246249
247- for k in range (2048 ):
250+ for k in range (( depth // byte_lanes ) * 2 ):
248251 await RisingEdge (dut .clk )
249252
250253 tb .sink .pause = False
251254
252255 if dut .DROP_OVERSIZE_FRAME .value :
253- for k in range (2048 ):
256+ for k in range (( depth // byte_lanes ) * 2 ):
254257 await RisingEdge (dut .clk )
255258
256259 else :
Original file line number Diff line number Diff line change @@ -236,21 +236,24 @@ async def run_test_overflow(dut):
236236
237237 tb = TB (dut )
238238
239+ depth = dut .DEPTH .value
240+ byte_lanes = min (tb .source .byte_lanes , tb .sink .byte_lanes )
241+
239242 await tb .reset ()
240243
241244 tb .sink .pause = True
242245
243- test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), 2048 ))
246+ test_data = bytearray (itertools .islice (itertools .cycle (range (256 )), depth * 2 ))
244247 test_frame = AxiStreamFrame (test_data )
245248 await tb .source .send (test_frame )
246249
247- for k in range (2048 ):
250+ for k in range (( depth // byte_lanes ) * 2 ):
248251 await RisingEdge (dut .clk )
249252
250253 tb .sink .pause = False
251254
252255 if dut .DROP_OVERSIZE_FRAME .value :
253- for k in range (2048 ):
256+ for k in range (( depth // byte_lanes ) * 2 ):
254257 await RisingEdge (dut .clk )
255258
256259 else :
You can’t perform that action at this time.
0 commit comments