From: Luke Kenneth Casson Leighton Date: Mon, 8 Nov 2021 23:33:02 +0000 (+0000) Subject: return latchregister results so that it can be further set/modified X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8a17073490ef89d6df2a15e8e3eeaacdd8ccd65;p=nmutil.git return latchregister results so that it can be further set/modified --- diff --git a/src/nmutil/latch.py b/src/nmutil/latch.py index 908c15c..5cf50bc 100644 --- a/src/nmutil/latch.py +++ b/src/nmutil/latch.py @@ -47,6 +47,7 @@ def latchregister(m, incoming, outgoing, settrue, name=None): m.d.comb += outgoing.eq(Mux(settrue, incoming, reg)) with m.If(settrue): # pass in some kind of expression/condition here m.d.sync += reg.eq(incoming) # latch input into register + return reg def mkname(prefix, suffix):