From b6fd9854ac46ac2d1646aeab0d65612424be90f1 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Tue, 18 Jun 2024 10:38:37 -0700 Subject: [PATCH] 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 7d92e1e74..bcee65f47 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