Gate

class hal_py.Gate

Bases: hal_py.DataContainer

Gate class containing information about a gate including its location, functions, and module.

add_boolean_function(self: hal_py.Gate, name: str, func: hal::BooleanFunction) → bool

Add a Boolean function with the given name to the gate.

Parameters
Returns

True on success, False otherwise.

Return type

bool

property boolean_functions

A dictionary from function name to raw Boolean function for all boolean functions associated with this gate.

Return type

dict[str,hal_py.BooleanFunction]

property data

A dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.

Type

dict[tuple(str,str),tuple(str,str)]

delete_data(self: hal_py.DataContainer, category: str, key: str, log_with_info_level: bool = False) → bool

Delete a data entry.

Parameters
  • category (str) – The data category.

  • key (str) – The data key.

  • log_with_info_level (bool) – Force explicit logging channel ‘netlist’ with log level ‘info’ to trace GUI events.

Returns

True on success, False otherwise.

Return type

bool

delete_parameter(self: hal_py.DataContainer, name: str) → bool

Delete an explicitly stored parameter value, if any.

Parameters

name (str) – The parameter name.

Returns

True if a value was deleted, False otherwise.

Return type

bool

property fan_in_endpoints

A list of all fan-in endpoints of the gate, i.e., all endpoints associated with an input pin of the gate.

Type

list[hal_py.Endpoint]

property fan_in_nets

A list of all fan-in nets of the gate, i.e., all nets that are connected to one of the input pins.

Type

list[hal_py.Net]

property fan_out_endpoints

A list of all fan-out endpoints of the gate, i.e., all endpoints associated with an output pin of the gate.

Type

list[hal_py.Endpoint]

property fan_out_nets

A list of all fan-out nets of the gate, i.e., all nets that are connected to one of the output pins.

Type

list[hal_py.Net]

get_boolean_function(*args, **kwargs)

Overloaded function.

  1. get_boolean_function(self: hal_py.Gate, name: str) -> hal::BooleanFunction

    Get the raw Boolean function specified by the given name without inlining or net substitution. This name can for example be an output pin of the gate or any other user-defined function name. For full control over inlining and net substitution use get_boolean_function with inlined and substitute_nets.

    param str name

    The name. If empty, the first output pin is used.

    returns

    The Boolean function on success, an empty Boolean function otherwise.

    rtype

    hal_py.BooleanFunction

  2. get_boolean_function(self: hal_py.Gate, name: str, inlined: bool, substitute_nets: bool) -> Optional[hal::BooleanFunction]

    Get the Boolean function specified by the given name, with full error reporting. When inlined is True, internal and output pin variables are recursively substituted with their definitions, and any gate-instance parameter values are reduced. When substitute_nets is True, the remaining input pin variables are additionally substituted with variable names derived from the fan-in nets using BooleanFunctionNetDecorator. substitute_nets requires inlined to be True; passing substitute_nets=True with inlined=False returns None.

    param str name

    The name. Must not be empty.

    param bool inlined

    Set True to inline internal and output pins and reduce parameter-conditional expressions.

    param bool substitute_nets

    Set True to substitute input pin variables with fan-in net variables. Requires inlined=True and every input pin to have a connected net.

    returns

    The Boolean function on success, None otherwise.

    rtype

    hal_py.BooleanFunction or None

  3. get_boolean_function(self: hal_py.Gate, pin: hal_py.GatePin = None) -> hal::BooleanFunction

    Get the raw Boolean function corresponding to the given output pin without inlining or net substitution. If pin is None, the Boolean function of the first output pin is returned. For full control over inlining and net substitution use get_boolean_function with inlined and substitute_nets.

    param hal_py.GatePin pin

    The pin.

    returns

    The Boolean function on success, an empty Boolean function otherwise.

    rtype

    hal_py.BooleanFunction

  4. get_boolean_function(self: hal_py.Gate, pin: hal_py.GatePin, inlined: bool, substitute_nets: bool) -> Optional[hal::BooleanFunction]

    Get the Boolean function corresponding to the given output pin, with full error reporting. When inlined is True, internal and output pin variables are recursively substituted with their definitions, and any gate-instance parameter values are reduced. When substitute_nets is True, the remaining input pin variables are additionally substituted with variable names derived from the fan-in nets using BooleanFunctionNetDecorator. substitute_nets requires inlined to be True; passing substitute_nets=True with inlined=False returns None. Returns None if pin is None.

    param hal_py.GatePin pin

    The output pin.

    param bool inlined

    Set True to inline internal and output pins and reduce parameter-conditional expressions.

    param bool substitute_nets

    Set True to substitute input pin variables with fan-in net variables. Requires inlined=True and every input pin to have a connected net.

    returns

    The Boolean function on success, None otherwise.

    rtype

    hal_py.BooleanFunction or None

