Skip to content

netlist_carpentry.io.read.yosys_netlist

Module handling the reading of a Yosys-generated JSON netlist and transformation into corresponding Python objects.

Classes:

YosysNetlistReader

YosysNetlistReader(path: Union[str, Path])

Bases: AbstractReader

Attributes:

module_name_mapping property

module_name_mapping: ModuleNameMapping

The mapping from original module names to normalized module names.

module_definitions property

module_definitions: Set[str]

The set of module definitions found in the netlist.

module_instantiations property

module_instantiations: Set[str]

The set of module instantiations found in the netlist.

undefined_modules property

undefined_modules: Set[str]

Return a set of module names that are instantiated but not defined in the netlist.

This set indicates submodule instantiations, where no definition is present. These instances will be treated as black-box cells, since their implementation remains unknown.

uninstantiated_modules property

uninstantiated_modules: Set[str]

Return a set of module names that are defined but not instantiated in the netlist.

This set indicates module definitions that are never used anywhere. These modules might be unnecessary.