diff --git a/tb/test_axis_async_fifo.py b/tb/test_axis_async_fifo.py index 0a1f842c..50f83659 100755 --- a/tb/test_axis_async_fifo.py +++ b/tb/test_axis_async_fifo.py @@ -466,6 +466,38 @@ def bench(): yield delay(100) + yield s_clk.posedge + print("test 10: backpressure test") + current_test.next = 10 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=10, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(5000) + yield s_clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_async_fifo_64.py b/tb/test_axis_async_fifo_64.py index 0bd343e6..9af357fe 100755 --- a/tb/test_axis_async_fifo_64.py +++ b/tb/test_axis_async_fifo_64.py @@ -466,6 +466,38 @@ def bench(): yield delay(100) + yield s_clk.posedge + print("test 10: backpressure test") + current_test.next = 10 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=10, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(1000) + yield s_clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_async_frame_fifo.py b/tb/test_axis_async_frame_fifo.py index dba018b1..96d0d695 100755 --- a/tb/test_axis_async_frame_fifo.py +++ b/tb/test_axis_async_frame_fifo.py @@ -634,6 +634,38 @@ def bench(): yield delay(100) + yield s_clk.posedge + print("test 11: backpressure test") + current_test.next = 11 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=11, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(5000) + yield s_clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_async_frame_fifo_64.py b/tb/test_axis_async_frame_fifo_64.py index 9d9ca5f3..699833f2 100755 --- a/tb/test_axis_async_frame_fifo_64.py +++ b/tb/test_axis_async_frame_fifo_64.py @@ -634,6 +634,38 @@ def bench(): yield delay(100) + yield s_clk.posedge + print("test 11: backpressure test") + current_test.next = 11 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=11, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(1000) + yield s_clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_fifo.py b/tb/test_axis_fifo.py index aa2527f9..0ffd1c00 100755 --- a/tb/test_axis_fifo.py +++ b/tb/test_axis_fifo.py @@ -455,6 +455,38 @@ def bench(): yield delay(100) + yield clk.posedge + print("test 10: backpressure test") + current_test.next = 10 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=10, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(5000) + yield clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_fifo_64.py b/tb/test_axis_fifo_64.py index 04181f7b..d09739bf 100755 --- a/tb/test_axis_fifo_64.py +++ b/tb/test_axis_fifo_64.py @@ -455,6 +455,38 @@ def bench(): yield delay(100) + yield clk.posedge + print("test 10: backpressure test") + current_test.next = 10 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=10, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(1000) + yield clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_frame_fifo.py b/tb/test_axis_frame_fifo.py index 2bcc89f3..9280f2c5 100755 --- a/tb/test_axis_frame_fifo.py +++ b/tb/test_axis_frame_fifo.py @@ -560,6 +560,38 @@ def bench(): yield delay(100) + yield clk.posedge + print("test 11: backpressure test") + current_test.next = 11 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=11, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(5000) + yield clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances() diff --git a/tb/test_axis_frame_fifo_64.py b/tb/test_axis_frame_fifo_64.py index 0d541dd3..2987b275 100755 --- a/tb/test_axis_frame_fifo_64.py +++ b/tb/test_axis_frame_fifo_64.py @@ -560,6 +560,38 @@ def bench(): yield delay(100) + yield clk.posedge + print("test 11: backpressure test") + current_test.next = 11 + + test_frame = axis_ep.AXIStreamFrame( + b'\xDA\xD1\xD2\xD3\xD4\xD5' + + b'\x5A\x51\x52\x53\x54\x55' + + b'\x80\x00' + + bytearray(range(256)), + id=11, + dest=1 + ) + + sink_pause.next = 1 + source.send(test_frame) + source.send(test_frame) + yield delay(1000) + yield clk.posedge + sink_pause.next = 0 + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield sink.wait() + rx_frame = sink.recv() + + assert rx_frame == test_frame + + yield delay(100) + raise StopSimulation return instances()