HAL  v4.5.0-254-g8f9f6a423
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::InitComponent Class Reference

#include <hal_core/netlist/gate_library/gate_type_component/init_component.h>

Inheritance diagram for hal::InitComponent:
Inheritance graph
Collaboration diagram for hal::InitComponent:
Collaboration graph

Public Member Functions

ComponentType get_type () const override
 
std::vector< GateTypeComponent * > get_components (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const override
 
const std::string & get_init_category () const
 
void set_init_category (const std::string &init_category)
 
const std::vector< std::string > & get_init_identifiers () const
 
void set_init_identifiers (const std::vector< std::string > &init_identifiers)
 
- Public Member Functions inherited from hal::GateTypeComponent
virtual ~GateTypeComponent ()=default
 
template<typename T >
T * convert_to ()
 
template<typename T >
const T * convert_to () const
 
GateTypeComponent * get_component (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
 
template<typename T >
T * get_component_as (const std::function< bool(const GateTypeComponent *)> &filter=nullptr)
 

Static Public Member Functions

static std::unique_ptr< InitComponent > create (const std::string &init_category, const std::vector< std::string > &init_identifiers)
 
static bool is_class_of (const GateTypeComponent *component)
 

Additional Inherited Members

- Public Types inherited from hal::GateTypeComponent
enum class  ComponentType {
  lut , ff , latch , ram ,
  mac , init , state , ram_port ,
  state_table
}
 

Detailed Description

A gate type component that describes where the initialization data of a gate is stored within its data container.

Definition at line 37 of file init_component.h.

Member Function Documentation

◆ create()

std::unique_ptr< InitComponent > hal::InitComponent::create ( const std::string &  init_category,
const std::vector< std::string > &  init_identifiers 
)
static

Create a new InitComponent with the category and a vector of identifiers pointing to the initialization data.

Parameters
[in]init_category- The data category.
[in]init_identifiers- The data identifiers.
Returns
The InitComponent.

Definition at line 11 of file init_component.cpp.

Referenced by hal::GateLibraryWizard::setComponents().

◆ get_components()

std::vector< GateTypeComponent * > hal::InitComponent::get_components ( const std::function< bool(const GateTypeComponent *)> &  filter = nullptr) const
overridevirtual

Get the sub-components of the gate type component. A user-defined filter may be applied to the result vector, but is disabled by default.

Parameters
[in]filter- The user-defined filter function applied to all candidate components.
Returns
The sub-components of the gate type component.

Implements hal::GateTypeComponent.

Definition at line 26 of file init_component.cpp.

References UNUSED.

◆ get_init_category()

const std::string & hal::InitComponent::get_init_category ( ) const

Get the category in which to find the initialization data.

Returns
The data category.

Definition at line 32 of file init_component.cpp.

Referenced by hal::gate_type_components_init(), hal::NetlistSimulator::load_initial_values_from_netlist(), and hal::verilator::remove_unwanted_parameters_from_netlist().

◆ get_init_identifiers()

const std::vector< std::string > & hal::InitComponent::get_init_identifiers ( ) const

Get the vector of identifiers at which to find initialization data.

Returns
The data identifiers.

Definition at line 42 of file init_component.cpp.

Referenced by hal::gate_type_components_init(), hal::NetlistSimulator::load_initial_values_from_netlist(), and hal::verilator::remove_unwanted_parameters_from_netlist().

◆ get_type()

InitComponent::ComponentType hal::InitComponent::get_type ( ) const
overridevirtual

Get the type of the gate type component.

Returns
The type of the gate type component.

Implements hal::GateTypeComponent.

Definition at line 16 of file init_component.cpp.

Referenced by hal::NetlistSimulator::load_initial_values_from_netlist().

◆ is_class_of()

bool hal::InitComponent::is_class_of ( const GateTypeComponent *  component)
static

Check whether a component is an InitComponent.

Parameters
[in]component- The component to check.
Returns
true if component is an InitComponent, false otherwise.

Definition at line 21 of file init_component.cpp.

References hal::GateTypeComponent::get_type().

Referenced by hal::gate_type_components_init(), hal::verilator::remove_unwanted_parameters_from_netlist(), hal::InitWizardPage::setData(), and hal::GatelibraryFrameInit::update().

◆ set_init_category()

void hal::InitComponent::set_init_category ( const std::string &  init_category)

Set the category in which to find the initialization data.

Parameters
[in]init_category- The data category.

Definition at line 37 of file init_component.cpp.

Referenced by hal::gate_type_components_init().

◆ set_init_identifiers()

void hal::InitComponent::set_init_identifiers ( const std::vector< std::string > &  init_identifiers)

Set the vector of identifiers at which to find initialization data.

Parameters
[in]init_identifiers- The data identifiers.

Definition at line 47 of file init_component.cpp.

Referenced by hal::gate_type_components_init().


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