openfpga/src/utils/pb_type_utils.cpp
/********************************************************************
 * This function will automatically infer the actual type of an interconnect
 * that will be used to implement the physical design:
 * - MUX_INTERC -> CIRCUIT_MODEL_MUX
 * - DIRECT_INTERC -> CIRCUIT_MODEL_WIRE
 * 
 * Note: 
 *   - COMPLETE_INTERC should not appear here!
 *   - We assume the interconnect type is the physical type
 *     after interconnect physical type annotation is done! 
 *******************************************************************/
This function will automatically infer the actual type of an interconnect
that will be used to implement the physical design:
- MUX_INTERC -> CIRCUIT_MODEL_MUX
- DIRECT_INTERC -> CIRCUIT_MODEL_WIRE

- COMPLETE_INTERC should not appear here.
- We assume the interconnect type is the physical type
after interconnect physical type annotation is done!
This function will automatically infer the actual type of an interconnect that will be used to implement the physical design : - MUX_INTERC - > CIRCUIT_MODEL_MUX - DIRECT_INTERC - > CIRCUIT_MODEL_WIRE - COMPLETE_INTERC should not appear here . - We assume the interconnect type is the physical type after interconnect physical type annotation is done!
e_circuit_model_type pb_interconnect_require_circuit_model_type(const e_interconnect& pb_interc_type) {
  std::map<e_interconnect, e_circuit_model_type> type_mapping;
  type_mapping[MUX_INTERC] = CIRCUIT_MODEL_MUX;
  type_mapping[DIRECT_INTERC] = CIRCUIT_MODEL_WIRE;
  VTR_ASSERT((MUX_INTERC == pb_interc_type) || (DIRECT_INTERC == pb_interc_type));
  return type_mapping.at(pb_interc_type); 
}
e_circuit_model_type pb_interconnect_require_circuit_model_type ( const e_interconnect & pb_interc_type ) { std :: map < e_interconnect , e_circuit_model_type > type_mapping ; type_mapping [ MUX_INTERC ] = CIRCUIT_MODEL_MUX ; type_mapping [ DIRECT_INTERC ] = CIRCUIT_MODEL_WIRE ; VTR_ASSERT ( ( MUX_INTERC == pb_interc_type ) || ( DIRECT_INTERC == pb_interc_type ) ) ; return type_mapping . at ( pb_interc_type ) ; }
This function will automatically infer the actual type of an interconnect
 that will be used to implement the physical design:
 - MUX_INTERC -> CIRCUIT_MODEL_MUX
 - DIRECT_INTERC -> CIRCUIT_MODEL_WIRE
This function will automatically infer the actual type of an interconnect that will be used to implement the physical design : - MUX_INTERC - > CIRCUIT_MODEL_MUX - DIRECT_INTERC - > CIRCUIT_MODEL_WIRE
/* A map from interconnect type to circuit model type */