Closed jfng closed 1 month ago
Actually, it may be better to emit a scalar value of 0 instead. If a VCD variable has no samples, GTKWave gives it the type "real" and the value "nan", which is confusing.
Actually, it may be better to emit a scalar value of 0 instead.
Yeah, sounds reasonable.
I changed it to emit a vector value of 0 instead (eg. b0 !
).
Now, both Surfer and GTKWave show a 0. Otherwise, GTKWave would show an "X" for a scalar value of a variable that isn't 1-bit.
Before this commit,
vcd_writer.sample()
emits vector values for 0-bit variables.For example, the following RTLIL:
would result in the following VCD:
However, according to IEEE 1364-2001, the syntax for vector values is:
After this commit,
foo
is no longer sampled in the VCD: