|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
The result of a module identification run containing the candidates. More...
#include </home/runner/work/hal/hal/plugins/module_identification/include/module_identification/api/result.h>

Public Member Functions | |
| Result (Netlist *nl, const std::vector< std::pair< BaseCandidate, VerifiedCandidate >> &result, const std::string &timing_stats_json="") | |
Constructor for Result. More... | |
| Netlist * | get_netlist () const |
| Get the netlist on which module identification has been performed. More... | |
| std::map< u32, std::vector< Gate * > > | get_verified_candidate_gates () const |
| Get a map of the candidate IDs to the gates contained inside the verified candidates. More... | |
| std::map< u32, VerifiedCandidate > | get_verified_candidates () const |
| Get a map of the candidate IDs to the verified candidates. More... | |
| std::map< u32, std::vector< Gate * > > | get_candidate_gates () const |
| Get a map of the candidate IDs to the gates contained inside the candidate. More... | |
| std::map< u32, VerifiedCandidate > | get_candidates () const |
| Get a map of the candidate IDs to the candidates. More... | |
| hal::Result< std::vector< Gate * > > | get_candidate_gates_by_id (const u32 id) const |
| Get the gates of the candidate with the corresponding ID. More... | |
| hal::Result< VerifiedCandidate > | get_candidate_by_id (const u32 id) const |
| Returns the candidate with the corresponding ID. More... | |
| std::set< Gate * > | get_all_gates () const |
| Get all gates contained in any of the candidates. More... | |
| std::set< Gate * > | get_all_verified_gates () const |
| Get all gates contained in any of the verified candidates. More... | |
| hal::Result< std::monostate > | create_modules_in_netlist () |
| Creates a HAL module for each candidate of the result. More... | |
| std::string | get_timing_stats () const |
| Get the collected timing information formatted as a JSON string. More... | |
| hal::Result< Result > | merge (const Result &other, const std::vector< std::vector< Gate * >> ®isters) const |
| Merges two results by combining the found verified candidates. More... | |
Static Public Member Functions | |
| static std::vector< std::vector< std::set< Gate * > > > | assign_base_candidates_to_iterations (const std::vector< Result > &iteration_results, const bool create_block_lists=false) |
| For different runs of the plugin figure out in which iteration the plugin found the highest quality result for each candidate. More... | |
The result of a module identification run containing the candidates.
| hal::module_identification::Result::Result | ( | Netlist * | nl, |
| const std::vector< std::pair< BaseCandidate, VerifiedCandidate >> & | result, | ||
| const std::string & | timing_stats_json = "" |
||
| ) |
Constructor for Result.
| [in] | nl | - The netlist on which module identification has been performed. |
| [in] | result | - A vector of pairs containing base candidates and their verified candidates. |
| [in] | timing_stats_json | - A JSON string containing timing statistics. Defaults to an empty string. |
Definition at line 18 of file result.cpp.
|
static |
For different runs of the plugin figure out in which iteration the plugin found the highest quality result for each candidate.
This is used to compare the results of different runs of the plugin and afterwards get a list of base candidates for each execution for which this execution gave the best results.
| [in] | iteration_results | - A vector of all the execution results. |
| [in] | create_block_lists | - A parameter to determine whether to create allow or block lists. |
Definition at line 872 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| hal::Result< std::monostate > hal::module_identification::Result::create_modules_in_netlist | ( | ) |
Creates a HAL module for each candidate of the result.
Definition at line 426 of file result.cpp.
References hal::control, hal::module_identification::counter, hal::Netlist::create_module(), hal::data, ERR, hal::Netlist::get_top_module(), hal::input, hal::utils::is_subset(), hal::utils::join(), log_error, log_info, log_warning, name, net, OK, hal::BooleanFunction::ONE, hal::output, hal::DataContainer::set_data(), and hal::BooleanFunctionDecorator::substitute_module_pins().
| std::set< Gate * > hal::module_identification::Result::get_all_gates | ( | ) | const |
Get all gates contained in any of the candidates.
Definition at line 107 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| std::set< Gate * > hal::module_identification::Result::get_all_verified_gates | ( | ) | const |
Get all gates contained in any of the verified candidates.
Definition at line 124 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| hal::Result< VerifiedCandidate > hal::module_identification::Result::get_candidate_by_id | ( | const u32 | id | ) | const |
| std::map< u32, std::vector< Gate * > > hal::module_identification::Result::get_candidate_gates | ( | ) | const |
Get a map of the candidate IDs to the gates contained inside the candidate.
This map contains all checked candidates, even the ones not verified. The ID is only unique for this result.
Definition at line 57 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| hal::Result< std::vector< Gate * > > hal::module_identification::Result::get_candidate_gates_by_id | ( | const u32 | id | ) | const |
| std::map< u32, VerifiedCandidate > hal::module_identification::Result::get_candidates | ( | ) | const |
Get a map of the candidate IDs to the candidates.
This map contains all checked candidates, even the ones not verified. The ID is only unique for this result.
Definition at line 68 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| Netlist * hal::module_identification::Result::get_netlist | ( | ) | const |
Get the netlist on which module identification has been performed.
Definition at line 23 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| std::string hal::module_identification::Result::get_timing_stats | ( | ) | const |
Get the collected timing information formatted as a JSON string.
Definition at line 680 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| std::map< u32, std::vector< Gate * > > hal::module_identification::Result::get_verified_candidate_gates | ( | ) | const |
Get a map of the candidate IDs to the gates contained inside the verified candidates.
This map only contains verified candidates that are fully verified. The ID is only unique for this result.
Definition at line 28 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| std::map< u32, VerifiedCandidate > hal::module_identification::Result::get_verified_candidates | ( | ) | const |
Get a map of the candidate IDs to the verified candidates.
This map only contains verified candidates that are fully verified. The ID is only unique for this result.
Definition at line 43 of file result.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| hal::Result< Result > hal::module_identification::Result::merge | ( | const Result & | other, |
| const std::vector< std::vector< Gate * >> & | registers | ||
| ) | const |
Merges two results by combining the found verified candidates.
When both results contain a verified candidate for the same base candidate, the better one is chosen via the same post-processing used in the orignal module identificaion process. This requires that the base candidates are identical and that all gates of all candidates still exist in the netlist!
| [in] | other | - Another module identification result that is merged with this one. |
| [in] | registers | - A list of previously identified register groupings that is used in the post-processing. |
Definition at line 685 of file result.cpp.
References hal::Module::contains_gate(), ERR, hal::Netlist::get_top_module(), OK, and hal::module_identification::post_processing().