def __init__(self, cell, editor, width=None, height=None, submodules=None,
pin_width=2.0, pin_height=2.0, pin_suffix='.0',
pin_layer=None, north_pins=None, east_pins=None,
- south_pins=None, west_pins=None, pads=None, **kwargs):
+ south_pins=None, west_pins=None, pads=None,
+ orientation=None, **kwargs):
"""
Creates a module.
:param south_pins: ditto (for the south side),
:param west_pins: ditto (for the west side),
:param pads: dictionary of {net: list of layers} for creating pads,
+ :param orientation: when placed, should be orientated/mirrored etc.
:param kwargs: extra parameters to be implemented in derived classes.
"""
self.editor = editor
self.south_pins = south_pins or []
self.west_pins = west_pins or []
+ self.orientation = orientation or Transformation.Orientation.ID
+
self.pads = pads or {}
self._submodules = []
else submodule
)
+
@property
def name(self):
return self.cell.getName()
"""
return DbU.toLambda(dbu)
+ @property
+ def ab_x(self):
+ return self.from_dbu(self.ab.getXMin())
+
+ @property
+ def ab_y(self):
+ return self.from_dbu(self.ab.getYMin())
+
+ @property
+ def ab_width(self):
+ return self.from_dbu(self.ab.getWidth())
+
+ @property
+ def ab_height(self):
+ return self.from_dbu(self.ab.getXHeight())
+
def compute_ab(self):
""" Compute default abutment box without placement. """
etesian = Etesian.EtesianEngine.create(self.cell)
# place submodule
instance.setTransformation(Transformation(
- self.to_dbu(x), self.to_dbu(y), Transformation.Orientation.ID
+ self.to_dbu(x), self.to_dbu(y), submodule.orientation,
))
instance.setPlacementStatus(Instance.PlacementStatus.FIXED)