Bit-Order Propagation
Tool to automatically propagate known bit orders to module pin groups of unknown bit order.
- bitorder_propagation.propagate_bitorder(*args, **kwargs)
Overloaded function.
propagate_bitorder(nl: hal_py.Netlist, src: Tuple[int, str], dst: Tuple[int, str]) -> Optional[Dict[Tuple[hal_py.Module, hal_py.ModulePinGroup], Dict[hal_py.Net, int]]]
Propagate known bit-order information from one module pin group to another module pin group of unknown bit order. The known bit-order information is taken from the order of pins in the pin group of
src
. After propagation, the algorithm tries to reconstruct a valid bit order from the propagated information. The valid bit order is then annotated to the module pin group, i.e., the pins of the respective pin group are renamed and reordered.- param hal_py.netlist nl
The netlist containing the module.
- param tuple(int,str) src
The pair of module ID and pin group name with known bit order.
- param tuple(int,str) dst
The pair of module ID and pin group name with unknown bit order.
- returns
A dict containing all known bit orders (including new and already known ones) on success,
None
otherwise.- rtype
dict[tuple(hal_py.Module,hal_py.ModulePinGroup),dict[hal_py.Net,int]] or None
propagate_bitorder(src: Tuple[hal_py.Module, hal_py.ModulePinGroup], dst: Tuple[hal_py.Module, hal_py.ModulePinGroup]) -> Optional[Dict[Tuple[hal_py.Module, hal_py.ModulePinGroup], Dict[hal_py.Net, int]]]
Propagate known bit-order information from one module pin group to another module pin group of unknown bit order. The known bit-order information is taken from the order of pins in the pin group of
src
. After propagation, the algorithm tries to reconstruct a valid bit order from the propagated information. The valid bit order is then annotated to the module pin group, i.e., the pins of the respective pin group are renamed and reordered.- param tuple(hal_py.Module,hal_py.ModulePinGroup) src
The pair of module and pin group with known bit order.
- param tuple(hal_py.Module,hal_py.ModulePinGroup) dst
The pair of module and pin group with unknown bit order.
- returns
A dict containing all known bit orders (including new and already known ones) on success,
None
otherwise.- rtype
dict[tuple(hal_py.Module,hal_py.ModulePinGroup),dict[hal_py.Net,int]] or None
propagate_bitorder(nl: hal_py.Netlist, src: List[Tuple[int, str]], dst: List[Tuple[int, str]]) -> Optional[Dict[Tuple[hal_py.Module, hal_py.ModulePinGroup], Dict[hal_py.Net, int]]]
Propagate known bit-order information from the given module pin groups to module pin groups of unknown bit order. The known bit-order information is taken from the order of pins in the pin groups of
src
. After propagation, the algorithm tries to reconstruct valid bit orders from the propagated information. The valid bit orders are then annotated to the module pin groups, i.e., the pins of the respective pin groups are renamed and reordered.- param hal_py.netlist nl
The netlist containing the modules.
- param list[tuple(int,str)] src
The pairs of module ID and pin group name with known bit order.
- param list[tuple(int,str)] dst
The pairs of module ID and pin group name with unknown bit order.
- returns
A dict containing all known bit orders (including new and already known ones) on success,
None
otherwise.- rtype
dict[tuple(hal_py.Module,hal_py.ModulePinGroup),dict[hal_py.Net,int]] or None
propagate_bitorder(src: List[Tuple[hal_py.Module, hal_py.ModulePinGroup]], dst: List[Tuple[hal_py.Module, hal_py.ModulePinGroup]]) -> Optional[Dict[Tuple[hal_py.Module, hal_py.ModulePinGroup], Dict[hal_py.Net, int]]]
Propagate known bit-order information from the given module pin groups to module pin groups of unknown bit order. The known bit-order information is taken from the order of pins in the pin groups of
src
. After propagation, the algorithm tries to reconstruct valid bit orders from the propagated information. The valid bit orders are then annotated to the module pin groups, i.e., the pins of the respective pin groups are renamed and reordered.- param list[tuple(hal_py.Module,hal_py.ModulePinGroup)] src
The pairs of module and pin group with known bit order.
- param list[tuple(hal_py.Module,hal_py.ModulePinGroup)] dst
The pairs of module and pin group with unknown bit order.
- returns
A dict containing all known bit orders (including new and already known ones) on success,
None
otherwise.- rtype
dict[tuple(hal_py.Module,hal_py.ModulePinGroup),dict[hal_py.Net,int]] or None
- bitorder_propagation.reorder_module_pin_groups(ordered_module_pin_groups: Dict[Tuple[hal_py.Module, hal_py.ModulePinGroup], Dict[hal_py.Net, int]]) bool
Reorder and rename the pins of the pin groups according to the provided bit-order information.
- Parameters
ordered_module_pin_groups (dict[tuple(hal_py.Module,hal_py.ModulePinGroup),dict[hal_py.Net,int]]) – A mapping from pairs of modules and their pin groups to known bit-order information given as a mapping from nets to their index.
- Returns
True
on success,False
otherwise.- Return type
- class bitorder_propagation.BitorderPropagationPlugin
This class provides an interface to integrate the bit-order propagation as a plugin within the HAL framework.
- get_description(self: bitorder_propagation.BitorderPropagationPlugin) str
Get the description of the plugin.
- Returns
The description of the plugin.
- Return type
- get_name(self: bitorder_propagation.BitorderPropagationPlugin) str
Get the name of the plugin.
- Returns
The name of the plugin.
- Return type
- get_version(self: bitorder_propagation.BitorderPropagationPlugin) str
Get the version of the plugin.
- Returns
The version of the plugin.
- Return type