HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::module_identification::Configuration Struct Reference

Configuration for the module identification analysis. More...

#include </home/runner/work/hal/hal/plugins/module_identification/include/module_identification/api/configuration.h>

Collaboration diagram for hal::module_identification::Configuration:
Collaboration graph

Public Member Functions

 Configuration (Netlist *nl)
 Constructs a new ModuleIdentification analysis configuration for the given netlist. More...
 
 Configuration ()
 Constructs an empty configuration. More...
 
Configurationwith_known_registers (const std::vector< std::vector< Gate * >> &registers)
 Set the known registers for prioritization. More...
 
Configurationwith_max_thread_count (const u32 &max_thread_count)
 Set the maximum number of threads. More...
 
Configurationwith_max_control_signals (const u32 &max_control_signals)
 Set the maximum number of control signals to be tested. More...
 
Configurationwith_multithreading_priority (const MultithreadingPriority &priority)
 Set the multithreading priority type. More...
 
Configurationwith_types_to_check (const std::vector< module_identification::CandidateType > &types_to_check)
 Set the candidate types to be checked. More...
 
Configurationwith_already_classified_candidates (const std::vector< std::vector< Gate * >> &already_classified_candidates)
 Add gates to be ignored during processing. More...
 
Configurationwith_blocked_base_candidates (const std::vector< std::set< Gate * >> &blocked_base_candidates)
 Add base candidates to be blocked during analysis. More...
 

Public Attributes

Netlistm_netlist
 The netlist to be analyzed. More...
 
std::vector< std::vector< Gate * > > m_known_registers = {}
 A vector handling possibly known registers. More...
 
std::vector< module_identification::CandidateTypem_types_to_check = all_checkable_candidate_types
 CandidateTypes that shall be checked. Defaults to all checkable candidate types. More...
 
u32 m_max_thread_count = 1
 Maximum number of concurrent threads created during execution. Defaults to 1. More...
 
u32 m_max_control_signals = 3
 Maximum number of control signals to be tested. Defaults to 3. More...
 
std::vector< std::vector< Gate * > > m_already_classified_candidates = {}
 Gates to ignore during processing. More...
 
std::vector< std::set< Gate * > > m_blocked_base_candidates = {}
 Base candidates to block during analysis. More...
 
MultithreadingPriority m_multithreading_priority = MultithreadingPriority::memory_priority
 Choose which MultithreadingPriority to use for the analysis. Defaults to memory priority. More...
 

Detailed Description

Configuration for the module identification analysis.

This struct holds important parameters that configure the module identification analysis, including netlist to analyze, known registers, candidate types to check, threading options, etc.

Definition at line 54 of file configuration.h.

Constructor & Destructor Documentation

◆ Configuration() [1/2]

hal::module_identification::Configuration::Configuration ( Netlist nl)

Constructs a new ModuleIdentification analysis configuration for the given netlist.

Parameters
[in]nl- The netlist to be analyzed.

Definition at line 7 of file configuration.cpp.

◆ Configuration() [2/2]

hal::module_identification::Configuration::Configuration ( )

Constructs an empty configuration.

Definition at line 9 of file configuration.cpp.

Member Function Documentation

◆ with_already_classified_candidates()

Configuration & hal::module_identification::Configuration::with_already_classified_candidates ( const std::vector< std::vector< Gate * >> &  already_classified_candidates)

Add gates to be ignored during processing.

All candidates that are build during the module identification run that contain any gates that overlap with any already classified candidate are discarded to avoid conflicts.

Parameters
[in]already_classified_candidates- Candidates to be ignored.
Returns
The updated module identification configuration.

Definition at line 41 of file configuration.cpp.

References m_already_classified_candidates.

Referenced by hal::PYBIND11_PLUGIN().

◆ with_blocked_base_candidates()

Configuration & hal::module_identification::Configuration::with_blocked_base_candidates ( const std::vector< std::set< Gate * >> &  blocked_base_candidates)

Add base candidates to be blocked during analysis.

Parameters
[in]blocked_base_candidates- Base candidates to be ignored.
Returns
The updated module identification configuration.

Definition at line 47 of file configuration.cpp.

References m_blocked_base_candidates.

Referenced by hal::PYBIND11_PLUGIN().

◆ with_known_registers()

Configuration & hal::module_identification::Configuration::with_known_registers ( const std::vector< std::vector< Gate * >> &  registers)

Set the known registers for prioritization.

Parameters
[in]registers- The groups provided by a dana run.
Returns
The updated module identification configuration.

Definition at line 11 of file configuration.cpp.

References m_known_registers.

Referenced by hal::PYBIND11_PLUGIN().

