openfpga/src/utils/pb_type_utils.cpp
/************************************************************************ 
 * With a given pb_type, provide a list of its ports
 ************************************************************************/
With a given pb_type, provide a list of its ports
With a given pb_type provide a list of its ports
std::vector<t_port*> pb_type_ports(t_pb_type* pb_type) {
  std::vector<t_port*> ports;
  for (int i = 0; i < pb_type->num_ports; ++i) {
    ports.push_back(&(pb_type->ports[i]));
  }
  return ports;
}
std :: vector < t_port * > pb_type_ports ( t_pb_type * pb_type ) { std :: vector < t_port * > ports ; for ( int i = 0 ; i < pb_type -> num_ports ; ++ i ) { ports . push_back ( & ( pb_type -> ports [ i ] ) ) ; } return ports ; }
With a given pb_type, provide a list of its ports
With a given pb_type provide a list of its ports