From b6fd9854ac46ac2d1646aeab0d65612424be90f1 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Tue, 18 Jun 2024 10:38:37 -0700 Subject: [PATCH 1/2] fix failing print statement warning about lack of power straps --- hammer/vlsi/hammer_vlsi_impl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hammer/vlsi/hammer_vlsi_impl.py b/hammer/vlsi/hammer_vlsi_impl.py index 7d92e1e7..bcee65f4 100644 --- a/hammer/vlsi/hammer_vlsi_impl.py +++ b/hammer/vlsi/hammer_vlsi_impl.py @@ -964,8 +964,8 @@ def _dump_power_straps_for_hardmacros(self) -> None: copy_fields = ["layer", "direction", "net_order", "width", "spacing", "group_pitch"] if len(above_insts) > 0: # in some cases top_layer == top layer in power strap API above_desc = {k: above_insts[0][k] for k in copy_fields} - elif not check_abut: - self.logger.error(f"par.power_straps_abutment is False, but you do not have power straps generated on layer {above_insts[0]['layer']} above instances of module {master}! Double check that you will supply power to them.") + elif len(insts) > 0 and not check_abut: + self.logger.error(f"par.power_straps_abutment is False, but you do not have power straps generated on layer {insts[0]['layer']} above instances of module {master}! Double check that you will supply power to them.") # Filter for top_layer == layer and valid/bad orientation abut_insts = list(filter(lambda m: m["top_layer"] == m["layer"] and From 7e44932673de5addc5c50c8aa45a8d40dcf96190 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Tue, 18 Jun 2024 10:56:08 -0700 Subject: [PATCH 2/2] update wording --- hammer/vlsi/hammer_vlsi_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hammer/vlsi/hammer_vlsi_impl.py b/hammer/vlsi/hammer_vlsi_impl.py index bcee65f4..b0b2396e 100644 --- a/hammer/vlsi/hammer_vlsi_impl.py +++ b/hammer/vlsi/hammer_vlsi_impl.py @@ -965,7 +965,7 @@ def _dump_power_straps_for_hardmacros(self) -> None: if len(above_insts) > 0: # in some cases top_layer == top layer in power strap API above_desc = {k: above_insts[0][k] for k in copy_fields} elif len(insts) > 0 and not check_abut: - self.logger.error(f"par.power_straps_abutment is False, but you do not have power straps generated on layer {insts[0]['layer']} above instances of module {master}! Double check that you will supply power to them.") + self.logger.error(f"par.power_straps_abutment is False, but power straps for instances of module {master} are being generated on layer {insts[0]['layer']}, which is the same as the module's top layer! Double check that you will supply power to these instances.") # Filter for top_layer == layer and valid/bad orientation abut_insts = list(filter(lambda m: m["top_layer"] == m["layer"] and