projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec80f0f
)
sim/core: truncate evaluated values before test in If
author
Sebastien Bourdeauducq
<sb@m-labs.hk>
Mon, 19 Oct 2015 07:58:21 +0000
(15:58 +0800)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Mon, 19 Oct 2015 07:58:21 +0000
(15:58 +0800)
migen/sim/core.py
patch
|
blob
|
history
diff --git
a/migen/sim/core.py
b/migen/sim/core.py
index 0de231f294da24d30f72bf2114993a22f853f837..af3f3734f97debc4bb3184c97ee78af32c9e75fb 100644
(file)
--- a/
migen/sim/core.py
+++ b/
migen/sim/core.py
@@
-181,7
+181,7
@@
class Evaluator:
if isinstance(s, _Assign):
self.assign(s.l, self.eval(s.r))
elif isinstance(s, If):
- if self.eval(s.cond):
+ if self.eval(s.cond)
& (2**len(s.cond) - 1)
:
self.execute(s.t)
else:
self.execute(s.f)