|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
Functions | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > | propagate_module_pingroup_bitorder (const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> &src, const std::set< std::pair< Module *, PinGroup< ModulePin > * >> &dst, const bool enforce_continuous_bitorders=true) |
| Propagate known bit-order information from the given module pin groups to module pin groups of unknown bit order. More... | |
| Result< std::monostate > | reorder_module_pin_groups (const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> &ordered_module_pin_groups) |
| Reorder and rename the pins of the pin groups according to the provided bit-order information. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > | propagate_bitorder (Netlist *nl, const std::pair< u32, std::string > &src, const std::pair< u32, std::string > &dst) |
| Propagate known bit-order information from one module pin group to another module pin group of unknown bit order. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > | propagate_bitorder (const std::pair< Module *, PinGroup< ModulePin > * > &src, const std::pair< Module *, PinGroup< ModulePin > * > &dst) |
| Propagate known bit-order information from one module pin group to another module pin group of unknown bit order. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > | propagate_bitorder (Netlist *nl, const std::vector< std::pair< u32, std::string >> &src, const std::vector< std::pair< u32, std::string >> &dst) |
| Propagate known bit-order information from the given module pin groups to module pin groups of unknown bit order. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > | propagate_bitorder (const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> &src, const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> &dst) |
| Propagate known bit-order information from the given module pin groups to module pin groups of unknown bit order. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, u32 > > | export_bitorder_propagation_information (const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> &src, const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> &dst, const std::string &export_filepath) |
Export word composition, known bitorder and connectivity in .json format to solve with external tools. More... | |
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, u32 > > | export_bitorder_propagation_information (const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> &src, const std::set< std::pair< Module *, PinGroup< ModulePin > * >> &dst, const std::string &export_filepath) |
Export word composition, known bitorder and connectivity in .json format to solve with external tools. More... | |
| Result< std::map< MPG, std::map< Net *, u32 > > > | propagate_module_pingroup_bitorder (const std::map< MPG, std::map< Net *, u32 >> &known_bitorders, const std::set< MPG > &unknown_bitorders, const bool enforce_continuous_bitorders) |
| Result< std::monostate > | reorder_module_pin_groups (const std::map< MPG, std::map< Net *, u32 >> &ordered_module_pin_groups) |
Propagates a known bit order from one module pin group to the pin groups that are connected to it.
| Result< std::map< MPG, u32 > > hal::bitorder_propagation::export_bitorder_propagation_information | ( | const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> & | src, |
| const std::set< std::pair< Module *, PinGroup< ModulePin > * >> & | dst, | ||
| const std::string & | export_filepath | ||
| ) |
Export word composition, known bitorder and connectivity in .json format to solve with external tools.
| [in] | src | - The known indices for the nets belonging to the given module pin groups. |
| [in] | dst | - The pairs of module ID and pin group name with unknown bit order. |
| [in] | export_filepath | - The filepath where the .json file should be written to. |
Definition at line 1485 of file bitorder_propagation.cpp.
References ERR, ERR_APPEND, hal::BooleanFunctionNetDecorator::get_boolean_variable_name(), identifier, and OK.
| Result< std::map< MPG, u32 > > hal::bitorder_propagation::export_bitorder_propagation_information | ( | const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> & | src, |
| const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> & | dst, | ||
| const std::string & | export_filepath | ||
| ) |
Export word composition, known bitorder and connectivity in .json format to solve with external tools.
| [in] | src | - The pairs of module and pin group with known bit order. |
| [in] | dst | - The pairs of module and pin group with unknown bit order. |
| [in] | export_filepath | - The filepath where the .json file should be written to. |
Definition at line 1454 of file bitorder_propagation.cpp.
References ERR_APPEND, hal::ModulePin::get_net(), index, and size.
Referenced by hal::PYBIND11_PLUGIN().
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > hal::bitorder_propagation::propagate_bitorder | ( | const std::pair< Module *, PinGroup< ModulePin > * > & | src, |
| const std::pair< Module *, PinGroup< ModulePin > * > & | dst | ||
| ) |
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.
| [in] | src | - The pair of module and pin group with known bit order. |
| [in] | dst | - The pair of module and pin group with unknown bit order. |
Definition at line 1294 of file bitorder_propagation.cpp.
References ERR, and propagate_bitorder().
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > hal::bitorder_propagation::propagate_bitorder | ( | const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> & | src, |
| const std::vector< std::pair< Module *, PinGroup< ModulePin > * >> & | dst | ||
| ) |
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.
| [in] | src | - The pairs of module and pin group with known bit order. |
| [in] | dst | - The pairs of module and pin group with unknown bit order. |
Definition at line 1384 of file bitorder_propagation.cpp.
References ERR_APPEND, hal::ModulePin::get_net(), index, log_info, net, OK, propagate_module_pingroup_bitorder(), reorder_module_pin_groups(), and size.
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > hal::bitorder_propagation::propagate_bitorder | ( | Netlist * | nl, |
| const std::pair< u32, std::string > & | src, | ||
| const std::pair< u32, std::string > & | dst | ||
| ) |
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.
| [in] | nl | - The netlist containing the module. |
| [in] | src | - The pair of module ID and pin group name with known bit order. |
| [in] | dst | - The pair of module ID and pin group name with unknown bit order. |
Definition at line 1287 of file bitorder_propagation.cpp.
Referenced by propagate_bitorder(), and hal::PYBIND11_PLUGIN().
| Result< std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 > > > hal::bitorder_propagation::propagate_bitorder | ( | Netlist * | nl, |
| const std::vector< std::pair< u32, std::string >> & | src, | ||
| const std::vector< std::pair< u32, std::string >> & | dst | ||
| ) |
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.
| [in] | nl | - The netlist containing the modules. |
| [in] | src | - The pairs of module ID and pin group name with known bit order. |
| [in] | dst | - The pairs of module ID and pin group name with unknown bit order. |
Definition at line 1311 of file bitorder_propagation.cpp.
References ERR, hal::Netlist::get_module_by_id(), and propagate_bitorder().
| Result<std::map<MPG, std::map<Net*, u32> > > hal::bitorder_propagation::propagate_module_pingroup_bitorder | ( | const std::map< MPG, std::map< Net *, u32 >> & | known_bitorders, |
| const std::set< MPG > & | unknown_bitorders, | ||
| const bool | enforce_continuous_bitorders | ||
| ) |
Definition at line 856 of file bitorder_propagation.cpp.
References hal::enum_to_string(), ERR, ERR_APPEND, hal::Net::get_id(), index, hal::input, log_error, log_info, log_warning, net, hal::none, and hal::output.
Referenced by propagate_bitorder().
| Result<std::map<std::pair<Module*, PinGroup<ModulePin>*>, std::map<Net*, u32> > > hal::bitorder_propagation::propagate_module_pingroup_bitorder | ( | const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> & | src, |
| const std::set< std::pair< Module *, PinGroup< ModulePin > * >> & | dst, | ||
| const bool | enforce_continuous_bitorders = true |
||
| ) |
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 map from net to index given for each pair of module and pin group in src. After propagation, the algorithm tries to reconstruct valid bit orders from the propagated information.
| [in] | src | - The known indices for the nets belonging to the given module pin groups. |
| [in] | dst | - The pairs of module ID and pin group name with unknown bit order. |
| [in] | enforce_continuous_bitorders | - Set true to only allow for continuous bit orders, false to also allow bit orders that are not continuous. Defaults to true. |
Referenced by hal::PYBIND11_PLUGIN().
| Result<std::monostate> hal::bitorder_propagation::reorder_module_pin_groups | ( | const std::map< MPG, std::map< Net *, u32 >> & | ordered_module_pin_groups | ) |
Definition at line 1236 of file bitorder_propagation.cpp.
References ERR, hal::BasePin< T >::get_group(), hal::BasePin< T >::get_name(), index, net, and OK.
Referenced by propagate_bitorder().
| Result<std::monostate> hal::bitorder_propagation::reorder_module_pin_groups | ( | const std::map< std::pair< Module *, PinGroup< ModulePin > * >, std::map< Net *, u32 >> & | ordered_module_pin_groups | ) |
Reorder and rename the pins of the pin groups according to the provided bit-order information.
| [in] | ordered_module_pin_groups | - A mapping from pairs of modules and their pin groups to known bit-order information given as a mapping from nets to their index. |
Referenced by hal::PYBIND11_PLUGIN().