vcd: single bit signals have no spaces in their value changes

This commit is contained in:
Jacob Lifshay 2024-12-01 20:12:43 -08:00
parent 12b3ba57f1
commit 5e0548db26
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
2 changed files with 3 additions and 3 deletions

View file

@ -477,7 +477,7 @@ impl<W: io::Write> TraceWriter for VcdWriter<W> {
fn set_signal_uint(&mut self, id: TraceScalarId, value: &BitSlice) -> Result<(), Self::Error> {
match value.len() {
0 => self.writer.write_all(b"s0 ")?,
1 => write!(self.writer, "{} ", if value[0] { "1" } else { "0" })?,
1 => self.writer.write_all(if value[0] { b"1" } else { b"0" })?,
_ => {
self.writer.write_all(b"b")?;
let mut any_ones = false;

View file

@ -185,8 +185,8 @@ $var wire 1 " bit_out $end
$upscope $end
$enddefinitions $end
$dumpvars
1 !
1 "
1!
1"
$end
#1000000
"# {