diff --git a/compiler/base/geometry.py b/compiler/base/geometry.py index b766b1af..33bcaaa2 100644 --- a/compiler/base/geometry.py +++ b/compiler/base/geometry.py @@ -147,8 +147,12 @@ class instance(geometry): self.width = 0 self.height = 0 else: - self.width = round_to_grid(mod.width) - self.height = round_to_grid(mod.height) + if mirror in ["R90","R270"] or rotate in [90,270]: + self.width = round_to_grid(mod.height) + self.height = round_to_grid(mod.width) + else: + self.width = round_to_grid(mod.width) + self.height = round_to_grid(mod.height) self.compute_boundary(offset,mirror,rotate) debug.info(4, "creating instance: " + self.name)