X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fnmutil%2Flatch.py;h=7d6a1efe22c881585a626e397590337186f6ef1b;hb=HEAD;hp=e25050867aab9825f0d7541d6444cec2a310995e;hpb=a5d3936b335ceaef952a53e98b06bd5dcdc1f295;p=nmutil.git diff --git a/src/nmutil/latch.py b/src/nmutil/latch.py index e250508..e2d7541 100644 --- a/src/nmutil/latch.py +++ b/src/nmutil/latch.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: LGPL-3-or-later """ This work is funded through NLnet under Grant 2019-02-012 @@ -45,7 +46,7 @@ def latchregister(m, incoming, outgoing, settrue, name=None): else: reg = Signal.like(incoming, name=name) m.d.comb += outgoing.eq(Mux(settrue, incoming, reg)) - with m.If(settrue): # pass in some kind of expression/condition here + with m.If(settrue): # pass in some kind of expression/condition here m.d.sync += reg.eq(incoming) # latch input into register return reg @@ -65,7 +66,7 @@ class SRLatch(Elaboratable): qint = mkname("qint", name) qlq_n = mkname("qlq", name) self.s = Signal(llen, name=s_n, reset=0) - self.r = Signal(llen, name=r_n, reset=(1<