Skip to content

Commit f1423f3

Browse files
committed
style: improve error messages in the Cocotb MFB monitor considering duplicit SOFs and EOFs
1 parent 84a975b commit f1423f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/cocotbext/cocotbext/ofm/mfb/monitors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ async def _monitor_recv(self):
102102
# Checking for beginning of a packet.
103103
self.log.debug("Frame Start")
104104
if in_frame:
105-
raise MFBProtocolError("Duplicate start-of-frame received on MFB bus!")
105+
raise MFBProtocolError("MFB error: a start-of-frame received without an end-of-frame!")
106106
in_frame = True
107107
frame = b""
108108

109109
if (self._eof_arr[rr] == 1) and (not eof_done):
110110
# Checking if the packet ends in the same regions where it began.
111111
self.log.debug("Frame End in single region")
112112
if not in_frame:
113-
raise MFBProtocolError("Duplicate end-of-frame received on MFB bus!")
113+
raise MFBProtocolError("MFB error: an end-of-frame received without a start-of-frame!")
114114
in_frame = False
115115
frame += data_bytes[ss_idx:ee_idx]
116116
self.item_cnt += len(data_bytes[ss_idx:ee_idx])*8 // self._item_width

0 commit comments

Comments
 (0)