projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ee1759
)
Fix handling of partial init attributes in write_verilog, fixes #997
author
Clifford Wolf
<clifford@clifford.at>
Tue, 7 May 2019 17:55:36 +0000
(19:55 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Tue, 7 May 2019 17:55:36 +0000
(19:55 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
backends/verilog/verilog_backend.cc
patch
|
blob
|
history
diff --git
a/backends/verilog/verilog_backend.cc
b/backends/verilog/verilog_backend.cc
index 9fd4ccbc8bcc6016ea13687552961efafeda4c0e..827af5d85c4061c3b7d7a5c08dbca87922d5918c 100644
(file)
--- a/
backends/verilog/verilog_backend.cc
+++ b/
backends/verilog/verilog_backend.cc
@@
-1618,7
+1618,8
@@
void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module)
SigSpec sig = active_sigmap(wire);
Const val = wire->attributes.at("\\init");
for (int i = 0; i < GetSize(sig) && i < GetSize(val); i++)
- active_initdata[sig[i]] = val.bits.at(i);
+ if (val[i] == State::S0 || val[i] == State::S1)
+ active_initdata[sig[i]] = val[i];
}
if (!module->processes.empty())