elasticai.creator.ir2vhdl.language#

Module Contents#

Classes#

Signal

LogicSignal

LogicVectorSignal

NullDefinedLogicSignal

PortMap

Instance

Represents an entity that we can/want instantiate.

InstanceFactory

Automatically creates Instances from VhdlNodes based on their type field.

API#

class elasticai.creator.ir2vhdl.language.Signal[source]#

Bases: abc.ABC

types: set[type[elasticai.creator.ir2vhdl.language.Signal]]#

‘set(…)’

abstractmethod define() collections.abc.Iterator[str][source]#
abstract property name: str#
classmethod from_code(code: str) elasticai.creator.ir2vhdl.language.Signal[source]#
abstractmethod classmethod can_create_from_code(code: str) bool[source]#
classmethod register_type(t: type[elasticai.creator.ir2vhdl.language.Signal]) None[source]#
abstractmethod make_instance_specific(instance: str) elasticai.creator.ir2vhdl.language.Signal[source]#
class elasticai.creator.ir2vhdl.language.LogicSignal(name: str)[source]#

Bases: elasticai.creator.ir2vhdl.language.Signal

define() collections.abc.Iterator[str][source]#
property name: str#
classmethod can_create_from_code(code: str) bool[source]#
classmethod from_code(code: str) elasticai.creator.ir2vhdl.language.Signal[source]#
make_instance_specific(instance: str) elasticai.creator.ir2vhdl.language.Signal[source]#
__eq__(other: object) bool[source]#
class elasticai.creator.ir2vhdl.language.LogicVectorSignal(name: str, width: int)[source]#

Bases: elasticai.creator.ir2vhdl.language.Signal

define() collections.abc.Iterator[str][source]#
property name: str#
property width: int#
classmethod can_create_from_code(code: str) bool[source]#
classmethod from_code(code: str) elasticai.creator.ir2vhdl.language.Signal[source]#
make_instance_specific(instance: str) elasticai.creator.ir2vhdl.language.Signal[source]#
__eq__(other) bool[source]#
class elasticai.creator.ir2vhdl.language.NullDefinedLogicSignal(name)[source]#

Bases: elasticai.creator.ir2vhdl.language.Signal

define() collections.abc.Iterator[str][source]#
property name: str#
classmethod can_create_from_code(code: str) bool[source]#
classmethod from_code(code: str) elasticai.creator.ir2vhdl.language.Signal[source]#
make_instance_specific(instance: str) elasticai.creator.ir2vhdl.language.Signal[source]#
class elasticai.creator.ir2vhdl.language.PortMap(map: dict[str, elasticai.creator.ir2vhdl.language.Signal])[source]#

Initialization

as_dict() dict[str, str][source]#
classmethod from_dict(data: dict[str, str]) elasticai.creator.ir2vhdl.language.PortMap[source]#
__eq__(other: object) bool[source]#
class elasticai.creator.ir2vhdl.language.Instance(node: elasticai.creator.hdl_ir.Node, generic_map: dict[str, str], port_map: dict[str, elasticai.creator.ir2vhdl.language.Signal])[source]#

Represents an entity that we can/want instantiate.

The aggregates all the knowledge that is necessary to instantiate and use the corresponding entity programmatically, when generating vhdl code.

Initialization

property input_shape: elasticai.creator.hdl_ir.Shape#
property output_shape: elasticai.creator.hdl_ir.Shape#
property name: str#
property implementation: str#
define_signals() collections.abc.Iterator[str][source]#
instantiate() collections.abc.Iterator[str][source]#
class elasticai.creator.ir2vhdl.language.InstanceFactory[source]#

Automatically creates Instances from VhdlNodes based on their type field.

register(type: str | None, fn: collections.abc.Callable[[elasticai.creator.hdl_ir.Node], elasticai.creator.ir2vhdl.language.Instance]) collections.abc.Callable[[elasticai.creator.hdl_ir.Node], elasticai.creator.ir2vhdl.language.Instance][source]#
__call__(node: elasticai.creator.hdl_ir.Node) elasticai.creator.ir2vhdl.language.Instance[source]#