merged changes in axis

This commit is contained in:
Alex Forencich 2018-07-02 16:26:21 -07:00
commit 7775e7774d
43 changed files with 455 additions and 1054 deletions

View File

@ -44,6 +44,15 @@ Supports power of two depths only.
Basic frame-based asynchronous FIFO with parametrizable data width and depth.
Supports power of two depths only.
### axis_cobs_decode
Consistent Overhead Byte Stuffing (COBS) decoder. Fixed 8 bit width.
### axis_cobs_encode
Consistent Overhead Byte Stuffing (COBS) encoder. Fixed 8 bit width.
Configurable zero insertion.
### axis_crosspoint module
Basic crosspoint switch. tready signal not supported. Parametrizable data
@ -180,6 +189,8 @@ Parametrizable priority encoder.
axis_arb_mux_4.v : 4 port arbitrated multiplexer
axis_async_fifo.v : Asynchronous FIFO
axis_async_frame_fifo.v : Asynchronous frame FIFO
axis_cobs_decode.v : COBS decoder
axis_cobs_encode.v : COBS encoder
axis_crosspoint.py : Crosspoint switch generator
axis_crosspoint_4x4.v : 4x4 crosspoint switch
axis_demux.py : Demultiplexer generator

View File

@ -344,7 +344,7 @@ class AXIStreamSource(object):
tvalid_int.next = False
tlast.next = False
if (tlast and tready_int and tvalid) or not tvalid_int:
if len(self.queue) > 0:
if self.queue:
frame = self.queue.pop(0)
frame.B = B
frame.N = N
@ -397,6 +397,8 @@ class AXIStreamSink(object):
return not self.queue
def wait(self, timeout=0):
if self.queue:
return
if timeout:
yield self.sync, delay(timeout)
else:

View File

