projects
/
nmutil.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fcb421
)
return latchregister results so that it can be further set/modified
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 8 Nov 2021 23:33:02 +0000
(23:33 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 8 Nov 2021 23:33:02 +0000
(23:33 +0000)
src/nmutil/latch.py
patch
|
blob
|
history
diff --git
a/src/nmutil/latch.py
b/src/nmutil/latch.py
index 908c15cecf7ea77c955047934fa59704481adb9a..5cf50bccb7fbff2f7a6b5bfe166ee2abf73dc33c 100644
(file)
--- 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):