From 68c9c882d5fb1c40ae6a74c8f3534764d12344b0 Mon Sep 17 00:00:00 2001 From: Ned Bingham Date: Tue, 16 Apr 2024 16:15:14 -0400 Subject: [PATCH] fixing via support --- rect | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rect b/rect index 05d2572..e95ca48 100755 --- a/rect +++ b/rect @@ -59,11 +59,26 @@ def queryGDS(conf, rectLayer): gds = conf["materials"][rectLayer]["gds"] if "gds_bloat" in conf["materials"][rectLayer]: gds_bloat = conf["materials"][rectLayer]["gds_bloat"] - else: + elif rectLayer in conf["materials"]["metal"]: if rectLayer+"_gds" in conf["materials"]["metal"]: gds = conf["materials"]["metal"][rectLayer+"_gds"] if rectLayer+"_gds_bloat" in conf["materials"]["metal"]: gds_bloat = conf["materials"]["metal"][rectLayer+"_gds_bloat"] + else: + subkey = "" + for key, value in conf["vias"].items(): + if key.endswith("_name"): + if value == rectLayer: + subkey = key[0:-5] + break + if subkey != "": + if subkey+"_gds" in conf["vias"]: + gds = conf["vias"][subkey+"_gds"] + if subkey+"_gds_bloat" in conf["vias"]: + gds_bloat = conf["vias"][subkey+"_gds_bloat"] + else: + print("unrecognized layer {rectLayer}") + return zip(gds, gds_bloat) TAP, FILL, CELL, BLOCK = range(4)