openfpga/src/utils/memory_utils.cpp
/*********************************************************************
 * Update the LSB and MSB of a configuration bus based on the number of 
 * memory bits of a module. 
 * Note that this function is designed to do such simple job, in purpose of
 * being independent from adding ports or printing ports.
 * As such, this function can be re-used in bitstream generation 
 * when Verilog generation is not needed.  
 * DO NOT update the configuration bus in the function of adding/printing ports
 **********************************************************************/
Update the LSB and MSB of a configuration bus based on the number of
memory bits of a module.
Note that this function is designed to do such simple job, in purpose of
being independent from adding ports or printing ports.
As such, this function can be re-used in bitstream generation
when Verilog generation is not needed.
DO NOT update the configuration bus in the function of adding/printing ports
Update the LSB and MSB of a configuration bus based on the number of memory bits of a module . Note that this function is designed to do such simple job in purpose of being independent from adding ports or printing ports . As such this function can be re - used in bitstream generation when Verilog generation is not needed . DO NOT update the configuration bus in the function of adding / printing ports
void update_mem_module_config_bus(const e_config_protocol_type& sram_orgz_type,
                                  const e_circuit_model_design_tech& mem_design_tech,
                                  const size_t& num_config_bits,
                                  BasicPort& config_bus) {
  switch (mem_design_tech) {
  case CIRCUIT_MODEL_DESIGN_CMOS:
    update_cmos_mem_module_config_bus(sram_orgz_type, num_config_bits, config_bus);
    break;
  case CIRCUIT_MODEL_DESIGN_RRAM:
    update_rram_mem_module_config_bus(sram_orgz_type, config_bus);
    break;
  default:
    VTR_LOG_ERROR("Invalid type of memory design technology!\n");
    exit(1);
  }
}
void update_mem_module_config_bus ( const e_config_protocol_type & sram_orgz_type , const e_circuit_model_design_tech & mem_design_tech , const size_t & num_config_bits , BasicPort & config_bus ) { switch ( mem_design_tech ) { case CIRCUIT_MODEL_DESIGN_CMOS : update_cmos_mem_module_config_bus ( sram_orgz_type , num_config_bits , config_bus ) ; break ; case CIRCUIT_MODEL_DESIGN_RRAM : update_rram_mem_module_config_bus ( sram_orgz_type , config_bus ) ; break ; default : VTR_LOG_ERROR ( " \n " ) ; exit ( 1 ) ; } }
Update the LSB and MSB of a configuration bus based on the number of
 memory bits of a module.
Update the LSB and MSB of a configuration bus based on the number of memory bits of a module .