get_boolean_functions(*args, **kwargs)

Overloaded function.

  1. get_boolean_functions(self: hal_py.Gate, only_custom_functions: bool = False) -> Dict[str, hal::BooleanFunction]

    Get a dictionary from function name to raw Boolean function for all boolean functions associated with this gate. For full control over inlining and net substitution use get_boolean_functions with inlined and substitute_nets.

    param bool only_custom_functions

    Set True to get only Boolean functions that are local to the gate, False otherwise.

    returns

    A dict from function name to function on success, an empty dict otherwise.

    rtype

    dict[str,hal_py.BooleanFunction]

  2. get_boolean_functions(self: hal_py.Gate, only_custom_functions: bool, inlined: bool, substitute_nets: bool) -> Optional[Dict[str, hal::BooleanFunction]]

    Get a dictionary from function name to Boolean function for all boolean functions associated with this gate. When inlined is True, internal and output pin variables are recursively substituted with their definitions, and gate-instance parameter values are reduced. When substitute_nets is True, the remaining input pin variables are additionally substituted with variable names derived from the fan-in nets. substitute_nets requires inlined to be True. Aborts on the first failure and returns None.

    param bool only_custom_functions

    If True, returns only functions set via add_boolean_function().

    param bool inlined

    Set True to inline internal and output pins and reduce parameter-conditional expressions.

    param bool substitute_nets

    Set True to substitute input pin variables with fan-in net variables. Requires inlined=True.

    returns

    A map from function name to function on success, None otherwise.

    rtype

    dict[str,hal_py.BooleanFunction] or None

get_data(self: hal_py.DataContainer, category: str, key: str) → Tuple[str, str]

Get the data entry specified by the given category and key.

Parameters
  • category (str) – The data category.

  • key (str) – The data key.

Returns

The tuple ((1) type, (2) value).

Return type

tuple(str,str)

get_data_map(self: hal_py.DataContainer) → Dict[Tuple[str, str], Tuple[str, str]]

Get a dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.

Returns

The stored data as a dict.

Return type

dict[tuple(str,str),tuple(str,str)]

get_fan_in_endpoint(*args, **kwargs)

Overloaded function.

  1. get_fan_in_endpoint(self: hal_py.Gate, pin_name: str) -> hal_py.Endpoint

    Get the fan-in endpoint corresponding to the input pin specified by name.

    param str pin_name

    The input pin name.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  2. get_fan_in_endpoint(self: hal_py.Gate, pin: hal_py.GatePin) -> hal_py.Endpoint

    Get the fan-in endpoint corresponding to the specified input pin.

    param hal_py.GatePin pin

    The input pin.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  3. get_fan_in_endpoint(self: hal_py.Gate, net: hal::Net) -> hal_py.Endpoint

    Get the fan-in endpoint connected to the specified input net.

    param hal_py.Net net

    The input net.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

get_fan_in_endpoints(*args, **kwargs)

Overloaded function.

  1. get_fan_in_endpoints(self: hal_py.Gate) -> List[hal_py.Endpoint]

    Get a list of all fan-in endpoints of the gate, i.e., all endpoints associated with an input pin of the gate.

    returns

    A list of all fan-in endpoints.

    rtype

    list[hal_py.Endpoint]

  2. get_fan_in_endpoints(self: hal_py.Gate, filter: Callable[[hal_py.Endpoint], bool]) -> List[hal_py.Endpoint]

    Get a list of all fan-in endpoints of the gate, i.e., all endpoints associated with an input pin of the gate. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.

    param lambda filter

    Filter function to be evaluated on each endpoint.

    returns

    A list of all fan-in endpoints.

    rtype

    list[hal_py.Endpoint]

get_fan_in_net(*args, **kwargs)

