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)]