projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f60ddb
)
Simplify waiting loops
author
Cesar Strauss
<cestrauss@gmail.com>
Mon, 6 Jul 2020 10:49:05 +0000
(07:49 -0300)
committer
Cesar Strauss
<cestrauss@gmail.com>
Mon, 6 Jul 2020 10:49:05 +0000
(07:49 -0300)
src/soc/experiment/alu_hier.py
patch
|
blob
|
history
diff --git
a/src/soc/experiment/alu_hier.py
b/src/soc/experiment/alu_hier.py
index c01b7f8a4185d92bbf6abdd6a2c9077d72e8636f..d18f195ad5dbbe2b8987c403a5f9a75962eb75c4 100644
(file)
--- a/
src/soc/experiment/alu_hier.py
+++ b/
src/soc/experiment/alu_hier.py
@@
-413,20
+413,13
@@
def run_op(dut, a, b, op, inv_a=0):
yield
# wait for the ALU to accept our input data
- while True:
- rdy = yield dut.p.ready_o
- if rdy:
- break
+ while not (yield dut.p.ready_o):
yield
yield dut.p.valid_i.eq(0)
# wait for the ALU to present the output data
- while True:
- yield Settle()
- vld = yield dut.n.valid_o
- if vld:
- break
+ while not (yield dut.n.valid_o):
yield
# latch the result and lower read_i