projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db10275
)
Fixed a bug in opt_const when optimizing 1-bit compares with constants
author
Clifford Wolf
<clifford@clifford.at>
Sat, 13 Apr 2013 19:18:24 +0000
(21:18 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Sat, 13 Apr 2013 19:18:24 +0000
(21:18 +0200)
passes/opt/opt_const.cc
patch
|
blob
|
history
diff --git
a/passes/opt/opt_const.cc
b/passes/opt/opt_const.cc
index 0effd964b503e4710b9d470076bbcc7b0f93096f..7c82f0fcb5a1878ad0c32b28cc1d86a516572c3e 100644
(file)
--- a/
passes/opt/opt_const.cc
+++ b/
passes/opt/opt_const.cc
@@
-181,8
+181,10
@@
void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module)
RTLIL::SigSpec b = assign_map(cell->connections["\\B"]);
if (a.is_fully_const()) {
- RTLIL::SigSpec tmp = a;
- a = b, b = tmp;
+ RTLIL::SigSpec tmp;
+ tmp = a, a = b, b = tmp;
+ cell->connections["\\A"] = a;
+ cell->connections["\\B"] = b;
}
if (b.is_fully_const()) {