API reference
- class hdl_block_design.Block(name: str, parameters: dict[str, Parameter], pins: dict[str, Pin])[source]
Class representing an available block in a block design.
- classmethod from_vhdl_string(s: str | bytes) Self[source]
Create a Block from a VHDL string or bytes string.
- Raises:
RuntimeError – If s contains 0 or > 1 entity declarations.
- classmethod from_yaml_file(path: PathLike) Self
Create an object from a YAML file.
- classmethod from_yaml_string(string: str) Self
Create an object from a YAML string.
- Raises:
TypeError – If yaml returns a non-dict.
- __eq__(other)
Return self==value.
- __repr__()
Return repr(self).
- enum hdl_block_design.Direction(value)[source]
Class representing the direction of a pin.
- Member Type:
Valid values are as follows:
- IN = Direction.IN
The pin is an input.
- OUT = Direction.OUT
The pin is an output.
- INOUT = Direction.INOUT
The pin is an input and an output.
- class hdl_block_design.Pin(name: str, type: str, direction: Direction | str)[source]
Class representing a pin on a block.
- classmethod from_yaml_file(path: PathLike) Self
Create an object from a YAML file.
- classmethod from_yaml_string(string: str) Self
Create an object from a YAML string.
- Raises:
TypeError – If yaml returns a non-dict.
- __eq__(other)
Return self==value.
- __repr__()
Return repr(self).