From b347e3f7a8fdaa7289f12bbacbb982cd7e3199d4 Mon Sep 17 00:00:00 2001 From: mrg Date: Wed, 15 Apr 2020 16:49:04 -0700 Subject: [PATCH] Try both layers for reversed layer stacks. --- compiler/base/wire.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/base/wire.py b/compiler/base/wire.py index 23cc1b41..ddb10f43 100644 --- a/compiler/base/wire.py +++ b/compiler/base/wire.py @@ -71,7 +71,10 @@ class wire(wire_path): if layer1 == "poly" or layer1 == "active": contact1 = getattr(contact, layer1 + "_contact") else: - contact1 = getattr(contact, layer1 + "_via") + try: + contact1 = getattr(contact, layer1 + "_via") + except AttributeError: + contact1 = getattr(contact, layer2 + "_via") max_contact = max(contact1.width, contact1.height) layer1_space = drc("{0}_to_{0}".format(layer1))