|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
Represents a verified candidate for module identification. More...

Public Member Functions | |
| VerifiedCandidate (const std::vector< std::vector< Net * >> &operands, const std::vector< Net * > &output_nets, const std::vector< Net * > &control_signals, const std::vector< std::map< Net *, BooleanFunction::Value >> &control_signal_mappings, const std::map< std::map< Net *, BooleanFunction::Value >, BooleanFunction > &word_level_operations, const std::vector< Gate * > &gates, const std::vector< Gate * > &base_gates, const std::map< std::string, std::string > &additional_data, const std::set< CandidateType > &types) | |
Constructor for VerifiedCandidate. More... | |
| VerifiedCandidate () | |
Default constructor for an empty/unverified VerifiedCandidate. More... | |
| bool | operator== (const VerifiedCandidate &other) const |
| Equality comparison operator for two verified candidates. More... | |
| std::string | get_candidate_info () const |
| Get the candidate information as a string. More... | |
| bool | is_verified () const |
| Check if the candidate is verified. More... | |
| std::string | get_name () const |
| Get the name of the candidate that represents the functionality of the candidate. More... | |
| BooleanFunction | get_merged_word_level_operation () const |
| Get the merged word-level operation for the candidate. More... | |
Static Public Member Functions | |
| static hal::Result< VerifiedCandidate > | merge (const std::vector< VerifiedCandidate > &candidates) |
| Merge multiple verified candidates into a single candidate. More... | |
Public Attributes | |
| std::vector< std::vector< Net * > > | m_operands |
| std::vector< Net * > | m_output_nets |
| std::vector< Net * > | m_control_signals |
| std::vector< std::map< Net *, BooleanFunction::Value > > | m_control_signal_mappings |
| std::map< std::map< Net *, BooleanFunction::Value >, BooleanFunction > | m_word_level_operations |
| std::vector< Gate * > | m_gates |
| std::vector< Gate * > | m_base_gates |
| std::vector< Net * > | m_total_input_nets |
| std::vector< Net * > | m_total_output_nets |
| std::set< CandidateType > | m_types |
| bool | m_verified |
Represents a verified candidate for module identification.
This class is used to represent a verified candidate within the module identification process, providing methods for their creation, manipulation, and verification.
Definition at line 49 of file verified_candidate.h.
| hal::module_identification::VerifiedCandidate::VerifiedCandidate | ( | const std::vector< std::vector< Net * >> & | operands, |
| const std::vector< Net * > & | output_nets, | ||
| const std::vector< Net * > & | control_signals, | ||
| const std::vector< std::map< Net *, BooleanFunction::Value >> & | control_signal_mappings, | ||
| const std::map< std::map< Net *, BooleanFunction::Value >, BooleanFunction > & | word_level_operations, | ||
| const std::vector< Gate * > & | gates, | ||
| const std::vector< Gate * > & | base_gates, | ||
| const std::map< std::string, std::string > & | additional_data, | ||
| const std::set< CandidateType > & | types | ||
| ) |
Constructor for VerifiedCandidate.
| [in] | operands | - A vector of vectors of operand nets. |
| [in] | output_nets | - A vector of output nets. |
| [in] | control_signals | - A vector of control signal nets. |
| [in] | control_signal_mappings | - A vector of mappings from nets to their Boolean values. |
| [in] | word_level_operations | - A map of control signal mappings to their respective word-level operations. |
| [in] | gates | - A vector of gates associated with the candidate. |
| [in] | base_gates | - A vector of base gates associated with the candidate. |
| [in] | additional_data | - A map of additional data. |
| [in] | types | - A set of candidate types. |
Definition at line 16 of file verified_candidate.cpp.
| hal::module_identification::VerifiedCandidate::VerifiedCandidate | ( | ) |
Default constructor for an empty/unverified VerifiedCandidate.
Definition at line 29 of file verified_candidate.cpp.
References m_base_gates, m_control_signal_mappings, m_control_signals, m_gates, m_operands, m_output_nets, m_types, m_verified, and m_word_level_operations.
Referenced by merge().
| std::string hal::module_identification::VerifiedCandidate::get_candidate_info | ( | ) | const |
Get the candidate information as a string.
Definition at line 48 of file verified_candidate.cpp.
References hal::data, hal::enum_to_string(), hal::utils::join(), m_control_signal_mappings, m_control_signals, m_gates, m_operands, m_output_nets, m_types, and m_verified.
Referenced by hal::PYBIND11_PLUGIN().
| BooleanFunction hal::module_identification::VerifiedCandidate::get_merged_word_level_operation | ( | ) | const |
Get the merged word-level operation for the candidate.
The mergred word-level operation includes all word-level oprations that we were able to verify for different control mappings of the candidate.
Definition at line 196 of file verified_candidate.cpp.
References hal::BooleanFunction::And(), hal::BooleanFunction::clone(), hal::BooleanFunction::Const(), hal::BooleanFunction::Eq(), hal::BooleanFunctionNetDecorator::get_boolean_variable(), hal::BooleanFunction::is_empty(), hal::BooleanFunction::Ite(), log_error, m_output_nets, m_word_level_operations, net, hal::BooleanFunction::size(), and hal::BooleanFunction::Var().
Referenced by hal::PYBIND11_PLUGIN().
| std::string hal::module_identification::VerifiedCandidate::get_name | ( | ) | const |
Get the name of the candidate that represents the functionality of the candidate.
Definition at line 186 of file verified_candidate.cpp.
References hal::utils::join(), and m_types.
Referenced by hal::PYBIND11_PLUGIN().
| bool hal::module_identification::VerifiedCandidate::is_verified | ( | ) | const |
Check if the candidate is verified.
true if the candidate is verified, false otherwise. Definition at line 43 of file verified_candidate.cpp.
References m_verified.
Referenced by hal::PYBIND11_PLUGIN().
|
static |
Merge multiple verified candidates into a single candidate.
This function merges a vector of verified candidates into a single candidate.
| [in] | candidates | - A vector of verified candidates to merge. |
Definition at line 98 of file verified_candidate.cpp.
References ERR, log_warning, OK, and VerifiedCandidate().
Referenced by hal::PYBIND11_PLUGIN().
|
inline |
Equality comparison operator for two verified candidates.
Compares two verified candidates for equality.
| [in] | other | - The verified candidate to compare against. |
true if the candidates are equal, false otherwise. Definition at line 88 of file verified_candidate.h.
References m_control_signal_mappings, m_control_signals, m_gates, m_operands, m_output_nets, m_types, and m_verified.
| std::vector<Gate*> hal::module_identification::VerifiedCandidate::m_base_gates |
A vector of base gates associated with the candidate.
Definition at line 167 of file verified_candidate.h.
Referenced by hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<std::map<Net*, BooleanFunction::Value> > hal::module_identification::VerifiedCandidate::m_control_signal_mappings |
A vector of all control mappings covered by this candidate.
Definition at line 152 of file verified_candidate.h.
Referenced by get_candidate_info(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<Net*> hal::module_identification::VerifiedCandidate::m_control_signals |
A vector of control signal nets.
Definition at line 147 of file verified_candidate.h.
Referenced by get_candidate_info(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<Gate*> hal::module_identification::VerifiedCandidate::m_gates |
A vector of gates associated with the candidate.
Definition at line 162 of file verified_candidate.h.
Referenced by get_candidate_info(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<std::vector<Net*> > hal::module_identification::VerifiedCandidate::m_operands |
A vector of operands.
Definition at line 137 of file verified_candidate.h.
Referenced by get_candidate_info(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<Net*> hal::module_identification::VerifiedCandidate::m_output_nets |
A vector of output nets.
Definition at line 142 of file verified_candidate.h.
Referenced by get_candidate_info(), get_merged_word_level_operation(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::vector<Net*> hal::module_identification::VerifiedCandidate::m_total_input_nets |
A vector of all input nets to the gate subgraph, regardless of whether they appear in a word-level operation or not..
Definition at line 172 of file verified_candidate.h.
Referenced by hal::PYBIND11_PLUGIN().
| std::vector<Net*> hal::module_identification::VerifiedCandidate::m_total_output_nets |
A vector of all output nets of the subgrapg, regardless of whether they appear in a word-level operation or not.
Definition at line 177 of file verified_candidate.h.
Referenced by hal::PYBIND11_PLUGIN().
| std::set<CandidateType> hal::module_identification::VerifiedCandidate::m_types |
The set of contained candidate types.
Definition at line 182 of file verified_candidate.h.
Referenced by get_candidate_info(), get_name(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| bool hal::module_identification::VerifiedCandidate::m_verified |
Indicates whether the candidate is verified.
Definition at line 187 of file verified_candidate.h.
Referenced by get_candidate_info(), is_verified(), operator==(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().
| std::map<std::map<Net*, BooleanFunction::Value>, BooleanFunction> hal::module_identification::VerifiedCandidate::m_word_level_operations |
A map of control signal mappings to their respective word-level operations.
Definition at line 157 of file verified_candidate.h.
Referenced by get_merged_word_level_operation(), hal::PYBIND11_PLUGIN(), and VerifiedCandidate().