From d3f4810d1b87a0040f54c799676ceab0cddce100 Mon Sep 17 00:00:00 2001 From: mrg Date: Wed, 5 May 2021 13:44:31 -0700 Subject: [PATCH] Add error with zero length labels on GDS write. --- compiler/gdsMill/gdsMill/vlsiLayout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/gdsMill/gdsMill/vlsiLayout.py b/compiler/gdsMill/gdsMill/vlsiLayout.py index bd9968dc..71e5498c 100644 --- a/compiler/gdsMill/gdsMill/vlsiLayout.py +++ b/compiler/gdsMill/gdsMill/vlsiLayout.py @@ -422,7 +422,8 @@ class VlsiLayout: self.structures[self.rootStructureName].texts.append(textToAdd) def padText(self, text): - if(len(text)%2 == 1): + debug.check(len(text) > 0, "Cannot have zero length text string.") + if(len(text) % 2 == 1): return text + '\x00' else: return text @@ -696,7 +697,6 @@ class VlsiLayout: return max_pins - def getAllPinShapes(self, pin_name): """ Search for a pin label and return ALL the enclosing rectangles on the same layer