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

This commit is contained in:
Robert Schmidt
2023-06-08 19:15:50 +02:00
22 changed files with 127 additions and 211 deletions
+16 -13
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
-2
View File
@@ -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);
+2 -2
View File
@@ -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 ;
}
-3
View File
@@ -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;
+2 -25
View File
@@ -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;
+1 -3
View File
@@ -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;
+33 -7
View File
@@ -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++;
+4 -6
View File
@@ -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);
+56 -46
View File
@@ -124,7 +124,7 @@ static inline void cmac_256(__m256i a,__m256i b, __m256i *re32, __m256i *im32)
*re32 = simde_mm256_add_epi32(*re32,cmac_tmp_re32);
*im32 = simde_mm256_add_epi32(*im32,cmac_tmp_im32);
}
#if 0
static inline void cmacc_256(__m256i a,__m256i b, __m256i *re32, __m256i *im32) __attribute__((always_inline));
static inline void cmacc_256(__m256i a,__m256i b, __m256i *re32, __m256i *im32)
{
@@ -142,7 +142,7 @@ static inline void cmacc_256(__m256i a,__m256i b, __m256i *re32, __m256i *im32)
*re32 = simde_mm256_add_epi32(*re32,cmac_tmp_re32);
*im32 = simde_mm256_add_epi32(*im32,cmac_tmp_im32);
}
#endif
static inline void cmult(__m128i a,__m128i b, __m128i *re32, __m128i *im32) __attribute__((always_inline));
static inline void cmult(__m128i a,__m128i b, __m128i *re32, __m128i *im32)
@@ -262,7 +262,7 @@ static inline void packed_cmultc(__m128i a,__m128i b, __m128i *c)
*c = cpack(cre,cim);
}
#if 0
static inline void packed_cmultc_256(__m256i a,__m256i b, __m256i *c) __attribute__((always_inline));
static inline void packed_cmultc_256(__m256i a,__m256i b, __m256i *c)
@@ -274,7 +274,7 @@ static inline void packed_cmultc_256(__m256i a,__m256i b, __m256i *c)
*c = cpack_256(cre,cim);
}
#endif
static inline __m128i packed_cmult2(__m128i a,__m128i b,__m128i b2) __attribute__((always_inline));
static inline __m128i packed_cmult2(__m128i a,__m128i b,__m128i b2)
@@ -619,7 +619,7 @@ static inline void bfly2_tw1(int16x8_t *x0, int16x8_t *x1, int16x8_t *y0, int16x
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void bfly2_16(__m128i *x0, __m128i *x1, __m128i *y0, __m128i *y1, __m128i *tw, __m128i *twb)__attribute__((always_inline));
static inline void bfly2_16(__m128i *x0, __m128i *x1, __m128i *y0, __m128i *y1, __m128i *tw, __m128i *twb)
@@ -640,7 +640,7 @@ static inline void bfly2_16(__m128i *x0, __m128i *x1, __m128i *y0, __m128i *y1,
/* print_shorts("y0",(int16_t*)y0);
print_shorts("y1",(int16_t*)y1);*/
}
#endif
static inline void bfly2_16_256(__m256i *x0, __m256i *x1, __m256i *y0, __m256i *y1, __m256i *tw, __m256i *twb)__attribute__((always_inline));
static inline void bfly2_16_256(__m256i *x0, __m256i *x1, __m256i *y0, __m256i *y1, __m256i *tw, __m256i *twb)
@@ -664,7 +664,7 @@ static inline void bfly2_16_256(__m256i *x0, __m256i *x1, __m256i *y0, __m256i *
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void bfly2_16(int16x8_t *x0, int16x8_t *x1, int16x8_t *y0, int16x8_t *y1, int16x8_t *tw, int16x8_t *twb)__attribute__((always_inline));
static inline void bfly2_16(int16x8_t *x0, int16x8_t *x1, int16x8_t *y0, int16x8_t *y1, int16x8_t *tw, int16x8_t *twb)
@@ -674,9 +674,11 @@ static inline void bfly2_16(int16x8_t *x0, int16x8_t *x1, int16x8_t *y0, int16x8
*y1 = vqsubq_s16(*x0,*x1);
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void ibfly2(__m128i *x0, __m128i *x1,__m128i *y0, __m128i *y1,__m128i *tw)__attribute__((always_inline));
static inline void ibfly2(__m128i *x0, __m128i *x1,__m128i *y0, __m128i *y1,__m128i *tw)
@@ -702,7 +704,7 @@ static inline void ibfly2(__m128i *x0, __m128i *x1,__m128i *y0, __m128i *y1,__m1
bfly2_tmp2 = _mm_unpackhi_epi32(dy1r,dy1i);
*y1 = _mm_packs_epi32(bfly2_tmp1,bfly2_tmp2);
}
#endif
static inline void ibfly2_256(__m256i *x0, __m256i *x1,__m256i *y0, __m256i *y1,__m256i *tw)__attribute__((always_inline));
static inline void ibfly2_256(__m256i *x0, __m256i *x1,__m256i *y0, __m256i *y1,__m256i *tw)
@@ -730,6 +732,7 @@ static inline void ibfly2_256(__m256i *x0, __m256i *x1,__m256i *y0, __m256i *y1,
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void ibfly2(int16x8_t *x0, int16x8_t *x1,int16x8_t *y0, int16x8_t *y1,int16x8_t *tw)
{
@@ -747,7 +750,7 @@ static inline void ibfly2(int16x8_t *x0, int16x8_t *x1,int16x8_t *y0, int16x8_t
*y1 = cpack(dy1r,dy1i);
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
@@ -855,7 +858,7 @@ static inline void ibfly3(__m128i *x0,__m128i *x1,__m128i *x2,
*(y2) = cpack(tmpre,tmpim);
*(y2) = _mm_adds_epi16(*(x0),*(y2));
}
#if 0
static inline void ibfly3_256(__m256i *x0,__m256i *x1,__m256i *x2,
__m256i *y0,__m256i *y1,__m256i *y2,
__m256i *tw1,__m256i *tw2) __attribute__((always_inline));
@@ -879,7 +882,7 @@ static inline void ibfly3_256(__m256i *x0,__m256i *x1,__m256i *x2,
*(y2) = cpack_256(tmpre,tmpim);
*(y2) = simde_mm256_adds_epi16(*(x0),*(y2));
}
#endif
#elif defined(__arm__) || defined(__aarch64__)
static inline void ibfly3(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,
int16x8_t *y0,int16x8_t *y1,int16x8_t *y2,
@@ -1100,6 +1103,7 @@ static inline void bfly4(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x3
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void ibfly4(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
__m128i *y0,__m128i *y1,__m128i *y2,__m128i *y3,
__m128i *tw1,__m128i *tw2,__m128i *tw3)__attribute__((always_inline));
@@ -1129,7 +1133,7 @@ static inline void ibfly4(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
dy1i = _mm_sub_epi32(x1r_2,_mm_add_epi32(x2i_2,x3r_2));
*(y1) = _mm_add_epi16(*(x0),cpack(dy1r,dy1i));
}
#endif
static inline void ibfly4_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3,
__m256i *y0,__m256i *y1,__m256i *y2,__m256i *y3,
__m256i *tw1,__m256i *tw2,__m256i *tw3)__attribute__((always_inline));
@@ -1161,7 +1165,7 @@ static inline void ibfly4_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3,
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void ibfly4(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x3,
int16x8_t *y0,int16x8_t *y1,int16x8_t *y2,int16x8_t *y3,
int16x8_t *tw1,int16x8_t *tw2,int16x8_t *tw3)__attribute__((always_inline));
@@ -1191,11 +1195,10 @@ static inline void ibfly4(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x
dy1i = vqsubq_s32(x1r_2,vqaddq_s32(x2i_2,x3r_2));
*(y1) = vqaddq_s16(*(x0),cpack(dy1r,dy1i));
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
static inline void bfly4_tw1(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
__m128i *y0,__m128i *y1,__m128i *y2,__m128i *y3)__attribute__((always_inline));
@@ -1229,7 +1232,6 @@ static inline void bfly4_tw1(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
*(y3) = _mm_subs_epi16(*(x0),_mm_adds_epi16(x1_flip,_mm_subs_epi16(*(x2),x3_flip)));
*/
}
static inline void bfly4_tw1_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3,
__m256i *y0,__m256i *y1,__m256i *y2,__m256i *y3)__attribute__((always_inline));
@@ -1254,7 +1256,6 @@ static inline void bfly4_tw1_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3
}
#elif defined(__arm__) || defined(__aarch64__)
static inline void bfly4_tw1(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x3,
int16x8_t *y0,int16x8_t *y1,int16x8_t *y2,int16x8_t *y3)__attribute__((always_inline));
@@ -1271,11 +1272,10 @@ static inline void bfly4_tw1(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t
*(y2) = vqsubq_s16(*(x0),vqsubq_s16(*(x1),vqsubq_s16(*(x2),*(x3))));
*(y3) = vqsubq_s16(*(x0),vqaddq_s16(x1_flip,vqsubq_s16(*(x2),x3_flip)));
}
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void ibfly4_tw1(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
__m128i *y0,__m128i *y1,__m128i *y2,__m128i *y3)__attribute__((always_inline));
@@ -1299,9 +1299,10 @@ static inline void ibfly4_tw1(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
*(y2) = _mm_subs_epi16(*(x0),_mm_subs_epi16(*(x1),_mm_subs_epi16(*(x2),*(x3))));
*(y3) = _mm_adds_epi16(*(x0),_mm_subs_epi16(x1_flip,_mm_adds_epi16(*(x2),x3_flip)));
}
#endif
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void ibfly4_tw1(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x3,
int16x8_t *y0,int16x8_t *y1,int16x8_t *y2,int16x8_t *y3)__attribute__((always_inline));
@@ -1318,10 +1319,11 @@ static inline void ibfly4_tw1(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_
*(y2) = vqsubq_s16(*(x0),vqsubq_s16(*(x1),vqsubq_s16(*(x2),*(x3))));
*(y3) = vqaddq_s16(*(x0),vqsubq_s16(x1_flip,vqaddq_s16(*(x2),x3_flip)));
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void bfly4_16(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
__m128i *y0,__m128i *y1,__m128i *y2,__m128i *y3,
__m128i *tw1,__m128i *tw2,__m128i *tw3,
@@ -1369,7 +1371,7 @@ static inline void bfly4_16(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
*(y3) = _mm_subs_epi16(x02t,x13t); // x0 - x1f - x2 + x3f
}
#endif
static inline void bfly4_16_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3,
__m256i *y0,__m256i *y1,__m256i *y2,__m256i *y3,
__m256i *tw1,__m256i *tw2,__m256i *tw3,
@@ -1445,6 +1447,7 @@ static inline void bfly4_16(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void ibfly4_16(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
__m128i *y0,__m128i *y1,__m128i *y2,__m128i *y3,
__m128i *tw1,__m128i *tw2,__m128i *tw3,
@@ -1492,7 +1495,7 @@ static inline void ibfly4_16(__m128i *x0,__m128i *x1,__m128i *x2,__m128i *x3,
*(y1) = _mm_subs_epi16(x02t,x13t); // x0 - x1f - x2 + x3f
}
#endif
static inline void ibfly4_16_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3,
__m256i *y0,__m256i *y1,__m256i *y2,__m256i *y3,
__m256i *tw1,__m256i *tw2,__m256i *tw3,
@@ -1533,6 +1536,7 @@ static inline void ibfly4_16_256(__m256i *x0,__m256i *x1,__m256i *x2,__m256i *x3
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void ibfly4_16(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t *x3,
int16x8_t *y0,int16x8_t *y1,int16x8_t *y2,int16x8_t *y3,
int16x8_t *tw1,int16x8_t *tw2,int16x8_t *tw3,
@@ -1562,7 +1566,7 @@ static inline void ibfly4_16(int16x8_t *x0,int16x8_t *x1,int16x8_t *x2,int16x8_t
*(y3) = vqaddq_s16(x02t,x13t); // x0 - x1f - x2 + x3f
*(y1) = vqsubq_s16(x02t,x13t); // x0 + x1f - x2 - x3f
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
@@ -1615,7 +1619,7 @@ static inline void bfly5(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3,__m1
}
#if 0
static inline void bfly5_256(__m256i *x0, __m256i *x1, __m256i *x2, __m256i *x3,__m256i *x4,
__m256i *y0, __m256i *y1, __m256i *y2, __m256i *y3,__m256i *y4,
__m256i *tw1,__m256i *tw2,__m256i *tw3,__m256i *tw4)__attribute__((always_inline));
@@ -1665,7 +1669,7 @@ static inline void bfly5_256(__m256i *x0, __m256i *x1, __m256i *x2, __m256i *x3,
}
#endif
#elif defined(__arm__) || defined(__aarch64__)
static inline void bfly5(int16x8_t *x0, int16x8_t *x1, int16x8_t *x2, int16x8_t *x3,int16x8_t *x4,
int16x8_t *y0, int16x8_t *y1, int16x8_t *y2, int16x8_t *y3,int16x8_t *y4,
@@ -1757,7 +1761,7 @@ static inline void bfly5_tw1(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3,
*(y4) = cpack(tmpre,tmpim);
*(y4) = _mm_adds_epi16(*(x0),*(y4));
}
#if 0
static inline void bfly5_tw1_256(__m256i *x0, __m256i *x1, __m256i *x2, __m256i *x3,__m256i *x4,
__m256i *y0, __m256i *y1, __m256i *y2, __m256i *y3,__m256i *y4) __attribute__((always_inline));
@@ -1793,7 +1797,7 @@ static inline void bfly5_tw1_256(__m256i *x0, __m256i *x1, __m256i *x2, __m256i
*(y4) = cpack_256(tmpre,tmpim);
*(y4) = simde_mm256_adds_epi16(*(x0),*(y4));
}
#endif
#elif defined(__arm__) || defined(__aarch64__)
static inline void bfly5_tw1(int16x8_t *x0, int16x8_t *x1, int16x8_t *x2, int16x8_t *x3,int16x8_t *x4,
int16x8_t *y0, int16x8_t *y1, int16x8_t *y2, int16x8_t *y3,int16x8_t *y4) __attribute__((always_inline));
@@ -1837,6 +1841,7 @@ static inline void bfly5_tw1(int16x8_t *x0, int16x8_t *x1, int16x8_t *x2, int16x
// i.e. x = [x0r x0i x1r x1i ... x15r x15i], y = [x0r x0i x4r x4i x8r x8i x12r x12i x1r x1i x5r x5i x9r x9i x13r x13i x2r x2i ... x15r x15i]
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void transpose16(__m128i *x,__m128i *y) __attribute__((always_inline));
static inline void transpose16(__m128i *x,__m128i *y)
{
@@ -1851,8 +1856,9 @@ static inline void transpose16(__m128i *x,__m128i *y)
y[2] = _mm_unpacklo_epi64(ytmp1,ytmp3);
y[3] = _mm_unpackhi_epi64(ytmp1,ytmp3);
}
#endif
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void transpose16(int16x8_t *x,int16x8_t *y) __attribute__((always_inline));
static inline void transpose16(int16x8_t *x,int16x8_t *y)
{
@@ -1866,11 +1872,12 @@ static inline void transpose16(int16x8_t *x,int16x8_t *y)
y[2] = vcombine_s16(vget_low_s16((int16x8_t)ytmp0.val[1]),vget_low_s16((int16x8_t)ytmp1.val[1]));
y[3] = vcombine_s16(vget_high_s16((int16x8_t)ytmp0.val[1]),vget_high_s16((int16x8_t)ytmp1.val[1]));
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
// same as above but output is offset by off
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void transpose16_ooff(__m128i *x,__m128i *y,int off) __attribute__((always_inline));
static inline void transpose16_ooff(__m128i *x,__m128i *y,int off)
@@ -1890,7 +1897,7 @@ static inline void transpose16_ooff(__m128i *x,__m128i *y,int off)
y2+=off;
*y2 = _mm_unpackhi_epi64(ytmp1,ytmp3); // x03 x13 x23 x33
}
#endif
static inline void transpose16_ooff_simd256(__m256i *x,__m256i *y,int off) __attribute__((always_inline));
static inline void transpose16_ooff_simd256(__m256i *x,__m256i *y,int off)
{
@@ -1917,6 +1924,7 @@ static inline void transpose16_ooff_simd256(__m256i *x,__m256i *y,int off)
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void transpose16_ooff(int16x8_t *x,int16x8_t *y,int off) __attribute__((always_inline));
static inline void transpose16_ooff(int16x8_t *x,int16x8_t *y,int off)
@@ -1934,11 +1942,11 @@ static inline void transpose16_ooff(int16x8_t *x,int16x8_t *y,int off)
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#if 0
static inline void transpose4_ooff(__m64 *x,__m64 *y,int off)__attribute__((always_inline));
static inline void transpose4_ooff(__m64 *x,__m64 *y,int off)
{
@@ -1950,7 +1958,7 @@ static inline void transpose4_ooff(__m64 *x,__m64 *y,int off)
// y[0] = [x0 x2]
// y[off] = [x1 x3]
}
#endif
static inline void transpose4_ooff_simd256(__m256i *x,__m256i *y,int off)__attribute__((always_inline));
static inline void transpose4_ooff_simd256(__m256i *x,__m256i *y,int off)
{
@@ -1968,7 +1976,7 @@ static inline void transpose4_ooff_simd256(__m256i *x,__m256i *y,int off)
}
#elif defined(__arm__) || defined(__aarch64__)
#if 0
static inline void transpose4_ooff(int16x4_t *x,int16x4_t *y,int off)__attribute__((always_inline));
static inline void transpose4_ooff(int16x4_t *x,int16x4_t *y,int off)
{
@@ -1977,7 +1985,7 @@ static inline void transpose4_ooff(int16x4_t *x,int16x4_t *y,int off)
y[0] = (int16x4_t)ytmp.val[0];
y[off] = (int16x4_t)ytmp.val[1];
}
#endif
#endif // defined(__x86_64__) || defined(__i386__)
// 16-point optimized DFT kernel
@@ -1987,16 +1995,6 @@ const static int16_t tw16[24] __attribute__((aligned(32))) = { 32767,0,30272,-12
32767,0,12539,-30273,-23170,-23170,-30273,12539
};
const static int16_t tw16a[24] __attribute__((aligned(32))) = {32767,0,30272,12540,23169 ,23170,12539 ,30273,
32767,0,23169,23170,0 ,32767,-23170,23170,
32767,0,12539,30273,-23170,23170,-30273,-12539
};
const static int16_t tw16b[24] __attribute__((aligned(32))) = { 0,32767,-12540,30272,-23170,23169 ,-30273,12539,
0,32767,-23170,23169,-32767,0 ,-23170,-23170,
0,32767,-30273,12539,-23170,-23170,12539 ,-30273
};
const static int16_t tw16c[24] __attribute__((aligned(32))) = { 0,32767,12540,30272,23170,23169 ,30273 ,12539,
0,32767,23170,23169,32767,0 ,23170 ,-23170,
0,32767,30273,12539,23170,-23170,-12539,-30273
@@ -2021,6 +2019,17 @@ const static int16_t tw16crep[48] __attribute__((aligned(32))) = { 0,32767,12540
0,32767,23170,23169,32767,0 ,23170 ,-23170,0,32767,23170,23169,32767,0 ,23170 ,-23170,
0,32767,30273,12539,23170,-23170,-12539,-30273,0,32767,30273,12539,23170,-23170,-12539,-30273
};
#if 0
const static int16_t tw16a[24] __attribute__((aligned(32))) = {32767,0,30272,12540,23169 ,23170,12539 ,30273,
32767,0,23169,23170,0 ,32767,-23170,23170,
32767,0,12539,30273,-23170,23170,-30273,-12539
};
const static int16_t tw16b[24] __attribute__((aligned(32))) = { 0,32767,-12540,30272,-23170,23169 ,-30273,12539,
0,32767,-23170,23169,-32767,0 ,-23170,-23170,
0,32767,-30273,12539,-23170,-23170,12539 ,-30273
};
static inline void dft16(int16_t *x,int16_t *y) __attribute__((always_inline));
@@ -2160,6 +2169,7 @@ static inline void dft16(int16_t *x,int16_t *y)
#endif // defined(__x86_64__) || defined(__i386__)
}
#endif
#if defined(__x86_64__) || defined(__i386__)
-23
View File
@@ -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);
+3 -5
View File
@@ -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)
-26
View File
@@ -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 */
-3
View File
@@ -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);