openfpga/src/utils/mux_utils.cpp
/**************************************************
 * Find the number of shared configuration bits for 
 * a routing multiplexer
 * Two cases are considered here.
 * They are placed in different branches (sub-functions)
 * in order to be easy in extending to new technology!
 *
 * Note: currently, shared configuration bits are demanded
 * by ReRAM-based multiplexers only
 *************************************************/
Find the number of shared configuration bits for
a routing multiplexer
Two cases are considered here.
They are placed in different branches (sub-functions)
in order to be easy in extending to new technology!

currently, shared configuration bits are demanded
by ReRAM-based multiplexers only
Find the number of shared configuration bits for a routing multiplexer Two cases are considered here . They are placed in different branches ( sub - functions ) in order to be easy in extending to new technology! currently shared configuration bits are demanded by ReRAM - based multiplexers only
size_t find_mux_num_shared_config_bits(const CircuitLibrary& circuit_lib,
                                       const CircuitModelId& mux_model,
                                       const MuxGraph& mux_graph, 
                                       const e_config_protocol_type& sram_orgz_type) {
  size_t num_shared_config_bits = size_t(-1);
  switch (circuit_lib.design_tech_type(mux_model)) {
  case CIRCUIT_MODEL_DESIGN_CMOS:
    num_shared_config_bits = find_cmos_mux_num_shared_config_bits(sram_orgz_type);
    break;
  case CIRCUIT_MODEL_DESIGN_RRAM:
    num_shared_config_bits = find_rram_mux_num_shared_config_bits(circuit_lib, mux_model, mux_graph, sram_orgz_type);
    break;
  default:
    VTR_LOG_ERROR("Invalid design_technology of MUX(name: %s)\n",
                  circuit_lib.model_name(mux_model).c_str()); 
    exit(1);
  }
  return num_shared_config_bits;
}
size_t find_mux_num_shared_config_bits ( const CircuitLibrary & circuit_lib , const CircuitModelId & mux_model , const MuxGraph & mux_graph , const e_config_protocol_type & sram_orgz_type ) { size_t num_shared_config_bits = size_t ( -1 ) ; switch ( circuit_lib . design_tech_type ( mux_model ) ) { case CIRCUIT_MODEL_DESIGN_CMOS : num_shared_config_bits = find_cmos_mux_num_shared_config_bits ( sram_orgz_type ) ; break ; case CIRCUIT_MODEL_DESIGN_RRAM : num_shared_config_bits = find_rram_mux_num_shared_config_bits ( circuit_lib , mux_model , mux_graph , sram_orgz_type ) ; break ; default : VTR_LOG_ERROR ( " \n " , circuit_lib . model_name ( mux_model ) . c_str ( ) ) ; exit ( 1 ) ; } return num_shared_config_bits ; }
Find the number of shared configuration bits for
 a routing multiplexer
 Two cases are considered here.
Find the number of shared configuration bits for a routing multiplexer Two cases are considered here .