![]() |
HAL
|
#include <gate.h>
Public Member Functions | |
bool | operator== (const Gate &other) const |
bool | operator!= (const Gate &other) const |
ssize_t | get_hash () const |
u32 | get_id () const |
Netlist * | get_netlist () const |
const std::string & | get_name () const |
void | set_name (const std::string &name) |
GateType * | get_type () const |
bool | has_location () const |
void | set_location_x (i32 x) |
i32 | get_location_x () const |
void | set_location_y (i32 y) |
i32 | get_location_y () const |
void | set_location (const std::pair< i32, i32 > &location) |
std::pair< i32, i32 > | get_location () const |
Module * | get_module () const |
std::vector< Module * > | get_modules (const std::function< bool(Module *)> &filter=nullptr, bool recursive=true) const |
Grouping * | get_grouping () const |
BooleanFunction | get_boolean_function (const std::string &name) const |
BooleanFunction | get_boolean_function (const GatePin *pin=nullptr) const |
std::unordered_map< std::string, BooleanFunction > | get_boolean_functions (bool only_custom_functions=false) const |
Result< BooleanFunction > | get_resolved_boolean_function (const GatePin *pin, const bool use_net_variables=false) const |
bool | add_boolean_function (const std::string &name, const BooleanFunction &func) |
bool | mark_vcc_gate () |
bool | mark_gnd_gate () |
bool | unmark_vcc_gate () |
bool | unmark_gnd_gate () |
bool | is_vcc_gate () const |
bool | is_gnd_gate () const |
const std::vector< Net * > & | get_fan_in_nets () const |
std::vector< Net * > | get_fan_in_nets (const std::function< bool(Net *)> &filter) const |
Net * | get_fan_in_net (const std::string &pin_name) const |
Net * | get_fan_in_net (const GatePin *pin) const |
bool | is_fan_in_net (const Net *net) const |
const std::vector< Endpoint * > & | get_fan_in_endpoints () const |
std::vector< Endpoint * > | get_fan_in_endpoints (const std::function< bool(Endpoint *)> &filter) const |
Endpoint * | get_fan_in_endpoint (const std::string &pin_name) const |
Endpoint * | get_fan_in_endpoint (const GatePin *pin) const |
Endpoint * | get_fan_in_endpoint (const Net *net) const |
const std::vector< Net * > & | get_fan_out_nets () const |
std::vector< Net * > | get_fan_out_nets (const std::function< bool(Net *)> &filter) const |
Net * | get_fan_out_net (const std::string &pin_name) const |
Net * | get_fan_out_net (const GatePin *pin) const |
bool | is_fan_out_net (const Net *net) const |
const std::vector< Endpoint * > & | get_fan_out_endpoints () const |
std::vector< Endpoint * > | get_fan_out_endpoints (const std::function< bool(Endpoint *)> &filter) const |
Endpoint * | get_fan_out_endpoint (const std::string &pin_name) const |
Endpoint * | get_fan_out_endpoint (const GatePin *pin) const |
Endpoint * | get_fan_out_endpoint (const Net *net) const |
std::vector< Gate * > | get_unique_predecessors (const std::function< bool(const GatePin *pin, Endpoint *ep)> &filter=nullptr) const |
std::vector< Endpoint * > | get_predecessors (const std::function< bool(const GatePin *pin, Endpoint *ep)> &filter=nullptr) const |
Endpoint * | get_predecessor (const std::string &pin_name) const |
Endpoint * | get_predecessor (const GatePin *pin) const |
std::vector< Gate * > | get_unique_successors (const std::function< bool(const GatePin *pin, Endpoint *ep)> &filter=nullptr) const |
std::vector< Endpoint * > | get_successors (const std::function< bool(const GatePin *pin, Endpoint *ep)> &filter=nullptr) const |
Endpoint * | get_successor (const std::string &pin_name) const |
Endpoint * | get_successor (const GatePin *pin) const |
Result< std::vector< std::string > > | get_init_data () const |
Result< std::monostate > | set_init_data (const std::vector< std::string > &init_data) |
![]() | |
DataContainer ()=default | |
virtual | ~DataContainer ()=default |
bool | operator== (const DataContainer &other) const |
bool | operator!= (const DataContainer &other) const |
bool | set_data (const std::string &category, const std::string &key, const std::string &data_type, const std::string &value, const bool log_with_info_level=false) |
bool | has_data (const std::string &category, const std::string &key) const |
std::tuple< std::string, std::string > | get_data (const std::string &category, const std::string &key) const |
bool | delete_data (const std::string &category, const std::string &key, const bool log_with_info_level=false) |
const std::map< std::tuple< std::string, std::string >, std::tuple< std::string, std::string > > & | get_data_map () const |
void | set_data_map (const std::map< std::tuple< std::string, std::string >, std::tuple< std::string, std::string >> &map) |
Friends | |
class | NetlistInternalManager |
Additional Inherited Members | |
![]() | |
std::map< std::tuple< std::string, std::string >, std::tuple< std::string, std::string > > | m_data |
Gate class containing information about a gate including its location, functions, and module.
bool hal::Gate::add_boolean_function | ( | const std::string & | name, |
const BooleanFunction & | func | ||
) |
Add a Boolean function with the given name to the gate.
[in] | name | - The name. |
[in] | func | - The function. |
Definition at line 497 of file gate.cpp.
References hal::BooleanFunction::compute_truth_table(), hal::GateTypeComponent::get_component_as(), hal::InitComponent::get_init_category(), hal::InitComponent::get_init_identifiers(), hal::LUTComponent::is_init_ascending(), log_error, name, and hal::BooleanFunction::to_string().
Referenced by hal::SubgraphNetlistDecorator::copy_subgraph_netlist(), and hal::gate_init().
BooleanFunction hal::Gate::get_boolean_function | ( | const GatePin * | pin = nullptr | ) | const |
Get the Boolean function corresponding to the given output pin. If pin
is a nullptr
, the Boolean function of the first output pin is returned.
[in] | pin | - The pin. |
Definition at line 246 of file gate.cpp.
References hal::BasePin< T >::get_name(), and log_warning.
BooleanFunction hal::Gate::get_boolean_function | ( | const std::string & | name | ) | const |
Get the Boolean function specified by the given name. This name can for example be an output pin of the gate or any other user-defined function name.
[in] | name | - The name. |
Definition at line 209 of file gate.cpp.
References hal::BasePin< T >::get_name(), hal::BasePin< T >::get_type(), log_warning, and name.
Referenced by hal::ActionAddBooleanFunction::exec(), and hal::gate_init().
std::unordered_map< std::string, BooleanFunction > hal::Gate::get_boolean_functions | ( | bool | only_custom_functions = false | ) | const |
Get a map from function name to Boolean function for all boolean functions associated with this gate.
[in] | only_custom_functions | - Set true to get only Boolean functions that are local to the gate, false otherwise. |
Definition at line 262 of file gate.cpp.
References hal::BasePin< T >::get_name().
Referenced by hal::gate_init(), operator==(), hal::netlist_utils::remove_buffers(), and hal::netlist_utils::remove_unused_lut_endpoints().
Get the fan-in endpoint corresponding to the specified input pin.
[in] | pin | - The input pin. |
nullptr
otherwise. Definition at line 695 of file gate.cpp.
References direction, hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_name(), log_debug, and log_warning.
Get the fan-in endpoint connected to the specified input net.
[in] | net | - The input net. |
nullptr
otherwise. Definition at line 717 of file gate.cpp.
References log_warning, and net.
Endpoint * hal::Gate::get_fan_in_endpoint | ( | const std::string & | pin_name | ) | const |
Get the fan-in endpoint corresponding to the input pin specified by name.
[in] | pin_name | - The input pin name. |
nullptr
otherwise. Definition at line 679 of file gate.cpp.
References log_warning.
Referenced by hal::gate_init(), and hal::TEST_F().
const std::vector< Endpoint * > & hal::Gate::get_fan_in_endpoints | ( | ) | const |
Get a vector of all fan-in endpoints of the gate, i.e., all endpoints associated with an input pin of the gate.
Definition at line 653 of file gate.cpp.
Referenced by hal::gate_init(), hal::NetlistTraversalDecorator::get_next_combinational_gates(), hal::NetlistTraversalDecorator::get_next_matching_gates_until_depth(), hal::NetlistTraversalDecorator::get_next_sequential_gates(), hal::netlist_utils::remove_buffers(), hal::netlist_utils::remove_unused_lut_endpoints(), hal::NetlistModificationDecorator::replace_gate(), and hal::TEST_F().
std::vector< Endpoint * > hal::Gate::get_fan_in_endpoints | ( | const std::function< bool(Endpoint *)> & | filter | ) | const |
Get a vector of all fan-in endpoints of the gate, i.e., all endpoints associated with an input pin of the gate. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - Filter function to be evaluated on each endpoint. |
Net * hal::Gate::get_fan_in_net | ( | const std::string & | pin_name | ) | const |
Get the fan-in net corresponding to the input pin specified by name.
[in] | pin_name | - The input pin name. |
nullptr
otherwise. Definition at line 617 of file gate.cpp.
Referenced by hal::NetlistModificationDecorator::connect_gates(), hal::gate_init(), hal::netlist_utils::get_nets_at_pins(), and hal::TEST_F().
const std::vector< Net * > & hal::Gate::get_fan_in_nets | ( | ) | const |
Get a vector of all fan-in nets of the gate, i.e., all nets that are connected to one of the input pins.
Definition at line 591 of file gate.cpp.
Referenced by hal::gate_init(), hal::netlist_utils::get_next_sequential_gates(), hal::netlist_utils::get_path(), hal::ModuleModel::moduleAssignNets(), hal::ShortestPath::net(), and hal::TEST_F().
Get a vector of all fan-in nets of the gate, i.e., all nets that are connected to one of the input pins. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - Filter function to be evaluated on each net. |
Definition at line 596 of file gate.cpp.
References test::n.
Get the fan-out endpoint corresponding to the specified input pin.
[in] | pin | - The output pin. |
nullptr
otherwise. Definition at line 834 of file gate.cpp.
References direction, hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_name(), log_debug, and log_warning.
Get the fan-out endpoint connected to the specified output net.
[in] | net | - The output net. |
nullptr
otherwise. Definition at line 856 of file gate.cpp.
References log_warning, and net.
Endpoint * hal::Gate::get_fan_out_endpoint | ( | const std::string & | pin_name | ) | const |
Get the fan-out endpoint corresponding to the output pin specified by name.
[in] | pin_name | - The output pin name. |
nullptr
otherwise. Definition at line 823 of file gate.cpp.
References log_warning.
Referenced by hal::gate_init(), and hal::TEST_F().
const std::vector< Endpoint * > & hal::Gate::get_fan_out_endpoints | ( | ) | const |
Get a vector of all fan-out endpoints of the gate, i.e., all endpoints associated with an output pin of the gate.
Definition at line 797 of file gate.cpp.
Referenced by hal::gate_init(), hal::NetlistTraversalDecorator::get_next_combinational_gates(), hal::NetlistTraversalDecorator::get_next_matching_gates_until_depth(), hal::NetlistTraversalDecorator::get_next_sequential_gates(), hal::netlist_utils::remove_buffers(), and hal::NetlistModificationDecorator::replace_gate().
std::vector< Endpoint * > hal::Gate::get_fan_out_endpoints | ( | const std::function< bool(Endpoint *)> & | filter | ) | const |
Get a vector of all fan-out endpoints of the gate, i.e., all endpoints associated with an output pin of the gate. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - Filter function to be evaluated on each endpoint. |
Net * hal::Gate::get_fan_out_net | ( | const std::string & | pin_name | ) | const |
Get the fan-out net corresponding to the output pin specified by name.
[in] | pin_name | - The output pin name. |
nullptr
otherwise. Definition at line 761 of file gate.cpp.
Referenced by hal::NetlistModificationDecorator::connect_gates(), hal::gate_init(), hal::netlist_utils::get_nets_at_pins(), and hal::TEST_F().
const std::vector< Net * > & hal::Gate::get_fan_out_nets | ( | ) | const |
Get a vector of all fan-out nets of the gate, i.e., all nets that are connected to one of the output pins.
Definition at line 735 of file gate.cpp.
Referenced by hal::gate_init(), hal::boolean_influence::get_ff_dependency_matrix(), hal::netlist_utils::get_next_sequential_gates(), hal::netlist_utils::get_path(), hal::ModuleModel::moduleAssignNets(), hal::ShortestPath::net(), and hal::TEST_F().
std::vector< Net * > hal::Gate::get_fan_out_nets | ( | const std::function< bool(Net *)> & | filter | ) | const |
Get a vector of all fan-out nets of the gate, i.e., all nets that are connected to one of the output pins. The filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - Filter function to be evaluated on each net. |
Definition at line 740 of file gate.cpp.
References test::n.
Grouping * hal::Gate::get_grouping | ( | ) | const |
Gets the grouping in which this gate is contained.
If no grouping contains this gate, a nullptr is returned.
Definition at line 204 of file gate.cpp.
Referenced by hal::ModuleContextMenu::addGateSubmenu(), hal::gate_init(), hal::SelectionDetailsWidget::groupingUnassignActionFactory(), hal::GroupingManagerWidget::removeElementsFromGrouping(), hal::NetlistModificationDecorator::replace_gate(), and hal::GroupingsOfItemModel::setGate().
ssize_t hal::Gate::get_hash | ( | ) | const |
Hash function for python binding.
Definition at line 90 of file gate.cpp.
Referenced by hal::gate_init().
u32 hal::Gate::get_id | ( | ) | const |
Get the unique id of the gate.
Definition at line 95 of file gate.cpp.
Referenced by hal::Net::add_destination(), hal::Net::add_source(), hal::NetlistModificationDecorator::connect_gates(), hal::Grouping::contains_gate(), hal::GuiApi::deselectGate(), hal::gate_init(), hal::netlist_utils::get_complex_gate_chain(), hal::netlist_utils::get_gate_chain(), hal::netlist_utils::get_nets_at_pins(), hal::NetlistTraversalDecorator::get_shortest_path(), hal::NetlistTraversalDecorator::get_shortest_path_distance(), hal::SelectionDetailsWidget::groupingUnassignActionFactory(), hal::event_log::handle_gate_event(), hal::event_log::handle_grouping_event(), hal::GateSelectPicker::handleSelectionChanged(), hal::GraphGraphicsView::handleShortestPath(), hal::Net::is_a_destination(), hal::Net::is_a_source(), hal::Netlist::mark_gnd_gate(), hal::Netlist::mark_vcc_gate(), operator==(), hal::netlist_utils::remove_buffers(), hal::Net::remove_destination(), hal::Net::remove_source(), hal::netlist_utils::remove_unused_lut_endpoints(), hal::NetlistModificationDecorator::replace_gate(), hal::GuiApi::selectGate(), hal::DataTableWidget::setGate(), hal::GateDetailsTabWidget::setGate(), hal::GroupingsOfItemModel::setGate(), hal::GroupingsOfItemWidget::setGate(), hal::Netlist::unmark_gnd_gate(), and hal::Netlist::unmark_vcc_gate().
Result< std::vector< std::string > > hal::Gate::get_init_data | ( | ) | const |
Get the INIT data of the gate, if available. An error is returned in case the gate does not hold any INIT data.
Definition at line 1034 of file gate.cpp.
References ERR, hal::GateTypeComponent::get_component_as(), hal::InitComponent::get_init_category(), hal::InitComponent::get_init_identifiers(), and OK.
Get the physical location of the gate in the layout.
If no valid physical location coordinate is assigned, a negative value is returned for the respective coordinate.
Definition at line 140 of file gate.cpp.
Referenced by hal::gate_init(), and hal::NetlistModificationDecorator::replace_gate().
i32 hal::Gate::get_location_x | ( | ) | const |
Get the physical location x-coordinate of the gate in the layout.
If no valid physical location x-coordinate is assigned, a negative value is returned.
Definition at line 130 of file gate.cpp.
Referenced by hal::gate_init(), and operator==().
i32 hal::Gate::get_location_y | ( | ) | const |
Get the physical location y-coordinate of the gate in the layout.
If no valid physical location y-coordinate is assigned, a negative value is returned.
Definition at line 135 of file gate.cpp.
Referenced by hal::gate_init(), and operator==().
Module * hal::Gate::get_module | ( | ) | const |
Get the module which contains this gate.
Definition at line 174 of file gate.cpp.
Referenced by hal::gate_init(), and hal::NetlistModificationDecorator::replace_gate().
std::vector< Module * > hal::Gate::get_modules | ( | const std::function< bool(Module *)> & | filter = nullptr , |
bool | recursive = true |
||
) | const |
Get all modules that contain this gate, either directly or as parent of another module. If recursive
is set to true, indirect parent modules are also included. Otherwise, only the module containing the gate directly is returned.
The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - An optional filter. |
[in] | recursive | - Set true to include indirect parents as well, false otherwise. |
Definition at line 179 of file gate.cpp.
References hal::Module::get_parent_modules().
Referenced by hal::gate_init().
const std::string & hal::Gate::get_name | ( | ) | const |
Get the name of the gate.
Definition at line 105 of file gate.cpp.
Referenced by hal::Net::add_destination(), hal::Net::add_source(), hal::ModuleContextMenu::addGateSubmenu(), hal::NetlistModificationDecorator::connect_gates(), hal::ActionRenameObject::exec(), hal::gate_init(), hal::netlist_utils::get_complex_gate_chain(), hal::netlist_utils::get_gate_chain(), hal::netlist_utils::get_nets_at_pins(), hal::NetlistTraversalDecorator::get_shortest_path(), hal::NetlistTraversalDecorator::get_shortest_path_distance(), hal::event_log::handle_gate_event(), hal::event_log::handle_grouping_event(), hal::GraphGraphicsView::handleShortestPath(), hal::Net::is_a_destination(), hal::Net::is_a_source(), hal::Netlist::mark_gnd_gate(), hal::Netlist::mark_vcc_gate(), operator==(), hal::netlist_utils::remove_buffers(), hal::Net::remove_destination(), hal::Net::remove_source(), hal::netlist_utils::remove_unused_lut_endpoints(), hal::NetlistModificationDecorator::replace_gate(), hal::TEST_F(), hal::Netlist::unmark_gnd_gate(), hal::Netlist::unmark_vcc_gate(), and hal::ModuleModel::updateGateName().
Netlist * hal::Gate::get_netlist | ( | ) | const |
Get the netlist this gate is associated with.
Definition at line 100 of file gate.cpp.
Referenced by hal::netlist_utils::get_complex_gate_chain(), hal::netlist_utils::get_gate_chain(), hal::NetlistTraversalDecorator::get_shortest_path(), hal::NetlistTraversalDecorator::get_shortest_path_distance(), and hal::netlist_utils::replace_gate().
Get a single direct predecessor endpoint that is connected to the specified input pin. Fails if there are no or more than one predecessors.
[in] | pin | - The input pin. |
nullptr
otherwise. Definition at line 912 of file gate.cpp.
References direction, hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_name(), and log_warning.
Endpoint * hal::Gate::get_predecessor | ( | const std::string & | pin_name | ) | const |
Get a single direct predecessor endpoint that is connected to the input pin specified by name. Fails if there are no or more than one predecessors.
[in] | pin_name | - The input pin name. |
nullptr
otherwise. Definition at line 938 of file gate.cpp.
References log_warning.
Referenced by hal::gate_init().
std::vector< Endpoint * > hal::Gate::get_predecessors | ( | const std::function< bool(const GatePin *pin, Endpoint *ep)> & | filter = nullptr | ) | const |
Get a vector of all direct predecessor endpoints of the gate, i.e., all predecessor endpoints that are connected to an input pin of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - An optional filter being evaluated on the gate's input pin as well as the predecessor endpoint. |
Definition at line 886 of file gate.cpp.
Referenced by hal::gate_init(), and hal::netlist_utils::get_complex_gate_chain().
Result< BooleanFunction > hal::Gate::get_resolved_boolean_function | ( | const GatePin * | pin, |
const bool | use_net_variables = false |
||
) | const |
Get the resolved Boolean function corresponding to the given output pin, i.e., a Boolean function that only depends on input pins (or nets) and no internal or output pins. If fan-in nets are used to derive variable names, the variable names are generated using the BooleanFunctionNetDecorator
.
[in] | pin | - The output pin. |
[in] | use_net_variables | - Set true to use variable names derived from fan-in nets of the gate, false to use input pin names instead. Defaults to false . |
Definition at line 287 of file gate.cpp.
References ERR, ERR_APPEND, hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_name(), hal::BooleanFunction::get_variable_names(), OK, hal::BooleanFunction::substitute(), and hal::utils::to_vector().
Get a single direct successor endpoint that is connected to the specified output pin. Fails if there are no or more than one successors.
[in] | pin | - The output pin. |
nullptr
otherwise. Definition at line 992 of file gate.cpp.
References direction, hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_name(), and log_warning.
Endpoint * hal::Gate::get_successor | ( | const std::string & | pin_name | ) | const |
Get a single direct successor endpoint that is connected to the output pin specified by name. Fails if there are no or more than one successors.
[in] | pin_name | - The output pin name. |
nullptr
otherwise. Definition at line 1018 of file gate.cpp.
References log_warning.
Referenced by hal::gate_init(), and hal::TEST_F().
std::vector< Endpoint * > hal::Gate::get_successors | ( | const std::function< bool(const GatePin *pin, Endpoint *ep)> & | filter = nullptr | ) | const |
Get a vector of all direct successor endpoints of the gate, i.e., all successor endpoints that are connected to an output pin of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - An optional filter being evaluated on the gate's output pin as well as the successor endpoint. |
Definition at line 966 of file gate.cpp.
Referenced by hal::gate_init(), hal::netlist_utils::get_complex_gate_chain(), and hal::netlist_utils::get_gate_chain().
GateType * hal::Gate::get_type | ( | ) | const |
Get the type of the gate.
Definition at line 125 of file gate.cpp.
Referenced by hal::Net::add_destination(), hal::Net::add_source(), hal::ModuleContextMenu::addGateSubmenu(), hal::dataflow::Grouping::are_groups_allowed_to_merge(), hal::gate_init(), hal::netlist_utils::get_complex_gate_chain(), hal::netlist_utils::get_gate_chain(), hal::NetlistTraversalDecorator::get_next_combinational_gates(), hal::NetlistTraversalDecorator::get_next_sequential_gates(), hal::event_log::handle_gate_event(), hal::Net::is_a_destination(), hal::Net::is_a_source(), operator==(), hal::PyCodeProvider::pyCodeGateAsyncSetResetBehavior(), hal::netlist_utils::remove_buffers(), hal::Net::remove_destination(), hal::Net::remove_source(), and hal::NetlistModificationDecorator::replace_gate().
std::vector< Gate * > hal::Gate::get_unique_predecessors | ( | const std::function< bool(const GatePin *pin, Endpoint *ep)> & | filter = nullptr | ) | const |
Get a vector of all unique predecessor gates of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - An optional filter being evaluated on the gate's input pin as well as the predecessor endpoint. |
Definition at line 874 of file gate.cpp.
Referenced by hal::gate_init().
std::vector< Gate * > hal::Gate::get_unique_successors | ( | const std::function< bool(const GatePin *pin, Endpoint *ep)> & | filter = nullptr | ) | const |
Get a vector of all unique successor gates of the gate. The optional filter is evaluated on every candidate such that the result only contains those matching the specified condition.
[in] | filter | - An optional filter being evaluated on the gate's output pin as well as the successor endpoint. |
Definition at line 954 of file gate.cpp.
Referenced by hal::gate_init().
bool hal::Gate::has_location | ( | ) | const |
Check whether the gate's location in the layout is available.
Definition at line 145 of file gate.cpp.
Referenced by hal::gate_init().
bool hal::Gate::is_fan_in_net | ( | const Net * | net | ) | const |
Check whether the given net is a fan-in of the gate.
[in] | net | - The net. |
true
if the net is a fan-in of the gate, false
otherwise. Definition at line 637 of file gate.cpp.
References log_warning, and net.
Referenced by hal::gate_init().
bool hal::Gate::is_fan_out_net | ( | const Net * | net | ) | const |
Check whether the given net is a fan-out of the gate.
[in] | net | - The net. |
true
if the net is a fan-out of the gate, false
otherwise. Definition at line 781 of file gate.cpp.
References log_warning, and net.
Referenced by hal::gate_init().
bool hal::Gate::is_gnd_gate | ( | ) | const |
Checks whether this gate is a global gnd gate.
Definition at line 586 of file gate.cpp.
Referenced by hal::gate_init(), and operator==().
bool hal::Gate::is_vcc_gate | ( | ) | const |
Checks whether this gate is a global vcc gate.
Definition at line 581 of file gate.cpp.
Referenced by hal::gate_init(), and operator==().
bool hal::Gate::mark_gnd_gate | ( | ) |
Mark this gate as a global gnd gate.
Definition at line 566 of file gate.cpp.
Referenced by hal::gate_init(), and hal::TEST_F().
bool hal::Gate::mark_vcc_gate | ( | ) |
Mark this gate as a global vcc gate.
Definition at line 561 of file gate.cpp.
Referenced by hal::gate_init(), and hal::TEST_F().
bool hal::Gate::operator!= | ( | const Gate & | other | ) | const |
bool hal::Gate::operator== | ( | const Gate & | other | ) | const |
Check whether two gates are equal. Does not check for connected nets or containing module.
[in] | other | - The gate to compare against. |
Definition at line 50 of file gate.cpp.
References get_boolean_functions(), get_id(), get_location_x(), get_location_y(), get_name(), get_type(), is_gnd_gate(), is_vcc_gate(), and log_debug.
Result< std::monostate > hal::Gate::set_init_data | ( | const std::vector< std::string > & | init_data | ) |
Set the INIT data of the gate, if available. An error is returned in case the gate does not hold any INIT data.
[in] | init_data | - The INIT data as a vector. |
Definition at line 1055 of file gate.cpp.
References ERR, hal::GateTypeComponent::get_component_as(), hal::InitComponent::get_init_category(), hal::InitComponent::get_init_identifiers(), and OK.
Set the physical location of the gate in the layout.
Only positive coordinates are valid, negative values will be regarded as no location assigned.
[in] | location | - A pair <x-coordinate, y-coordinate>. |
Definition at line 168 of file gate.cpp.
Referenced by hal::gate_init().
void hal::Gate::set_location_x | ( | i32 | x | ) |
Set the physical location x-coordinate of the gate in the layout.
Only positive values are valid, negative values will be regarded as no location assigned.
[in] | x | - The gate's x-coordinate. |
Definition at line 150 of file gate.cpp.
Referenced by hal::gate_init().
void hal::Gate::set_location_y | ( | i32 | y | ) |
Set the physical location y-coordinate of the gate in the layout.
Only positive values are valid, negative values will be regarded as no location assigned.
[in] | y | - The gate's y-coordinate. |
Definition at line 159 of file gate.cpp.
Referenced by hal::gate_init().
void hal::Gate::set_name | ( | const std::string & | name | ) |
Set the name of the gate.
[in] | name | - The new name. |
Definition at line 110 of file gate.cpp.
References log_error, name, and hal::utils::trim().
Referenced by hal::ActionRenameObject::exec(), and hal::gate_init().
bool hal::Gate::unmark_gnd_gate | ( | ) |
Unmark this gate as a global gnd gate.
Definition at line 576 of file gate.cpp.
Referenced by hal::gate_init().
bool hal::Gate::unmark_vcc_gate | ( | ) |
Unmark this gate as a global vcc gate.
Definition at line 571 of file gate.cpp.
Referenced by hal::gate_init().
|
friend |