projects
/
nmutil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
return latchregister results so that it can be further set/modified
[nmutil.git]
/
src
/
nmutil
/
latch.py
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):