From 666b9214d01460024ece9edebb61986b7d084633 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 25 Jun 2026 16:50:43 -0700 Subject: [PATCH] LibertyWriter::writeBusDcls() resolves #436 Signed-off-by: James Cherry --- liberty/LibertyWriter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liberty/LibertyWriter.cc b/liberty/LibertyWriter.cc index ab8b8177..695b2ccb 100644 --- a/liberty/LibertyWriter.cc +++ b/liberty/LibertyWriter.cc @@ -275,7 +275,7 @@ LibertyWriter::writeBusDcls() sta::print(stream_, " type (\"{}\") {{\n", dcl->name()); sta::print(stream_, " base_type : array;\n"); sta::print(stream_, " data_type : bit;\n"); - sta::print(stream_, " bit_width : {};\n", std::abs(dcl->from() - dcl->to() + 1)); + sta::print(stream_, " bit_width : {};\n", std::abs(dcl->from() - dcl->to()) + 1); sta::print(stream_, " bit_from : {};\n", dcl->from()); sta::print(stream_, " bit_to : {};\n", dcl->to()); sta::print(stream_, " }}\n");