From dcc3fac2aaf2de62f8dac109b77fd0e6acd61c2d Mon Sep 17 00:00:00 2001 From: morgan Date: Fri, 20 Sep 2024 12:44:20 +0800 Subject: [PATCH] cxp GW: add packet_type & decode_error csr --- src/gateware/cxp.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gateware/cxp.py b/src/gateware/cxp.py index 177287b..7c81049 100644 --- a/src/gateware/cxp.py +++ b/src/gateware/cxp.py @@ -51,6 +51,14 @@ class DownConn_Interface(Module, AutoCSR): for s, d in zip(rx_pipeline, rx_pipeline[1:]): self.comb += s.source.connect(d.sink) + + self.packet_type = CSRStatus(8) + self.decode_error = CSRStatus() + self.comb += [ + self.packet_type.status.eq(recv_path.packet_decoder.packet_type), + self.decode_error.status.eq(recv_path.packet_decoder.decode_err), + ] + # DEBUG: CSR self.trig_ack = CSRStatus() self.trig_clr = CSR()