@ -84,7 +84,7 @@ class LocalLinkSource(object):
src_rdy_out_n_int.next = True
eof_out_n.next = True
if (not eof_out_n and not dst_rdy_in_n_int and not src_rdy_out_n) or src_rdy_out_n_int:
if len(self.queue) > 0:
if self.queue:
frame = self.queue.pop(0)
if name is not None:
print("[%s] Sending frame %s" % (name, repr(frame)))
@ -100,9 +100,10 @@ class LocalLinkSink(object):
def __init__(self):
self.has_logic = False
self.queue = []
self.sync = Signal(intbv(0))
def recv(self):
if len(self.queue) > 0:
if self.queue:
return self.queue.pop(0)
return None
@ -110,7 +111,15 @@ class LocalLinkSink(object):
return len(self.queue)
def empty(self):
return self.count() == 0
return not self.queue
def wait(self, timeout=0):
if self.queue:
return
if timeout:
yield self.sync, delay(timeout)
else:
yield self.sync
def create_logic(self,
clk,
@ -154,6 +163,7 @@ class LocalLinkSink(object):
frame.append(int(data_in))
if not eof_in_n:
self.queue.append(frame)
self.sync.next = not self.sync
if name is not None:
print("[%s] Got frame %s" % (name, repr(frame)))
frame = []

View File

@ -205,10 +205,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -246,14 +243,12 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -292,15 +287,13 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -205,10 +205,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -246,14 +243,12 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -292,15 +287,13 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -282,13 +282,8 @@ def bench():
)
source_0.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -309,13 +304,8 @@ def bench():
)
source_1.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -345,17 +335,13 @@ def bench():
source_0.send(test_frame1)
source_0.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -385,17 +371,13 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -440,13 +422,13 @@ def bench():
source_2_pause.next = False
source_3_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -485,13 +467,13 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -531,31 +513,32 @@ def bench():
yield clk.posedge
source_1.send(test_frame1)
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -282,13 +282,8 @@ def bench():
)
source_0.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -309,13 +304,8 @@ def bench():
)
source_1.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -345,17 +335,13 @@ def bench():
source_0.send(test_frame1)
source_0.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -385,17 +371,13 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -440,13 +422,13 @@ def bench():
source_2_pause.next = False
source_3_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -485,13 +467,13 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -531,31 +513,32 @@ def bench():
yield clk.posedge
source_1.send(test_frame1)
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -185,12 +185,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -211,12 +207,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -251,10 +243,7 @@ def bench():
yield output_clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -287,18 +276,13 @@ def bench():
test_frame2.dest = 2
source.send(test_frame1)
source.send(test_frame2)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -338,13 +322,12 @@ def bench():
source_pause.next = False
yield input_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -384,13 +367,12 @@ def bench():
sink_pause.next = False
yield output_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -412,12 +394,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -443,10 +421,7 @@ def bench():
yield input_clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -185,12 +185,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -211,12 +207,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -251,10 +243,7 @@ def bench():
yield output_clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -287,18 +276,13 @@ def bench():
test_frame2.dest = 2
source.send(test_frame1)
source.send(test_frame2)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -338,13 +322,12 @@ def bench():
source_pause.next = False
yield input_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -384,13 +367,12 @@ def bench():
sink_pause.next = False
yield output_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -412,12 +394,8 @@ def bench():
)
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -443,10 +421,7 @@ def bench():
yield input_clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -233,12 +233,8 @@ def bench():
output_status_good_frame_asserted.next = 0
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -273,12 +269,8 @@ def bench():
output_status_good_frame_asserted.next = 0
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,10 +319,7 @@ def bench():
yield output_clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -374,18 +363,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -439,17 +423,12 @@ def bench():
source_pause.next = False
yield input_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
if output_axis_tvalid:
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -503,13 +482,12 @@ def bench():
sink_pause.next = False
yield output_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -614,10 +592,7 @@ def bench():
yield input_clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -233,12 +233,8 @@ def bench():
output_status_good_frame_asserted.next = 0
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -273,12 +269,8 @@ def bench():
output_status_good_frame_asserted.next = 0
source.send(test_frame)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,10 +319,7 @@ def bench():
yield output_clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -374,18 +363,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield input_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -439,17 +423,12 @@ def bench():
source_pause.next = False
yield input_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
if output_axis_tvalid:
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -503,13 +482,12 @@ def bench():
sink_pause.next = False
yield output_clk.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -614,10 +592,7 @@ def bench():
yield input_clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield output_clk.posedge
yield output_clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -257,9 +257,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -285,9 +283,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -313,15 +309,14 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
assert rx_frame.data == block
assert not rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -345,15 +340,14 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
assert rx_frame.data == block
assert not rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -383,17 +377,17 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -423,17 +417,17 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block

View File

@ -257,9 +257,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -286,9 +284,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -296,6 +292,7 @@ def bench():
assert cobs_decode(rx_frame.data) == block
assert not rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -324,14 +321,13 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(rx_frame.data) == None
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block

View File

@ -258,9 +258,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -287,9 +285,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -297,6 +293,7 @@ def bench():
assert cobs_decode(rx_frame.data[:-1]) == block
assert not rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block
@ -325,14 +322,13 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(rx_frame.data[:-1]) == None
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert cobs_decode(enc) == block

View File

@ -369,25 +369,23 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
source_3.send(test_frame3)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -411,25 +409,23 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
source_3.send(test_frame3)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame3
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame2
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame1
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0
@ -447,25 +443,23 @@ def bench():
test_frame0 = axis_ep.AXIStreamFrame(b'\x03\x00\xFF\xFF\x01\x02\x03\x04', id=0, dest=0)
source_0.send(test_frame0)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame0
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame0
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0

View File

@ -369,25 +369,23 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
source_3.send(test_frame3)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -411,25 +409,23 @@ def bench():
source_1.send(test_frame1)
source_2.send(test_frame2)
source_3.send(test_frame3)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame3
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame2
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame1
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0
@ -447,25 +443,23 @@ def bench():
test_frame0 = axis_ep.AXIStreamFrame(b'\x03\x00\xFF\xFF\x01\x02\x03\x04', id=0, dest=0)
source_0.send(test_frame0)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame0
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame0
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0

View File

@ -288,13 +288,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame
@ -317,13 +312,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame
@ -355,17 +345,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame1
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame2
@ -402,13 +388,13 @@ def bench():
while input_axis_tvalid:
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2
@ -450,13 +436,13 @@ def bench():
source_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2
@ -504,13 +490,13 @@ def bench():
sink_3_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2

