mirror of https://github.com/YosysHQ/yosys.git
cxxrtl: fix handling of 0-bit variables in `vcd_writer.sample()`.
This commit is contained in:
parent
0f762f75a6
commit
f953a516d0
|
@ -127,6 +127,8 @@ class vcd_writer {
|
||||||
bool bit_curr = var.curr[bit / (8 * sizeof(chunk_t))] & (1 << (bit % (8 * sizeof(chunk_t))));
|
bool bit_curr = var.curr[bit / (8 * sizeof(chunk_t))] & (1 << (bit % (8 * sizeof(chunk_t))));
|
||||||
buffer += (bit_curr ? '1' : '0');
|
buffer += (bit_curr ? '1' : '0');
|
||||||
}
|
}
|
||||||
|
if (var.width == 0)
|
||||||
|
buffer += '0';
|
||||||
buffer += ' ';
|
buffer += ' ';
|
||||||
emit_ident(var.ident);
|
emit_ident(var.ident);
|
||||||
buffer += '\n';
|
buffer += '\n';
|
||||||
|
|
Loading…
Reference in New Issue