pdkmaster.technology¶
pdkmaster.technology.edge¶
-
class
pdkmaster.technology.edge.
MaskEdge
(mask: pdkmaster.technology.mask._Mask)[source]¶ Bases:
pdkmaster.technology.edge._Edge
Objects of this class represent the edges of shapes present on a Mask object.
-
class
pdkmaster.technology.edge.
Join
(edges: Union[pdkmaster.technology.edge._Edge, Iterable[pdkmaster.technology.edge._Edge]])[source]¶ Bases:
pdkmaster.technology.edge._Edge
Joim represent the resulting _Edge object from joining the edges from two or more _Edge objects.
-
class
pdkmaster.technology.edge.
Intersect
(edges: Union[pdkmaster.technology.mask._Mask, _Edge, Iterable[Union[pdkmaster.technology.mask._Mask, _Edge]]])[source]¶ Bases:
pdkmaster.technology.edge._Edge
Joim is the resulting _Edge object representing the overlapping parts of the edges from two or more _Edge objects.
Crossing edges can result in points but the handling of this is application dependent.
pdkmaster.technology.mask¶
-
class
pdkmaster.technology.mask.
DesignMask
(*, name: str, fill_space: str)[source]¶ Bases:
pdkmaster.technology.mask._Mask
,pdkmaster.technology.rule._Rule
A DesignMask object is a _Mask object with the shapes on the mask provided by shapes by the user. It is not a derived mask.
- Parameters:
name – the name of the mask
fill_space – wether space between two shapes may be filled up. Value has to be one of (“no”, “same_net”, “yes”)
-
property
designmasks
¶ The designasks property of a _Mask object gives a list of all designamsks used in a _Mask.
API Notes
The returned Iterable may contain same DesignMask object multiple times. User who need a unique set can use a set object for that.
-
class
pdkmaster.technology.mask.
Join
(masks: Union[pdkmaster.technology.mask._Mask, Iterable[pdkmaster.technology.mask._Mask]])[source]¶ Bases:
pdkmaster.technology.mask._Mask
A derived _Mask object that represenet the shapes resulting of joining all the shapes of the provided masks.
-
property
designmasks
¶ The designasks property of a _Mask object gives a list of all designamsks used in a _Mask.
API Notes
The returned Iterable may contain same DesignMask object multiple times. User who need a unique set can use a set object for that.
-
property
-
class
pdkmaster.technology.mask.
Intersect
(masks: Union[pdkmaster.technology.mask._Mask, Iterable[pdkmaster.technology.mask._Mask]])[source]¶ Bases:
pdkmaster.technology.mask._Mask
A derived _Mask object that represenet the shapes resulting of the intersection of all the shapes of the provided masks.
-
property
designmasks
¶ The designasks property of a _Mask object gives a list of all designamsks used in a _Mask.
API Notes
The returned Iterable may contain same DesignMask object multiple times. User who need a unique set can use a set object for that.
-
property
pdkmaster.technology.geometry¶
The pdkmaster.design.geometry module provides classes to represent shapes drawn in a DesignMask of a technology.
-
pdkmaster.technology.geometry.
epsilon
¶ value under which two coordinate values are considered equal. Default is 1e-6; as coordinates are assumed to be in µm this corresponds with 1 fm.
-
pdkmaster.technology.geometry.
origin
¶ (0.0, 0.0)
-
class
pdkmaster.technology.geometry.
Rotation
[source]¶ Bases:
enum.Enum
Enum type to represent supported _Shape rotations
-
No
= 'no'¶
-
R0
= 'no'¶
-
R90
= '90'¶
-
R180
= '180'¶
-
R270
= '270'¶
-
MX
= 'mirrorx'¶
-
MX90
= 'mirrorx&90'¶
-
MY
= 'mirrory'¶
-
MY90
= 'mirrory&90'¶
-
static
from_name
(rot: str) → pdkmaster.technology.geometry.Rotation[source]¶ Helper function to convert a rotation string representation to a Rotation value.
- Parameters:
rot – string r of the rotation; supported values: (“no”, “90”, “180”, “270”, “mirrorx”, “mirrorx&90”, “mirrory”, “mirrory&90”)
- Returns:
Corresponding Rotation value
-
-
class
pdkmaster.technology.geometry.
RotationContext
[source]¶ Bases:
object
Context for rotate operations that are considered to belong together.
Currently it will cache rotated MultiPartShape and link part to the rotated parts.
-
class
pdkmaster.technology.geometry.
MoveContext
[source]¶ Bases:
object
Context for move operations that are considered to be part of one move.
Currently it will cache moved MultiPartShape and link part to the moved parts.
-
class
pdkmaster.technology.geometry.
Point
(*, x: float, y: float)[source]¶ Bases:
pdkmaster.technology.geometry._PointsShape
,pdkmaster.technology.geometry._Rectangular
A point object
- Parameters:
x – X-coordinate
y – Y-coordinate
API Notes
Point objects are immutable, x and y coordinates may not be changed after object creation.
Point is a final class, no backwards compatibility is guaranteed for subclassing this class.
-
static
from_float
(*, point: Union[Tuple[float, float], List[float]]) → pdkmaster.technology.geometry.Point[source]¶
-
static
from_point
(*, point: pdkmaster.technology.geometry.Point, x: Optional[float] = None, y: Optional[float] = None) → pdkmaster.technology.geometry.Point[source]¶
-
property
x
¶ X-coordinate
-
property
y
¶ Y-coordinate
-
property
pointsshapes
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.Point[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.Point[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
points
¶
-
property
left
¶
-
property
bottom
¶
-
property
right
¶
-
property
top
¶
-
property
area
¶
-
class
pdkmaster.technology.geometry.
Line
(*, point1: pdkmaster.technology.geometry.Point, point2: pdkmaster.technology.geometry.Point)[source]¶ Bases:
pdkmaster.technology.geometry._PointsShape
,pdkmaster.technology.geometry._Rectangular
A line shape
A line consist of a start point and an end point. It is considered to be directional so two lines with start en and point exchanged are not considered equal.
-
property
point1
¶
-
property
point2
¶
-
property
pointsshapes
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.Line[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.Line[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
points
¶
-
property
left
¶
-
property
bottom
¶
-
property
right
¶
-
property
top
¶
-
property
area
¶
-
property
-
class
pdkmaster.technology.geometry.
Polygon
(*, points: Iterable[Point])[source]¶ Bases:
pdkmaster.technology.geometry._PointsShape
-
classmethod
from_floats
(*, points: Iterable[Union[Tuple[float, float], List[float]]])[source]¶ API Notes
This method is only meant to be called as Outline.from_floats not as obj.__class__.from_floats(). This means that subclasses may overload this method with incompatible call signature.
-
property
pointsshapes
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.Polygon[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.Polygon[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
points
¶
-
property
area
¶
-
classmethod
-
class
pdkmaster.technology.geometry.
Rect
(*, left: float, bottom: float, right: float, top: float)[source]¶ Bases:
pdkmaster.technology.geometry.Polygon
,pdkmaster.technology.geometry._Rectangular
A rectangular shape object
- Parameters:
bottom, right, top (left,) – Edge coordinates of the rectangle; left, bottom have to be smaller than resp. right, top.
API Notes
Rect objects are immutable, dimensions may not be changed after creation.
This class is final. No backwards guarantess given for subclasses in user code
-
static
from_floats
(*, values: Tuple[float, float, float, float]) → pdkmaster.technology.geometry.Rect[source]¶ API Notes: * This method is only meant to be called as Outline.from_floats
not as obj.__class__.from_floats(). This means that subclasses may overload this method with incompatible call signature.
-
static
from_rect
(*, rect: pdkmaster.technology.geometry._Rectangular, left: Optional[float] = None, bottom: Optional[float] = None, right: Optional[float] = None, top: Optional[float] = None, bias: Union[float, pdkmaster.technology.property_.Enclosure] = 0.0) → pdkmaster.technology.geometry.Rect[source]¶
-
static
from_corners
(*, corner1: pdkmaster.technology.geometry.Point, corner2: pdkmaster.technology.geometry.Point) → pdkmaster.technology.geometry.Rect[source]¶
-
static
from_float_corners
(*, corners: Tuple[Union[Tuple[float, float], List[float]], Union[Tuple[float, float], List[float]]]) → pdkmaster.technology.geometry.Rect[source]¶
-
property
left
¶
-
property
bottom
¶
-
property
right
¶
-
property
top
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.Rect[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.Rect[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
points
¶
-
property
area
¶
-
class
pdkmaster.technology.geometry.
Ring
(*, outer_bound: pdkmaster.technology.geometry.Rect, ring_width: Union[int, float])[source]¶ Bases:
pdkmaster.technology.geometry.Polygon
A shape representating a ring shape polygon
- Parameters:
outer_bound – the outer edge of the shape
ring_width – the width of the ring, it has to be smaller than half the width or height of the outer edge.
-
class
pdkmaster.technology.geometry.
RectRing
(*, outer_bound: pdkmaster.technology.geometry.Rect, rect_width: Union[int, float], rect_height: Union[int, float, None] = None, min_rect_space: Union[int, float])[source]¶ Bases:
pdkmaster.technology.geometry._Shape
A RectRing object is a shape that consists of a ring of Rect objects.
An exception will be raised when there is not enough room to put the four corner rects. If the ‘Rect’ objects needs to be on a grid all dimensions specified for this object - including outer bound placement, width & height - have to be double that grid number.
- Parameters:
outer_bound – the outer bound of the ring; e.g. the generated rect shapes will be inside and touching the bound.
rect_width – the width of the generated rect objects.
rect_height – the height of the generated rect objects; by default it will be the same as rect_width.
min_rect_space – the minimum space between two rect structures.
-
property
outer_bound
¶
-
property
rect_width
¶
-
property
rect_height
¶
-
property
min_rect_space
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.RectRing[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.RectRing[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
pointsshapes
¶
-
property
bounds
¶
-
property
area
¶
-
class
pdkmaster.technology.geometry.
MultiPartShape
(fullshape: pdkmaster.technology.geometry.Polygon, parts: Iterable[pdkmaster.technology.geometry.Polygon])[source]¶ Bases:
pdkmaster.technology.geometry.Polygon
This shape represents a single polygon shape that consist of a build up of touching parts.
Main use case is to represent a shape where parts are on a different net as is typically the case for a WaferWire.
- Parameters:
fullshape – The full shape
parts –
The subshapes The subshapes should be touching shapes and joined should form the fullshape shape. Currently it is only checked if the areas match, in better checking may be implemented.
The subshapes will be converted to MultiPartShape._Part objects before becoming member of the parts property
-
property
fullshape
¶
-
property
parts
¶
-
property
pointsshapes
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.MultiPartShape[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.MultiPartShape[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
points
¶
-
property
area
¶
-
class
pdkmaster.technology.geometry.
MultiShape
(*, shapes: Iterable[pdkmaster.technology.geometry._Shape])[source]¶ Bases:
pdkmaster.technology.geometry._Shape
,collections.abc.Collection
,typing.Generic
A shape representing a group of shapes
- Parameters:
shapes –
the sub shapes. Subshapes may or may not overlap. The object will fail to create if only one unique shape is provided including if the same shape is provided multiple times without another shape.
MultiShape objects part of the provided shapes will be flattened and it’s children will be joined with the other shapes.
-
property
shapes
¶
-
property
pointsshapes
¶
-
property
bounds
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.MultiShape[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.MultiShape[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
area
¶
-
class
pdkmaster.technology.geometry.
RepeatedShape
(*, shape: pdkmaster.technology.geometry._Shape, offset0: pdkmaster.technology.geometry.Point, n: int, n_dxy: pdkmaster.technology.geometry.Point, m: int = 1, m_dxy: Optional[pdkmaster.technology.geometry.Point] = None)[source]¶ Bases:
pdkmaster.technology.geometry._Shape
A repetition of a shape allowing easy generation of array of objects. Implementation is generic so that one can represent any repetition with one or two vector that don’t need to be manhattan.
API Notes
The current implementation assumes repeated shapes don’t overlap. If they do area property will give wrong value.
-
property
shape
¶
-
property
offset0
¶
-
property
n
¶
-
property
n_dxy
¶
-
property
m
¶
-
property
m_dxy
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.RepeatedShape[source]¶ Move a _Shape object by a given vector
This method is called moved() to represent the fact the _Shape objects are immutable and a new object is created by the moved() method.
-
property
pointsshapes
¶
-
property
bounds
¶
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.RepeatedShape[source]¶ Rotate a _Shape object by a given vector
This method is called rotated() to represent the fact the _Shape objects are immutable and a new object is created by the rotated() method.
-
property
area
¶
-
class
pdkmaster.technology.geometry.
ArrayShape
(*, shape: pdkmaster.technology.geometry._Shape, offset0: pdkmaster.technology.geometry.Point, rows: int, columns: int, pitch_y: Optional[float] = None, pitch_x: Optional[float] = None)[source]¶ Bases:
pdkmaster.technology.geometry.RepeatedShape
Object representing a manhattan repeared shape.
This is a RepeatedShape subclass with repeat vectors either a horizontal and/or a vertical one.
- Parameters:
shape – The object to repeat
offset0 – The placement of the first shape
columns (rows,) – The number of rows and columns Both have to be equal or higher than 1 and either rows or columns has to be higher than 1.
pitch_x (pitch_y,) – The displacement for resp. the rows and the columns.
-
property
rows
¶
-
property
columns
¶
-
property
pitch_x
¶
-
property
pitch_y
¶
-
class
pdkmaster.technology.geometry.
MaskShape
(*, mask: pdkmaster.technology.mask.DesignMask, shape: pdkmaster.technology.geometry._Shape)[source]¶ Bases:
object
-
property
mask
¶
-
property
shape
¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.MaskShape[source]¶
-
rotated
(*, rotation: pdkmaster.technology.geometry.Rotation, context: Optional[pdkmaster.technology.geometry.RotationContext] = None) → pdkmaster.technology.geometry.MaskShape[source]¶
-
property
area
¶
-
property
bounds
¶
-
property
-
class
pdkmaster.technology.geometry.
MaskShapes
(iterable: Union[T, Iterable[T]])[source]¶ Bases:
pdkmaster._util.TypedListMapping
A TypedListMapping of MaskShape objects.
API Notes
Contrary to other classes a MaskShapes object is mutable if not frozen.
-
move
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → None[source]¶
-
moved
(*, dxy: pdkmaster.technology.geometry.Point, context: Optional[pdkmaster.technology.geometry.MoveContext] = None) → pdkmaster.technology.geometry.MaskShapes[source]¶ Moved MaskShapes object will not be frozen
-
pdkmaster.technology.net¶
pdkmaster.technology.primitive¶
The native technology primitives
-
class
pdkmaster.technology.primitive.
Marker
(**super_args)[source]¶ Bases:
pdkmaster.technology.primitive._DesignMaskPrimitive
The Marker primitive represents a layer used by other primitives for definition of these primitives; typically a recognition. It does not represent a processing layer and thus no physical mask is corresponding with this primitive.
-
property
fill_space
¶
-
property
-
class
pdkmaster.technology.primitive.
Auxiliary
(**super_args)[source]¶ Bases:
pdkmaster.technology.primitive._DesignMaskPrimitive
The Auxiliary primitive represents a layer that is defined by a foundry’s technology but not used in other PDKMaster primitives.
-
property
fill_space
¶
-
property
-
class
pdkmaster.technology.primitive.
ExtraProcess
(*, fill_space: str, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskPrimitive
ExtraProcess is a layer indicating an ExtraProcess step not handled by other primitives.
For example non-silicidation for making active or poly resistors.
-
property
fill_space
¶
-
property
-
class
pdkmaster.technology.primitive.
Implant
(*, type_: str, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskPrimitive
Implant is a layer that represent an implantation step in the semiconductor processing.
- Parameters:
type_ – type of the implant; has to be “n”, “p” or “adjust” an “adjust” layer is extra implant that can be used on both n-type and p-type regions.
super_args – _WidthSpacePrimitive and _DesignMaskPrimitive arguments
-
property
fill_space
¶
-
class
pdkmaster.technology.primitive.
Insulator
(*, fill_space: str, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskPrimitive
Insulator is a layer representing an insulator layer.
Typical use is for thick oxide layer for higher voltage transistors.
- Parameters:
fill_space – wether to allow fillinig regions that are violating minimum spacing; it can only be “yes” or “no”; “same_net” does not make sense for an insulator.
-
property
fill_space
¶
-
class
pdkmaster.technology.primitive.
Well
(*, min_space_samenet: Union[int, float, None] = None, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskConductor
,pdkmaster.technology.primitive.Implant
Well is an Implant layer that has deeper implant so it forms a well of a certain type.
Typical application is for both NMOS and PMOS transistors on a wafer without shorting the source/drain regions to the bulk.
- Parameters:
min_space_samenet – the smaller spacing between two wells on the same net.
-
class
pdkmaster.technology.primitive.
WaferWire
(*, implant: Union[T, Iterable[T]], min_implant_enclosure: Union[T, Iterable[T]], implant_abut: Union[str, T, Iterable[T]], allow_contactless_implant: bool, allow_in_substrate: bool, well: Union[T, Iterable[T]], min_well_enclosure: Union[T, Iterable[T]], min_well_enclosure_same_type: Union[T, Iterable[T], None] = None, min_substrate_enclosure: Optional[pdkmaster.technology.property_.Enclosure] = None, min_substrate_enclosure_same_type: Optional[pdkmaster.technology.property_.Enclosure] = None, allow_well_crossing: bool, oxide: Union[T, Iterable[T], None] = None, min_oxide_enclosure: Union[T, Iterable[T]] = None, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskConductor
WaferWire is representing the wire made from wafer material and normally isolated by LOCOS for old technlogies and STI (shallow-trench-isolation) or FINFET for newer/recent ones. The doping type is supposed the be determing by implant layers.
- Parameters:
implant – the valid Implant layers for this primitive
min_implant_enclosure – the minimum required enclosure by the implant over the waferwire. If a single enclosure is specified it is the spec for all the implants.
implant_abut – wether to allow the abutment of two waferwire shapes of opposite type.
allow_contactless_implant – wether to allow waferwire shapes without a contact. If True it is assumed that abutted shapes are on the same net.
allow_in_substrate – wether to allow a waferwire shape that is not in a well. Some processes use wafers of a certain doping type; others need a well for all active devices.
well – the well primitives valid for this WaferWire, It is assumed that WaferWire with implant type the same as the well connect to that well.
min_well_enclosure – the minimum required enclosure of the WaferWire by the well. If only one value is given it is valid for all the wells.
min_well_enclosure_same_type – allow to specify other enclosure for WaferWires with the same type as the well.
min_substrate_enclosure – the minimum required enclosure of the WaferWire by the substrate with the substrate defined as any wafer region that is not covered by a well. If not specified the same value as min_well_enclosure is used.
min_substrate_enclosure_same_type – allow to specify other enclosure for WaferWires with the same type as the well. If not specified the same value as min_well_enclosure_same_type is used.
allow_well_crossing – wether it is allow for a WaferWire to go over a well boundary
oxide – the list of valid oxide layers for this WaferWire. This can be empty.
min_oxide_enclosure – the minimum required enclosure of the WaferWire by the oxide layer. If only one value is given it is valid for all the oxide layers.
super_args – the argument for _WidthSpacePrimitive and _DesignMaskPrimitive
-
class
pdkmaster.technology.primitive.
GateWire
(**super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskConductor
GateWire is a _WidthSpaceDesignMaskConductor that can act as the gate of a MOSFET.
No extra arguments next to the _WidthSpacePrimitive and _DesignMaskPrimitive ones.
-
class
pdkmaster.technology.primitive.
MetalWire
(**super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskConductor
GateWire is a _WidthSpaceDesignMaskConductor that acts as an interconnect layer.
No extra arguments next to the _WidthSpacePrimitive and _DesignMaskPrimitive ones.
-
class
pdkmaster.technology.primitive.
TopMetalWire
(**super_args)[source]¶ Bases:
pdkmaster.technology.primitive.MetalWire
TopMetalWire is a primitive for top metal layer. A top metal layer does not have to appear in the bottom list of a Via.
-
class
pdkmaster.technology.primitive.
Via
(*, width: Union[int, float], min_space: Union[int, float], bottom: Union[T, Iterable[T]], top: Union[T, Iterable[T]], min_bottom_enclosure: Union[T, Iterable[T]], min_top_enclosure: Union[T, Iterable[T]], **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._DesignMaskConductor
A Via layer is a layer that connect two conductor layer vertically.
- Parameters:
width – the fixed width; only squares with this width are allowed on the Via layer.
bottom – list of valid bottom primitives for this Via layer. These have to be WaferWire, GateWire, MetalWire or Resistor objects
min_bottom_enclosure – the minimum required enclosure of the Via by the bottom layer. If only one value is given it is valid for all the bottom layers.
top – list of valid bottom primitives for this Via layer. These have to be WaferWire, GateWire, MetalWire or Resistor objects
min_bottom_enclosure – the minimum required enclosure of the Via by the top layer. If only one value is given it is valid for all the top layers.
super_args – parameters for _DesignMaskPrimitive
-
property
fill_space
¶
-
property
designmasks
¶
-
class
pdkmaster.technology.primitive.
PadOpening
(*, bottom: pdkmaster.technology.primitive.MetalWire, min_bottom_enclosure: pdkmaster.technology.property_.Enclosure, **super_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpaceDesignMaskConductor
PadOpening is a layer representing an opening in the top layer in the processing of a semiconductor wafer.
Typical application is for wirebonding, bumping for flip-chip or an RDL (redistribution) layer.
- Parameters:
bottom – the MetalWire layer for which on top of which an opening in the isolation is made.
min_bottom_enclsoure – the minimum enclosure of the PadOpening layer by the bottom layer.
super_args – arguments for WidthSpacePrimitive and _DesignMaskPrimitive
-
property
fill_space
¶
-
property
designmasks
¶
-
class
pdkmaster.technology.primitive.
Resistor
(*, name: str, wire: Union[pdkmaster.technology.primitive.WaferWire, pdkmaster.technology.primitive.GateWire, pdkmaster.technology.primitive.MetalWire], contact: Optional[pdkmaster.technology.primitive.Via], min_contact_space: Union[int, float, None] = None, indicator: Union[T, Iterable[T]], min_indicator_extension: Union[T, Iterable[T]], implant: Optional[pdkmaster.technology.primitive.Implant] = None, min_implant_enclosure: Optional[pdkmaster.technology.property_.Enclosure] = None, model: Optional[str] = None, subckt_params: Optional[Dict[str, str]] = None, sheetres: Union[int, float, None] = None, **widthspace_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpacePrimitive
Resistor is a primitive that represent a resistor device. The resistor itself is not drawn by defined by the overlap of other drawn layers.
-
mask
¶ the resulting mask with the shape of the mask. It is the overlapping part of the base wire with all the indicators
- Parameters:
wire – the base wire used to make a resistor device. It has to be a WaferWire, a Gatewire or a MetalWire
contact – optional Via layer used to connect the base wire.
min_contact_space – the minimum of the contact to the overlap of the base wire and all the indicator layers.
indicator – list of indicator layers for the Resistor. Only the overlapping area of all the indicator layers will be seen as the Resistor device. For am indicator of type ExtraProcess it is assumed that this extra process does influence the resulting resistance as with a Marker type it does not and is thus just a recognition layer.
min_indicator_extension – minimum required extension of the indicator shapes over the base wire. If only one value is given it will be used for all the indicators.
implant – optional implant layer for the resistor. This allows to have different sheet resistance and models for wire with different implants. If wire is a WaferWire the implant layer has to be a valid implant for that waferwire.
model – spice model name of the Resistor; the width and height of the overlapping area are used as parameters.
subckt_params – Conversion of width and height parameter to the name used by the model. It is thus a dict with keys “width” and “height” and the value for each the actual spice model parameter name. By default “width” is translated to “w” and “height to “l”.
sheetres – the optional sheet resistance value. If both sheetres and model are given, sheetres will be used for LVS and model for generating extracted netlist meant for simulation.
-
-
class
pdkmaster.technology.primitive.
Diode
(*, name: Optional[str] = None, wire: pdkmaster.technology.primitive.WaferWire, indicator: Union[T, Iterable[T]], min_indicator_enclosure: Union[T, Iterable[T]], implant: pdkmaster.technology.primitive.Implant, min_implant_enclosure: Optional[pdkmaster.technology.property_.Enclosure] = None, well: Optional[pdkmaster.technology.primitive.Well] = None, min_well_enclosure: Optional[pdkmaster.technology.property_.Enclosure] = None, model: Optional[str] = None, **widthspace_args)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpacePrimitive
Diode represent a diode device made up of a WaferWire object. A diode device needs a pn-junction which does need to be achieved by implants.
- Parameters:
name – optional name for the diode; otherwise a unique name starting with “diode:” will be generated.
wire – the base layer for the diode
indicator – list of indicator layers for the Diode. Only the overlapping area of all the indicator layers will be seen as the Resistor device. Both ExtraProcess and Marker are valid indicator layers.
min_indicator_extension – minimum required enclosure of the base wire by the indicator. If only one value is given it will be used for all the indicators.
implant – the implant layer of the WaferWire forming the diode. The implant layer has to be a valid implant layer for the base WaferWire primitive.
min_implant_enclosure – the optional minimum required enclosure of the base wire by the implant. If not provided the one specified for the base wire will be used as default.
well – optional well to place the diode in. This well has to be of opposite type of the implant layer. If no well is specified the diode is in the substrate. So then the base wire must be allowed to be placed in the substrate and the technology substrate type has to be the opposite of the implant of the diode.
min_well_enclosure – optional minimum required enclosure of the base wire by the well. If no well is specified no min_well_enclosure may be specified either. If a well is specified but no min_well_enclosure the minimum well enclosure from the base WaferWire will be used.
model – the spice model name
widthspace_args – the arguments for _WidthSpacePrimitive
-
class
pdkmaster.technology.primitive.
MOSFETGate
(*, name: Optional[str] = None, active: pdkmaster.technology.primitive.WaferWire, poly: pdkmaster.technology.primitive.GateWire, oxide: Optional[pdkmaster.technology.primitive.Insulator] = None, min_gateoxide_enclosure: Optional[pdkmaster.technology.property_.Enclosure] = None, inside: Union[T, Iterable[T], None] = None, min_gateinside_enclosure: Union[T, Iterable[T], None] = None, min_l: Union[int, float, None] = None, min_w: Union[int, float, None] = None, min_sd_width: Union[int, float, None] = None, min_polyactive_extension: Union[int, float, None] = None, min_gate_space: Union[int, float, None] = None, contact: Optional[pdkmaster.technology.primitive.Via] = None, min_contactgate_space: Union[int, float, None] = None)[source]¶ Bases:
pdkmaster.technology.primitive._WidthSpacePrimitive
MOSFETGate is a primitive representing the gate of a MOSFET transistor. A self-aligned process is assumed for the MOSFET so the gate is basically the area where a gate layer crosses the active layer. A dielectric layer in between the two layers is forming the gate capacitor the is part of the basic principles of how a MOSFET device funtions. The gate has a seaparte primitive as it often is common between different MOSFET devices (e.g. nmos and pmos or multi-Vt devices) with common rules.
- Parameters:
name – optional name for the gate. If not specified a unique name based on the layers is given
active – the bottom layer for the gate. The part of the active layer under the gate layer is acting as the channel of the MOSFET.
poly – the top layer of gate.
oxide – optionally an oxide layer can be given to have gate for different types of devices. If not specified it means to default oxide layer of the process is present to form the
min_gateoxide_enclosure – optional minimum required enclosure of the gate by the oxide layer
inside – optional marker layers for the gate. This allows to specify alternative rules for a device that is physically processed the same as another device. Example use is the marking of ESD devices with own rules but being physically the same device as the other higher voltage devices.
min_gateinside_enclosure – optional minimum required enclosure of the gate by the inside layer. If 1 value is specified it is used for all the inside layers.
min_l – optional minimum l specification valid for all MOSFET devices using this gate. If not specified the minimum poly layer width will be used as the minimum l.
min_w – optional minimum w specification valid for all MOSFET devices using this gate. If not specified the minimum active layer width will be used as the minimum w.
min_sd_width – optional minimum extension of the active layer over the gate.
min_polyactive_extension – optional minimum extension of the poly layer over the gate.
min_gate_space – optional minimum spacing between two gates sharing the same active wire
contact – optional contact layer for this device; this is needed to allow to specify the minimum contact to gate spacing.
min_contactgate_space – optional common specification of minimum contact to gate spacing
-
property
computed
¶ the computed property allows to get values for parameters that were not specified during object init. For example assume that gate is MOSFETGate object that did not specify min_l. Then gate.min_l is None and gate.computed.min_l is equal to gate.poly.min_width. This separation is done to server different use cases. When looking at DRC rules gate.min_l being None indicated no extra rule needs to be generated for this gate. For layout it is easier to use gate.computed.min_l to derive the dimension of the device to be drawn.
-
class
pdkmaster.technology.primitive.
MOSFET
(*, name: str, gate: pdkmaster.technology.primitive.MOSFETGate, implant: Union[T, Iterable[T]], well: Optional[pdkmaster.technology.primitive.Well] = None, min_l: Union[int, float, None] = None, min_w: Union[int, float, None] = None, min_sd_width: Union[int, float, None] = None, min_polyactive_extension: Union[int, float, None] = None, min_gateimplant_enclosure: Union[T, Iterable[T]], min_gate_space: Union[int, float, None] = None, contact: Optional[pdkmaster.technology.primitive.Via] = None, min_contactgate_space: Union[int, float, None] = None, model: Optional[str] = None)[source]¶ Bases:
pdkmaster.technology.primitive._Primitive
MOSFET is a primitive representing a MOSFET transistor.
MOS stands for metal-oxide-semiconductor; see https://en.wikipedia.org/wiki/MOSFET for explanation of a MOSFET device.
- Parameters:
name – name for the gate.
gate – the MOSFETGate object for this device
implant – implant layers for this device
well – optional well in which this MOSFET needs to be located. If gate.active can’t be put in substrate well has to be specified. If specified the well has to be valid for gate.active and the implant type has to be opposite to the implant types.
min_l – optional minimum l specification for the MOSFET device If not specified the min_l of the gate will be used, which in turn could be the gate poly layer minimum width.
min_w – optional minimum w specification valid the MOSFET device If not specified the min_w of the gate will be used, which in turn could be the gate active layer minimum width.
min_sd_width – optional minimum extension of the active layer over the gate. If not specified the value from the gate will be used. This value has to be specified either here or for the gate.
min_polyactive_extension – optional minimum extension of the poly layer over the gate. If not specified the value from the gate will be used. This value has to be specified either here or for the gate.
min_gateimplant_enclosure – SingleOrMulti[prp.Enclosure].T,
min_gate_space – optional minimum spacing between two gates sharing the same active wire If not specified the value from the gate will be used. This value has to be specified either here or for the gate.
contact – optional contact layer for this device; this is needed to allow to specify the minimum contact to gate spacing. If not specified the value from the gate will be used.
min_contactgate_space – optional common specification of minimum contact to gate spacing If not specified the value from the gate will be used. If neither the gate nor here contact is specified this parameter may not be specified either. Otherwise here and/or the gate have to speicify a value.
model – optional spice model name for the device. Needed when one wants to do spice simulations or LVS.
-
property
computed
¶ the computed property allows to get values for parameters that were not specified during object init. For example assume that nmos is MOSFET object that did not specify min_l. Then nmos.min_l is None and nmos.computed.min_l is equal to nmos.gate.computed.min_l, which can then refer further to nmos.gate.poly.min_width. This separation is done to server different use cases. When looking at DRC rules gate.min_l being None indicated no extra rule needs to be generated for this gate. For layout it is easier to use gate.computed.min_l to derive the dimension of the device to be drawn.
-
property
gate_prim
¶ gate_prim attribute is the primitive representing the gate of the MOSFET object. Main reason it exists is to use it in rules; for example a minimum spacing to the gate of a transistor.
-
property
gate_mask
¶
-
property
designmasks
¶
-
class
pdkmaster.technology.primitive.
Bipolar
(*, name: str, type_: str, model: Optional[str] = None, is_subcircuit=False, indicator: Union[T, Iterable[T]])[source]¶ Bases:
pdkmaster.technology.primitive._Primitive
The Bipolar primitive represents the bipolar injunction transistors. It’s thus a PNP or a NPN device.
For more info see https://en.wikipedia.org/wiki/Bipolar_junction_transistor
Currently no layout generation for this device is implemented and the technology will need to provide fixed layout implementations. Bipolar devices are assumed to have fixed layouts for each technology.
- Parameters:
name – name of the Bipolar device
type_ – the bipolar type; has to be ‘npn’ or ‘pnp’
model – the optional (spice) model name for the device
indicator – the layer(s) to mark a certain structure as a bipolar device
API Notes
Bipolar does not have a fixed API yet. Backwards incompatible changes are reserved for implemting more general layout generation.
-
property
designmasks
¶
-
class
pdkmaster.technology.primitive.
Spacing
(*, primitives1: Union[T, Iterable[T]], primitives2: Union[T, Iterable[T], None] = None, min_space: Union[int, float])[source]¶ Bases:
pdkmaster.technology.primitive._RulePrimitive
A _RulePrimitive that allows to define extra minimum space requirement that is not derived from the parameters from any of the primitives in the a technology
- Argumnets:
- primitives1: first set of primitives
If primitives2 is not provided this set has to contain more than one primitive and the minimum space requirement is for the combined shape of joining all shapes in all the layers in this set.
- primitives2: optinal second set of primitives
If this set is provided the minimum space specification is for each shape on a layer in primitives1 to each shape on a layer in primitives2.
min_space: the minimum space specifcation
-
property
designmasks
¶
pdkmaster.technology.property_¶
-
class
pdkmaster.technology.property_.
Enclosure
(spec: Union[float, Iterable[float]])[source]¶ Bases:
object
Enclosure object are representing the enclosure value of one layer over another layer. Most of the time it is used to indicae the minimum required enclosure of one layer over another layer.
Enclosure constraints can symmetric or asymmetric. A symmetric enclosure can be specified with a single float value, an assymetric one with two float values. Internally always two float values are stored and be accessed through the spec attribute of an Enclosure object. For a symmetric object the two float values are the same.
When an enclosure is used as a constraint symmetric means that the enclosure has to be met in all directions. Asymmetric normally means that a smaller enclosure in one direction is allowed when both enclosures in the other direction are bigger than the bigger enclosure value. For this case the order of the two value don’t have a meaning.
An enclosure can also be used to specify when doing layout generation. The PDKMaster convention here is that the order has a meaning; the first value is for the horizontal direction and the second value for the vertical one. Also giving meaning to the wide() and tall() object methods
Enclosure objects are implemented as immutable objects.
-
property
spec
¶
-
static
cast
(v: Union[float, Iterable[float], Enclosure]) → pdkmaster.technology.property_.Enclosure[source]¶
-
property
first
¶
-
property
second
¶
-
property
is_assymetric
¶
-
property
-
class
pdkmaster.technology.property_.
Property
(name: str, *, allow_none: bool = False)[source]¶ Bases:
object
Thie class represents a property of an object. Rules may be built from from a comparison operation.
o = Property(name=’width’) rule = o >= 3.5
Then rule represents the rule for width greater or equal to 3.5.
-
value_conv
()¶
-
value_type
¶ alias of
builtins.float
-
value_type_str
: str = 'float'¶
-
-
class
pdkmaster.technology.property_.
EnclosureProperty
(name: str, *, allow_none: bool = False)[source]¶ Bases:
pdkmaster.technology.property_.Property
An EnclosureProperty object is a Property with an Enclosure object as value.
-
value_conv
() → pdkmaster.technology.property_.Enclosure¶
-
value_type_str
: str = "'Enclosure'"¶
-
-
class
pdkmaster.technology.property_.
Operators
[source]¶ Bases:
object
Operators is a class representing a bunch of boolean operators.
-
class
Greater
(*, left: pdkmaster.technology.property_.Property, right: Any)[source]¶ Bases:
pdkmaster.technology.property_._Comparison
-
symbol
: ClassVar[str] = '>'¶
-
-
class
GreaterEqual
(*, left: pdkmaster.technology.property_.Property, right: Any)[source]¶ Bases:
pdkmaster.technology.property_._Comparison
-
symbol
: ClassVar[str] = '>='¶
-
-
class
Smaller
(*, left: pdkmaster.technology.property_.Property, right: Any)[source]¶ Bases:
pdkmaster.technology.property_._Comparison
-
symbol
: ClassVar[str] = '<'¶
-
-
class
SmallerEqual
(*, left: pdkmaster.technology.property_.Property, right: Any)[source]¶ Bases:
pdkmaster.technology.property_._Comparison
-
symbol
: ClassVar[str] = '<='¶
-
-
class
Equal
(*, left: pdkmaster.technology.property_.Property, right: Any)[source]¶ Bases:
pdkmaster.technology.property_._Comparison
-
symbol
: ClassVar[str] = '=='¶
-
-
GT
¶ alias of
Operators.Greater
-
GE
¶ alias of
Operators.GreaterEqual
-
ST
¶ alias of
Operators.Smaller
-
SE
¶ alias of
Operators.SmallerEqual
-
EQ
¶ alias of
Operators.Equal
-
class
-
pdkmaster.technology.property_.
Ops
¶
pdkmaster.technology.rule¶
-
class
pdkmaster.technology.rule.
Rules
(iterable: Iterable[_elem_typevar_] = ())[source]¶ Bases:
pdkmaster._util.TypedList
pdkmaster.technology.technology_¶
-
class
pdkmaster.technology.technology_.
Technology
[source]¶ Bases:
abc.ABC
A Technology object is the representation of a semiconductor process. It’s mainly a list of _Primitive objects with these primitives describing the capabilities of the technolgy.
the Technology class is an abstract base class so subclasses need to implement some of the abstract methods defined in this base class.
The setup of the primitives for a technology is done in the _init() method. Typically subclasses should not overload the __init__() method.
Next to the _init() abstract method subclasses also need to define some abstract properties to define some properties of the technology. These are name(), grid() and substrate_type().
-
abstract property
name
¶ property with the name of the technology
-
abstract property
grid
¶ property with the minimum grid of the technology
Optionally primitives may define a bigger grid for their shapes.
-
abstract property
substrate_type
¶ property with the substrate type of the technology
It has to be “n”, “p” or “undoped”.
-
is_ongrid
(v: float, mult: int = 1) → float[source]¶ Returns wether a value is on grid or not.
- Parameters:
w – value to check
mult – value has to be on mult*grid
-
on_grid
(dim: Union[int, float, pdkmaster.technology.geometry.Point], *, mult: int = 1, rounding: str = 'nearest') → Union[float, pdkmaster.technology.geometry.Point][source]¶ Compute a value on grid from a given value.
- Parameters:
dim – value to put on grid
mult – value will be put on mult*grid
rounding – how to round the value Has to be one of “floor”, “nearest”, “ceiling”; “nearest” is the default.
-
property
dbu
¶ Returns database unit compatible with technology grid. An exception is raised if the technology grid is not a multuple of 10pm.
This method is specifically for use to export to format that use the dbu.
-
property
substrate
¶ Property representing the substrate of the technology; it’s defined as the area that is outside any of the wells of the technology.
As this value needs access to the list of wells it’s only available afcer the technology has been initialized and is not available during run of the _init() method.
-
property
rules
¶ Return all the rules that are derived from the primitives of the technology.
-
property
primitives
¶ Return the primitives of the technology.
-
abstract property
pdkmaster.technology.wafer_¶
-
pdkmaster.technology.wafer_.
outside
(masks: Union[pdkmaster.technology.mask.DesignMask, Iterable[pdkmaster.technology.mask.DesignMask]], *, alias: Optional[str] = None) → pdkmaster.technology.mask._Mask[source]¶ Return a mask representing the area on the wafer outside other mask(s). Optionally an alias can be given for the generated mask.
-
class
pdkmaster.technology.wafer_.
SubstrateNet
(*, name: str)[source]¶ Bases:
pdkmaster.technology.net.Net
SubstrateNet is a net representing the bulk of a wafer.