openfpga/src/utils/pb_graph_utils.cpp
/********************************************************************
 * This function aims to find out all the pb_graph_pins that drive 
 * a given pb_graph pin w.r.t. a given interconnect definition
 *******************************************************************/
This function aims to find out all the pb_graph_pins that drive
a given pb_graph pin w.r.t. a given interconnect definition
This function aims to find out all the pb_graph_pins that drive a given pb_graph pin w . r . t . a given interconnect definition
std::vector<t_pb_graph_pin*> pb_graph_pin_inputs(t_pb_graph_pin* pb_graph_pin,
                                                 t_interconnect* selected_interconnect) { 
  std::vector<t_pb_graph_pin*> inputs;
  for (int iedge = 0; iedge < pb_graph_pin->num_input_edges; ++iedge) {
    if (selected_interconnect != pb_graph_pin->input_edges[iedge]->interconnect) {
      continue;
    }
    for (int ipin = 0; ipin < pb_graph_pin->input_edges[iedge]->num_input_pins; ++ipin) {
      if (inputs.end() != std::find(inputs.begin(), inputs.end(), pb_graph_pin->input_edges[iedge]->input_pins[ipin])) {
        continue;
      }
      inputs.push_back(pb_graph_pin->input_edges[iedge]->input_pins[ipin]);
    }
  }
  return inputs;
}
std :: vector < t_pb_graph_pin * > pb_graph_pin_inputs ( t_pb_graph_pin * pb_graph_pin , t_interconnect * selected_interconnect ) { std :: vector < t_pb_graph_pin * > inputs ; for ( int iedge = 0 ; iedge < pb_graph_pin -> num_input_edges ; ++ iedge ) { if ( selected_interconnect != pb_graph_pin -> input_edges [ iedge ] -> interconnect ) { continue ; } for ( int ipin = 0 ; ipin < pb_graph_pin -> input_edges [ iedge ] -> num_input_pins ; ++ ipin ) { if ( inputs . end ( ) != std :: find ( inputs . begin ( ) , inputs . end ( ) , pb_graph_pin -> input_edges [ iedge ] -> input_pins [ ipin ] ) ) { continue ; } inputs . push_back ( pb_graph_pin -> input_edges [ iedge ] -> input_pins [ ipin ] ) ; } } return inputs ; }
This function aims to find out all the pb_graph_pins that drive
 a given pb_graph pin w.r.t.
This function aims to find out all the pb_graph_pins that drive a given pb_graph pin w . r . t .
/* Search the input edges only, stats on the size of MUX we may need (fan-in) */ /* We care the only edges in the selected mode */ /* Ensure that the pin is unique in the list */ /* Unique pin, push to the vector */