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

A register candidate discovered by HAWKEYE. More...

#include </home/runner/work/hal/hal/plugins/hawkeye/include/hawkeye/register_candidate.h>

Collaboration diagram for hal::hawkeye::RegisterCandidate:
Collaboration graph

Public Member Functions

 RegisterCandidate ()=default
 Default constructor for RegisterCandidate. More...
 
 ~RegisterCandidate ()=default
 Default destructor for RegisterCandidate. More...
 
 RegisterCandidate (const std::set< Gate * > &round_reg)
 Construct a state register candidate from the state register of a round-based implementation. More...
 
 RegisterCandidate (std::set< Gate * > &&round_reg)
 Construct a state register candidate from the state register of a round-based implementation. More...
 
 RegisterCandidate (const std::set< Gate * > &in_reg, const std::set< Gate * > &out_reg)
 Construct a state register candidate from the input and output registers from one round of a pipelined implementation. More...
 
 RegisterCandidate (std::set< Gate * > &&in_reg, std::set< Gate * > &&out_reg)
 Construct a state register candidate from the input and output registers from one round of a pipelined implementation. More...
 
bool operator== (const RegisterCandidate &rhs) const
 Equality comparison operator for two register candidates. More...
 
bool operator< (const RegisterCandidate &rhs) const
 Less-than comparison operator for two register candidates. More...
 
Netlistget_netlist () const
 Get the netlist associated with the candidate. More...
 
u32 get_size () const
 Get the size of the candidate, i.e., the width of its registers. More...
 
bool is_round_based () const
 Check if the candidate is round-based, i.e., input and output register are the same. More...
 
const std::set< Gate * > & get_input_reg () const
 Get the candidate's input register. More...
 
const std::set< Gate * > & get_output_reg () const
 Get the candidate's output register. More...
 

Detailed Description

A register candidate discovered by HAWKEYE.

This class holds all information belonging to a register candidate discovered by HAWKEYE's candidate search and makes these information accessible through getters.

Definition at line 51 of file register_candidate.h.

Constructor & Destructor Documentation

◆ RegisterCandidate() [1/5]

hal::hawkeye::RegisterCandidate::RegisterCandidate ( )
default

Default constructor for RegisterCandidate.

◆ ~RegisterCandidate()

hal::hawkeye::RegisterCandidate::~RegisterCandidate ( )
default

Default destructor for RegisterCandidate.

◆ RegisterCandidate() [2/5]

hal::hawkeye::RegisterCandidate::RegisterCandidate ( const std::set< Gate * > &  round_reg)

Construct a state register candidate from the state register of a round-based implementation.

Parameters
[in]round_reg- The state register.

Definition at line 9 of file register_candidate.cpp.

References get_netlist().

◆ RegisterCandidate() [3/5]

hal::hawkeye::RegisterCandidate::RegisterCandidate ( std::set< Gate * > &&  round_reg)

Construct a state register candidate from the state register of a round-based implementation.

Parameters
[in]round_reg- The state register.

Definition at line 16 of file register_candidate.cpp.

References get_netlist().

◆ RegisterCandidate() [4/5]

hal::hawkeye::RegisterCandidate::RegisterCandidate ( const std::set< Gate * > &  in_reg,
const std::set< Gate * > &  out_reg 
)

Construct a state register candidate from the input and output registers from one round of a pipelined implementation.

Parameters
[in]in_reg- The input register.
[in]out_reg- The output register.

Definition at line 24 of file register_candidate.cpp.

References get_netlist().

◆ RegisterCandidate() [5/5]

hal::hawkeye::RegisterCandidate::RegisterCandidate ( std::set< Gate * > &&  in_reg,
std::set< Gate * > &&  out_reg 
)

Construct a state register candidate from the input and output registers from one round of a pipelined implementation.

Parameters
[in]in_reg- The input register.
[in]out_reg- The output register.

Definition at line 31 of file register_candidate.cpp.

References get_netlist().

Member Function Documentation

◆ get_input_reg()

const std::set< Gate * > & hal::hawkeye::RegisterCandidate::get_input_reg ( ) const

Get the candidate's input register.

Returns
The input register of the candidate.

Definition at line 64 of file register_candidate.cpp.

Referenced by hal::hawkeye::RoundCandidate::from_register_candidate(), and hal::PYBIND11_PLUGIN().

◆ get_netlist()

Netlist * hal::hawkeye::RegisterCandidate::get_netlist ( ) const

Get the netlist associated with the candidate.

Returns
The netlist of the candidate.

Definition at line 49 of file register_candidate.cpp.

Referenced by hal::hawkeye::RoundCandidate::from_register_candidate(), hal::PYBIND11_PLUGIN(), and RegisterCandidate().

◆ get_output_reg()

const std::set< Gate * > & hal::hawkeye::RegisterCandidate::get_output_reg ( ) const

Get the candidate's output register.

Returns
The output register of the candidate.

Definition at line 69 of file register_candidate.cpp.

Referenced by hal::hawkeye::RoundCandidate::from_register_candidate(), and hal::PYBIND11_PLUGIN().

◆ get_size()

u32 hal::hawkeye::RegisterCandidate::get_size ( ) const

Get the size of the candidate, i.e., the width of its registers.

Returns
The size of the candidate.

Definition at line 54 of file register_candidate.cpp.

Referenced by hal::hawkeye::RoundCandidate::from_register_candidate(), and hal::PYBIND11_PLUGIN().

◆ is_round_based()

bool hal::hawkeye::RegisterCandidate::is_round_based ( ) const

Check if the candidate is round-based, i.e., input and output register are the same.

Returns
true if the candidate is round-based, false otherwise.

Definition at line 59 of file register_candidate.cpp.

Referenced by hal::PYBIND11_PLUGIN().

◆ operator<()

bool hal::hawkeye::RegisterCandidate::operator< ( const RegisterCandidate rhs) const

Less-than comparison operator for two register candidates.

Compares two register candidates to determine their relative order. Candidates are compared based on their size, input register, and (if round-based) output register.

Parameters
rhsThe register candidate to compare against.
Returns
true if this candidate is less than the rhs candidate, false otherwise.

Definition at line 43 of file register_candidate.cpp.

◆ operator==()

bool hal::hawkeye::RegisterCandidate::operator== ( const RegisterCandidate rhs) const

Equality comparison operator for two register candidates.

Compares two register candidates for equality. Two candidates are considered equal if they have the same size, input register, and (if round-based) output register.

Parameters
[in]rhs- The register candidate to compare against.
Returns
true if the candidates are equal, false otherwise.

Definition at line 38 of file register_candidate.cpp.


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