openfpga/src/fabric/build_routing_module_utils.cpp
/*********************************************************************
 * Generate a list of input ports for routing multiplexer inside the switch block
 ********************************************************************/
Generate a list of input ports for routing multiplexer inside the switch block
Generate a list of input ports for routing multiplexer inside the switch block
std::vector<ModulePinInfo> find_switch_block_module_input_ports(const ModuleManager& module_manager,
                                                                const ModuleId& sb_module, 
                                                                const RRGraph& rr_graph,
                                                                const RRGSB& rr_gsb, 
                                                                const std::vector<RRNodeId>& input_rr_nodes) {
  std::vector<ModulePinInfo> input_ports;
  for (const RRNodeId& input_rr_node : input_rr_nodes) {
    enum e_side input_pin_side = NUM_SIDES;
    int index = -1;
    rr_gsb.get_node_side_and_index(rr_graph, input_rr_node, IN_PORT, input_pin_side, index);
    VTR_ASSERT(NUM_SIDES != input_pin_side);
    VTR_ASSERT(-1 != index);
    input_ports.push_back(find_switch_block_module_input_port(module_manager, sb_module, rr_graph, rr_gsb, input_pin_side, input_rr_node));
  }
  return input_ports;
}
std :: vector < ModulePinInfo > find_switch_block_module_input_ports ( const ModuleManager & module_manager , const ModuleId & sb_module , const RRGraph & rr_graph , const RRGSB & rr_gsb , const std :: vector < RRNodeId > & input_rr_nodes ) { std :: vector < ModulePinInfo > input_ports ; for ( const RRNodeId & input_rr_node : input_rr_nodes ) { enum e_side input_pin_side = NUM_SIDES ; int index = -1 ; rr_gsb . get_node_side_and_index ( rr_graph , input_rr_node , IN_PORT , input_pin_side , index ) ; VTR_ASSERT ( NUM_SIDES != input_pin_side ) ; VTR_ASSERT ( -1 != index ) ; input_ports . push_back ( find_switch_block_module_input_port ( module_manager , sb_module , rr_graph , rr_gsb , input_pin_side , input_rr_node ) ) ; } return input_ports ; }
Generate a list of input ports for routing multiplexer inside the switch block
Generate a list of input ports for routing multiplexer inside the switch block
/* Find the side where the input locates in the Switch Block */ /* The input could be at any side of the switch block, find it */