Commit ef6f571b authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/remove-unused-static-functions' into integration_2023_w23

parents 3d11dbc1 1b09f683
......@@ -66,24 +66,27 @@ static telnetsrv_params_t telnetparams;
#define TELNETSRV_OPTNAME_STATICMOD "staticmod"
#define TELNETSRV_OPTNAME_SHRMOD "shrmod"
// clang-format off
paramdef_t telnetoptions[] = {
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* configuration parameters for telnet utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
{"listenaddr", "<listen ip address>\n", 0, uptr : &telnetparams.listenaddr, defstrval : "0.0.0.0", TYPE_IPV4ADDR, 0},
{"listenport", "<local port>\n", 0, uptr : &(telnetparams.listenport), defuintval : 9090, TYPE_UINT, 0},
{"listenstdin", "enable input from stdin\n", PARAMFLAG_BOOL, uptr : &(telnetparams.listenstdin), defuintval : 0, TYPE_UINT, 0},
{"priority", "<scheduling policy (0-99)\n", 0, iptr : &telnetparams.priority, defuintval : 0, TYPE_INT, 0},
{"debug", "<debug level>\n", 0, uptr : NULL, defuintval : 0, TYPE_UINT, 0},
{"loopcount", "<loop command iterations>\n", 0, uptr : &(telnetparams.loopcount), defuintval : 10, TYPE_UINT, 0},
{"loopdelay", "<loop command delay (ms)>\n", 0, uptr : &(telnetparams.loopdelay), defuintval : 5000, TYPE_UINT, 0},
{"histfile", "<history file name>\n", PARAMFLAG_NOFREE, strptr : &(telnetparams.histfile), defstrval : "oaitelnet.history", TYPE_STRING, 0},
{"histsize", "<history sizes>\n", 0, iptr : &(telnetparams.histsize), defuintval : 50, TYPE_INT, 0},
{"logfile", "log file when redirecting", PARAMFLAG_NOFREE, strptr : &(telnetparams.logfile), defstrval : "oaisoftmodem.log", TYPE_STRING, 0},
{"phypbsize", "<phy dump buff size (bytes)>\n", 0, uptr : &(telnetparams.phyprntbuff_size), defuintval : 65000, TYPE_UINT, 0},
{TELNETSRV_OPTNAME_STATICMOD, "<static modules selection>\n", 0, strlistptr : NULL, defstrlistval : telnet_defstatmod, TYPE_STRINGLIST, (sizeof(telnet_defstatmod) / sizeof(char *))},
{TELNETSRV_OPTNAME_SHRMOD, "<dynamic modules selection>\n", 0, strlistptr : NULL, defstrlistval : NULL, TYPE_STRINGLIST, 0}};
{"listenaddr", "<listen ip address>\n", 0, .uptr = &telnetparams.listenaddr, .defstrval = "0.0.0.0", TYPE_IPV4ADDR, 0},
{"listenport", "<local port>\n", 0, .uptr = &telnetparams.listenport, .defuintval = 9090, TYPE_UINT, 0},
{"listenstdin", "enable input from stdin\n", PARAMFLAG_BOOL, .uptr = &telnetparams.listenstdin, .defuintval = 0, TYPE_UINT, 0},
{"priority", "<scheduling policy (0-99)\n", 0, .iptr = &telnetparams.priority, .defuintval = 0, TYPE_INT, 0},
{"debug", "<debug level>\n", 0, .uptr = NULL, .defuintval = 0, TYPE_UINT, 0},
{"loopcount", "<loop command iterations>\n", 0, .uptr = &telnetparams.loopcount, .defuintval = 10, TYPE_UINT, 0},
{"loopdelay", "<loop command delay (ms)>\n", 0, .uptr = &telnetparams.loopdelay, .defuintval = 5000, TYPE_UINT, 0},
{"histfile", "<history file name>\n", PARAMFLAG_NOFREE, .strptr = &telnetparams.histfile, .defstrval = "oaitelnet.history", TYPE_STRING, 0},
{"histsize", "<history sizes>\n", 0, .iptr = &telnetparams.histsize, .defuintval = 50, TYPE_INT, 0},
{"logfile", "log file when redirecting", PARAMFLAG_NOFREE, .strptr = &telnetparams.logfile, .defstrval = "oaisoftmodem.log", TYPE_STRING, 0},
{"phypbsize", "<phy dump buff size (bytes)>\n", 0, .uptr = &telnetparams.phyprntbuff_size, .defuintval = 65000, TYPE_UINT, 0},
{TELNETSRV_OPTNAME_STATICMOD, "<static modules selection>\n", 0, .strlistptr = NULL, .defstrlistval = telnet_defstatmod, TYPE_STRINGLIST, (sizeof(telnet_defstatmod) / sizeof(char *))},
{TELNETSRV_OPTNAME_SHRMOD, "<dynamic modules selection>\n", 0, .strlistptr = NULL, .defstrlistval = NULL, TYPE_STRINGLIST, 0}
};
// clang-format on
int get_phybsize(void) {
return telnetparams.phyprntbuff_size;
......
......@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c
......@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
......@@ -40,4 +40,4 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
export CC=/usr/bin/clang && \
export CXX=/usr/bin/clang++ && \
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
......@@ -38,7 +38,7 @@ RUN dnf install -y libasan libubsan
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest as oai-physim
......
......@@ -212,7 +212,6 @@ void fh_if4p5_south_in(RU_t *ru,
uint16_t packet_type;
uint32_t symbol_number=0;
uint32_t symbol_mask_full;
int pultick_received=0;
if ((fp->frame_type == TDD) && (subframe_select(fp,*subframe)==SF_S))
symbol_mask_full = (1<<fp->ul_symbols_in_S_subframe)-1;
......@@ -232,7 +231,6 @@ void fh_if4p5_south_in(RU_t *ru,
if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
else if (packet_type == IF4p5_PULTICK) {
proc->symbol_mask[sf] = 0xffff;
pultick_received++;
/*
if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx);
else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx);
......
......@@ -11,7 +11,7 @@ static inline void set_parallel_conf(char *parallel_conf) {
{NULL,-1}
};
thread_struct.parallel_conf = (PARALLEL_CONF_t)map_str_to_int(config, parallel_conf);
if (thread_struct.parallel_conf == -1 ) {
if (thread_struct.parallel_conf == (unsigned int)-1) {
LOG_E(ENB_APP,"Impossible value: %s\n", parallel_conf);
thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
}
......@@ -24,7 +24,7 @@ static inline void set_worker_conf(char *worker_conf) {
{NULL, -1}
};
thread_struct.worker_conf = (WORKER_CONF_t)map_str_to_int(config, worker_conf);
if (thread_struct.worker_conf == -1 ) {
if (thread_struct.worker_conf == (unsigned int)-1) {
LOG_E(ENB_APP,"Impossible value: %s\n", worker_conf);
thread_struct.worker_conf = WORKER_DISABLE ;
}
......
......@@ -793,7 +793,6 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
int8_t *soft_input) {
uint32_t ind=0,k;
uint16_t Kw = 3*(RCC<<5);
uint32_t acc=1;
int16_t w16[Kw];
#ifdef RM_DEBUG_CC
uint32_t nulled=0;
......@@ -827,13 +826,11 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
if (ind==Kw) {
ind=0;
acc++;
}
}
// rescale
for (ind=0; ind<Kw; ind++) {
// w16[ind]=(w16[ind]/acc);
if (w16[ind]>7)
w[ind]=7;
else if (w16[ind]<-8)
......
......@@ -371,8 +371,8 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
// rate matching table
int iplast=polarParams->rate_matching_pattern[0];
int ccnt=0;
int groupcnt=0;
#ifdef DEBUG_POLAR_ENCODER
int groupcnt=0;
int firstingroup_out=0;
int firstingroup_in=iplast;
#endif
......@@ -386,8 +386,8 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
#endif
if ((ip - iplast) == 1) ccnt++;
else {
groupcnt++;
#ifdef DEBUG_POLAR_ENCODER
groupcnt++;
printf("group %d (size %d): (%d:%d) => (%d:%d)\n",groupcnt,ccnt+1,
firstingroup_in,firstingroup_in+ccnt,
firstingroup_out,firstingroup_out+ccnt);
......@@ -404,7 +404,9 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
iplast=ip;
}
#ifdef DEBUG_POLAR_ENCODER
groupcnt++;
#endif
if ((ccnt+1)<mingroupsize) mingroupsize=ccnt+1;
#ifdef DEBUG_POLAR_ENCODER
printf("group %d (size %d): (%d:%d) => (%d:%d)\n",groupcnt,ccnt+1,
......
......@@ -34,8 +34,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
unsigned char p,
unsigned char symbol)
{
unsigned short rb,nb_rb=0;
unsigned short rb;
unsigned char aarx,l,lprime,nsymb,skip_half=0,sss_symb,pss_symb=0,rb_alloc_ind,harq_pid,uespec_pilots=0;
int beamforming_mode, ch_offset;
uint8_t subframe;
......@@ -241,7 +240,6 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
LOG_E(PHY,"lte_dl_bf_channel_estimation(lte_dl_bf_channel_estimation.c): transmission mode not supported.\n");
}
}
nb_rb++;
}
rxF+=24;
......@@ -395,8 +393,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
} else {
LOG_E(PHY,"lte_dl_bf_channel_estimation(lte_dl_bf_channel_estimation.c):transmission mode not supported.\n");
}
}
nb_rb++;
}
}
rxF+=24;
......@@ -645,7 +642,6 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
LOG_E(PHY,"lte_dl_bf_channel_estimation(lte_dl_bf_channel_estimation.c):transmission mode not supported.\n");
}
}
nb_rb++;
}
rxF+=24;
......
......@@ -512,9 +512,7 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms)
{
uint16_t rb,nb_rb=0;
uint16_t rb;
uint8_t i,j,aarx;
int32_t *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
......@@ -558,7 +556,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
}
nb_rb++;
dl_ch0_ext+=12;
rxF_ext+=12;
......@@ -579,7 +576,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
rxF_ext+=8;
......@@ -596,7 +592,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
for (i=0; i<12; i++)
rxF_ext[i]=rxF[i];
nb_rb++;
dl_ch0_ext+=12;
rxF_ext+=12;
......@@ -617,7 +612,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
rxF_ext+=8;
......@@ -652,8 +646,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
rxF_ext+=8;
dl_ch0+=12;
......@@ -672,8 +664,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
rxF_ext[i]=rxF[(1+i-6)];
}
nb_rb++;
dl_ch0_ext+=12;
rxF_ext+=12;
dl_ch0+=12;
......@@ -688,7 +678,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
for (i=0; i<12; i++)
rxF_ext[i]=rxF[i];
nb_rb++;
dl_ch0_ext+=12;
rxF_ext+=12;
......@@ -708,7 +697,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
rxF_ext+=8;
......@@ -728,9 +716,7 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms)
{
uint16_t rb,nb_rb=0;
uint16_t rb;
uint8_t i,aarx,j;
int32_t *dl_ch0,*dl_ch0_ext,*dl_ch1,*dl_ch1_ext,*rxF,*rxF_ext;
uint8_t symbol_mod;
......@@ -785,7 +771,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
// ((int16_t*)&rxF[i<<1])[0],((int16_t*)&rxF[i<<1])[0]);
}
nb_rb++;
dl_ch0_ext+=12;
dl_ch1_ext+=12;
rxF_ext+=12;
......@@ -804,7 +789,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
dl_ch1_ext+=8;
rxF_ext+=8;
......@@ -827,7 +811,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
for (i=0; i<12; i++)
rxF_ext[i]=rxF[i];
nb_rb++;
dl_ch0_ext+=12;
dl_ch1_ext+=12;
rxF_ext+=12;
......@@ -852,7 +835,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
dl_ch1_ext+=8;
rxF_ext+=8;
......@@ -881,7 +863,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
rxF_ext[i]=rxF[(1+i)];
}
nb_rb++;
dl_ch0_ext+=12;
dl_ch1_ext+=12;
rxF_ext+=12;
......@@ -915,8 +896,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
dl_ch1_ext+=8;
rxF_ext+=8;
......@@ -936,7 +915,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
for (i=0; i<12; i++)
rxF_ext[i]=rxF[i];
nb_rb++;
dl_ch0_ext+=12;
dl_ch1_ext+=12;
rxF_ext+=12;
......@@ -959,7 +937,6 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
}
}
nb_rb++;
dl_ch0_ext+=8;
dl_ch1_ext+=8;
rxF_ext+=8;
......
......@@ -364,7 +364,7 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
#define NBR_RE_PER_RB_WITH_DMRS 12
// after removing the 3 DMRS RE, the RB contains 9 RE with PDCCH
#define NBR_RE_PER_RB_WITHOUT_DMRS 9
uint16_t c_rb, nb_rb = 0;
uint16_t c_rb;
//uint8_t rb_count_bit;
uint8_t i, j, aarx;
int32_t *dl_ch0, *dl_ch0_ext, *rxF, *rxF_ext;
......@@ -484,7 +484,6 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
}
}
nb_rb++;
dl_ch0_ext += NBR_RE_PER_RB_WITHOUT_DMRS;
rxF_ext += NBR_RE_PER_RB_WITHOUT_DMRS;
dl_ch0 += 12;
......@@ -506,7 +505,6 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
}
}
nb_rb++;
dl_ch0_ext += NBR_RE_PER_RB_WITHOUT_DMRS;
rxF_ext += NBR_RE_PER_RB_WITHOUT_DMRS;
dl_ch0 += 12;
......
......@@ -1077,7 +1077,9 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
//txptr = &txdataF[0][re_offset];
int k=0;
#ifdef DEBUG_NR_PUCCH_TX
int kk=0;
#endif
for (int n=0; n<12; n++) {
if ((n==6) && ((rb+startingPRB) == (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 1)) {
......@@ -1089,9 +1091,21 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
((int16_t *)&txdataF[0][re_offset])[0] = d_re[i+k];
((int16_t *)&txdataF[0][re_offset])[1] = d_im[i+k];
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch2] (n=%d,i=%d) mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
n,i,amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+k,re_offset,
l,n,((int16_t *)&txdataF[0][re_offset])[0],((int16_t *)&txdataF[0][re_offset])[1]);
printf(
"\t [nr_generate_pucch2] (n=%d,i=%d) mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d "
"\tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
n,
i,
amp,
frame_parms->ofdm_symbol_size,
frame_parms->N_RB_DL,
frame_parms->first_carrier_offset,
i + k,
re_offset,
l,
n,
((int16_t *)&txdataF[0][re_offset])[0],
((int16_t *)&txdataF[0][re_offset])[1]);
#endif
k++;
}
......@@ -1101,11 +1115,23 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
((int16_t *)&txdataF[0][re_offset])[1] = (int16_t)((int32_t)(amp*ONE_OVER_SQRT2*(1-(2*((uint8_t)((s>>((2*m)+1))&1)))))>>15);
m++;
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch2] (n=%d,i=%d) mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
n,i,amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+kk,re_offset,
l,n,((int16_t *)&txdataF[0][re_offset])[0],((int16_t *)&txdataF[0][re_offset])[1]);
#endif
printf(
"\t [nr_generate_pucch2] (n=%d,i=%d) mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d "
"\tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
n,
i,
amp,
frame_parms->ofdm_symbol_size,
frame_parms->N_RB_DL,
frame_parms->first_carrier_offset,
i + kk,
re_offset,
l,
n,
((int16_t *)&txdataF[0][re_offset])[0],
((int16_t *)&txdataF[0][re_offset])[1]);
kk++;
#endif
}
re_offset++;
......
......@@ -251,9 +251,8 @@ static OAIgraph_t nrUEcommonGraph( void (*funct) (scopeGraphData_t **data, OAIgr
}
#ifndef WEBSRVSCOPE
static void setRange(OAIgraph_t *graph, float minX, float maxX, float minY, float maxY) {
if ( maxX > graph->maxX || minX < graph->minX ||
abs(maxX-graph->maxX)>abs(graph->maxX)/2 ||
abs(maxX-graph->maxX)>abs(graph->maxX)/2 ) {
if (maxX > graph->maxX || minX < graph->minX || fabs(maxX - graph->maxX) > fabs(graph->maxX) / 2
|| fabs(maxX - graph->maxX) > fabs(graph->maxX) / 2) {
graph->maxX/=2;
graph->minX/=2;
graph->maxX=max(graph->maxX,maxX);
......@@ -261,9 +260,8 @@ static void setRange(OAIgraph_t *graph, float minX, float maxX, float minY, floa
fl_set_xyplot_xbounds(graph->graph, graph->minX*1.2, graph->maxX*1.2);
}
if ( maxY > graph->maxY || minY < graph->minY ||
abs(maxY-graph->maxY)>abs(graph->maxY)/2 ||
abs(maxY-graph->maxY)>abs(graph->maxY)/2 ) {
if (maxY > graph->maxY || minY < graph->minY || fabs(maxY - graph->maxY) > fabs(graph->maxY) / 2
|| fabs(maxY - graph->maxY) > fabs(graph->maxY) / 2) {
graph->maxY/=2;
graph->minY/=2;
graph->maxY=max(graph->maxY,maxY);
......
This diff is collapsed.
......@@ -504,10 +504,6 @@ int main(int argc, char **argv)
short channel_output_fixed[16 * 68 * 384];
short channel_output_uncoded[16 * 68 * 384];
unsigned int errors_bit_uncoded = 0;
unsigned int errors_bit = 0;
unsigned char test_input_bit[16 * 68 * 384];
unsigned char estimated_output_bit[16 * 68 * 384];
/////////////////////////[adk] preparing UL harq_process parameters/////////////////////////
///////////
......@@ -626,25 +622,6 @@ int main(int argc, char **argv)
if (ret)
n_errors++;
//count errors
errors_bit = 0;
for (i = 0; i < TBS; i++) {
estimated_output_bit[i] = (ulsch_gNB->harq_process->b[i / 8] & (1 << (i & 7))) >> (i & 7);
test_input_bit[i] = (test_input[i / 8] & (1 << (i & 7))) >> (i & 7); // Further correct for multiple segments
if (estimated_output_bit[i] != test_input_bit[i]) {
errors_bit++;
}
}
/*
if (errors_bit > 0) {
n_false_positive++;
if (n_trials == 1)
printf("errors_bit %u (trial %d)\n", errors_bit, trial);
}
printf("\n");*/
}
printf("*****************************************\n");
......
......@@ -359,11 +359,6 @@ static struct complexd R_sqrt_22_EPA_medium[16] = {{0.8375,0.0}, {0.5249,0.0}, {
void tdlModel(int tdl_paths, double *tdl_delays, double *tdl_amps_dB, double DS_TDL, channel_desc_t *chan_desc ) {
int nb_rx=chan_desc-> nb_rx;
int nb_tx=chan_desc-> nb_tx;
int tdl_pathsby3 = tdl_paths/3;
if ((tdl_paths%3)>0)
tdl_pathsby3++;
chan_desc->nb_taps = tdl_paths;
chan_desc->Td = tdl_delays[tdl_paths-1]*DS_TDL;
printf("last path (%d) at %f * %e = %e\n",tdl_paths-1,tdl_delays[tdl_paths-1],DS_TDL,chan_desc->Td);
......
......@@ -252,8 +252,7 @@ void RCconfig_macrlc(void)
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
int num_enbs = 0;
int j,k = 0;
int32_t enb_id = 0;
int nb_cc = 0;
int32_t enb_id = 0;
int32_t offsetMaxLimit = 0;
int32_t cycleNb = 0;
......@@ -390,9 +389,8 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j);
LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath);
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
//printf("Component carrier %d\n",component_carrier);
nb_cc++;
// Cell params, MIB/SIB1
// printf("Component carrier %d\n",component_carrier);
// Cell params, MIB/SIB1
RRCcfg->tdd_config[j] = ccparams_lte.tdd_config;
AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
"Failed to parse eNB configuration file %s, enb %u illegal tdd_config %d (should be 0-%d)!",
......
......@@ -2591,27 +2591,6 @@ uint32_t nr_get_code_rate_ul(uint8_t Imcs, uint8_t table_idx) {
}
}
static inline uint8_t is_codeword_disabled(uint8_t format, uint8_t Imcs, uint8_t rv) {
return ((format==NFAPI_NR_DL_DCI_FORMAT_1_1)&&(Imcs==26)&&(rv==1));
}
static inline uint8_t get_table_idx(uint8_t mcs_table, uint8_t dci_format, uint8_t rnti_type, uint8_t ss_type) {
if ((mcs_table == NFAPI_NR_MCS_TABLE_QAM256) && (dci_format == NFAPI_NR_DL_DCI_FORMAT_1_1) && ((rnti_type==NFAPI_NR_RNTI_C)||(rnti_type==NFAPI_NR_RNTI_CS)))
return 2;
else if ((mcs_table == NFAPI_NR_MCS_TABLE_QAM64_LOW_SE) && (rnti_type!=NFAPI_NR_RNTI_new) && (rnti_type==NFAPI_NR_RNTI_C) && (ss_type==NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC))
return 3;
else if (rnti_type==NFAPI_NR_RNTI_new)
return 3;
else if ((mcs_table == NFAPI_NR_MCS_TABLE_QAM256) && (rnti_type==NFAPI_NR_RNTI_CS) && (dci_format == NFAPI_NR_DL_DCI_FORMAT_1_1))
return 2; // Condition mcs_table not configured in sps_config necessary here but not yet implemented
/*else if((mcs_table == NFAPI_NR_MCS_TABLE_QAM64_LOW_SE) && (rnti_type==NFAPI_NR_RNTI_CS))
* table_idx = 3;
* Note: the commented block refers to the case where the mcs_table is from sps_config*/
else
return 1;
}
// Table 5.1.2.2.1-1 38.214
uint8_t getRBGSize(uint16_t bwp_size, long rbg_size_config) {
......
......@@ -40,15 +40,6 @@
#include <stdio.h>
#include "nfapi_nr_interface.h"
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
#define LOG_DCI_D(a...) printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) ->" a)
#else
#define LOG_DCI_D(a...)
#endif
#define LOG_DCI_PARM(a...) LOG_D(PHY,"\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci)" a)
//#define DEBUG_DCI
void fill_dci_search_candidates(const NR_SearchSpace_t *ss,
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15,
const uint32_t Y)
......
......@@ -98,32 +98,6 @@ static void process_rlcBearerConfig(struct NR_CellGroupConfig__rlc_BearerToAddMo
}
static void process_drx_Config(NR_UE_sched_ctrl_t *sched_ctrl, NR_SetupRelease_DRX_Config_t *drx_Config)
{
AssertFatal(false, "%s() not implemented\n", __func__);
AssertFatal(drx_Config->present != NR_SetupRelease_DRX_Config_PR_NOTHING, "Cannot have NR_SetupRelease_DRX_Config_PR_NOTHING\n");
}
static void process_schedulingRequestConfig(NR_UE_sched_ctrl_t *sched_ctrl, NR_SchedulingRequestConfig_t *schedulingRequestConfig)
{
AssertFatal(false, "%s() not implemented\n", __func__);
}
static void process_bsrConfig(NR_UE_sched_ctrl_t *sched_ctrl, NR_BSR_Config_t *bsr_Config)
{
AssertFatal(false, "%s() not implemented\n", __func__);
}
static void process_tag_Config(NR_UE_sched_ctrl_t *sched_ctrl, NR_TAG_Config_t *tag_Config)
{
AssertFatal(false, "%s() not implemented\n", __func__);
}
static void process_phr_Config(NR_UE_sched_ctrl_t *sched_ctrl, NR_SetupRelease_PHR_Config_t *phr_Config)
{
AssertFatal(false, "%s() not implemented\n", __func__);
}
void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl)
{
/* we assume that this function is mutex-protected from outside */
......
......@@ -241,7 +241,6 @@ void rlc_entity_um_recv_pdu(rlc_entity_t *_entity, char *buffer, int size)
int data_e;
int data_li;
int packet_count;
int data_size;
int data_start;
int indicated_data_size;
......@@ -277,7 +276,6 @@ void rlc_entity_um_recv_pdu(rlc_entity_t *_entity, char *buffer, int size)
return;
}
packet_count = 1;
/* go to start of data */
indicated_data_size = 0;
......@@ -292,7 +290,6 @@ void rlc_entity_um_recv_pdu(rlc_entity_t *_entity, char *buffer, int size)
return;
}
indicated_data_size += data_li;
packet_count++;
}
rlc_pdu_decoder_align(&data_decoder);
......
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