Gate Pin Group
- class hal_py.GatePinGroup
A group of gate pins made up of a name, the pins, a pin order, and a start index.
- property ascending
True
if the pin order of a pin group comprising n pins is ascending (from 0 to n-1),False
if it is descending (from n-1 to 0).- Type
- contains_pin(self: hal_py.GatePinGroup, pin: hal_py.GatePin) bool
Check whether the pin group contains the given pin.
- Parameters
pin (hal_py.GatePin) – The pin to check.
- Returns
True if the pin group contains the pin, True otherwise.
- Return type
- property direction
The direction of the pin group.
- Type
- empty(self: hal_py.GatePinGroup) bool
Check whether the pin group is empty, i.e., contains no pins.
- Returns
True if the pin group is empty, False otherwise.
- Return type
- get_direction(self: hal_py.GatePinGroup) hal_py.PinDirection
Get the direction of the pin group.
- Returns
The direction of the pin.
- Return type
- get_id(self: hal_py.GatePinGroup) int
Get the ID of the gate pin group. The ID is unique within a gate type.
- Returns
The ID of the pin.
- Return type
- get_index(self: hal_py.GatePinGroup, pin: hal_py.GatePin) int
Get the index within the pin group of the given pin.
- Parameters
pin (hal_py.GatePin) – The pin
- Returns
The index of the pin on success, -1 otherwise.
- Return type
- get_name(self: hal_py.GatePinGroup) str
Get the name of the pin group.
- Returns
The name of the pin group.
- Return type
- get_pin_at_index(self: hal_py.GatePinGroup, index: int) hal_py.GatePin
Get the pin specified by the given index.
- Parameters
index (int) – The index of the pin within the pin group.
- Returns
The pin on success, None otherwise.
- Return type
- get_pins(self: hal_py.GatePinGroup, filter: Callable[[hal_py.GatePin], bool] = None) List[hal_py.GatePin]
Get the (ordered) pins of the pin groups. The optional filter is evaluated on every pin such that the result only contains pins matching the specified condition.
- Parameters
filter (lambda) – Filter function to be evaluated on each pin.
- Returns
The ordered pins.
- Return type
- get_start_index(self: hal_py.GatePinGroup) int
Get the start index of the pin group. Commonly, pin groups start at index 0, but this may not always be the case. Note that the start index for a pin group comprising n pins is 0 independent of whether it is ascending or descending.
- Returns
The start index.
- Return type
- get_type(self: hal_py.GatePinGroup) hal_py.PinType
Get the type of the pin group.
- Returns
The type of the pin.
- Return type
- is_ascending(self: hal_py.GatePinGroup) bool
Check whether the pin order of a pin group comprising n pins is ascending (from 0 to n-1) or descending (from n-1 to 0).
- Returns
True
for ascending bit order,False
otherwise.- Return type
- is_ordered(self: hal_py.GatePinGroup) bool
Check whether the pin group features an inherent order.
- Returns
True
if the pin group is inherently ordered,False
otherwise.- Return type
- property pins
The (ordered) pins of the pin groups.
- Type
- size(self: hal_py.GatePinGroup) int
Get the size, i.e., the number of pins, of the pin group.
- Returns
The size of the pin group.
- Return type
- property start_index
The start index of the pin group. Commonly, pin groups start at index 0, but this may not always be the case. Note that the start index for a pin group comprising n pins is 0 independent of whether it is ascending or descending.
- Type
- property type
The type of the pin group.
- Type