openfpga/src/utils/circuit_library_utils.cpp
/********************************************************************
 * Find the number of shared configuration bits for a ReRAM circuit 
 * TODO: this function is subjected to be changed due to ReRAM-based SRAM cell design!!!
 *******************************************************************/
Find the number of shared configuration bits for a ReRAM circuit
TODO: this function is subjected to be changed due to ReRAM-based SRAM cell design
Find the number of shared configuration bits for a ReRAM circuit TODO : this function is subjected to be changed due to ReRAM - based SRAM cell design
static 
size_t find_rram_circuit_num_shared_config_bits(const CircuitLibrary& circuit_lib,
                                                const CircuitModelId& rram_model,
                                                const e_config_protocol_type& sram_orgz_type) {
  size_t num_shared_config_bits = 0;
  switch (sram_orgz_type) {
  case CONFIG_MEM_STANDALONE:
  case CONFIG_MEM_SCAN_CHAIN:
    break;
  case CONFIG_MEM_MEMORY_BANK: {
    std::vector<CircuitPortId> blb_ports = circuit_lib.model_ports_by_type(rram_model, CIRCUIT_MODEL_PORT_BLB);
    for (auto blb_port : blb_ports) {
      num_shared_config_bits = std::max((int)num_shared_config_bits, (int)circuit_lib.port_size(blb_port) - 1);
    }
    break;
  }    
  default:
    VTR_LOG_ERROR("Invalid type of SRAM organization!\n");
    exit(1);
  }
  return num_shared_config_bits;
}
static size_t find_rram_circuit_num_shared_config_bits ( const CircuitLibrary & circuit_lib , const CircuitModelId & rram_model , const e_config_protocol_type & sram_orgz_type ) { size_t num_shared_config_bits = 0 ; switch ( sram_orgz_type ) { case CONFIG_MEM_STANDALONE : case CONFIG_MEM_SCAN_CHAIN : break ; case CONFIG_MEM_MEMORY_BANK : { std :: vector < CircuitPortId > blb_ports = circuit_lib . model_ports_by_type ( rram_model , CIRCUIT_MODEL_PORT_BLB ) ; for ( auto blb_port : blb_ports ) { num_shared_config_bits = std :: max ( ( int ) num_shared_config_bits , ( int ) circuit_lib . port_size ( blb_port ) - 1 ) ; } break ; } default : VTR_LOG_ERROR ( " \n " ) ; exit ( 1 ) ; } return num_shared_config_bits ; }
Find the number of shared configuration bits for a ReRAM circuit
 TODO: this function is subjected to be changed due to ReRAM-based SRAM cell design!!
Find the number of shared configuration bits for a ReRAM circuit TODO : this function is subjected to be changed due to ReRAM - based SRAM cell design!!
/* Branch on the organization of configuration protocol */ /* Find BL/WL ports */