forked from M-Labs/artiq
1
0
Fork 0

drtio: forward errors to CSR

This commit is contained in:
Sebastien Bourdeauducq 2016-10-26 22:03:05 +08:00
parent 7f8e53aa5c
commit 45621934fd
1 changed files with 9 additions and 0 deletions

View File

@ -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()