|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <hal_core/netlist/pins/base_pin.h>

Public Member Functions | |
| virtual | ~BasePin ()=default |
| bool | operator== (const BasePin &other) const |
| bool | operator!= (const BasePin &other) const |
| ssize_t | get_hash () const |
| u32 | get_id () const |
| void | set_name (const std::string &name) |
| const std::string & | get_name () const |
| void | set_direction (PinDirection direction) |
| PinDirection | get_direction () const |
| void | set_type (PinType type) |
| PinType | get_type () const |
| const std::pair< PinGroup< T > *, i32 > & | get_group () const |
Protected Member Functions | |
| BasePin (const u32 id, const std::string &name, PinDirection direction, PinType type=PinType::none) | |
Protected Attributes | |
| u32 | m_id |
| std::string | m_name |
| PinDirection | m_direction |
| PinType | m_type |
| std::pair< PinGroup< T > *, i32 > | m_group = {nullptr, 0} |
The base class for the pins of a gate type and the pins of a module. A pin carries a name, a direction, and a type, and it belongs to exactly one pin group.
Base class for gate and module pins.
Definition at line 47 of file base_pin.h.
|
virtualdefault |
|
inlineprotected |
Construct a new pin from its name, direction, and type.
| [in] | id | - The ID of the pin. |
| [in] | name | - The pin name. |
| [in] | direction | - The direction of the pin. |
| [in] | type | - The type of the pin. |
Definition at line 188 of file base_pin.h.
|
inline |
Get the direction of the pin.
Definition at line 130 of file base_pin.h.
References hal::BasePin< T >::m_direction.
Referenced by hal::ActionPingroup::addPinsToNewGroup(), hal::Gate::get_fan_in_endpoint(), hal::Gate::get_fan_out_endpoint(), hal::GateType::get_input_pin_names(), hal::Module::get_input_pin_names(), hal::GateType::get_input_pins(), hal::Module::get_input_pins(), hal::GateType::get_output_pin_names(), hal::Module::get_output_pin_names(), hal::GateType::get_output_pins(), hal::Module::get_output_pins(), hal::Gate::get_predecessor(), hal::Gate::get_resolved_boolean_function(), hal::Gate::get_successor(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::BasePin< T >::operator==(), hal::Module::remove_pin_from_group(), hal::ActionPingroup::removePinsFromGroup(), and hal::PinItem::setFields().
|
inline |
Get the group of the pin as well as the index of the pin within the group.
Definition at line 160 of file base_pin.h.
References hal::BasePin< T >::m_group.
Referenced by hal::GateType::assign_pin_to_group(), hal::Module::assign_pin_to_group(), hal::verilator::converter::get_function_for_combinational_gate(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::BasePin< T >::operator==(), hal::ActionPingroup::pinIndex2Row(), hal::ActionPingroup::pinRow2Index(), and hal::bitorder_propagation::reorder_module_pin_groups().
|
inline |
Hash function for python binding.
Definition at line 80 of file base_pin.h.
|
inline |
Get the ID of the pin. The ID is unique within an entity, e.g., a module or a gate type.
Definition at line 90 of file base_pin.h.
References hal::BasePin< T >::m_id.
Referenced by hal::GateType::assign_pin_to_group(), hal::Module::assign_pin_to_group(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::Module::move_pin_within_group(), hal::BasePin< T >::operator==(), hal::Module::remove_pin_from_group(), hal::Module::set_pin_name(), hal::Module::set_pin_type(), and hal::PinItem::setFields().
|
inline |
Get the name of the pin.
Definition at line 110 of file base_pin.h.
References hal::BasePin< T >::m_name.
Referenced by hal::GateType::assign_pin_to_group(), hal::Module::assign_pin_to_group(), hal::LogicEvaluatorDialog::compile(), hal::NetlistModificationDecorator::connect_gates(), hal::ActionPingroup::generateGroupName(), hal::GateType::get_boolean_function(), hal::Gate::get_boolean_function(), hal::Gate::get_boolean_functions(), hal::Gate::get_fan_in_endpoint(), hal::Gate::get_fan_out_endpoint(), hal::verilator::converter::get_function_for_combinational_gate(), hal::Gate::get_predecessor(), hal::Gate::get_resolved_boolean_function(), hal::Gate::get_successor(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::Module::move_pin_within_group(), hal::BasePin< T >::operator==(), hal::netlist_utils::remove_buffers(), hal::netlist_preprocessing::remove_buffers(), hal::Module::remove_pin_from_group(), hal::ActionPingroup::removePinsFromGroup(), hal::bitorder_propagation::reorder_module_pin_groups(), hal::Module::set_pin_name(), hal::Module::set_pin_type(), and hal::PinItem::setFields().
|
inline |
Get the type of the pin.
Definition at line 150 of file base_pin.h.
References hal::BasePin< T >::m_type.
Referenced by hal::ActionPingroup::addPinsToNewGroup(), hal::z3_utils::compare_netlists(), hal::LogicEvaluatorDialog::compile(), hal::hawkeye::RoundCandidate::from_register_candidate(), hal::Gate::get_boolean_function(), hal::verilator::converter::get_function_for_ff(), hal::NetlistTraversalDecorator::get_next_combinational_gates(), hal::NetlistTraversalDecorator::get_next_sequential_gates(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::BasePin< T >::operator==(), hal::Module::remove_pin_from_group(), hal::ActionPingroup::removePinsFromGroup(), hal::Module::set_pin_type(), and hal::PinItem::setFields().
|
inline |
Check whether two pins are unequal.
| [in] | other | - The pin to compare against. |
true if both pins are unequal, false otherwise. Definition at line 70 of file base_pin.h.
References hal::BasePin< T >::operator==().
|
inline |
Check whether two pins are equal.
| [in] | other | - The pin to compare against. |
true if both pins are equal, false otherwise. Definition at line 58 of file base_pin.h.
References hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_group(), hal::BasePin< T >::get_id(), hal::BasePin< T >::get_name(), hal::BasePin< T >::get_type(), hal::BasePin< T >::m_direction, hal::BasePin< T >::m_group, hal::BasePin< T >::m_id, hal::BasePin< T >::m_name, and hal::BasePin< T >::m_type.
Referenced by hal::BasePin< T >::operator!=(), and hal::ModulePin::operator==().
|
inline |
Set the direction of the pin.
| [in] | direction | - The pin direction. |
Definition at line 120 of file base_pin.h.
References direction, and hal::BasePin< T >::m_direction.
|
inline |
Set the name of the pin.
| [in] | name | - The name of the pin. |
Definition at line 100 of file base_pin.h.
References hal::BasePin< T >::m_name, and name.
Referenced by hal::Module::set_pin_name().
|
inline |
Set the type of the pin.
| [in] | type | - The pin type. |
Definition at line 140 of file base_pin.h.
References hal::BasePin< T >::m_type, and type.
Referenced by hal::Module::set_pin_type().
|
protected |
Definition at line 176 of file base_pin.h.
Referenced by hal::BasePin< T >::get_direction(), hal::BasePin< T >::operator==(), and hal::BasePin< T >::set_direction().
|
protected |
Definition at line 178 of file base_pin.h.
Referenced by hal::BasePin< T >::get_group(), and hal::BasePin< T >::operator==().
|
protected |
Definition at line 174 of file base_pin.h.
Referenced by hal::BasePin< T >::get_id(), and hal::BasePin< T >::operator==().
|
protected |
Definition at line 175 of file base_pin.h.
Referenced by hal::BasePin< T >::get_name(), hal::BasePin< T >::operator==(), and hal::BasePin< T >::set_name().
|
protected |
Definition at line 177 of file base_pin.h.
Referenced by hal::BasePin< T >::get_type(), hal::BasePin< T >::operator==(), and hal::BasePin< T >::set_type().