forked from M-Labs/artiq
drtio: forward errors to CSR
This commit is contained in:
parent
7f8e53aa5c
commit
45621934fd
|
@ -32,6 +32,9 @@ class _KernelCSRs(AutoCSR):
|
||||||
self.o_dbg_last_timestamp = CSRStatus(64)
|
self.o_dbg_last_timestamp = CSRStatus(64)
|
||||||
self.o_reset_channel_status = CSR()
|
self.o_reset_channel_status = CSR()
|
||||||
|
|
||||||
|
self.err_present = CSR()
|
||||||
|
self.err_code = CSRStatus(8)
|
||||||
|
|
||||||
|
|
||||||
class RTController(Module):
|
class RTController(Module):
|
||||||
def __init__(self, rt_packets, channel_count, fine_ts_width):
|
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):
|
def get_csrs(self):
|
||||||
return self.kcsrs.get_csrs()
|
return self.kcsrs.get_csrs()
|
||||||
|
|
Loading…
Reference in New Issue