projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ec6429
)
Fix a segfault in dffinit when the value has too few bits
author
Marcus Comstedt
<marcus@mc.pp.se>
Sun, 8 Nov 2015 18:16:56 +0000
(19:16 +0100)
committer
Marcus Comstedt
<marcus@mc.pp.se>
Sun, 8 Nov 2015 18:16:56 +0000
(19:16 +0100)
The code was already trying to add the required number of bits, but
fell one short of the mark.
passes/techmap/dffinit.cc
patch
|
blob
|
history
diff --git
a/passes/techmap/dffinit.cc
b/passes/techmap/dffinit.cc
index 6a80f043b871454558ac5e924b6aea2b79bb8523..e0273f439de1897bac5e547a8105f54f64dff9c1 100644
(file)
--- a/
passes/techmap/dffinit.cc
+++ b/
passes/techmap/dffinit.cc
@@
-100,7
+100,7
@@
struct DffinitPass : public Pass {
for (int i = 0; i < GetSize(sig); i++) {
if (init_bits.count(sig[i]) == 0)
continue;
- while (GetSize(value.bits) < i)
+ while (GetSize(value.bits) <
=
i)
value.bits.push_back(State::S0);
value.bits[i] = init_bits.at(sig[i]);
cleanup_bits.insert(sig[i]);