◆ with_max_control_signals()

Configuration & hal::module_identification::Configuration::with_max_control_signals ( const u32 max_control_signals)

Set the maximum number of control signals to be tested.

Parameters
[in]max_control_signals- The number of control signals checked.
Returns
The updated module identification configuration.

Definition at line 23 of file configuration.cpp.

References m_max_control_signals.

Referenced by hal::GuiExtensionModuleIdentification::execute_function(), and hal::PYBIND11_PLUGIN().

◆ with_max_thread_count()

Configuration & hal::module_identification::Configuration::with_max_thread_count ( const u32 max_thread_count)

Set the maximum number of threads.

Parameters
[in]max_thread_count- The number of threads to be started at max.
Returns
The updated module identification configuration.

Definition at line 17 of file configuration.cpp.

References m_max_thread_count.

Referenced by hal::GuiExtensionModuleIdentification::execute_function(), and hal::PYBIND11_PLUGIN().

◆ with_multithreading_priority()

Configuration & hal::module_identification::Configuration::with_multithreading_priority ( const MultithreadingPriority priority)

Set the multithreading priority type.

Parameters
[in]priority- The type of multithreading used during execution.
Returns
The updated module identification configuration.

Definition at line 29 of file configuration.cpp.

References m_multithreading_priority.

Referenced by hal::GuiExtensionModuleIdentification::execute_function(), and hal::PYBIND11_PLUGIN().

◆ with_types_to_check()

Configuration & hal::module_identification::Configuration::with_types_to_check ( const std::vector< module_identification::CandidateType > &  types_to_check)

Set the candidate types to be checked.

Parameters
[in]types_to_check- A list of candidate types to be checked for.
Returns
The updated module identification configuration.

Definition at line 35 of file configuration.cpp.

References m_types_to_check.

Referenced by hal::GuiExtensionModuleIdentification::execute_function(), and hal::PYBIND11_PLUGIN().

Member Data Documentation

◆ m_already_classified_candidates

std::vector<std::vector<Gate*> > hal::module_identification::Configuration::m_already_classified_candidates = {}

Gates to ignore during processing.

Definition at line 96 of file configuration.h.

Referenced by hal::module_identification::generate_structural_candidates(), hal::PYBIND11_PLUGIN(), and with_already_classified_candidates().

◆ m_blocked_base_candidates

std::vector<std::set<Gate*> > hal::module_identification::Configuration::m_blocked_base_candidates = {}

Base candidates to block during analysis.

Definition at line 101 of file configuration.h.

Referenced by hal::module_identification::generate_structural_candidates(), hal::PYBIND11_PLUGIN(), and with_blocked_base_candidates().

◆ m_known_registers

std::vector<std::vector<Gate*> > hal::module_identification::Configuration::m_known_registers = {}

A vector handling possibly known registers.

Definition at line 76 of file configuration.h.

Referenced by hal::module_identification::generate_functional_candidates(), hal::PYBIND11_PLUGIN(), and with_known_registers().

◆ m_max_control_signals

u32 hal::module_identification::Configuration::m_max_control_signals = 3

Maximum number of control signals to be tested. Defaults to 3.

Definition at line 91 of file configuration.h.

Referenced by hal::module_identification::generate_functional_candidates(), hal::PYBIND11_PLUGIN(), and with_max_control_signals().

◆ m_max_thread_count

u32 hal::module_identification::Configuration::m_max_thread_count = 1

Maximum number of concurrent threads created during execution. Defaults to 1.

Definition at line 86 of file configuration.h.

Referenced by hal::PYBIND11_PLUGIN(), and with_max_thread_count().

◆ m_multithreading_priority

MultithreadingPriority hal::module_identification::Configuration::m_multithreading_priority = MultithreadingPriority::memory_priority

Choose which MultithreadingPriority to use for the analysis. Defaults to memory priority.

Definition at line 106 of file configuration.h.

Referenced by hal::PYBIND11_PLUGIN(), and with_multithreading_priority().

◆ m_netlist

Netlist* hal::module_identification::Configuration::m_netlist

The netlist to be analyzed.

Definition at line 71 of file configuration.h.

Referenced by hal::module_identification::execute(), and hal::PYBIND11_PLUGIN().

◆ m_types_to_check

std::vector<module_identification::CandidateType> hal::module_identification::Configuration::m_types_to_check = all_checkable_candidate_types

CandidateTypes that shall be checked. Defaults to all checkable candidate types.

Definition at line 81 of file configuration.h.

Referenced by hal::module_identification::generate_functional_candidates(), hal::PYBIND11_PLUGIN(), and with_types_to_check().


The documentation for this struct was generated from the following files: