From 45ab53802fef8e922a8b3a80f1db6c5d0b679434 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 9 Aug 2020 22:33:50 +0100 Subject: [PATCH] stop combinatorial loop in pi2ls --- src/soc/experiment/pi2ls.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/soc/experiment/pi2ls.py b/src/soc/experiment/pi2ls.py index 3c421c2e..501eb55c 100644 --- a/src/soc/experiment/pi2ls.py +++ b/src/soc/experiment/pi2ls.py @@ -97,12 +97,12 @@ class Pi2LSUI(PortInterfaceBase): with m.If(~self.valid_l.q): m.next = "IDLE" - # indicate valid at both ends - m.d.comb += self.lsui.m_valid_i.eq(self.valid_l.q) - m.d.comb += self.lsui.x_valid_i.eq(self.valid_l.q) + # indicate valid at both ends. OR with lsui_busy (stops comb loop) + m.d.comb += self.lsui.m_valid_i.eq(self.valid_l.q | self.lsui_busy) + m.d.comb += self.lsui.x_valid_i.eq(self.valid_l.q | self.lsui_busy) - # reset the valid latch when not busy - m.d.comb += self.valid_l.r.eq(~self.lsui_busy)#~pi.busy_o) # self.lsui.x_busy_o) + # reset the valid latch when not busy. sync to stop loop + m.d.sync += self.valid_l.r.eq(~self.lsui_busy) return m -- 2.30.2