|
HAL
v4.5.0-124-g47ab54673
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
Classes | |
| class | BitOrder |
| class | BitOrderResult |
Typedefs | |
| using | WordIndex = u32 |
Functions | |
| Result< BitOrderResult > | propagate_module_pingroup_bitorder (const BitOrderResult &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 BitOrderResult &ordered_module_pin_groups) |
| Reorder and rename the pins of the pin groups according to the provided bit-order information. More... | |
| Result< BitOrderResult > | 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< BitOrderResult > | 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< BitOrderResult > | 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< BitOrderResult > | 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 > * >, WordIndex > > | 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 > * >, WordIndex > > | export_bitorder_propagation_information (const BitOrderResult &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< BitOrderResult > | propagate_module_pingroup_bitorder (const BitOrderResult &src, const std::set< MPG > &unknown_bitorders, const bool enforce_continuous_bitorders) |
Propagates a known bit order from one module pin group to the pin groups that are connected to it.
| using hal::bitorder_propagation::WordIndex = typedef u32 |
The index of a module pin group among the words that export_bitorder_propagation_information writes.
It identifies a word within the exported file and has nothing to do with the index of a bit.
Definition at line 52 of file bit_order.h.
| Result< std::map< MPG, WordIndex > > hal::bitorder_propagation::export_bitorder_propagation_information | ( | const BitOrderResult & | 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 1521 of file bitorder_propagation.cpp.
References ERR, ERR_APPEND, hal::BooleanFunctionNetDecorator::get_boolean_variable_name(), identifier, and OK.
| Result< std::map< MPG, WordIndex > > 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 1490 of file bitorder_propagation.cpp.
References ERR_APPEND, hal::ModulePin::get_net(), index, and size.
Referenced by hal::PYBIND11_PLUGIN().
| Result< BitOrderResult > 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 1330 of file bitorder_propagation.cpp.
References ERR, and propagate_bitorder().
| Result< BitOrderResult > 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 1420 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< BitOrderResult > 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 1323 of file bitorder_propagation.cpp.
Referenced by propagate_bitorder(), and hal::PYBIND11_PLUGIN().
| Result< BitOrderResult > 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 1347 of file bitorder_propagation.cpp.
References ERR, hal::Netlist::get_module_by_id(), and propagate_bitorder().
| Result<BitOrderResult> hal::bitorder_propagation::propagate_module_pingroup_bitorder | ( | const BitOrderResult & | src, |
| const std::set< MPG > & | unknown_bitorders, | ||
| const bool | enforce_continuous_bitorders | ||
| ) |
Definition at line 888 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<BitOrderResult> hal::bitorder_propagation::propagate_module_pingroup_bitorder | ( | const BitOrderResult & | 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 BitOrderResult & | 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. |
Definition at line 1270 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(), and hal::PYBIND11_PLUGIN().