projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6d5a0e
)
put internal state out as part of latch api
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 24 May 2019 16:50:18 +0000
(17:50 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 24 May 2019 16:50:18 +0000
(17:50 +0100)
src/nmutil/latch.py
patch
|
blob
|
history
diff --git
a/src/nmutil/latch.py
b/src/nmutil/latch.py
index 6cf5ab7ec93e5de0752cdfd2cf00f56c4edf7d8c..0833ae61b5a7137e5483b8e41d5884fb4273c824 100644
(file)
--- a/
src/nmutil/latch.py
+++ b/
src/nmutil/latch.py
@@
-33,14
+33,15
@@
def latchregister(m, incoming, outgoing, settrue):
class SRLatch(Elaboratable):
def __init__(self, sync=True):
self.sync = sync
- self.s = Signal(reset
_less=True
)
- self.r = Signal(reset
_less=True)
+ self.s = Signal(reset
=0
)
+ self.r = Signal(reset
=1) # defaults to off
self.q = Signal(reset_less=True)
self.qn = Signal(reset_less=True)
+ self.qlq = Signal()
def elaborate(self, platform):
m = Module()
- q_int =
Signal(reset_less=True)
+ q_int =
self.qlq
if self.sync:
with m.If(self.s):