View File

@ -288,13 +288,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame
@ -317,13 +312,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame
@ -355,17 +345,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
while input_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame1
yield sink_0.wait()
rx_frame = sink_0.recv()
assert rx_frame == test_frame2
@ -402,13 +388,13 @@ def bench():
while input_axis_tvalid:
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2
@ -450,13 +436,13 @@ def bench():
source_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2
@ -504,13 +490,13 @@ def bench():
sink_3_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink_1.wait()
rx_frame = sink_1.recv()
assert rx_frame == test_frame1
yield sink_2.wait()
rx_frame = sink_2.recv()
assert rx_frame == test_frame2

View File

@ -177,12 +177,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -203,12 +199,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -243,10 +235,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -276,18 +265,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -327,13 +311,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -373,13 +356,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -401,12 +383,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -432,10 +410,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -177,12 +177,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -203,12 +199,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -243,10 +235,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -276,18 +265,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -327,13 +311,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -373,13 +356,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -401,12 +383,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -432,10 +410,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -204,12 +204,8 @@ def bench():
good_frame_asserted.next = 0
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -238,12 +234,8 @@ def bench():
good_frame_asserted.next = 0
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -286,10 +278,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,18 +316,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -386,13 +370,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -440,13 +423,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -536,10 +518,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -204,12 +204,8 @@ def bench():
good_frame_asserted.next = 0
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -238,12 +234,8 @@ def bench():
good_frame_asserted.next = 0
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -286,10 +278,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,18 +316,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -386,13 +370,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -440,13 +423,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -536,10 +518,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -233,12 +233,8 @@ def bench():
source_1.send(test_frame_1)
source_2.send(test_frame_2)
source_3.send(test_frame_3)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0.data + test_frame_1.data + test_frame_2.data + test_frame_3.data
@ -257,12 +253,8 @@ def bench():
source_1.send(test_frame_1)
source_2.send(test_frame_2)
source_3.send(test_frame_3)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0.data + test_frame_1.data + test_frame_2.data + test_frame_3.data
@ -297,10 +289,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0.data + test_frame_1.data + test_frame_2.data + test_frame_3.data
@ -327,18 +316,13 @@ def bench():
source_2.send(test_frame_2b)
source_3.send(test_frame_3a)
source_3.send(test_frame_3b)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0a.data + test_frame_1a.data + test_frame_2a.data + test_frame_3a.data
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0b.data + test_frame_1b.data + test_frame_2b.data + test_frame_3b.data
@ -381,13 +365,12 @@ def bench():
source_3_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0a.data + test_frame_1a.data + test_frame_2a.data + test_frame_3a.data
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0b.data + test_frame_1b.data + test_frame_2b.data + test_frame_3b.data
@ -424,13 +407,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0a.data + test_frame_1a.data + test_frame_2a.data + test_frame_3a.data
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0b.data + test_frame_1b.data + test_frame_2b.data + test_frame_3b.data
@ -450,12 +432,8 @@ def bench():
source_1.send(test_frame_1)
source_2.send(test_frame_2)
source_3.send(test_frame_3)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.data == struct.pack('>H', tag) + test_frame_0.data + test_frame_1.data + test_frame_2.data + test_frame_3.data

View File

@ -234,10 +234,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -247,6 +244,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
@ -273,10 +271,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -286,12 +281,14 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
assert status.data[0][2] == lrx
assert status.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -301,6 +298,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
@ -329,10 +327,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -344,12 +339,14 @@ def bench():
assert rx_frame.last_cycle_user
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
assert status.data[0][2] == lrx
assert status.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -359,6 +356,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)

View File

@ -234,10 +234,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -247,6 +244,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
@ -273,10 +271,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -286,12 +281,14 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
assert status.data[0][2] == lrx
assert status.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -301,6 +298,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
@ -329,10 +327,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -344,12 +339,14 @@ def bench():
assert rx_frame.last_cycle_user
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)
assert status.data[0][2] == lrx
assert status.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -359,6 +356,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield status_sink.wait()
status = status_sink.recv()
assert status.data[0][0] == (lt < lmin)
assert status.data[0][1] == (lt > lmax)

