![]() |
HAL
|
#include <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} |
Base class for gate and module pins.
Definition at line 44 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 186 of file base_pin.h.
|
inline |
Get the direction of the pin.
Definition at line 128 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(), 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 158 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::ActionPingroup::exec(), hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::BasePin< T >::operator==(), hal::pinIndex2Row(), hal::pinRow2Index(), and hal::TEST_F().
|
inline |
Hash function for python binding.
Definition at line 77 of file base_pin.h.
|
inline |
TODO test, pybind Get the ID of the pin. The ID is unique within an entity, e.g., a module or a gate type.
Definition at line 88 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 108 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::NetlistModificationDecorator::connect_gates(), hal::ActionPingroup::exec(), hal::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::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::Module::remove_pin_from_group(), hal::ActionPingroup::removePinsFromGroup(), hal::Module::set_pin_name(), hal::Module::set_pin_type(), hal::PinItem::setFields(), and hal::TEST_F().
|
inline |
Get the type of the pin.
Definition at line 148 of file base_pin.h.
References hal::BasePin< T >::m_type.
Referenced by hal::ActionPingroup::addPinsToNewGroup(), hal::ActionPingroup::exec(), hal::Gate::get_boolean_function(), 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::Module::set_pin_type(), and hal::PinItem::setFields().
|
inline |
Check whether two pins are unequal.
[in] | other | - The pin to compare against. |
Definition at line 67 of file base_pin.h.
References hal::BasePin< T >::operator==().
|
inline |
Check whether two pins are equal.
[in] | other | - The pin to compare against. |
Definition at line 55 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 118 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 98 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 138 of file base_pin.h.
References hal::BasePin< T >::m_type, and type.
Referenced by hal::Module::set_pin_type().
|
protected |
Definition at line 174 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 176 of file base_pin.h.
Referenced by hal::BasePin< T >::get_group(), and hal::BasePin< T >::operator==().
|
protected |
Definition at line 172 of file base_pin.h.
Referenced by hal::BasePin< T >::get_id(), and hal::BasePin< T >::operator==().
|
protected |
Definition at line 173 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 175 of file base_pin.h.
Referenced by hal::BasePin< T >::get_type(), hal::BasePin< T >::operator==(), and hal::BasePin< T >::set_type().