projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b32f06d
)
only process data if the input strobe is valid
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 13 Mar 2019 04:26:24 +0000
(
04:26
+0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 13 Mar 2019 04:26:24 +0000
(
04:26
+0000)
src/add/example_buf_pipe.py
patch
|
blob
|
history
diff --git
a/src/add/example_buf_pipe.py
b/src/add/example_buf_pipe.py
index 337ce50e9c39921421d625fee9f2361c1b2fae85..fa52f3c70551abe1ebacff864fee96bed8bdbd5a 100644
(file)
--- a/
src/add/example_buf_pipe.py
+++ b/
src/add/example_buf_pipe.py
@@
-40,7
+40,6
@@
"""
from nmigen import Signal, Cat, Const, Mux, Module
-from nmigen.compat.sim import run_simulation
from nmigen.cli import verilog, rtlil
class BufPipe:
@@
-92,7
+91,8
@@
class BufPipe:
# store result of processing in combinatorial temporary
result = Signal(32)
- m.d.comb += result.eq(self.process(self.i_data))
+ with m.If(self.i_p_stb): # input is valid: process it
+ m.d.comb += result.eq(self.process(self.i_data))
with m.If(o_p_busyn): # not stalled
m.d.sync += self.r_data.eq(result)