Commit f5678be9 authored by Xu Bo's avatar Xu Bo

merge develop branch

parents 2407b4af a2d16b34
...@@ -241,6 +241,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs ...@@ -241,6 +241,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros") add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
...@@ -1804,6 +1805,7 @@ add_executable(lte-softmodem-nos1 ...@@ -1804,6 +1805,7 @@ add_executable(lte-softmodem-nos1
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c ${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
...@@ -1934,7 +1936,7 @@ add_executable(oaisim_nos1 ...@@ -1934,7 +1936,7 @@ add_executable(oaisim_nos1
${x2ap_h} ${x2ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
......
...@@ -67,6 +67,7 @@ UE_AUTOTEST_TRACE="False" ...@@ -67,6 +67,7 @@ UE_AUTOTEST_TRACE="False"
UE_DEBUG_TRACE="False" UE_DEBUG_TRACE="False"
UE_TIMING_TRACE="False" UE_TIMING_TRACE="False"
DISABLE_LOG_X="False" DISABLE_LOG_X="False"
USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
trap handle_ctrl_c INT trap handle_ctrl_c INT
...@@ -159,6 +160,8 @@ Options ...@@ -159,6 +160,8 @@ Options
Disable all LOG_* macros Disable all LOG_* macros
--build-eclipse --build-eclipse
Build eclipse project files. Paths are auto corrected by fixprj.sh Build eclipse project files. Paths are auto corrected by fixprj.sh
--usrp-recplay
Build for I/Q record-playback modes
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
...@@ -355,6 +358,10 @@ function main() { ...@@ -355,6 +358,10 @@ function main() {
BUILD_TELNETSRV=1 BUILD_TELNETSRV=1
echo_info "Build embedded telnet server" echo_info "Build embedded telnet server"
shift ;; shift ;;
--usrp-recplay)
USRP_REC_PLAY="True"
echo_info "Enabling USRP record playback mode"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -546,6 +553,7 @@ function main() { ...@@ -546,6 +553,7 @@ function main() {
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
......
...@@ -52,9 +52,12 @@ char defbool[2]="1"; ...@@ -52,9 +52,12 @@ char defbool[2]="1";
switch(cfgoptions->type) switch(cfgoptions->type)
{ {
case TYPE_STRING: case TYPE_STRING:
config_check_valptr(cfgoptions, (char **)(cfgoptions->strptr), sizeof(char *)); if (cfgoptions->numelt == 0 ) {
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval+1)); config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
sprintf(*(cfgoptions->strptr), "%s",tmpval); sprintf(*(cfgoptions->strptr), "%s",tmpval);
} else {
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
}
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval); printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
optisset=1; optisset=1;
break; break;
......
...@@ -129,20 +129,21 @@ int i; ...@@ -129,20 +129,21 @@ int i;
/* default */ /* default */
if (cfgparam == NULL) { if (cfgparam == NULL) {
cfgparam = "libconfig:oaisoftmodem.conf"; tmpflags = tmpflags | CONFIG_NOOOPT;
cfgparam = DEFAULT_CFGMODE ":" DEFAULT_CFGFILENAME;
} }
/* parse the config parameters to set the config source */ /* parse the config parameters to set the config source */
i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams); i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
if (i< 0) { if (i< 0) {
fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno)); fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
cfgmode=strdup("libconfig"); cfgmode=strdup(DEFAULT_CFGMODE);
modeparams = strdup("oaisoftmodem.conf"); modeparams = strdup(DEFAULT_CFGFILENAME);
} }
else if ( i == 1 ) { else if ( i == 1 ) {
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig /* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
with one parameter, the path to the configuration file */ with one parameter, the path to the configuration file */
modeparams=cfgmode; modeparams=cfgmode;
cfgmode=strdup("libconfig"); cfgmode=strdup(DEFAULT_CFGMODE);
} }
cfgptr = malloc(sizeof(configmodule_interface_t)); cfgptr = malloc(sizeof(configmodule_interface_t));
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#define CONFIG_DEBUGCMDLINE 4 // print command line processing messages #define CONFIG_DEBUGCMDLINE 4 // print command line processing messages
#define CONFIG_HELP 8 // print help message #define CONFIG_HELP 8 // print help message
#define CONFIG_ABORT 16 // config failed,abort execution #define CONFIG_ABORT 16 // config failed,abort execution
#define CONFIG_NOOOPT 32 // no -O option found when parsing command line
typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP); typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
......
...@@ -50,7 +50,11 @@ configmodule_interface_t *config_get_if(void) ...@@ -50,7 +50,11 @@ configmodule_interface_t *config_get_if(void)
char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length)
{ {
printf_ptrs("-- %s 0x%08lx %i\n",cfgoptions->optname,(uintptr_t)(*ptr),length); printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
if(cfgoptions->numelt > 0) { /* already allocated */
return *ptr;
}
if (*ptr == NULL) { if (*ptr == NULL) {
*ptr = malloc(length); *ptr = malloc(length);
if ( *ptr != NULL) { if ( *ptr != NULL) {
...@@ -147,3 +151,7 @@ int config_isparamset(paramdef_t *params,int paramidx) ...@@ -147,3 +151,7 @@ int config_isparamset(paramdef_t *params,int paramidx)
return 0; return 0;
} }
} }
int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx) {
return -1;
}
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
extern "C" extern "C"
{ {
#endif #endif
#define DEFAULT_CFGFILENAME "oaisoftmodem.conf"
#define DEFAULT_CFGMODE "libconfig"
#define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode ) #define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode )
#define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP ) #define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP )
#define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] ) #define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] )
...@@ -51,6 +54,7 @@ extern int config_get(paramdef_t *params,int numparams, char *prefix); ...@@ -51,6 +54,7 @@ extern int config_get(paramdef_t *params,int numparams, char *prefix);
extern int config_isparamset(paramdef_t *params,int paramidx); extern int config_isparamset(paramdef_t *params,int paramidx);
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val); extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix); extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix);
extern int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx);
#define config_getlist config_get_if()->getlist #define config_getlist config_get_if()->getlist
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0]) #define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
......
...@@ -104,17 +104,28 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) ...@@ -104,17 +104,28 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
cfgpath,str,cfgoptions[i].numelt); cfgpath,str,cfgoptions[i].numelt);
str[strlen(str)-1] = 0; str[strlen(str)-1] = 0;
} }
if (cfgoptions[i].numelt == 0 ) {
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *)); config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1); config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
sprintf( *(cfgoptions[i].strptr) , "%s", str); sprintf( *(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) ); printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) );
} else {
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,(char *)cfgoptions[i].strptr );
}
} else { } else {
if( cfgoptions[i].defstrval != NULL) { if( cfgoptions[i].defstrval != NULL) {
defval=1; defval=1;
if (cfgoptions[i].numelt == 0 ) {
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *)); config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1); config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1);
sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval); sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr)); printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr));
} else {
sprintf((char *)(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, (char *)cfgoptions[i].strptr);
}
} else { } else {
notfound=1; notfound=1;
} }
...@@ -183,7 +194,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) ...@@ -183,7 +194,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
read_intarray(&cfgoptions[i],setting,cfgpath); read_intarray(&cfgoptions[i],setting,cfgpath);
} else { } else {
if( cfgoptions[i].defintarrayval != NULL) { if( cfgoptions[i].defintarrayval != NULL) {
config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t)); config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t*));
cfgoptions[i].iptr=cfgoptions[i].defintarrayval; cfgoptions[i].iptr=cfgoptions[i].defintarrayval;
defval=1; defval=1;
for (int j=0; j<cfgoptions[i].numelt ; j++) { for (int j=0; j<cfgoptions[i].numelt ; j++) {
......
...@@ -58,7 +58,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { ...@@ -58,7 +58,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
uint16_t db_fulllength, db_halflength; uint16_t db_fulllength, db_halflength;
int slotoffsetF=0, blockoffsetF=0; int slotoffsetF=0, blockoffsetF=0;
uint16_t *data_block=NULL, *i=NULL; uint16_t *data_block=NULL, *i=NULL, *d=NULL;
IF4p5_header_t *packet_header=NULL; IF4p5_header_t *packet_header=NULL;
eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv); eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv);
...@@ -138,23 +138,48 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { ...@@ -138,23 +138,48 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
if (packet_type == IF4p5_PULFFT) { if (packet_type == IF4p5_PULFFT) {
uint16_t *rx0 = (uint16_t*) &rxdataF[0][blockoffsetF];
uint16_t *rx1 = (uint16_t*) &rxdataF[0][slotoffsetF];
for (symbol_id=fp->symbols_per_tti-nsym; symbol_id<fp->symbols_per_tti; symbol_id++) { for (symbol_id=fp->symbols_per_tti-nsym; symbol_id<fp->symbols_per_tti; symbol_id++) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL, symbol_id ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL, symbol_id );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 1 );
for (element_id=0; element_id<db_halflength; element_id++) {
i = (uint16_t*) &rxdataF[0][blockoffsetF+element_id];
data_block[element_id] = ((uint16_t) lin2alaw_if4p5[*i]) | ((uint16_t)(lin2alaw_if4p5[*(i+1)]<<8));
i = (uint16_t*) &rxdataF[0][slotoffsetF+element_id]; start_meas(&ru->compression);
data_block[element_id+db_halflength] = ((uint16_t) lin2alaw_if4p5[*i]) | ((uint16_t)(lin2alaw_if4p5[*(i+1)]<<8));
//if (element_id==0) LOG_I(PHY,"send_if4p5: symbol %d rxdata0 = (%d,%d)\n",symbol_id,*i,*(i+1)); for (element_id=0; element_id<db_halflength; element_id+=8) {
i = (uint16_t*) &rx0[element_id];
d = (uint16_t*) &data_block[element_id];
d[0] = ((uint16_t) lin2alaw_if4p5[i[0]]) | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
d[1] = ((uint16_t) lin2alaw_if4p5[i[2]]) | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
d[2] = ((uint16_t) lin2alaw_if4p5[i[4]]) | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
d[3] = ((uint16_t) lin2alaw_if4p5[i[6]]) | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
d[4] = ((uint16_t) lin2alaw_if4p5[i[8]]) | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
i = (uint16_t*) &rx1[element_id];
d = (uint16_t*) &data_block[element_id+db_halflength];
d[0] = ((uint16_t) lin2alaw_if4p5[i[0]]) | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
d[1] = ((uint16_t) lin2alaw_if4p5[i[2]]) | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
d[2] = ((uint16_t) lin2alaw_if4p5[i[4]]) | ((uint16_t)(lin2alaw_if4p5[i[5]]<<8));
d[3] = ((uint16_t) lin2alaw_if4p5[i[6]]) | ((uint16_t)(lin2alaw_if4p5[i[7]]<<8));
d[4] = ((uint16_t) lin2alaw_if4p5[i[8]]) | ((uint16_t)(lin2alaw_if4p5[i[9]]<<8));
d[5] = ((uint16_t) lin2alaw_if4p5[i[10]]) | ((uint16_t)(lin2alaw_if4p5[i[11]]<<8));
d[6] = ((uint16_t) lin2alaw_if4p5[i[12]]) | ((uint16_t)(lin2alaw_if4p5[i[13]]<<8));
d[7] = ((uint16_t) lin2alaw_if4p5[i[14]]) | ((uint16_t)(lin2alaw_if4p5[i[15]]<<8));
} }
stop_meas(&ru->compression);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF, 0 );
packet_header->frame_status &= ~(0x000f<<26); packet_header->frame_status &= ~(0x000f<<26);
packet_header->frame_status |= (symbol_id&0x000f)<<26; packet_header->frame_status |= (symbol_id&0x000f)<<26;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 );
start_meas(&ru->transport);
if ((ru->ifdevice.trx_write_func(&ru->ifdevice, if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
symbol_id, symbol_id,
&tx_buffer, &tx_buffer,
...@@ -163,6 +188,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { ...@@ -163,6 +188,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
IF4p5_PULFFT)) < 0) { IF4p5_PULFFT)) < 0) {
perror("ETHERNET write for IF4p5_PULFFT\n"); perror("ETHERNET write for IF4p5_PULFFT\n");
} }
stop_meas(&ru->transport);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 );
slotoffsetF += fp->ofdm_symbol_size; slotoffsetF += fp->ofdm_symbol_size;
blockoffsetF += fp->ofdm_symbol_size; blockoffsetF += fp->ofdm_symbol_size;
...@@ -181,7 +207,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { ...@@ -181,7 +207,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
} else if (packet_type >= IF4p5_PRACH && } else if (packet_type >= IF4p5_PRACH &&
packet_type <= IF4p5_PRACH+4) { packet_type <= IF4p5_PRACH+4) {
// FIX: hard coded prach samples length // FIX: hard coded prach samples length
LOG_D(PHY,"IF4p5_PRACH: frame %d, subframe %d\n",frame,subframe); LOG_D(PHY,"IF4p5_PRACH: frame %d, subframe %d,packet type %x\n",frame,subframe,packet_type);
db_fulllength = PRACH_NUM_SAMPLES; db_fulllength = PRACH_NUM_SAMPLES;
if (eth->flags == ETH_RAW_IF4p5_MODE) { if (eth->flags == ETH_RAW_IF4p5_MODE) {
...@@ -222,6 +248,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) { ...@@ -222,6 +248,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
packet_type)) < 0) { packet_type)) < 0) {
perror("ETHERNET write for IF4p5_PRACH\n"); perror("ETHERNET write for IF4p5_PRACH\n");
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 0 );
} else { } else {
AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type); AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type);
...@@ -283,7 +310,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint ...@@ -283,7 +310,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
*subframe = ((packet_header->frame_status)>>22)&0x000f; *subframe = ((packet_header->frame_status)>>22)&0x000f;
*packet_type = packet_header->sub_type; *packet_type = packet_header->sub_type;
LOG_D(PHY,"recv_IF4p5: Frame %d, Subframe %d: packet_type %x\n",*frame,*subframe,*packet_type);
if (*packet_type == IF4p5_PDLFFT) { if (*packet_type == IF4p5_PDLFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f; *symbol_number = ((packet_header->frame_status)>>26)&0x000f;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
...@@ -313,7 +340,6 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint ...@@ -313,7 +340,6 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size); slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size);
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: CC_id %d : frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
for (element_id=0; element_id<db_halflength; element_id++) { for (element_id=0; element_id<db_halflength; element_id++) {
i = (uint16_t*) &rxdataF[0][blockoffsetF+element_id]; i = (uint16_t*) &rxdataF[0][blockoffsetF+element_id];
*i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ]; *i = alaw2lin_if4p5[ (data_block[element_id] & 0xff) ];
...@@ -353,8 +379,8 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint ...@@ -353,8 +379,8 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
PRACH_BLOCK_SIZE_BYTES); PRACH_BLOCK_SIZE_BYTES);
} }
//LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe, LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
// dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839))); dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe); for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
} else if (*packet_type == IF4p5_PULTICK) { } else if (*packet_type == IF4p5_PULTICK) {
......
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
#define IF4p5_PULFFT 0x0019 #define IF4p5_PULFFT 0x0019
#define IF4p5_PDLFFT 0x0020 #define IF4p5_PDLFFT 0x0020
#define IF4p5_PRACH 0x0021 #define IF4p5_PRACH 0x0021
#define IF4p5_PRACH_BR_CE0 0x0021 #define IF4p5_PRACH_BR_CE0 0x0022
#define IF4p5_PRACH_BR_CE1 0x0022 #define IF4p5_PRACH_BR_CE1 0x0023
#define IF4p5_PRACH_BR_CE2 0x0023 #define IF4p5_PRACH_BR_CE2 0x0024
#define IF4p5_PRACH_BR_CE3 0x0024 #define IF4p5_PRACH_BR_CE3 0x0025
#define IF4p5_PULTICK 0x0025 #define IF4p5_PULTICK 0x0026
struct IF4p5_header { struct IF4p5_header {
/// Type /// Type
......
...@@ -1871,6 +1871,23 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1871,6 +1871,23 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
eNB->pucch1ab_stats_cnt[j][i]=0; eNB->pucch1ab_stats_cnt[j][i]=0;
} }
} }
#if defined(USRP_REC_PLAY)
// It's probably bad to do this statically only once.
// Looks like the above is incomplete.
// Such reset needs to be done once a UE PHY structure is being used/re-used
// Don't know if this is ever possible in current architecture
for (i=0;i<10240;i++) {
for (j=0;j<NUMBER_OF_UE_MAX;j++) {
eNB->pucch1_stats[j][i]=0;
eNB->pucch1_stats_thres[j][i]=0;
}
}
for (i=0;i<20480;i++) {
for (j=0;j<NUMBER_OF_UE_MAX;j++) {
eNB->pucch1ab_stats[j][i]=0;
}
}
#endif
first_call=0; first_call=0;
} }
...@@ -2154,6 +2171,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -2154,6 +2171,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
// stat_max *= nsymb; // normalize to energy per symbol // stat_max *= nsymb; // normalize to energy per symbol
// stat_max /= (frame_parms->N_RB_UL*12); // // stat_max /= (frame_parms->N_RB_UL*12); //
stat_max /= (nsymb*12); stat_max /= (nsymb*12);
#ifdef DEBUG_PUCCH_RX #ifdef DEBUG_PUCCH_RX
printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max); printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
#endif #endif
...@@ -2289,8 +2307,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -2289,8 +2307,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat_im=0; stat_im=0;
// Do detection now // Do detection now
#if defined(USRP_REC_PLAY)
// It looks like the value is a bit messy when RF is replayed.
// For instance i assume to skip pucch1_thres from the test below.
if (sigma2_dB<(dB_fixed(stat_max))) {//
#else
if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) {// if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) {//
#endif
chL = (nsymb>>1)-4; chL = (nsymb>>1)-4;
chest_mag=0; chest_mag=0;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max]; cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max];
...@@ -2431,7 +2454,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -2431,7 +2454,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
if (fmt==pucch_format1b) if (fmt==pucch_format1b)
*(1+payload) = (stat_im<0) ? 1 : 2; *(1+payload) = (stat_im<0) ? 1 : 2;
} else { // insufficient energy on PUCCH so NAK } else { // insufficient energy on PUCCH so NAK
#if defined(USRP_REC_PLAY)
LOG_I(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#else
LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#endif
*payload = 4; // DTX *payload = 4; // DTX
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
......
...@@ -756,6 +756,10 @@ typedef struct RU_t_s{ ...@@ -756,6 +756,10 @@ typedef struct RU_t_s{
time_stats_t rx_fhaul; time_stats_t rx_fhaul;
/// Timing statistics (TX Fronthaul + Compression) /// Timing statistics (TX Fronthaul + Compression)
time_stats_t tx_fhaul; time_stats_t tx_fhaul;
/// Timong statistics (Compression)
time_stats_t compression;
/// Timing statistics (Fronthaul transport)
time_stats_t transport;
/// RX and TX buffers for precoder output /// RX and TX buffers for precoder output
RU_COMMON common; RU_COMMON common;
/// beamforming weight vectors per eNB /// beamforming weight vectors per eNB
......
...@@ -2939,7 +2939,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -2939,7 +2939,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
//dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); //dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
ue->UE_mode[eNB_id] = PUSCH; ue->UE_mode[eNB_id] = PUSCH;
}
} else { } else {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Problem in DCI!\n",ue->Mod_id,frame_rx,subframe_rx); LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Problem in DCI!\n",ue->Mod_id,frame_rx,subframe_rx);
dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
...@@ -2977,7 +2977,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -2977,7 +2977,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
} }
} }
}
else if ((dci_alloc_rx[i].rnti == P_RNTI) && else if ((dci_alloc_rx[i].rnti == P_RNTI) &&
((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) { ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) {
......
...@@ -2624,6 +2624,8 @@ void RCConfig(void) { ...@@ -2624,6 +2624,8 @@ void RCConfig(void) {
/* get global parameters, defined outside any section in the config file */ /* get global parameters, defined outside any section in the config file */
printf("Getting ENBSParams\n");
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -107,5 +107,3 @@ extern int last_ulsch_ue_id[MAX_NUM_CCs]; ...@@ -107,5 +107,3 @@ extern int last_ulsch_ue_id[MAX_NUM_CCs];
#endif #endif
#endif //DEF_H #endif //DEF_H
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
/* /*
* slice specific scheduler * slice specific scheduler
*/ */
typedef void (*slice_scheduler)(module_id_t mod_id, typedef void (*slice_scheduler) (module_id_t mod_id,
int slice_id, int slice_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
...@@ -55,7 +55,7 @@ void flexran_schedule_ue_spec_default(mid_t mod_id, ...@@ -55,7 +55,7 @@ void flexran_schedule_ue_spec_default(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
/* /*
* slice specific scheduler for embb * slice specific scheduler for embb
*/ */
...@@ -65,7 +65,7 @@ flexran_schedule_ue_spec_embb(mid_t mod_id, ...@@ -65,7 +65,7 @@ flexran_schedule_ue_spec_embb(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
/* /*
* slice specific scheduler for urllc * slice specific scheduler for urllc
*/ */
...@@ -75,7 +75,7 @@ flexran_schedule_ue_spec_urllc(mid_t mod_id, ...@@ -75,7 +75,7 @@ flexran_schedule_ue_spec_urllc(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
/* /*
* slice specific scheduler for mmtc * slice specific scheduler for mmtc
...@@ -86,7 +86,7 @@ flexran_schedule_ue_spec_mmtc(mid_t mod_id, ...@@ -86,7 +86,7 @@ flexran_schedule_ue_spec_mmtc(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
/* /*
* slice specific scheduler for best effort traffic * slice specific scheduler for best effort traffic
*/ */
...@@ -96,7 +96,7 @@ flexran_schedule_ue_spec_be(mid_t mod_id, ...@@ -96,7 +96,7 @@ flexran_schedule_ue_spec_be(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
/* /*
* common flexran scheduler function * common flexran scheduler function
...@@ -107,82 +107,110 @@ flexran_schedule_ue_spec_common(mid_t mod_id, ...@@ -107,82 +107,110 @@ flexran_schedule_ue_spec_common(mid_t mod_id,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int *mbsfn_flag, int *mbsfn_flag,
Protocol__FlexranMessage **dl_info); Protocol__FlexranMessage ** dl_info);
uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
int total_rbs);
int flexran_slice_member(int UE_id, int flexran_slice_member(int UE_id, int slice_id);
int slice_id);
int flexran_slice_maxmcs(int slice_id) ; int flexran_slice_maxmcs(int slice_id);
void _store_dlsch_buffer (module_id_t Mod_id, void _store_dlsch_buffer(module_id_t Mod_id,
int slice_id, int slice_id,
frame_t frameP, frame_t frameP, sub_frame_t subframeP);
sub_frame_t subframeP);
void _assign_rbs_required (module_id_t Mod_id, void _assign_rbs_required(module_id_t Mod_id,
int slice_id, int slice_id,
frame_t frameP, frame_t frameP,
sub_frame_t subframe, sub_frame_t subframe,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t
uint16_t nb_rbs_allowed_slice[MAX_NUM_CCs][MAX_NUM_SLICES], nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
int min_rb_unit[MAX_NUM_CCs]); uint16_t
nb_rbs_allowed_slice[MAX_NUM_CCs]
[MAX_NUM_SLICES], int min_rb_unit[MAX_NUM_CCs]);
void _dlsch_scheduler_pre_processor (module_id_t Mod_id, void _dlsch_scheduler_pre_processor(module_id_t Mod_id,
int slice_id, int slice_id,
frame_t frameP, frame_t frameP,
sub_frame_t subframeP, sub_frame_t subframeP,
int N_RBG[MAX_NUM_CCs], int N_RBG[MAX_NUM_CCs],
int *mbsfn_flag); int *mbsfn_flag);
void _dlsch_scheduler_pre_processor_reset (int module_idP, void _dlsch_scheduler_pre_processor_reset(int module_idP,
int UE_id, int UE_id,
uint8_t CC_id, uint8_t CC_id,
int frameP, int frameP,
int subframeP, int subframeP,
int N_RBG, int N_RBG,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], nb_rbs_required[MAX_NUM_CCs]
uint16_t nb_rbs_allowed_slice[MAX_NUM_CCs][MAX_NUM_SLICES], [NUMBER_OF_UE_MAX],
unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX], uint16_t
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]); nb_rbs_required_remaining
[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
void _dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id, uint16_t
nb_rbs_allowed_slice[MAX_NUM_CCs]
[MAX_NUM_SLICES],
unsigned char
rballoc_sub[MAX_NUM_CCs]
[N_RBG_MAX],
unsigned char
MIMO_mode_indicator[MAX_NUM_CCs]
[N_RBG_MAX]);
void _dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
int UE_id, int UE_id,
uint8_t CC_id, uint8_t CC_id,
int N_RBG, int N_RBG,
int transmission_mode, int transmission_mode,
int min_rb_unit, int min_rb_unit,
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX], uint16_t
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], nb_rbs_required[MAX_NUM_CCs]
unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX], [NUMBER_OF_UE_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]); uint16_t
nb_rbs_required_remaining
[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
unsigned char
rballoc_sub[MAX_NUM_CCs]
[N_RBG_MAX],
unsigned char
MIMO_mode_indicator
[MAX_NUM_CCs][N_RBG_MAX]);
/* /*
* Default scheduler used by the eNB agent * Default scheduler used by the eNB agent
*/ */
void flexran_schedule_ue_spec_default(mid_t mod_id, uint32_t frame, uint32_t subframe, void flexran_schedule_ue_spec_default(mid_t mod_id, uint32_t frame,
int *mbsfn_flag, Protocol__FlexranMessage **dl_info); uint32_t subframe, int *mbsfn_flag,
Protocol__FlexranMessage ** dl_info);
/* /*
* Data plane function for applying the DL decisions of the scheduler * Data plane function for applying the DL decisions of the scheduler
*/ */
void flexran_apply_dl_scheduling_decisions(mid_t mod_id, uint32_t frame, uint32_t subframe, int *mbsfn_flag, void flexran_apply_dl_scheduling_decisions(mid_t mod_id, uint32_t frame,
Protocol__FlexranMessage *dl_scheduling_info); uint32_t subframe,
int *mbsfn_flag,
Protocol__FlexranMessage *
dl_scheduling_info);
/* /*
* Data plane function for applying the UE specific DL decisions of the scheduler * Data plane function for applying the UE specific DL decisions of the scheduler
*/ */
void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, uint32_t frame, uint32_t subframe, int *mbsfn_flag, void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
uint32_t n_dl_ue_data, Protocol__FlexDlData **dl_ue_data); uint32_t frame,
uint32_t subframe,
int *mbsfn_flag,
uint32_t n_dl_ue_data,
Protocol__FlexDlData **
dl_ue_data);
/* /*
* Data plane function for filling the DCI structure * Data plane function for filling the DCI structure
*/ */
void flexran_fill_oai_dci(mid_t mod_id, uint32_t CC_id, uint32_t rnti, Protocol__FlexDlDci *dl_dci); void flexran_fill_oai_dci(mid_t mod_id, uint32_t CC_id, uint32_t rnti,
Protocol__FlexDlDci * dl_dci);
#endif #endif
...@@ -55,8 +55,9 @@ TAILQ_HEAD(DlMacConfigHead, dl_mac_config_element_s); ...@@ -55,8 +55,9 @@ TAILQ_HEAD(DlMacConfigHead, dl_mac_config_element_s);
/* /*
* Default scheduler used by the eNB agent * Default scheduler used by the eNB agent
*/ */
void flexran_schedule_ue_spec_remote(mid_t mod_id, uint32_t frame, uint32_t subframe, void flexran_schedule_ue_spec_remote(mid_t mod_id, uint32_t frame,
int *mbsfn_flag, Protocol__FlexranMessage **dl_info); uint32_t subframe, int *mbsfn_flag,
Protocol__FlexranMessage ** dl_info);
// Find the difference in subframes from the given subframe // Find the difference in subframes from the given subframe
......
...@@ -34,28 +34,36 @@ ...@@ -34,28 +34,36 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "proto.h" #include "proto.h"
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id) int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
{ {
RACH_ConfigCommon_t *rach_ConfigCommon = NULL; RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
AssertFatal(CC_id==0, AssertFatal(CC_id == 0,
"Transmission on secondary CCs is not supported yet\n"); "Transmission on secondary CCs is not supported yet\n");
AssertFatal(UE_mac_inst[module_idP].radioResourceConfigCommon!=NULL, AssertFatal(UE_mac_inst[module_idP].radioResourceConfigCommon != NULL,
"[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",module_idP,CC_id); "[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",
module_idP, CC_id);
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon; rach_ConfigCommon =
&UE_mac_inst[module_idP].radioResourceConfigCommon->
rach_ConfigCommon;
return(-120 + (rach_ConfigCommon->powerRampingParameters.preambleInitialReceivedTargetPower<<1) + return (-120 +
get_DELTA_PREAMBLE(module_idP,CC_id)); (rach_ConfigCommon->
powerRampingParameters.preambleInitialReceivedTargetPower <<
1) + get_DELTA_PREAMBLE(module_idP, CC_id));
} }
int8_t get_deltaP_rampup(module_id_t module_idP,uint8_t CC_id) int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id)
{ {
AssertFatal(CC_id==0, AssertFatal(CC_id == 0,
"Transmission on secondary CCs is not supported yet\n"); "Transmission on secondary CCs is not supported yet\n");
LOG_D(MAC,"[PUSCH]%d dB\n",UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER<<1); LOG_D(MAC, "[PUSCH]%d dB\n",
return((int8_t)(UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER<<1)); UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER << 1);
return ((int8_t)
(UE_mac_inst[module_idP].
RA_PREAMBLE_TRANSMISSION_COUNTER << 1));
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -220,7 +220,7 @@ pdcp_validate_security( ...@@ -220,7 +220,7 @@ pdcp_validate_security(
stream_decrypt(pdcp_pP->cipheringAlgorithm, stream_decrypt(pdcp_pP->cipheringAlgorithm,
&decrypt_params, &decrypt_params,
&buffer_decrypted); &buffer_decrypted);
#if !defined(USRP_REC_PLAY)
if (srb_flagP) { if (srb_flagP) {
/* Now check the integrity of the complete PDU */ /* Now check the integrity of the complete PDU */
decrypt_params.message = pdcp_pdu_buffer; decrypt_params.message = pdcp_pdu_buffer;
...@@ -241,7 +241,7 @@ pdcp_validate_security( ...@@ -241,7 +241,7 @@ pdcp_validate_security(
return -1; return -1;
} }
} }
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT);
return 0; return 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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