openfpga/src/utils/pb_type_utils.cpp
/************************************************************************ 
 * Find a port for a pb_type with a given name
 * If not found, return null pointer
 ************************************************************************/
Find a port for a pb_type with a given name
If not found, return null pointer
Find a port for a pb_type with a given name If not found return null pointer
t_port* find_pb_type_port(t_pb_type* pb_type, const std::string& port_name) {
  for (int i = 0; i < pb_type->num_ports; ++i) {
    if (port_name == std::string(pb_type->ports[i].name)) {
      return &(pb_type->ports[i]);
    }
  }
  return nullptr;
}
t_port * find_pb_type_port ( t_pb_type * pb_type , const std :: string & port_name ) { for ( int i = 0 ; i < pb_type -> num_ports ; ++ i ) { if ( port_name == std :: string ( pb_type -> ports [ i ] . name ) ) { return & ( pb_type -> ports [ i ] ) ; } } return nullptr ; }
Find a port for a pb_type with a given name
 If not found, return null pointer
Find a port for a pb_type with a given name If not found return null pointer