mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1203 from whitequark/write_verilog-zero-width-values
write_verilog: dump zero width constants correctly
This commit is contained in:
commit
927f0caa9d
|
@ -189,7 +189,8 @@ void dump_const(std::ostream &f, const RTLIL::Const &data, int width = -1, int o
|
|||
if (width < 0)
|
||||
width = data.bits.size() - offset;
|
||||
if (width == 0) {
|
||||
f << "\"\"";
|
||||
// See IEEE 1364-2005 Clause 5.1.14.
|
||||
f << "{0{1'b0}}";
|
||||
return;
|
||||
}
|
||||
if (nostr)
|
||||
|
|
Loading…
Reference in New Issue