3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-05 09:04:08 +00:00

cxxrtl: fix handling of 0-bit variables in vcd_writer.sample().

This commit is contained in:
Jean-François Nguyen 2024-10-11 23:24:13 +02:00 committed by Catherine
parent 0f762f75a6
commit f953a516d0

View file

@ -127,6 +127,8 @@ class vcd_writer {
bool bit_curr = var.curr[bit / (8 * sizeof(chunk_t))] & (1 << (bit % (8 * sizeof(chunk_t))));
buffer += (bit_curr ? '1' : '0');
}
if (var.width == 0)
buffer += '0';
buffer += ' ';
emit_ident(var.ident);
buffer += '\n';