|
HAL
v4.5.0-258-gf372a0264
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <hal_core/netlist/gate_library/gate_type_component/gate_type_component.h>


Public Types | |
| enum class | ComponentType { lut , ff , latch , ram , mac , init , state , ram_port , state_table } |
Public Member Functions | |
| virtual | ~GateTypeComponent ()=default |
| virtual ComponentType | get_type () const =0 |
| template<typename T > | |
| T * | convert_to () |
| template<typename T > | |
| const T * | convert_to () const |
| virtual std::vector< GateTypeComponent * > | get_components (const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const =0 |
| 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) |
A component defining additional functionality of a gate type.
Definition at line 39 of file gate_type_component.h.
|
strong |
The type of a gate type component.
Definition at line 47 of file gate_type_component.h.
|
virtualdefault |
|
inline |
Convert the gate type component to a component of the type specified by the template parameter. A check is performed to determine whether the conversion is legal and a nullptr is returned in case it is not.
nullptr. Definition at line 74 of file gate_type_component.h.
References hal::T.
Referenced by get_component_as(), hal::GateType::get_component_as(), and hal::GateLibraryWizard::setComponents().
|
inline |
Convert the gate type component to a component of the type specified by the template parameter. A check is performed to determine whether the conversion is legal and a nullptr is returned in case it is not.
nullptr. Definition at line 88 of file gate_type_component.h.
References hal::T.
| GateTypeComponent * hal::GateTypeComponent::get_component | ( | const std::function< bool(const GateTypeComponent *)> & | filter = nullptr | ) | const |
Get a single component matching the filter condition (if provided). Returns a nullptr if (i) the gate type does not contain any components, (ii) multiple components match the filter condition, or (iii) no component matches the filter condition.
| [in] | filter | - The filter applied to all candidate components. |
nullptr. Definition at line 16 of file gate_type_component.cpp.
References get_components().
Referenced by hal::gate_type_components_init(), and get_component_as().
|
inline |
Get a single sub-component of the gate type component and convert it to a component of the type specified by the template parameter. A user-defined filter may be applied to the result set, but is disabled by default. If more no or than one components match the filter condition, a nullptr is returned. A check is performed to determine whether the conversion is legal and a nullptr is returned in case it is not.
| [in] | filter | - The user-defined filter function applied to all candidate components. |
nullptr. Definition at line 126 of file gate_type_component.h.
References convert_to(), get_component(), and hal::T.
Referenced by hal::Gate::add_boolean_function(), hal::resynthesis::decompose_gates_of_type(), hal::verilator::converter::get_function_for_ff(), hal::verilator::converter::get_function_for_latch(), hal::verilator::remove_unwanted_parameters_from_netlist(), hal::resynthesis::resynthesize_gates(), and hal::xilinx_toolbox::split_lut().
|
pure virtual |
Get all components matching the filter condition (if provided) as a vector. Returns an empty vector if (i) the gate type does not contain any components or (ii) no component matches the filter condition.
| [in] | filter | - The filter applied to all candidate components, disabled by default. |
Implemented in hal::StateTableComponent, hal::StateComponent, hal::RAMPortComponent, hal::RAMComponent, hal::MACComponent, hal::LUTComponent, hal::LatchComponent, hal::InitComponent, and hal::FFComponent.
Referenced by hal::gate_type_components_init(), and get_component().
|
pure virtual |
Get the type of the gate type component.
Implemented in hal::StateTableComponent, hal::StateComponent, hal::RAMPortComponent, hal::RAMComponent, hal::MACComponent, hal::LUTComponent, hal::LatchComponent, hal::InitComponent, and hal::FFComponent.
Referenced by hal::gate_type_components_init(), hal::GateType::has_component_of_type(), hal::FFComponent::is_class_of(), hal::InitComponent::is_class_of(), hal::LatchComponent::is_class_of(), hal::LUTComponent::is_class_of(), hal::MACComponent::is_class_of(), hal::RAMComponent::is_class_of(), hal::RAMPortComponent::is_class_of(), hal::StateComponent::is_class_of(), hal::StateTableComponent::is_class_of(), and hal::xilinx_toolbox::split_lut().