From 6990773ea16edc06e5e7670fc1ba38bab1a5914f Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 29 Oct 2018 10:32:42 -0700 Subject: [PATCH] Add error check requiring non-zero area pin layouts. --- compiler/base/pin_layout.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/base/pin_layout.py b/compiler/base/pin_layout.py index bea511e2..7a7ccd96 100644 --- a/compiler/base/pin_layout.py +++ b/compiler/base/pin_layout.py @@ -19,6 +19,10 @@ class pin_layout: self.rect = [vector(rect[0]),vector(rect[1])] # snap the rect to the grid self.rect = [x.snap_to_grid() for x in self.rect] + + debug.check(self.width()>0,"Zero width pin.") + debug.check(self.height()>0,"Zero height pin.") + # if it's a layer number look up the layer name. this assumes a unique layer number. if type(layer_name_num)==int: self.layer = list(layer.keys())[list(layer.values()).index(layer_name_num)]