Overloaded function.

  1. get_fan_in_net(self: hal_py.Gate, pin_name: str) -> hal::Net

    Get the fan-in net corresponding to the input pin specified by name.

    param str pin_name

    The input pin name.

    returns

    The fan-in net on success, None otherwise.

    rtype

    hal_py.Net or None

  2. get_fan_in_net(self: hal_py.Gate, pin: hal_py.GatePin) -> hal::Net

    Get the fan-in net corresponding to the specified input pin.

    param hal_py.GatePin pin

    The input pin.

    returns

    The fan-in net on success, None otherwise.

    rtype

    hal_py.Net or None

get_fan_in_nets(*args, **kwargs)

Overloaded function.

  1. get_fan_in_nets(self: hal_py.Gate) -> List[hal::Net]

    Get a list of all fan-in nets of the gate, i.e., all nets that are connected to one of the input pins.

    returns

    A list of all fan-in nets.

    rtype

    list[hal_py.Net]

  2. get_fan_in_nets(self: hal_py.Gate, filter: Callable[[hal::Net], bool]) -> List[hal::Net]

    Get a list of all fan-in nets of the gate, i.e., all nets that are connected to one of the input pins. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.

    param lambda filter

    Filter function to be evaluated on each net.

    returns

    A list of all fan-in nets.

    rtype

    list[hal_py.Net]

get_fan_out_endpoint(*args, **kwargs)

Overloaded function.

  1. get_fan_out_endpoint(self: hal_py.Gate, pin_name: str) -> hal_py.Endpoint

    Get the fan-out endpoint corresponding to the output pin specified by name.

    param str pin_name

    The output pin name.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  2. get_fan_out_endpoint(self: hal_py.Gate, pin: hal_py.GatePin) -> hal_py.Endpoint

    Get the fan-out endpoint corresponding to the specified output pin.

    param hal_py.GatePin pin

    The output pin.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  3. get_fan_out_endpoint(self: hal_py.Gate, net: hal::Net) -> hal_py.Endpoint

    Get the fan-out endpoint connected to the specified output net.

    param hal_py.Net net

    The output net.

    returns

    The endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

get_fan_out_endpoints(*args, **kwargs)

Overloaded function.

  1. get_fan_out_endpoints(self: hal_py.Gate) -> List[hal_py.Endpoint]

    Get a list of all fan-out endpoints of the gate, i.e., all endpoints associated with an output pin of the gate.

    returns

    A list of all fan-out endpoints.

    rtype

    list[hal_py.Endpoint]

  2. get_fan_out_endpoints(self: hal_py.Gate, filter: Callable[[hal_py.Endpoint], bool]) -> List[hal_py.Endpoint]

    Get a list of all fan-out endpoints of the gate, i.e., all endpoints associated with an output pin of the gate. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.

    param lambda filter

    Filter function to be evaluated on each endpoint.

    returns

    A list of all fan-out endpoints.

    rtype

    list[hal_py.Endpoint]

get_fan_out_net(*args, **kwargs)

Overloaded function.

  1. get_fan_out_net(self: hal_py.Gate, pin_name: str) -> hal::Net

    Get the fan-out net corresponding to the output pin specified by name.

    param str pin_name

    The output pin name.

    returns

    The fan-out net on success, None otherwise.

    rtype

    hal_py.Net or None

  2. get_fan_out_net(self: hal_py.Gate, pin: hal_py.GatePin) -> hal::Net

    Get the fan-out net corresponding to the specified output pin.

    param hal_py.GatePin pin

    The output pin.

    returns

    The fan-out net on success, None otherwise.

    rtype

    hal_py.Net or None

get_fan_out_nets(*args, **kwargs)

Overloaded function.

  1. get_fan_out_nets(self: hal_py.Gate) -> List[hal::Net]

    Get a list of all fan-out nets of the gate, i.e., all nets that are connected to one of the output pins.

    returns

    A list of all fan-out nets.

    rtype

    list[hal_py.Net]

  2. get_fan_out_nets(self: hal_py.Gate, filter: Callable[[hal::Net], bool]) -> List[hal::Net]

    Get a list of all fan-out nets of the gate, i.e., all nets that are connected to one of the output pins. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.

    param lambda filter

    Filter function to be evaluated on each net.

    returns

    A list of all fan-out nets.

    rtype

    list[hal_py.Net]

get_grouping(self: hal_py.Gate) → hal::Grouping

Gets the grouping in which this gate is contained. If no grouping contains this gate, None is returned.

Returns

The grouping.

Return type

hal_py.Grouping

