Browse Source

fix rtlil const formatting

main
NotAFile 4 months ago
parent
commit
e08e9ccdf2
  1. 2
      src/rtlil.rs

2
src/rtlil.rs

@ -63,7 +63,7 @@ impl SigSpec {
impl std::fmt::Display for SigSpec {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
SigSpec::Const(val, width) => write!(f, "{}'{}", width, val)?,
SigSpec::Const(val, width) => write!(f, "{0}'{2:01$b}", width, *width as usize, val)?,
SigSpec::Wire(id) => write!(f, "{}", id)?,
};
Ok(())

Loading…
Cancel
Save