forked from M-Labs/artiq
drtio: improve repeater error reports
This commit is contained in:
parent
420e1cb1d0
commit
0befec7d26
@ -124,11 +124,13 @@ impl Repeater {
|
||||
error!("[REP#{}] received truncated packet", repno);
|
||||
}
|
||||
if errors & 4 != 0 {
|
||||
let cmd;
|
||||
let chan_sel;
|
||||
unsafe {
|
||||
cmd = (csr::DRTIOREP[repno].command_missed_cmd_read)();
|
||||
chan_sel = (csr::DRTIOREP[repno].command_missed_chan_sel_read)();
|
||||
}
|
||||
error!("[REP#{}] CRI command missed, chan_sel=0x{:06x}", repno, chan_sel)
|
||||
error!("[REP#{}] CRI command missed, cmd={}, chan_sel=0x{:06x}", repno, cmd, chan_sel)
|
||||
}
|
||||
if errors & 8 != 0 {
|
||||
let destination;
|
||||
|
@ -10,6 +10,7 @@ class RTController(Module, AutoCSR):
|
||||
def __init__(self, rt_packet):
|
||||
self.set_time = CSR()
|
||||
self.protocol_error = CSR(4)
|
||||
self.command_missed_cmd = CSRStatus(2)
|
||||
self.command_missed_chan_sel = CSRStatus(24)
|
||||
self.buffer_space_timeout_dest = CSRStatus(8)
|
||||
|
||||
@ -28,7 +29,8 @@ class RTController(Module, AutoCSR):
|
||||
(rt_packet.err_unknown_packet_type, "rtio_rx", None, None),
|
||||
(rt_packet.err_packet_truncated, "rtio_rx", None, None),
|
||||
(rt_packet.err_command_missed, "rtio",
|
||||
rt_packet.cri.chan_sel, self.command_missed_chan_sel.status),
|
||||
Cat(rt_packet.command_missed_cmd, rt_packet.command_missed_chan_sel),
|
||||
Cat(self.command_missed_cmd.status, self.command_missed_chan_sel.status)),
|
||||
(rt_packet.err_buffer_space_timeout, "rtio",
|
||||
rt_packet.buffer_space_destination, self.buffer_space_timeout_dest.status)
|
||||
]
|
||||
|
@ -19,6 +19,8 @@ class RTPacketRepeater(Module):
|
||||
|
||||
# in rtio domain
|
||||
self.err_command_missed = Signal()
|
||||
self.command_missed_cmd = Signal(2)
|
||||
self.command_missed_chan_sel = Signal(24)
|
||||
self.err_buffer_space_timeout = Signal()
|
||||
self.buffer_space_destination = Signal(8)
|
||||
|
||||
@ -103,7 +105,11 @@ class RTPacketRepeater(Module):
|
||||
|
||||
# Missed commands
|
||||
cri_ready = Signal()
|
||||
self.sync.rtio += self.err_command_missed.eq(~cri_ready & (self.cri.cmd != cri.commands["nop"]))
|
||||
self.sync.rtio += [
|
||||
self.err_command_missed.eq(~cri_ready & (self.cri.cmd != cri.commands["nop"])),
|
||||
self.command_missed_chan_sel.eq(self.cri.chan_sel),
|
||||
self.command_missed_cmd.eq(self.cri.cmd)
|
||||
]
|
||||
|
||||
# TX FSM
|
||||
tx_fsm = ClockDomainsRenamer("rtio")(FSM(reset_state="IDLE"))
|
||||
|
Loading…
Reference in New Issue
Block a user