View File

@ -221,12 +221,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -236,6 +231,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -262,12 +258,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -277,12 +268,14 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
assert hdr.data[0][2] == lrx
assert hdr.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -292,6 +285,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -320,12 +314,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -335,6 +324,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -342,6 +332,7 @@ def bench():
assert hdr.data[0][3] == lt
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -351,6 +342,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)

View File

@ -221,12 +221,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -236,6 +231,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -262,12 +258,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -277,12 +268,14 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
assert hdr.data[0][2] == lrx
assert hdr.data[0][3] == lt
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -292,6 +285,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -320,12 +314,7 @@ def bench():
yield wait()
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -335,6 +324,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame1.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)
@ -342,6 +332,7 @@ def bench():
assert hdr.data[0][3] == lt
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
lrx = len(rx_frame.data)
@ -351,6 +342,7 @@ def bench():
assert lrx <= lmax
assert rx_frame.data[:lm] == test_frame2.data[:lm]
yield hdr_sink.wait()
hdr = hdr_sink.recv()
assert hdr.data[0][0] == (lt < lmin)
assert hdr.data[0][1] == (lt > lmax)

View File

@ -143,12 +143,8 @@ def bench():
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10')
source.send(test_frame)
yield clk.posedge
yield ll_eof_out_n.negedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert bytearray(rx_frame) == test_frame
@ -181,10 +177,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield ll_eof_out_n.negedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert bytearray(rx_frame) == test_frame

View File

@ -288,13 +288,8 @@ def bench():
)
source_0.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -317,13 +312,8 @@ def bench():
)
source_1.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -355,17 +345,13 @@ def bench():
source_0.send(test_frame1)
source_0.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -402,13 +388,13 @@ def bench():
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -456,13 +442,13 @@ def bench():
source_3_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -504,13 +490,13 @@ def bench():
sink_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -288,13 +288,8 @@ def bench():
)
source_0.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -317,13 +312,8 @@ def bench():
)
source_1.send(test_frame)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -355,17 +345,13 @@ def bench():
source_0.send(test_frame1)
source_0.send(test_frame2)
yield clk.posedge
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -402,13 +388,13 @@ def bench():
while input_0_axis_tvalid or input_1_axis_tvalid or input_2_axis_tvalid or input_3_axis_tvalid:
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -456,13 +442,13 @@ def bench():
source_3_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -504,13 +490,13 @@ def bench():
sink_pause.next = False
yield clk.posedge
select.next = 2
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2

View File

@ -222,14 +222,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -250,14 +244,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -292,12 +280,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,18 +310,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -378,16 +356,12 @@ def bench():
source_pause.next = False
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -427,16 +401,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -458,14 +428,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -482,6 +446,8 @@ def bench():
rate_num.next = rate[0]
rate_denom.next = rate[1]
yield delay(100)
reset_stats.next = 1
yield clk.posedge
start_time = now()
@ -501,21 +467,19 @@ def bench():
for f in test_frame:
source.send(f)
yield clk.posedge
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
stop_time = now()
rx_frame = []
for i in range(len(lens)):
if not sink.empty():
rx_frame.append(sink.recv())
yield sink.wait()
rx_frame.append(sink.recv())
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
stop_time = now()
assert len(rx_frame) == len(test_frame)

View File

@ -222,14 +222,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -250,14 +244,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -292,12 +280,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -327,18 +310,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -378,16 +356,12 @@ def bench():
source_pause.next = False
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -427,16 +401,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -458,14 +428,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -482,6 +446,8 @@ def bench():
rate_num.next = rate[0]
rate_denom.next = rate[1]
yield delay(100)
reset_stats.next = 1
yield clk.posedge
start_time = now()
@ -501,21 +467,19 @@ def bench():
for f in test_frame:
source.send(f)
yield clk.posedge
yield clk.posedge
while input_axis_tvalid or output_axis_tvalid:
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
stop_time = now()
rx_frame = []
for i in range(len(lens)):
if not sink.empty():
rx_frame.append(sink.recv())
yield sink.wait()
rx_frame.append(sink.recv())
yield clk.posedge
while not input_axis_tready:
yield clk.posedge
stop_time = now()
assert len(rx_frame) == len(test_frame)

