Add backpressure tests

This commit is contained in:
Alex Forencich 2018-12-08 23:59:57 -08:00
parent f45a3ef5e0
commit f9a5e6803b
8 changed files with 256 additions and 0 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()