fix rtlil const formatting

This commit is contained in:
NotAFile 2022-04-06 00:09:12 +02:00
parent 83540e898a
commit e08e9ccdf2
1 changed files with 1 additions and 1 deletions

View File

@ -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(())