Interface definition¶
Topwrap uses interface definition files for its parsing functionality. These are used to match a given set of signals that appear in the HDL source with signals in the interface definition.
InterfaceDefinition
is defined as a marshmallow_dataclass.dataclass
- this enables loading YAML structure into Python objects and performs validation (that the YAML has the correct format) and typechecking (that the loaded values are of correct types).
- class InterfaceDefinition(name: str, port_prefix: str, signals: ~topwrap.interface.InterfaceDefinitionSignals = <factory>)¶
Interface described in YAML interface definition file
- __init__(name: str, port_prefix: str, signals: ~topwrap.interface.InterfaceDefinitionSignals = <factory>)¶
- Schema¶
alias of
InterfaceDefinition
- get_interface_by_name(name: str) InterfaceDefinition | None ¶
Retrieve interface definition by its name
- Returns:¶
InterfaceDefinition object, or None if there’s no such interface
Last update:
2024-11-12