openfpga/src/utils/decoder_library_utils.cpp
/***************************************************************************************
 * Try to find if the decoder already exists in the library, 
 * If there is no such decoder, add it to the library 
 ***************************************************************************************/
Try to find if the decoder already exists in the library,
If there is no such decoder, add it to the library
Try to find if the decoder already exists in the library If there is no such decoder add it to the library
DecoderId add_mux_local_decoder_to_library(DecoderLibrary& decoder_lib, 
                                           const size_t data_size) {
  size_t addr_size = find_mux_local_decoder_addr_size(data_size);
  DecoderId decoder_id = decoder_lib.find_decoder(addr_size, data_size, false, false, true);
  if (DecoderId::INVALID() == decoder_id) { 
    return decoder_lib.add_decoder(addr_size, data_size, false, false, true);
  }
  return decoder_id;
}
DecoderId add_mux_local_decoder_to_library ( DecoderLibrary & decoder_lib , const size_t data_size ) { size_t addr_size = find_mux_local_decoder_addr_size ( data_size ) ; DecoderId decoder_id = decoder_lib . find_decoder ( addr_size , data_size , false , false , true ) ; if ( DecoderId :: INVALID ( ) == decoder_id ) { return decoder_lib . add_decoder ( addr_size , data_size , false , false , true ) ; } return decoder_id ; }
Try to find if the decoder already exists in the library,
 If there is no such decoder, add it to the library
Try to find if the decoder already exists in the library If there is no such decoder add it to the library
/* Add the decoder */ /* There is already a decoder in the library, return the decoder id */