From 251d90c3d5c44e301a588c82c0dc0527da7b4cf1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 20 Sep 2018 08:53:45 +0800 Subject: [PATCH] drtio: clear read request in satellite only after reply has been fully sent Otherwise, chan_sel become invalid before the end of the packet, which can cause the interconnect to invalidate i_timestamp and i_data which results in corruption of the end of the packet. --- artiq/gateware/drtio/rt_packet_satellite.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/artiq/gateware/drtio/rt_packet_satellite.py b/artiq/gateware/drtio/rt_packet_satellite.py index a045c020d..557640749 100644 --- a/artiq/gateware/drtio/rt_packet_satellite.py +++ b/artiq/gateware/drtio/rt_packet_satellite.py @@ -227,16 +227,14 @@ class RTPacketSatellite(Module): tx_fsm.act("READ_OVERFLOW", tx_dp.send("read_reply_noevent", overflow=1), clear_read_request.eq(1), - If(tx_dp.packet_last, - NextState("IDLE") - ) + If(tx_dp.packet_last, NextState("IDLE")) ) tx_fsm.act("READ", tx_dp.send("read_reply", timestamp=self.cri.i_timestamp, data=self.cri.i_data), - clear_read_request.eq(1), If(tx_dp.packet_last, + clear_read_request.eq(1), NextState("IDLE") ) )