projects
/
nmutil.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22bb7e4
)
add docstring to latchregister
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 4 May 2020 12:53:05 +0000
(13:53 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Mon, 4 May 2020 12:53:05 +0000
(13:53 +0100)
src/nmutil/latch.py
patch
|
blob
|
history
diff --git
a/src/nmutil/latch.py
b/src/nmutil/latch.py
index 7d6a1efe22c881585a626e397590337186f6ef1b..1c22483a49b93cfdbeeecb4cb97e40cae2e8b4f3 100644
(file)
--- a/
src/nmutil/latch.py
+++ b/
src/nmutil/latch.py
@@
-22,6
+22,15
@@
endmodule
"""
def latchregister(m, incoming, outgoing, settrue, name=None):
"""
def latchregister(m, incoming, outgoing, settrue, name=None):
+ """latchregister
+
+ based on a conditon, "settrue", incoming data will be "latched"
+ into a register and passed out on "outgoing".
+
+ * if "settrue" is ASSERTED, outgoing is COMBINATORIALLY equal to incoming
+ * on the same cycle that settrue is DEASSERTED, outgoing REMAINS
+ equal (indefinitely) to the incoming value
+ """
# make reg same as input. reset OK.
if isinstance(incoming, Record):
reg = Record.like(incoming, name=name)
# make reg same as input. reset OK.
if isinstance(incoming, Record):
reg = Record.like(incoming, name=name)