View File

@ -176,12 +176,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -202,12 +198,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -242,10 +234,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -275,18 +264,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -326,13 +310,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -372,13 +355,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -400,12 +382,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -176,12 +176,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -202,12 +198,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -242,10 +234,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -275,18 +264,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -326,13 +310,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -372,13 +355,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -400,12 +382,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -180,12 +180,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -205,12 +201,8 @@ def bench():
dest=1)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -245,10 +237,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -278,18 +267,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -329,13 +313,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -375,13 +358,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -403,12 +385,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -434,10 +412,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -180,12 +180,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -205,12 +201,8 @@ def bench():
dest=1)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -245,10 +237,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -278,18 +267,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -329,13 +313,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -375,13 +358,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -403,12 +385,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -434,10 +412,7 @@ def bench():
yield clk.posedge
sink_pause.next = 0
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -176,12 +176,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -202,12 +198,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -242,10 +234,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -275,18 +264,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -326,13 +310,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -372,13 +355,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -400,12 +382,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -176,12 +176,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -202,12 +198,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -242,10 +234,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -275,18 +264,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -326,13 +310,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -372,13 +355,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -400,12 +382,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -432,21 +432,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -471,21 +473,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame3
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame2
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame1
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0
@ -510,21 +514,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -549,21 +555,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_0.wait()
rx_frame1 = sink_0.recv()
assert rx_frame1 == test_frame1
yield sink_0.wait()
rx_frame2 = sink_0.recv()
assert rx_frame2 == test_frame2
yield sink_0.wait()
rx_frame3 = sink_0.recv()
assert rx_frame3 == test_frame3
@ -588,13 +596,13 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1

View File

@ -432,21 +432,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -471,21 +473,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame3
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame2
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame1
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame0
@ -510,21 +514,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1
yield sink_2.wait()
rx_frame2 = sink_2.recv()
assert rx_frame2 == test_frame2
yield sink_3.wait()
rx_frame3 = sink_3.recv()
assert rx_frame3 == test_frame3
@ -549,21 +555,23 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_0.wait()
rx_frame1 = sink_0.recv()
assert rx_frame1 == test_frame1
yield sink_0.wait()
rx_frame2 = sink_0.recv()
assert rx_frame2 == test_frame2
yield sink_0.wait()
rx_frame3 = sink_0.recv()
assert rx_frame3 == test_frame3
@ -588,13 +596,13 @@ def bench():
yield clk.posedge
yield wait()
yield clk.posedge
yield clk.posedge
yield sink_0.wait()
rx_frame0 = sink_0.recv()
assert rx_frame0 == test_frame0
yield sink_1.wait()
rx_frame1 = sink_1.recv()
assert rx_frame1 == test_frame1

View File

@ -177,12 +177,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -203,12 +199,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -238,10 +230,7 @@ def bench():
yield clk.posedge
source_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -271,10 +260,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
@ -304,18 +290,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -355,13 +336,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -401,13 +381,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
@ -429,12 +408,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -177,12 +177,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -203,12 +199,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -238,10 +230,7 @@ def bench():
yield clk.posedge
source_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
@ -271,10 +260,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
@ -304,18 +290,13 @@ def bench():
source.send(test_frame1)
source.send(test_frame2)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -355,13 +336,12 @@ def bench():
source_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
@ -401,13 +381,12 @@ def bench():
sink_pause.next = False
yield clk.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.last_cycle_user
@ -429,12 +408,8 @@ def bench():
)
source.send(test_frame)
yield clk.posedge
yield output_axis_tlast.posedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame

View File

@ -143,12 +143,8 @@ def bench():
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10')
source.send(test_frame)
yield clk.posedge
yield axis_tlast.negedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert bytearray(rx_frame) == test_frame
@ -181,10 +177,7 @@ def bench():
yield clk.posedge
sink_pause.next = False
yield axis_tlast.negedge
yield clk.posedge
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert bytearray(rx_frame) == test_frame