get_id(self: hal_py.Gate) → int

Get the unique ID of the gate.

Returns

The unique id.

Return type

int

get_location(self: hal_py.Gate) → Tuple[int, int]

Get the physical location of the gate in the layout. If no valid physical location coordinate is assigned, a negative value is returned for the respective coordinate.

Returns

A tuple <x-coordinate, y-coordinate>.

Return type

tuple(int,int)

get_location_x(self: hal_py.Gate) → int

Get the physical location x-coordinate of the gate in the layout. If no valid physical location x-coordinate is assigned, a negative value is returned.

Returns

The gate’s x-coordinate.

Return type

int

get_location_y(self: hal_py.Gate) → int

Get the physical location y-coordinate of the gate in the layout. If no valid physical location y-coordinate is assigned, a negative value is returned.

Returns

The gate’s y-coordinate.

Return type

int

get_module(self: hal_py.Gate) → hal::Module

Get the module which contains this gate.

Returns

The module.

Return type

hal_py.Module

get_modules(self: hal_py.Gate, filter: Callable[[hal::Module], bool] = None, recursive: bool = True) → List[hal::Module]

Get all modules that contain this gate, either directly or as parent of another module. If recursive is set to True, indirect parent modules are also included. Otherwise, only the module containing the gate directly is returned. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.

Parameters
  • filter (lambda) – An optional filter.

  • recursive (bool) – Set True to include indirect parents as well, False otherwise.

Returns

A list of modules.

Return type

list[hal_py.Module]

get_name(self: hal_py.Gate) → str

Get the name of the gate.

Returns

The name.

Return type

str

get_netlist(self: hal_py.Gate) → hal_py.Netlist

Get the netlist this gate is associated with.

Returns

The netlist.

Return type

hal_py.Netlist

get_parameter_declaration(self: hal_py.DataContainer, name: str) → Optional[hal_py.Parameter]

Get the full declaration of a typed parameter.

Parameters

name (str) – The parameter name.

Returns

The parameter declaration on success, None otherwise.

Return type

hal_py.Parameter or None

get_parameter_value(*args, **kwargs)

Overloaded function.

  1. get_parameter_value(self: hal_py.DataContainer, name: str) -> Optional[str]

    Get the value of a typed parameter. Returns the explicitly-stored value or None if the parameter does not exist.

    param str name

    The parameter name.

    returns

    The value string on success, None otherwise.

    rtype

    str or None

  2. get_parameter_value(self: hal_py.DataContainer, name: hal_py.Parameter) -> Optional[str]

    Get the value of a typed parameter. Returns the explicitly-stored value or None if the parameter does not exist.

    param hal_py.Parameter param

    The parameter.

    returns

    The value string on success, None otherwise.

    rtype

    str or None

get_parameters(self: hal_py.DataContainer) → Dict[str, Tuple[hal_py.Parameter, str]]

Get all explicitly stored parameter values as a dict from name to (declaration, value).

Returns

The parameter dict.

Return type

dict[str,tuple(hal_py.Parameter,str)]

get_predecessor(*args, **kwargs)

Overloaded function.

  1. get_predecessor(self: hal_py.Gate, pin_name: str) -> hal_py.Endpoint

    Get a single direct predecessor endpoint that is connected to the input pin specified by name. Fails if there are no or more than one predecessors.

    param str pin_name

    The input pin name.

    returns

    The predecessor endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  2. get_predecessor(self: hal_py.Gate, pin: hal_py.GatePin) -> hal_py.Endpoint

    Get a single direct predecessor endpoint that is connected to the specified input pin. Fails if there are no or more than one predecessors.

    param hal_py.GatePin pin

    The input pin.

    returns

    The predecessor endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

get_predecessors(self: hal_py.Gate, filter: Callable[[hal_py.GatePin, hal_py.Endpoint], bool] = None) → List[hal_py.Endpoint]

Get a list of all direct predecessor endpoints of the gate, i.e., all predecessor endpoints that are connected to an input pin of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.

Parameters

filter (lambda) – An optional filter being evaluated on the gate’s input pin as well as the predecessor endpoint.

Returns

A list of predecessor endpoints.

Return type

list[hal_py.Endpoint]

get_successor(*args, **kwargs)

