From: Luke Kenneth Casson Leighton Date: Sun, 9 Aug 2020 21:33:50 +0000 (+0100) Subject: stop combinatorial loop in pi2ls X-Git-Tag: semi_working_ecp5~412^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45ab53802fef8e922a8b3a80f1db6c5d0b679434;p=soc.git stop combinatorial loop in pi2ls --- 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