From 45621934fd404fc5374c89b4d2de4824ca094bf7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 26 Oct 2016 22:03:05 +0800 Subject: [PATCH] drtio: forward errors to CSR --- artiq/gateware/drtio/rt_controller.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/gateware/drtio/rt_controller.py b/artiq/gateware/drtio/rt_controller.py index e0efafcd7..fca4d75f4 100644 --- a/artiq/gateware/drtio/rt_controller.py +++ b/artiq/gateware/drtio/rt_controller.py @@ -32,6 +32,9 @@ class _KernelCSRs(AutoCSR): self.o_dbg_last_timestamp = CSRStatus(64) self.o_reset_channel_status = CSR() + self.err_present = CSR() + self.err_code = CSRStatus(8) + class RTController(Module): def __init__(self, rt_packets, channel_count, fine_ts_width): @@ -164,5 +167,11 @@ class RTController(Module): ) ] + self.comb += [ + self.kcsrs.err_present.w.eq(rt_packets.error_not), + rt_packets.error_not_ack.eq(self.kcsrs.err_present.re), + self.kcsrs.err_code.status.eq(rt_packets.error_code) + ] + def get_csrs(self): return self.kcsrs.get_csrs()