forked from M-Labs/artiq
1
0
Fork 0

drtio: fix link error generation

This commit is contained in:
Sebastien Bourdeauducq 2018-03-04 23:20:13 +08:00
parent d747d74cb3
commit 6aaa8bf9d9
1 changed files with 3 additions and 7 deletions

View File

@ -63,11 +63,6 @@ class RTController(Module):
self.comb += self.cd_rtio_with_rst.clk.eq(ClockSignal("rtio")) self.comb += self.cd_rtio_with_rst.clk.eq(ClockSignal("rtio"))
self.specials += AsyncResetSynchronizer(self.cd_rtio_with_rst, local_reset) self.specials += AsyncResetSynchronizer(self.cd_rtio_with_rst, local_reset)
self.comb += [
self.cri.o_status[2].eq(~self.csrs.link_up.storage),
self.cri.i_status[3].eq(~self.csrs.link_up.storage)
]
# protocol errors # protocol errors
err_unknown_packet_type = Signal() err_unknown_packet_type = Signal()
err_packet_truncated = Signal() err_packet_truncated = Signal()
@ -126,7 +121,7 @@ class RTController(Module):
o_status_underflow = Signal() o_status_underflow = Signal()
self.comb += [ self.comb += [
self.cri.o_status.eq(Cat( self.cri.o_status.eq(Cat(
o_status_wait, o_status_underflow)), o_status_wait, o_status_underflow, ~self.csrs.link_up.storage)),
self.csrs.o_wait.status.eq(o_status_wait) self.csrs.o_wait.status.eq(o_status_wait)
] ]
o_underflow_set = Signal() o_underflow_set = Signal()
@ -151,7 +146,8 @@ class RTController(Module):
i_status_overflow = Signal() i_status_overflow = Signal()
i_status_wait_status = Signal() i_status_wait_status = Signal()
self.comb += self.cri.i_status.eq(Cat( self.comb += self.cri.i_status.eq(Cat(
i_status_wait_event, i_status_overflow, i_status_wait_status)) i_status_wait_event, i_status_overflow, i_status_wait_status,
~self.csrs.link_up.storage))
load_read_reply = Signal() load_read_reply = Signal()
self.sync.sys_with_rst += [ self.sync.sys_with_rst += [