From 1e0c6d6d5dfffdf67ff9c5152eda956324a9739a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 30 Sep 2016 11:25:06 +0800 Subject: [PATCH] drtio: monitor received link_init --- artiq/gateware/drtio/link_layer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/artiq/gateware/drtio/link_layer.py b/artiq/gateware/drtio/link_layer.py index 65cab5e9c..47bcf9336 100644 --- a/artiq/gateware/drtio/link_layer.py +++ b/artiq/gateware/drtio/link_layer.py @@ -256,9 +256,13 @@ class LinkLayer(Module): tx.link_init.eq(1), tx.signal_rx_ready.eq(1), If(rx.remote_rx_ready, - NextState("READY") + NextState("WAIT_REMOTE_LINK_UP") ) ) + fsm.act("WAIT_REMOTE_LINK_UP", + If(~rx.link_init, NextState("READY")) + ) fsm.act("READY", + If(rx.link_init, NextState("RESET_RX")), self.ready.eq(1) )