Overloaded function.

  1. get_successor(self: hal_py.Gate, pin_name: str) -> hal_py.Endpoint

    Get a single direct successor endpoint that is connected to the output pin specified by name. Fails if there are no or more than one successors.

    param str pin_name

    The output pin name.

    returns

    The successor endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

  2. get_successor(self: hal_py.Gate, pin: hal_py.GatePin) -> hal_py.Endpoint

    Get a single direct successor endpoint that is connected to the output pin specified by name. Fails if there are no or more than one successors.

    param hal_py.GatePin pin

    The output pin.

    returns

    The successor endpoint on success, None otherwise.

    rtype

    hal_py.Endpoint or None

get_successors(self: hal_py.Gate, filter: Callable[[hal_py.GatePin, hal_py.Endpoint], bool] = None) → List[hal_py.Endpoint]

Get a list of all direct successor endpoints of the gate, i.e., all successor endpoints that are connected to an output pin of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.

Parameters

filter (lambda) – An optional filter being evaluated on the gate’s output pin as well as the successor endpoint.

Returns

A list of successor endpoints.

Return type

list[hal_py.Endpoint]

get_type(self: hal_py.Gate) → hal_py.GateType

Get the type of the gate.

Returns

The type.

Return type

hal_py.Gate_type

get_unique_predecessors(self: hal_py.Gate, filter: Callable[[hal_py.GatePin, hal_py.Endpoint], bool] = None) → List[hal_py.Gate]

Get a list of all unique predecessor gates of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.

Parameters

filter (lambda) – An optional filter being evaluated on the gate’s input pin as well as the predecessor endpoint.

Returns

A list of unique predecessor gates.

Return type

list[hal_py.Gate]

get_unique_successors(self: hal_py.Gate, filter: Callable[[hal_py.GatePin, hal_py.Endpoint], bool] = None) → List[hal_py.Gate]

Get a list of all unique successor gates of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.

Parameters

filter (lambda) – An optional filter being evaluated on the gate’s output pin as well as the successor endpoint.

Returns

A list of unique successor gates.

Return type

list[hal_py.Gate]

has_boolean_function(*args, **kwargs)

Overloaded function.

  1. has_boolean_function(self: hal_py.Gate, name: str) -> bool

    Check whether the gate has a Boolean function with the given name, i.e., whether get_boolean_function finds one. This name can for example be an output pin of the gate or any other user-defined function name. Every LUT output pin has a Boolean function, even if the LUT is not configured.

    param str name

    The name.

    returns

    True if the gate has a Boolean function with that name, False otherwise.

    rtype

    bool

  2. has_boolean_function(self: hal_py.Gate, pin: hal_py.GatePin) -> bool

    Check whether the gate has a Boolean function for the given output pin, i.e., whether get_boolean_function finds one. If pin is None, the first output pin is checked. Every LUT output pin has a Boolean function, even if the LUT is not configured.

    param hal_py.GatePin pin

    The pin.

    returns

    True if the gate has a Boolean function for the pin, False otherwise.

    rtype

    bool

has_data(self: hal_py.DataContainer, category: str, key: str) → bool

Determine whether an entry of given category and key exists.

Parameters
  • category (str) – The data category.

  • key (str) – The data key.

Returns

True if the entry exists, False otherwise.

Return type

bool

has_location(self: hal_py.Gate) → bool

Checks whether the gate’s location in the layout is available.

Returns

True if valid location data is available, False otherwise.

Return type

bool

has_parameter(*args, **kwargs)

Overloaded function.

  1. has_parameter(self: hal_py.DataContainer, name: str) -> bool

    Check whether a parameter with the given name exists and has an explicitly stored value.

    param str name

    The parameter name.

    returns

    True if the parameter is explicitly set, False otherwise.

    rtype

    bool

  2. has_parameter(self: hal_py.DataContainer, param: hal_py.Parameter) -> bool

    Check whether a parameter exists and has an explicitly stored value.

    param hal_py.Parameter param

    The parameter.

    returns

    True if the parameter is explicitly set, False otherwise.

    rtype

    bool

property id

The unique ID of the gate.

Type

int

is_fan_in_net(self: hal_py.Gate, net: hal::Net) → bool

Check whether the given net is a fan-in of the gate.

Parameters

net (hal_py.Net) – The net.

Returns

True if the net is a fan-in of the gate, False otherwise.

Return type

bool

is_fan_out_net(self: hal_py.Gate, net: hal::Net) → bool

Check whether the given net is a fan-out of the gate.

