Commit 411d0d6e authored by Wolfgang A. Mozart's avatar Wolfgang A. Mozart

fixing lots of warnings, but nr-uesoftmodem still crashes

parent 3545e139
Pipeline #10886 failed with stage
in 0 seconds
......@@ -468,7 +468,7 @@ return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... )
{
char log_buffer[MAX_LOG_TOTAL];
char log_buffer[MAX_LOG_TOTAL]={0};
va_list args;
va_start(args, format);
......
......@@ -436,8 +436,7 @@ int32_t rate_matching_lte(uint32_t N_coded,
uint8_t *inPtr,
uint32_t off);
void crcTableInit (void);
unsigned int crcbit (unsigned char * inputptr, int octetlen, unsigned int poly);
......
......@@ -1080,6 +1080,6 @@ int8_t polar_decoder_int16(int16_t *input,
}
// pack into ceil(payloadBits/32) 32 bit words, lowest index in MSB
// nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out);
nr_byte2bit_uint8_32_t(polarParams->nr_polar_B, polarParams->payloadBits, out);
nr_byte2bit_uint8_32_t(polarParams->nr_polar_B, polarParams->payloadBits, (unsigned int *)out);
return(0);
}
......@@ -290,6 +290,9 @@ void nr_free_double_3D_array(double ***input,
uint16_t xlen,
uint16_t ylen);
void nr_free_double_2D_array(double **input, uint16_t xlen);
void updateLLR(double ***llr,
uint8_t **llrU,
uint8_t ***bit,
......@@ -370,4 +373,9 @@ static inline void nr_polar_deinterleaver(uint8_t *input,
}
}
void build_decoder_tree(t_nrPolar_params *pp);
int8_t polar_decoder_int16(int16_t *input,
uint8_t *out,
t_nrPolar_params *polarParams);
#endif
......@@ -68,7 +68,7 @@ uint32_t nr_compute_tbs(uint8_t mcs,
uint8_t Nl)
{
uint16_t nbp_re, nb_re, nb_dmrs_prb, nb_rb_oh, Ninfo,Np_info,n,Qm,R,C;
uint32_t nr_tbs;
uint32_t nr_tbs=0;
nb_rb_oh = 0; //set to 0 if not configured by higher layer
Qm = Mcsindextable1[mcs][0];
......
......@@ -39,7 +39,7 @@ int32_t nr_segmentation(unsigned char *input_buffer,
unsigned int *F)
{
unsigned int L,Bprime,Bprime_by_C,Z,r,Kb,k,s,crc,Kprime;
unsigned int L,Bprime,Bprime_by_C,Z,r,Kb,k,s,Kprime;
if (B<=8448) {
L=0;
......
......@@ -176,7 +176,7 @@ int nr_init_frame_parms0(
int nr_init_frame_parms(nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *fp) {
nr_init_frame_parms0(fp,
return nr_init_frame_parms0(fp,
config->subframe_config.numerology_index_mu.value,
config->subframe_config.dl_cyclic_prefix_type.value);
}
......
......@@ -618,5 +618,10 @@ int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type);
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type);
uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
/**@}*/
#endif
......@@ -159,7 +159,7 @@ void nr_pdcch_scrambling(uint32_t *in,
}
uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
t_nrPolar_paramsPtr *nrPolar_params,
t_nrPolar_paramsPtr *nrPolar_params,
uint32_t **gold_pdcch_dmrs,
int32_t** txdataF,
int16_t amp,
......
......@@ -265,7 +265,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
#endif
// Payload interleaving
uint32_t in=0, out=0;
uint32_t in=0;
for (int i=0; i<NR_POLAR_PBCH_PAYLOAD_BITS>>3; i++)
in |= (uint32_t)(pbch->pbch_a[i]<<((3-i)<<3));
......
......@@ -491,7 +491,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
// generate pilot
nr_pdsch_dmrs_rx(ue,eNB_offset,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol], &pilot[0],1000,1,nb_rb_pdsch);
nr_pdsch_dmrs_rx(ue,eNB_offset,Ns,ue->nr_gold_pdsch, &pilot[0],1000,1,nb_rb_pdsch);
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
......
......@@ -34,14 +34,10 @@
#include <stdlib.h>
#include <string.h>
#endif
//#include "PHY/defs.h"
#include "PHY/defs_nr_UE.h"
#include "nr_transport_proto_ue.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/CODING/coding_extern.h"
//#include "PHY/extern.h"
//#include "SCHED/defs.h"
//#include "SIMULATION/TOOLS/defs.h" // for taus
#include "PHY/sse_intrin.h"
#include "assertions.h"
......@@ -53,7 +49,7 @@
//#define NR_LTE_PDCCH_DCI_SWITCH
#define NR_PDCCH_DCI_RUN // activates new nr functions
#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
#define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0)
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
#define PDCCH_TEST_POLAR_TEMP_FIX
......@@ -1191,7 +1187,7 @@ if (do_common){
//uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id;
//uint32_t puissance_2_31= (1<<30)*2;
//uint32_t calc_x2=puissance_2_16%puissance_2_31;
x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3
x2 = (((1<<16)*n_rnti)+n_id); //mod 2^31 is implicit //this is c_init in 38.211 v15.1.0 Section 7.3.2.3
// x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2
#ifndef NR_PDCCH_DCI_DEBUG
printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d, length=%d)\n",x2,n_id,n_rnti,length);
......
......@@ -274,7 +274,7 @@ void nr_pbch_channel_compensation(int **rxdataF_ext,
{
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
//short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
#if defined(__x86_64__) || defined(__i386__)
__m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
#elif defined(__arm__)
......@@ -441,8 +441,6 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
uint8_t reset, offset;
uint32_t x1, x2, s=0;
int16_t *demod_pbch_e = pbch->llr;
uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime;
uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved;
uint32_t unscrambling_mask = 0x100006D;
......@@ -660,7 +658,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
t_nrPolar_params *currentPtr = nr_polar_params(ue->nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL);
decoderState = polar_decoder_int16(pbch_e_rx,&nr_ue_pbch_vars->pbch_a_prime,currentPtr);
decoderState = polar_decoder_int16(pbch_e_rx,(uint8_t*)&nr_ue_pbch_vars->pbch_a_prime,currentPtr);
if(decoderState == -1)
......
......@@ -1637,9 +1637,11 @@ uint8_t get_prach_prb_offset(NR_DL_FRAME_PARMS *frame_parms,
uint8_t n_ra_prboffset,
uint8_t tdd_mapindex, uint16_t Nf);
void nr_pdcch_unscrambling(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx,
uint16_t *z, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common);
uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
/**@}*/
#endif
......@@ -128,11 +128,12 @@ static inline void stop_meas(time_stats_t *ts)
static inline void reset_meas(time_stats_t *ts) {
ts->trials=0;
ts->in=0;
ts->diff=0;
ts->p_time=0;
ts->diff_square=0;
ts->max=0;
ts->trials=0;
ts->meas_flag=0;
}
......
......@@ -342,6 +342,8 @@ int8_t dB_fixed2(uint32_t x,uint32_t y);
int16_t dB_fixed_times10(uint32_t x);
uint8_t dB_fixed64(uint64_t x);
int32_t phy_phase_compensation_top (uint32_t pilot_type, uint32_t initial_pilot,
uint32_t last_pilot, int32_t ignore_prefix);
......
......@@ -163,8 +163,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
int offset = gNB->CC_id;
if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_subframe_select(cfg,subframe)==SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
......@@ -190,7 +188,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if (nfapi_mode == 0 || nfapi_mode == 1)
nr_generate_dci_top(gNB->pdcch_vars,
gNB->nrPolar_params,
&gNB->nrPolar_params,
gNB->nr_gold_pdcch_dmrs[slot_idx],
gNB->common_vars.txdataF,
AMP, *fp, *cfg);
......
......@@ -26,19 +26,26 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include "common/config/config_userapi.h"
#include "common/utils/LOG/log.h"
#include "common/ran_context.h"
#include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/RF/rf.h"
#include "PHY/types.h"
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "SCHED_NR/sched_nr.h"
#include "PHY/MODULATION/modulation_common.h"
#include "common/ran_context.h"
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
......@@ -70,7 +77,7 @@ void exit_function(const char* file, const char* function, const int line,const
}
// needed for some functions
PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={NULL};
PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}};
int main(int argc, char **argv)
{
......@@ -126,11 +133,9 @@ int main(int argc, char **argv)
cpuf = get_cpu_freq_GHz();
/*
if ( load_configmodule(argc,argv) == 0) {
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
}
*/
logInit();
randominit(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment