HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
configuration.cpp
Go to the documentation of this file.
2 
3 namespace hal
4 {
5  namespace module_identification
6  {
7  Configuration::Configuration(Netlist* nl) : m_netlist(nl) {};
8 
10 
11  Configuration& Configuration::with_known_registers(const std::vector<std::vector<hal::Gate*>>& registers)
12  {
13  m_known_registers = registers;
14  return *this;
15  }
16 
18  {
20  return *this;
21  }
22 
24  {
25  m_max_control_signals = max_control_signals;
26  return *this;
27  }
28 
30  {
31  m_multithreading_priority = priority;
32  return *this;
33  }
34 
35  Configuration& Configuration::with_types_to_check(const std::vector<hal::module_identification::CandidateType>& types_to_check)
36  {
37  m_types_to_check = types_to_check;
38  return *this;
39  }
40 
41  Configuration& Configuration::with_already_classified_candidates(const std::vector<std::vector<hal::Gate*>>& already_classified_candidates)
42  {
43  m_already_classified_candidates = already_classified_candidates;
44  return *this;
45  }
46 
47  Configuration& Configuration::with_blocked_base_candidates(const std::vector<std::set<hal::Gate*>>& blocked_base_candidates)
48  {
49  m_blocked_base_candidates = blocked_base_candidates;
50  return *this;
51  }
52  } // namespace module_identification
53 
54  template<>
55  std::map<module_identification::CandidateType, std::string> EnumStrings<module_identification::CandidateType>::data = {
72  };
73 
74 } // namespace hal
uint32_t u32
Definition: defines.h:41
This file contains the struct Configuration for module identification analysis.
@ mixed
Mixed operation, for merged VerifiedCandidates that contain multiple candidate types.
@ signed_less_equal
Signed less-than-or-equal comparison.
@ addition_offset
Addition operation with a constant offset.
@ less_equal
Less-than-or-equal comparison.
@ value_check
Value check against a constant operation.
@ absolute
Absolute value operation.
@ constant_multiplication
Constant multiplication operation.
@ signed_less_than
Signed less-than comparison.
@ constant_multiplication_offset
Constant multiplication operation with a constant offset.
MultithreadingPriority
Specifies the strategy for multithreading in the module identification process.
Definition: defines.h:45
Configuration for the module identification analysis.
Definition: configuration.h:55
Configuration()
Constructs an empty configuration.
Configuration & with_multithreading_priority(const MultithreadingPriority &priority)
Set the multithreading priority type.
Configuration & with_types_to_check(const std::vector< module_identification::CandidateType > &types_to_check)
Set the candidate types to be checked.
Configuration & with_already_classified_candidates(const std::vector< std::vector< Gate * >> &already_classified_candidates)
Add gates to be ignored during processing.
std::vector< std::set< Gate * > > m_blocked_base_candidates
Base candidates to block during analysis.
std::vector< module_identification::CandidateType > m_types_to_check
CandidateTypes that shall be checked. Defaults to all checkable candidate types.
Definition: configuration.h:81
std::vector< std::vector< Gate * > > m_known_registers
A vector handling possibly known registers.
Definition: configuration.h:76
u32 m_max_control_signals
Maximum number of control signals to be tested. Defaults to 3.
Definition: configuration.h:91
Configuration & with_known_registers(const std::vector< std::vector< Gate * >> &registers)
Set the known registers for prioritization.
Configuration & with_blocked_base_candidates(const std::vector< std::set< Gate * >> &blocked_base_candidates)
Add base candidates to be blocked during analysis.
std::vector< std::vector< Gate * > > m_already_classified_candidates
Gates to ignore during processing.
Definition: configuration.h:96
Configuration & with_max_control_signals(const u32 &max_control_signals)
Set the maximum number of control signals to be tested.
Configuration & with_max_thread_count(const u32 &max_thread_count)
Set the maximum number of threads.
MultithreadingPriority m_multithreading_priority
Choose which MultithreadingPriority to use for the analysis. Defaults to memory priority.
u32 m_max_thread_count
Maximum number of concurrent threads created during execution. Defaults to 1.
Definition: configuration.h:86