openfpga/src/utils/memory_utils.cpp
/********************************************************************
 * Check if the MSB of a configuration bus of a switch block
 * matches the expected value
 ********************************************************************/
Check if the MSB of a configuration bus of a switch block
matches the expected value
Check if the MSB of a configuration bus of a switch block matches the expected value
bool check_mem_config_bus(const e_config_protocol_type& sram_orgz_type, 
                          const BasicPort& config_bus, 
                          const size_t& local_expected_msb) {
  switch (sram_orgz_type) {
  case CONFIG_MEM_STANDALONE:
    return false;
    break;
  case CONFIG_MEM_SCAN_CHAIN:
    return (local_expected_msb == config_bus.get_msb());
    break;
  case CONFIG_MEM_MEMORY_BANK:
    return (local_expected_msb == config_bus.get_msb());
    break;
  default:
    VTR_LOG_ERROR("Invalid type of SRAM organization!\n");
    exit(1);
  }
  return false;
}
bool check_mem_config_bus ( const e_config_protocol_type & sram_orgz_type , const BasicPort & config_bus , const size_t & local_expected_msb ) { switch ( sram_orgz_type ) { case CONFIG_MEM_STANDALONE : return false ; break ; case CONFIG_MEM_SCAN_CHAIN : return ( local_expected_msb == config_bus . get_msb ( ) ) ; break ; case CONFIG_MEM_MEMORY_BANK : return ( local_expected_msb == config_bus . get_msb ( ) ) ; break ; default : VTR_LOG_ERROR ( " \n " ) ; exit ( 1 ) ; } return false ; }
Check if the MSB of a configuration bus of a switch block
 matches the expected value
Check if the MSB of a configuration bus of a switch block matches the expected value
/* Not supported */ /* TODO: comment on why
     */ /* TODO: comment on why
     */ /* Reach here, it means something goes wrong, return a false value */