Parameters

net (hal_py.Net) – The net.

Returns

True if the net is a fan-out of the gate, False otherwise.

Return type

bool

is_gnd_gate(self: hal_py.Gate) → bool

Checks whether this gate is a global gnd gate.

Returns

True if the gate is a global gnd gate, False otherwise.

Return type

bool

is_vcc_gate(self: hal_py.Gate) → bool

Checks whether this gate is a global vcc gate.

Returns

True if the gate is a global vcc gate, False otherwise.

Return type

bool

property location

The physical location of the gate in the layout. Only positive values are valid, negative values will be regarded as no location assigned.

Type

tuple(int,int)

property location_x

The x-coordinate of the physical location of the gate in the layout. Only positive values are valid, negative values will be regarded as no location assigned.

Type

int

property location_y

The y-coordinate of the physical location of the gate in the layout. Only positive values are valid, negative values will be regarded as no location assigned.

Type

int

mark_gnd_gate(self: hal_py.Gate) → bool

Mark this gate as a global gnd gate.

Returns

True on success, False otherwise.

Return type

bool

mark_vcc_gate(self: hal_py.Gate) → bool

Mark this gate as a global vcc gate.

Returns

True on success, False otherwise.

Return type

bool

property module

The module in which contains this gate.

Type

hal_py.Module

property modules

A list of all modules that contain this gate, either directly or as parent of another module.

Type

list[hal_py.Module]

property name

The name of the gate.

Type

str

property netlist

The netlist this gate is associated with.

Type

hal_py.Netlist

property parameters

All explicitly stored parameter values as a dict from name to (declaration, value).

Type

dict[str,tuple(hal_py.Parameter,str)]

property predecessors

A list of all direct predecessor endpoints of the gate, i.e., all predecessor endpoints that are connected to an input pin of the gate.

Type

list[hal_py.Endpoint]

set_data(self: hal_py.DataContainer, category: str, key: str, data_type: str, value: str, log_with_info_level: bool = False) → bool

Add a data entry.<br> May overwrite an existing entry.

Parameters
  • category (str) – The data category.

  • key (str) – The data key.

  • data_type (str) – The data type.

  • value (str) – The data value.

  • log_with_info_level (bool) – Force explicit logging channel ‘netlist’ with log level ‘info’ to trace GUI events.

Returns

True on success, False otherwise.

Return type

bool

set_location(self: hal_py.Gate, location: Tuple[int, int]) → None

Set the physical location of the gate in the layout. Only positive coordinates are valid, negative values will be regarded as no location assigned.

Parameters

location (tuple(int,int)) – A tuple <x-coordinate, y-coordinate>.

set_location_x(self: hal_py.Gate, x: int) → None

Set the physical location x-coordinate of the gate in the layout. Only positive values are valid, negative values will be regarded as no location assigned.

Parameters

x (int) – The gate’s x-coordinate.

set_location_y(self: hal_py.Gate, y: int) → None

Set the physical location y-coordinate of the gate in the layout. Only positive values are valid, negative values will be regarded as no location assigned.

Parameters

y (int) – The gate’s y-coordinate.

set_name(self: hal_py.Gate, name: str) → None

Set the name of the gate.

Parameters

name (str) – The new name.

set_parameter(self: hal_py.DataContainer, param: hal_py.Parameter, value: str) → bool

Set (or overwrite) the value of a typed parameter as a string. The value is validated, normalized, and stored; any existing entry with the same name is replaced.

Parameters
  • param (hal_py.Parameter) – The parameter declaration.

  • value (str) – The value to store as a string.

Returns

True on success, False otherwise.

Return type

bool

property successors

A list of all direct successor endpoints of the gate, i.e., all successor endpoints that are connected to an output pin of the gate.

Type

list[hal_py.Endpoint]

property type

The type of the gate

Type

hal_py.Gate_type

property unique_predecessors

A list of all unique predecessor gates of the gate.

Type

list[hal_py.Gate]

property unique_successors

A list of all unique successor gates of the gate.

Type

list[hal_py.Gate]

unmark_gnd_gate(self: hal_py.Gate) → bool

Unmark this gate as a global gnd gate.

Returns

True on success, False otherwise.

Return type

bool

unmark_vcc_gate(self: hal_py.Gate) → bool

Unmark this gate as a global vcc gate.

Returns

True on success, False otherwise.

Return type

bool