From 1cb05f3ed50ed3c9cbc83a64f507db83187ad1d4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Sep 2017 10:51:44 +0800 Subject: [PATCH] rtio/sed/LaneDistributor: persist underflow/sequence error until next write --- artiq/gateware/rtio/sed/lane_distributor.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/artiq/gateware/rtio/sed/lane_distributor.py b/artiq/gateware/rtio/sed/lane_distributor.py index c58dfeb6d..a65521028 100644 --- a/artiq/gateware/rtio/sed/lane_distributor.py +++ b/artiq/gateware/rtio/sed/lane_distributor.py @@ -102,8 +102,16 @@ class LaneDistributor(Module): o_status_wait.eq(~current_lane_writable) ] self.sync += [ - o_status_underflow.eq(do_underflow), - o_status_sequence_error.eq(do_sequence_error) + If(self.cri.cmd == cri.commands["write"], + o_status_underflow.eq(0), + o_status_sequence_error.eq(0) + ), + If(do_underflow, + o_status_underflow.eq(1) + ), + If(do_sequence_error, + o_status_sequence_error.eq(1) + ) ] # current lane has been full, spread events by switching to the next.