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