diff --git a/tb/ip_ep.py b/tb/ip_ep.py index 46a63f17..ab216fe3 100644 --- a/tb/ip_ep.py +++ b/tb/ip_ep.py @@ -420,6 +420,10 @@ def IPFrameSink(clk, rst, frame.payload = ip_payload_fifo.get() fifo.put(frame) + # ensure all payloads have been matched to headers + if ip_header_fifo.empty(): + assert ip_payload_fifo.empty() + if name is not None: print("[%s] Got frame %s" % (name, repr(frame))) diff --git a/tb/udp_ep.py b/tb/udp_ep.py index c814cc4c..aac2f1bc 100644 --- a/tb/udp_ep.py +++ b/tb/udp_ep.py @@ -519,6 +519,10 @@ def UDPFrameSink(clk, rst, frame.payload = udp_payload_fifo.get() fifo.put(frame) + # ensure all payloads have been matched to headers + if udp_header_fifo.empty(): + assert udp_payload_fifo.empty() + if name is not None: print("[%s] Got frame %s" % (name, repr(frame)))