Fix some warnings in PHY due to array parameter mismatch for a few functions

master
Pedro Alvarez 4 years ago committed by Andre Puschmann
parent b40867ffec
commit c74b2dd633

@ -80,7 +80,7 @@ SRSRAN_API int srsran_predecoding_diversity(cf_t* y,
SRSRAN_API int srsran_predecoding_diversity_multi(cf_t* y[SRSRAN_MAX_PORTS],
cf_t* h[SRSRAN_MAX_PORTS][SRSRAN_MAX_PORTS],
cf_t* x[SRSRAN_MAX_LAYERS],
float* csi[SRSRAN_MAX_LAYERS],
float* csi[SRSRAN_MAX_CODEWORDS],
int nof_rxant,
int nof_ports,
int nof_symbols,

@ -135,7 +135,8 @@ typedef struct {
SRSRAN_API int srsran_cqi_size(srsran_cqi_cfg_t* cfg);
SRSRAN_API int srsran_cqi_value_pack(srsran_cqi_cfg_t* cfg, srsran_cqi_value_t* value, uint8_t* buff);
SRSRAN_API int
srsran_cqi_value_pack(srsran_cqi_cfg_t* cfg, srsran_cqi_value_t* value, uint8_t buff[SRSRAN_CQI_MAX_BITS]);
SRSRAN_API int
srsran_cqi_value_unpack(srsran_cqi_cfg_t* cfg, uint8_t buff[SRSRAN_CQI_MAX_BITS], srsran_cqi_value_t* value);

@ -104,7 +104,7 @@ SRSRAN_API int srsran_pusch_nr_decode(srsran_pusch_nr_t* q,
const srsran_sch_grant_nr_t* grant,
srsran_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSRAN_MAX_PORTS],
srsran_pusch_res_nr_t data[SRSRAN_MAX_TB]);
srsran_pusch_res_nr_t* data[SRSRAN_MAX_TB]);
SRSRAN_API uint32_t srsran_pusch_nr_rx_info(const srsran_pusch_nr_t* q,
const srsran_sch_cfg_nr_t* cfg,

@ -199,7 +199,7 @@ SRSRAN_API int srsran_ue_dl_decode_pdsch(srsran_ue_dl_t* q,
SRSRAN_API int srsran_ue_dl_decode_pmch(srsran_ue_dl_t* q,
srsran_dl_sf_cfg_t* sf,
srsran_pmch_cfg_t* pmch_cfg,
srsran_pdsch_res_t* data);
srsran_pdsch_res_t data[SRSRAN_MAX_CODEWORDS]);
SRSRAN_API int srsran_ue_dl_decode_phich(srsran_ue_dl_t* q,
srsran_dl_sf_cfg_t* sf,

@ -482,7 +482,7 @@ int srsran_pdsch_nr_decode(srsran_pdsch_nr_t* q,
srsran_pdsch_res_nr_t* data)
{
// Check input pointers
if (!q || !cfg || !grant || !data || !sf_symbols) {
if (!q || !cfg || !grant || !data || !sf_symbols || !channel) {
return SRSRAN_ERROR_INVALID_INPUTS;
}
@ -528,8 +528,7 @@ int srsran_pdsch_nr_decode(srsran_pdsch_nr_t* q,
// Antenna port demapping
// ... Not implemented
srsran_predecoding_type(
q->x, channel->ce, q->d, NULL, 1, 1, 1, 0, nof_re, SRSRAN_TXSCHEME_PORT0, 1.0f, channel->noise_estimate);
srsran_predecoding_single(q->x[0], channel->ce[0][0], q->d[0], NULL, nof_re, 1.0f, channel->noise_estimate);
// Layer demapping
if (grant->nof_layers > 1) {

@ -909,10 +909,10 @@ int srsran_pusch_nr_decode(srsran_pusch_nr_t* q,
const srsran_sch_grant_nr_t* grant,
srsran_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSRAN_MAX_PORTS],
srsran_pusch_res_nr_t* data)
srsran_pusch_res_nr_t* data[SRSRAN_MAX_TB])
{
// Check input pointers
if (!q || !cfg || !grant || !data || !sf_symbols) {
if (!q || !cfg || !grant || !data || !sf_symbols || !channel) {
return SRSRAN_ERROR_INVALID_INPUTS;
}
@ -969,8 +969,7 @@ int srsran_pusch_nr_decode(srsran_pusch_nr_t* q,
// Antenna port demapping
// ... Not implemented
srsran_predecoding_type(
q->x, channel->ce, q->d, NULL, 1, 1, 1, 0, nof_re, SRSRAN_TXSCHEME_PORT0, 1.0f, channel->noise_estimate);
srsran_predecoding_single(q->x[0], channel->ce[0][0], q->d[0], NULL, nof_re, 1.0f, channel->noise_estimate);
// Layer demapping
if (grant->nof_layers > 1) {
@ -979,7 +978,7 @@ int srsran_pusch_nr_decode(srsran_pusch_nr_t* q,
// SCH decode
for (uint32_t tb = 0; tb < SRSRAN_MAX_TB; tb++) {
if (pusch_nr_decode_codeword(q, cfg, &grant->tb[tb], data, grant->rnti) < SRSRAN_SUCCESS) {
if (pusch_nr_decode_codeword(q, cfg, &grant->tb[tb], data[0], grant->rnti) < SRSRAN_SUCCESS) {
ERROR("Error encoding TB %d", tb);
return SRSRAN_ERROR;
}

@ -39,7 +39,7 @@ uint8_t bch_payload_file[SRSRAN_BCH_PAYLOAD_LEN] = {0, 1, 1, 0, 1, 0, 0, 0, 0, 0
#define FLEN (10 * SRSRAN_SF_LEN(srsran_symbol_sz(cell.nof_prb)))
srsran_filesource_t fsrc;
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_CODEWORDS];
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_PORTS];
srsran_pbch_t pbch;
srsran_ofdm_t fft;
srsran_chest_dl_t chest;

@ -33,7 +33,7 @@ int flen;
FILE* fmatlab = NULL;
srsran_filesource_t fsrc;
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_CODEWORDS];
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_PORTS];
srsran_pcfich_t pcfich;
srsran_regs_t regs;
srsran_ofdm_t fft;

@ -39,7 +39,7 @@ int max_frames = 10;
srsran_dci_format_t dci_format = SRSRAN_DCI_FORMAT1A;
srsran_filesource_t fsrc;
srsran_pdcch_t pdcch;
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_CODEWORDS];
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_PORTS];
srsran_regs_t regs;
srsran_ofdm_t fft;
srsran_chest_dl_t chest;

@ -165,7 +165,7 @@ int main(int argc, char** argv)
exit(-1);
}
uint8_t* data[] = {malloc(100000)};
uint8_t* data[SRSRAN_MAX_CODEWORDS] = {malloc(100000)};
if (!data[0]) {
perror("malloc");
exit(-1);

@ -39,7 +39,7 @@ int numsubframe = 0;
FILE* fmatlab = NULL;
srsran_filesource_t fsrc;
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_CODEWORDS];
cf_t * input_buffer, *fft_buffer[SRSRAN_MAX_PORTS];
srsran_phich_t phich;
srsran_regs_t regs;
srsran_ofdm_t fft;

@ -207,9 +207,12 @@ int main(int argc, char** argv)
SRSRAN_DCI_TB_DISABLE(dci.tb[1]);
srsran_ra_dl_dci_to_grant(&cell, &dl_sf, SRSRAN_TM1, false, &dci, &pmch_cfg.pdsch_cfg.grant);
srsran_pdsch_res_t pdsch_res;
pdsch_res.payload = data;
ret = srsran_ue_dl_decode_pmch(&ue_dl, &dl_sf, &pmch_cfg, &pdsch_res);
srsran_pdsch_res_t pdsch_res = {};
pdsch_res.payload = data;
srsran_pdsch_res_t pdsch_res_vec[SRSRAN_MAX_CODEWORDS];
pdsch_res_vec[0] = pdsch_res;
ret = srsran_ue_dl_decode_pmch(&ue_dl, &dl_sf, &pmch_cfg, pdsch_res_vec);
if (pdsch_res.crc == 1) {
printf("PMCH Decoded OK!\n");
} else if (pdsch_res.crc == 0) {

@ -80,7 +80,7 @@ int test_uci_cqi_pucch(void)
int ret = SRSRAN_SUCCESS;
__attribute__((aligned(256))) uint8_t o_bits[SRSRAN_UCI_MAX_CQI_LEN_PUCCH] = {0};
__attribute__((aligned(256))) uint8_t e_bits[SRSRAN_UCI_CQI_CODED_PUCCH_B] = {0};
__attribute__((aligned(256))) int16_t e_symb[SRSRAN_UCI_CQI_CODED_PUCCH_B] = {0};
__attribute__((aligned(256))) int16_t e_symb[SRSRAN_CQI_MAX_BITS] = {0};
__attribute__((aligned(256))) uint8_t d_bits[SRSRAN_UCI_MAX_CQI_LEN_PUCCH] = {0};
srsran_uci_cqi_pucch_t uci_cqi_pucch = {0};

@ -266,7 +266,9 @@ int main(int argc, char** argv)
}
chest.nof_re = pusch_cfg.grant.tb->nof_re;
if (srsran_pusch_nr_decode(&pusch_rx, &pusch_cfg, &pusch_cfg.grant, &chest, sf_symbols, &data_rx) <
srsran_pusch_res_nr_t* data_rx_vec[SRSRAN_MAX_TB] = {};
data_rx_vec[0] = &data_rx;
if (srsran_pusch_nr_decode(&pusch_rx, &pusch_cfg, &pusch_cfg.grant, &chest, sf_symbols, data_rx_vec) <
SRSRAN_SUCCESS) {
ERROR("Error encoding");
goto clean_exit;

@ -120,7 +120,7 @@ int16_t srsran_uci_decode_cqi_pucch(srsran_uci_cqi_pucch_t* q,
uint8_t* cqi_data,
uint32_t cqi_len)
{
if (cqi_len < SRSRAN_UCI_MAX_CQI_LEN_PUCCH && b_bits != NULL && cqi_data != NULL) {
if (q != NULL && cqi_len < SRSRAN_UCI_MAX_CQI_LEN_PUCCH && b_bits != NULL && cqi_data != NULL) {
uint32_t max_w = 0;
int32_t max_corr = INT32_MIN;
uint32_t nwords = 1 << SRSRAN_UCI_MAX_CQI_LEN_PUCCH;
@ -646,9 +646,10 @@ int srsran_uci_decode_ack_ri(srsran_pusch_cfg_t* cfg,
uint32_t Qm = srsran_mod_bits_x_symbol(cfg->grant.tb.mod);
int16_t llr_acc[32] = {}; ///< LLR accumulator
uint32_t nof_acc =
(nof_bits == 1) ? Qm : (nof_bits == 2) ? Qm * 3 : SRSRAN_FEC_BLOCK_SIZE; ///< Number of required LLR
uint32_t count_acc = 0; ///< LLR counter
uint32_t nof_acc = (nof_bits == 1) ? Qm
: (nof_bits == 2) ? Qm * 3
: SRSRAN_FEC_BLOCK_SIZE; ///< Number of required LLR
uint32_t count_acc = 0; ///< LLR counter
for (uint32_t i = 0; i < Qprime; i++) {
if (is_ri) {

@ -597,12 +597,7 @@ int rf_zmq_recv_with_time(void* h, void* data, uint32_t nsamples, bool blocking,
return rf_zmq_recv_with_time_multi(h, &data, nsamples, blocking, secs, frac_secs);
}
int rf_zmq_recv_with_time_multi(void* h,
void* data[4],
uint32_t nsamples,
bool blocking,
time_t* secs,
double* frac_secs)
int rf_zmq_recv_with_time_multi(void* h, void** data, uint32_t nsamples, bool blocking, time_t* secs, double* frac_secs)
{
int ret = SRSRAN_ERROR;

@ -573,11 +573,11 @@ int srsran_ue_dl_nr_decode_pdsch(srsran_ue_dl_nr_t* q,
return SRSRAN_SUCCESS;
}
int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q,
const srsran_sch_cfg_nr_t* cfg,
const srsran_pdsch_res_nr_t* res,
char* str,
uint32_t str_len)
int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q,
const srsran_sch_cfg_nr_t* cfg,
const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS],
char* str,
uint32_t str_len)
{
int len = 0;

@ -471,8 +471,10 @@ int main(int argc, char** argv)
}
if (srsran_verbose >= SRSRAN_VERBOSE_INFO) {
char str[512];
srsran_ue_dl_nr_pdsch_info(&ue_dl, &pdsch_cfg, &pdsch_res, str, (uint32_t)sizeof(str));
char str[512];
srsran_pdsch_res_nr_t pdsch_res_vec[SRSRAN_MAX_CODEWORDS] = {};
pdsch_res_vec[0] = pdsch_res;
srsran_ue_dl_nr_pdsch_info(&ue_dl, &pdsch_cfg, pdsch_res_vec, str, (uint32_t)sizeof(str));
char str_extra[2048];
srsran_sch_cfg_nr_info(&pdsch_cfg, str_extra, (uint32_t)sizeof(str_extra));

Loading…
Cancel
Save