Merge remote-tracking branch 'origin/develop' into feature-59-tm4

This commit is contained in:
Elena_Lukashova
2017-03-27 14:03:51 +02:00
94 changed files with 13260 additions and 729 deletions
+7 -1
View File
@@ -283,8 +283,10 @@ if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
else()
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
else()
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/RRC-e10.asn)
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION})
@@ -1769,6 +1771,7 @@ add_executable(lte-softmodem
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${GTPU_need_ITTI}
${HW_SOURCE}
${TRANSPORT_SOURCE}
@@ -1805,6 +1808,7 @@ add_executable(lte-softmodem-nos1
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR_DIR}/common/utils/system.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
${RTAI_SOURCE}
@@ -1900,6 +1904,7 @@ add_executable(oaisim
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${GTPU_need_ITTI}
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${HW_SOURCE}
@@ -1946,6 +1951,7 @@ add_executable(oaisim_nos1
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_DIR}/common/utils/system.c
${HW_SOURCE}
${TRANSPORT_SOURCE}
${XFORMS_SOURCE}
+1
View File
@@ -716,6 +716,7 @@ ADD_EXECUTABLE(at_nas_ue ${OPENAIR_NAS_DIR}/UE/UEprocess.c
${OPENAIR_NAS_DIR}/UE/nas_proc.c
${OPENAIR_NAS_DIR}/UE/nas_user.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
)
target_link_libraries (at_nas_ue
@@ -1,2 +1,4 @@
sudo rmmod nasmesh || true
sudo rmmod ue_ip || true
sudo /opt/ltebox/tools/stop_ltebox || true
sudo /opt/hss_sim0609/starthss_real
@@ -1,5 +1,7 @@
cd /tmp/oai_test_setup/oai
source oaienv
sudo rmmod nasmesh || true
sudo rmmod ue_ip || true
cd cmake_targets
rm -rf log
mkdir -p log
@@ -3,6 +3,8 @@ stty isig intr ^C
cd /tmp/oai_test_setup/oai
source oaienv
sudo rmmod nasmesh || true
sudo rmmod ue_ip || true
cd cmake_targets/lte_build_oai/build
ulimit -c unlimited
sudo rm -f core
@@ -3,6 +3,8 @@ stty isig intr ^C
cd /tmp/oai_test_setup/oai
source oaienv
sudo rmmod nasmesh || true
sudo rmmod ue_ip || true
cd cmake_targets/autotests/v2/actions
sudo python start_3276.py
@@ -16,6 +16,8 @@ stty isig intr ^C
cd /tmp/oai_test_setup/oai
source oaienv
sudo rmmod nasmesh || true
sudo rmmod ue_ip || true
cd cmake_targets/autotests/v2/actions
python start_bandrich.py
+3 -2
View File
@@ -41,7 +41,7 @@ VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel10"
REL="Rel14"
HW="None"
TP="None"
NOS1=0
@@ -95,8 +95,9 @@ Options
-a | --agent
Enables agent for software-defined control of the eNB
-r | --3gpp-release
default is Rel10,
default is Rel14,
Rel8 limits the implementation to 3GPP Release 8 version
Rel10 limits the implementation to 3GPP Release 10 version
-w | --hardware
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, None (Default)
Adds this RF board support (in external packages installation and in compilation)
+9 -9
View File
@@ -3,19 +3,16 @@
# in those arrays, each line is:
# <file> <sha1sum of file (without line 4 which changes depending on the location of the files)> <patch to apply to file>
RRC_Rel14=(
"SystemInformation-r8-IEs.h" 562e3c3aeb7c6d76d722f31bf24488a26e627f33 "fix_asn1.data/RRC.rel14/SystemInformation-r8-IEs.h.diff"
)
RRC_Rel10=(
"SystemInformation-r8-IEs.h" 603cd6615cff36ec7020692d72c0d6de7c4859cb "fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff"
)
X2AP_Rel11_2=(
"X2ap-CriticalityDiagnostics-IE-List.h" ae96308b37fcbcbf39da5012e42968135fc5f27b "fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff"
"NativeInteger.c" 1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff"
"constr_SET_OF.c" 808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff"
)
S1AP_Rel10_5=(
"NativeInteger.c" 1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff"
"constr_SET_OF.c" 808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff"
)
red_color="$(tput setaf 1)"
@@ -94,6 +91,10 @@ function patch_rrc()
local version="$2"
case "$version" in
Rel14 )
echo "patching RRC files release 14"
apply_patches "$directory" RRC_Rel14 ${#RRC_Rel14[*]}
;;
Rel10 )
echo "patching RRC files release 10"
apply_patches "$directory" RRC_Rel10 ${#RRC_Rel10[*]}
@@ -130,8 +131,7 @@ function patch_s1ap()
case "$version" in
R10 )
echo "patching S1AP files release 10.5"
apply_patches "$directory" S1AP_Rel10_5 ${#S1AP_Rel10_5[*]}
#nothing to do anymore (fixes went to asn1c)
;;
* )
error unknwon/unhandled S1AP version \'"$version"\'
@@ -0,0 +1,23 @@
73,77d72
< /* SystemInformation-r8-IEs */
< typedef struct SystemInformation_r8_IEs {
< struct SystemInformation_r8_IEs__sib_TypeAndInfo {
< A_SEQUENCE_OF(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member {
< SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR present;
103c98,102
< } choice;
---
> };
>
> struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member {
> SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR present;
> union SystemInformation_r8_IEs__sib_TypeAndInfo__Member_u choice;
107c106,111
< } ) list;
---
> };
>
> /* SystemInformation-r8-IEs */
> typedef struct SystemInformation_r8_IEs {
> struct SystemInformation_r8_IEs__sib_TypeAndInfo {
> A_SEQUENCE_OF(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member) list;
@@ -1,8 +0,0 @@
283c283
< int dynamic = 0;
---
> //int dynamic = 0;
290c290
< dynamic = 1;
---
> //dynamic = 1;
@@ -1,4 +0,0 @@
1007c1007
< (int)nelems, (int)ct ? ct->effective_bits : -1);
---
> (int)nelems, ct ? ct->effective_bits : -1);
@@ -1,8 +0,0 @@
283c283
< int dynamic = 0;
---
> //int dynamic = 0;
290c290
< dynamic = 1;
---
> //dynamic = 1;
@@ -1,4 +0,0 @@
1007c1007
< (int)nelems, (int)ct ? ct->effective_bits : -1);
---
> (int)nelems, ct ? ct->effective_bits : -1);
+186
View File
@@ -0,0 +1,186 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* This module provides a separate process to run system().
* The communication between this process and the main processing
* is done through unix pipes.
*
* Motivation: the UE sets its IP address using system() and
* that disrupts realtime processing in some cases. Having a
* separate process solves this problem.
*/
#include "system.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <string.h>
#define MAX_COMMAND 4096
static int command_pipe_read;
static int command_pipe_write;
static int result_pipe_read;
static int result_pipe_write;
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static int module_initialized = 0;
/********************************************************************/
/* util functions */
/********************************************************************/
static void lock_system(void)
{
if (pthread_mutex_lock(&lock) != 0) {
printf("pthread_mutex_lock fails\n");
abort();
}
}
static void unlock_system(void)
{
if (pthread_mutex_unlock(&lock) != 0) {
printf("pthread_mutex_unlock fails\n");
abort();
}
}
static void write_pipe(int p, char *b, int size)
{
while (size) {
int ret = write(p, b, size);
if (ret <= 0) exit(0);
b += ret;
size -= ret;
}
}
static void read_pipe(int p, char *b, int size)
{
while (size) {
int ret = read(p, b, size);
if (ret <= 0) exit(0);
b += ret;
size -= ret;
}
}
/********************************************************************/
/* background process */
/********************************************************************/
/* This function is run by background process. It waits for a command,
* runs it, and reports status back. It exits (in normal situations)
* when the main process exits, because then a "read" on the pipe
* will return 0, in which case "read_pipe" exits.
*/
static void background_system_process(void)
{
int len;
int ret;
char command[MAX_COMMAND+1];
while (1) {
read_pipe(command_pipe_read, (char*)&len, sizeof(int));
read_pipe(command_pipe_read, command, len);
ret = system(command);
write_pipe(result_pipe_write, (char *)&ret, sizeof(int));
}
}
/********************************************************************/
/* background_system() */
/* return -1 on error, 0 on success */
/********************************************************************/
int background_system(char *command)
{
int res;
int len;
if (module_initialized == 0) {
printf("FATAL: calling 'background_system' but 'start_background_system' was not called\n");
abort();
}
len = strlen(command)+1;
if (len > MAX_COMMAND) {
printf("FATAL: command too long. Increase MAX_COMMAND (%d).\n", MAX_COMMAND);
printf("command was: '%s'\n", command);
abort();
}
/* only one command can run at a time, so let's lock/unlock */
lock_system();
write_pipe(command_pipe_write, (char*)&len, sizeof(int));
write_pipe(command_pipe_write, command, len);
read_pipe(result_pipe_read, (char*)&res, sizeof(int));
unlock_system();
if (res == -1 || !WIFEXITED(res) || WEXITSTATUS(res) != 0) return -1;
return 0;
}
/********************************************************************/
/* start_background_system() */
/* initializes the "background system" module */
/* to be called very early by the main processing */
/********************************************************************/
void start_background_system(void)
{
int p[2];
pid_t son;
module_initialized = 1;
if (pipe(p) == -1) {
perror("pipe");
exit(1);
}
command_pipe_read = p[0];
command_pipe_write = p[1];
if (pipe(p) == -1) {
perror("pipe");
exit(1);
}
result_pipe_read = p[0];
result_pipe_write = p[1];
son = fork();
if (son == -1) {
perror("fork");
exit(1);
}
if (son) {
close(result_pipe_write);
close(command_pipe_read);
return;
}
close(result_pipe_read);
close(command_pipe_write);
background_system_process();
}
+39
View File
@@ -0,0 +1,39 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _SYSTEM_H_OAI_
#define _SYSTEM_H_OAI_
/****************************************************
* send a command to the background process
* return -1 on error, 0 on success
****************************************************/
int background_system(char *command);
/****************************************************
* initialize the background process
* to be called very early
****************************************************/
void start_background_system(void);
#endif /* _SYSTEM_H_OAI_ */
+2 -2
View File
@@ -31,7 +31,7 @@
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MobilityControlInfo.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "SCellToAddMod-r10.h"
#endif
/** @addtogroup _PHY_STRUCTURES_
@@ -317,7 +317,7 @@ void lte_param_init(unsigned char N_tx_port_eNB,
uint8_t osf,
uint32_t perfect_ce);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
+4 -3
View File
@@ -483,7 +483,8 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup = 1;
eNB->soundingrs_ul_config_dedicated[UE_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
eNB->soundingrs_ul_config_dedicated[UE_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
eNB->soundingrs_ul_config_dedicated[UE_id].freqDomainPosition = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
@@ -706,7 +707,7 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
@@ -1213,7 +1214,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
}
const size_t num = 7*2*fp->N_RB_DL*12+4;
//const size_t num = 7*2*fp->N_RB_DL*12+4;
for (k=0;k<8;k++) { //harq_pid
for (l=0;l<8;l++) { //round
pdsch_vars_th0[eNB_id]->rxdataF_comp1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
@@ -667,28 +667,28 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
}
extern uint16_t transmission_offset_tdd[16];
#define DEBUG_SRS
//#define DEBUG_SRS
int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_COMMON *common_vars,
LTE_eNB_SRS *srs_vars,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
unsigned char sub_frame_number,
unsigned char subframe,
unsigned char eNB_id)
{
int T_SFC,aa;
int aa;
int N_symb,symbol;
uint8_t nb_antennas_rx = frame_parms->nb_antenna_ports_eNB;
uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
#ifdef DEBUG_SRS
char fname[40], vname[40];
#endif
uint8_t Ssrs = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
//uint8_t Ssrs = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
//uint8_t T_SFC = (Ssrs<=7 ? 5 : 10);
N_symb = 2*7-frame_parms->Ncp;
symbol = (sub_frame_number+1)*N_symb-1; //SRS is always in last symbol of subframe
T_SFC = (Ssrs<=7 ? 5 : 10);
symbol = N_symb-1; //SRS is always in last symbol of subframe
/*
msg("SRS channel estimation eNB %d, subframs %d, %d %d %d %d %d\n",eNB_id,sub_frame_number,
@@ -699,19 +699,21 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
SRS_parms->Ssrs);
*/
if ((1<<(sub_frame_number%T_SFC))&transmission_offset_tdd[Ssrs]) {
//if ((1<<(sub_frame_number%T_SFC))&transmission_offset_tdd[Ssrs]) {
if (generate_srs_rx(frame_parms,
soundingrs_ul_config_dedicated,
srs_vars->srs)==-1) {
msg("lte_srs_channel_estimation: Error in generate_srs_rx\n");
if (generate_srs(frame_parms,
soundingrs_ul_config_dedicated,
&srs_vars->srs[eNB_id],
0x7FFF,
subframe)==-1) {
LOG_E(PHY,"lte_srs_channel_estimation: Error in generate_srs_rx\n");
return(-1);
}
for (aa=0; aa<nb_antennas_rx; aa++) {
#ifdef DEBUG_SRS
msg("SRS channel estimation eNB %d, subframs %d, aarx %d, %p, %p, %p\n",eNB_id,sub_frame_number,aa,
&common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
&common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
srs_vars->srs,
srs_vars->srs_ch_estimates[eNB_id][aa]);
#endif
@@ -719,14 +721,15 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
//write_output("eNB_rxF.m","rxF",&common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
//write_output("eNB_srs.m","srs_eNB",common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
mult_cpx_conj_vector((int16_t*) &common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
(int16_t*) srs_vars->srs,
//memcpy(srs_vars->srs_ch_estimates[eNB_id][aa],&srs_vars->srs[eNB_id],frame_parms->ofdm_symbol_size*sizeof(int32_t));
//memcpy(srs_vars->srs_ch_estimates[eNB_id][aa],&common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],frame_parms->ofdm_symbol_size*sizeof(int32_t));
mult_cpx_conj_vector((int16_t*) &common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
(int16_t*) &srs_vars->srs[eNB_id],
(int16_t*) srs_vars->srs_ch_estimates[eNB_id][aa],
frame_parms->ofdm_symbol_size,
15,
0);
//msg("SRS channel estimation cmult out\n");
#ifdef USER_MODE
#ifdef DEBUG_SRS
sprintf(fname,"eNB_id%d_an%d_srs_ch_est.m",eNB_id,aa);
@@ -735,7 +738,6 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
#endif
#endif
}
}
/*
else {
+3 -2
View File
@@ -8639,6 +8639,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
print_CQI(ulsch->o,ulsch->uci_format,eNB_id,ue->frame_parms.N_RB_DL);
ulsch->bundling = 1-AckNackFBMode;
if (frame_parms->frame_type == FDD) {
int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
@@ -8670,7 +8671,6 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch->srs_active = use_srs;
ulsch->bundling = 1-AckNackFBMode;
if ((rnti >= cba_rnti) && (rnti < p_rnti))
ulsch->harq_processes[harq_pid]->status = CBA_ACTIVE;
@@ -9273,6 +9273,8 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
}
ulsch->bundling = 1-AckNackFBMode;
if (frame_parms->frame_type == FDD) {
int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
@@ -9296,7 +9298,6 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch->harq_processes[harq_pid]->srs_active = use_srs;
ulsch->bundling = 1-AckNackFBMode;
//Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1)
if(cshift == 0)
@@ -120,8 +120,8 @@ int rx_pdsch(PHY_VARS_UE *ue,
int32_t **rxdataF_comp_ptr;
int32_t **dl_ch_mag_ptr;
int32_t codeword_TB0;
int32_t codeword_TB1;
int32_t codeword_TB0 = -1;
int32_t codeword_TB1 = -1;
+28 -7
View File
@@ -578,13 +578,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
{
uint8_t *x0 = NULL;
MIMO_mode_t mimo_mode;
MIMO_mode_t mimo_mode = -1;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
int first_layer0; //= dlsch0_harq->first_layer;
int Nlayers0; // = dlsch0_harq->Nlayers;
int Nlayers0 = -1; // = dlsch0_harq->Nlayers;
uint8_t mod_order0=0; // = get_Qm(dlsch0_harq->mcs);
uint8_t mod_order1=0; //=2;
uint8_t precoder_index0,precoder_index1;
@@ -1998,13 +1998,13 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
uint8_t nsymb;
uint8_t harq_pid; //= dlsch0->current_harq_pid;
LTE_DL_eNB_HARQ_t *dlsch0_harq;
LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid];
uint8_t harq_pid = -1; //= dlsch0->current_harq_pid;
LTE_DL_eNB_HARQ_t *dlsch0_harq = NULL;
LTE_DL_eNB_HARQ_t *dlsch1_harq = NULL; //= dlsch1->harq_processes[harq_pid];
uint32_t i,i2,jj,jj2,re_allocated,symbol_offset;
uint16_t l,rb,re_offset;
uint32_t rb_alloc_ind;
uint32_t *rb_alloc; //=dlsch0_harq->rb_alloc;
uint32_t *rb_alloc = NULL; //=dlsch0_harq->rb_alloc;
uint8_t pilots=0;
uint8_t skip_dc,skip_half;
@@ -2015,6 +2015,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];
int16_t *qam_table_s0=NULL,*qam_table_s1=NULL;
#if 0
/* TODO: variable to be removed? */
int (*allocate_REs)(PHY_VARS_eNB*,
int **,
uint32_t*,
@@ -2036,13 +2038,14 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
uint8_t,
int *,
int *);
#endif
int P1_SHIFT[13],P2_SHIFT[13];
int offset,nushiftmod3;
uint8_t get_pmi_temp;
MIMO_mode_t mimo_mode;
MIMO_mode_t mimo_mode = -1;
uint8_t mprime=0,Ns;
int8_t lprime=-1;
int aa=0;
@@ -2242,7 +2245,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
re_offset = frame_parms->first_carrier_offset;
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
#if 0
/* TODO: remove this code? */
allocate_REs = allocate_REs_in_RB;
#endif
switch (mod_order0) {
case 2:
@@ -2251,15 +2257,21 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
case 4:
if (pilots) {
qam_table_s0 = qam16_table_b0;
#if 0
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_16QAM_siso :
allocate_REs_in_RB;
#endif
}
else {
qam_table_s0 = qam16_table_a0;
#if 0
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_16QAM_siso :
allocate_REs_in_RB;
#endif
}
break;
@@ -2267,15 +2279,21 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
case 6:
if (pilots) {
qam_table_s0 = qam64_table_b0;
#if 0
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_64QAM_siso :
allocate_REs_in_RB;
#endif
}
else {
qam_table_s0 = qam64_table_a0;
#if 0
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_64QAM_siso :
allocate_REs_in_RB;
#endif
}
break;
@@ -2284,7 +2302,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
switch (mod_order1) {
case 2:
qam_table_s1 = NULL;
#if 0
/* TODO: remove this code? */
allocate_REs = allocate_REs_in_RB;
#endif
break;
case 4:
if (pilots) {
+8 -2
View File
@@ -56,7 +56,9 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
int32_t *tx_buffer=NULL;
#ifdef DEBUG_DL_MOBIPASS
int8_t dummy_buffer[fp->samples_per_tti*2];
#endif
void *alaw_buffer = eNB->ifbuffer.tx[subframe&1];
uint16_t *data_block = NULL;
uint16_t *j = NULL;
@@ -262,8 +264,10 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
uint16_t packet_id=0, i=0, element_id=0;
int8_t dummy_buffer_rx[fp->samples_per_tti*2];
#ifdef DEBUG_UL_MOBIPASS
//int8_t dummy_buffer_rx[fp->samples_per_tti*2];
uint8_t rxe;
#endif
int32_t spp_eth = (int32_t) eNB->ifdevice.openair0_cfg->samples_per_packet;
int32_t spsf = (int32_t) eNB->ifdevice.openair0_cfg->samples_per_frame/10;
@@ -390,14 +394,16 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
uint16_t db_fulllength = PAYLOAD_MOBIPASS_NUM_SAMPLES;
openair0_timestamp timestamp_mobipass[fp->samples_per_tti/db_fulllength];
#ifdef DEBUG_UL_MOBIPASS
int lower_offset = 0;
int upper_offset = 70000;
#endif
int subframe_skip = 0;
int reset_flag = 0;
int32_t *rx_buffer=NULL;
__m128i *data_block=NULL, *data_block_head=NULL;
__m128i *rxp128;
__m128i r0, r1;
__m128i r0;
//rx_buffer = memalign(16, MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + db_fulllength*sizeof(int16_t));
rx_buffer = malloc(MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + db_fulllength*sizeof(int16_t));
+1 -1
View File
@@ -507,7 +507,7 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int i=0;
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
+6 -4
View File
@@ -1617,9 +1617,11 @@ uint8_t SE2I_TBS(float SE,
@param soundingrs_ul_config_dedicated Dynamic configuration from RRC during Connection Establishment
@param txdataF pointer to the frequency domain TX signal
@returns 0 on success*/
int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
int *txdataF);
int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
int *txdataF,
int16_t amp,
uint32_t subframe);
int32_t generate_srs_tx_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe);
@@ -1948,7 +1950,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_subba
int32_t pmi_convert_rank1_from_rank2(uint16_t pmi_alloc, int tpmi, int nb_rb);
//uint16_t quantize_subband_pmi2(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t a_id,int nb_subbands);
uint16_t quantize_subband_pmi2(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t a_id,int nb_subbands);
uint64_t pmi2hex_2Ar1(uint32_t pmi);
+15 -2
View File
@@ -31,6 +31,7 @@
*/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "SCHED/defs.h"
@@ -69,6 +70,7 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
uint8_t cqireq;
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max;
uint16_t use_srs=0;
LOG_D(PHY,"[eNB][RAPROC] generate_eNB_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",subframe,harq_pid);
@@ -133,8 +135,6 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
ulsch->beta_offset_ri_times8 = 10;
ulsch->beta_offset_harqack_times8 = 16;
ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1);
ulsch->rnti = (((uint16_t)rar[4])<<8)+rar[5];
if (ulsch->harq_processes[harq_pid]->round == 0) {
@@ -151,6 +151,19 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
ulsch->harq_processes[harq_pid]->round++;
}
ulsch->Msg3_active = 1;
get_Msg3_alloc(frame_parms,
subframe,
frame,
&ulsch->Msg3_frame,
&ulsch->Msg3_subframe);
use_srs = is_srs_occasion_common(frame_parms,ulsch->Msg3_frame,ulsch->Msg3_subframe);
ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch->harq_processes[harq_pid]->srs_active = use_srs;
#ifdef DEBUG_RAR
msg("ulsch ra (eNB): harq_pid %d\n",harq_pid);
msg("ulsch ra (eNB): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb);
+19 -31
View File
@@ -120,17 +120,15 @@ int compareints (const void * a, const void * b)
return ( *(unsigned short*)a - *(unsigned short*)b );
}
int32_t generate_srs_tx(PHY_VARS_UE *ue,
uint8_t eNB_id,
int16_t amp,
uint32_t subframe)
#define DEBUG_SRS
int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
int32_t *txptr,
int16_t amp,
uint32_t subframe)
{
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated=&ue->soundingrs_ul_config_dedicated[eNB_id];
int32_t **txdataF = ue->common_vars.txdataF;
uint16_t msrsb=0,Nb=0,nb,b,msrs0=0,k,Msc_RS,Msc_RS_idx,carrier_pos,symbol_offset;
uint16_t msrsb=0,Nb=0,nb,b,msrs0=0,k,Msc_RS,Msc_RS_idx,carrier_pos;
uint16_t *Msc_idx_ptr;
int32_t k0;
//uint32_t subframe_offset;
@@ -178,7 +176,7 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
}
if (k0<0) {
msg("generate_srs: invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d\n",msrs0,msrsb,Nb,nb,k0);
LOG_E(PHY,"generate_srs: invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d\n",msrs0,msrsb,Nb,nb,k0);
return(-1);
}
@@ -188,7 +186,7 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes;
else {
msg("generate_srs: index for Msc_RS=%d not found\n",Msc_RS);
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not found\n",Msc_RS);
return(-1);
}
@@ -199,29 +197,20 @@ int32_t generate_srs_tx(PHY_VARS_UE *ue,
else if (Msc_RS==144)
Msc_RS_idx = 9;
else {
msg("generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
return(-1);
}
#endif
#ifdef DEBUG_SRS
msg("generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d\n",Msc_RS, Msc_RS_idx);
LOG_D(PHY,"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d, k0 = %d\n",Msc_RS, Msc_RS_idx,k0);
#endif
carrier_pos = (frame_parms->first_carrier_offset + k0);
if (carrier_pos>frame_parms->ofdm_symbol_size) {
carrier_pos -= frame_parms->ofdm_symbol_size;
}
uint16_t nsymb = (frame_parms->Ncp==0) ? 14:12;
symbol_offset = (int)frame_parms->ofdm_symbol_size*((subframe*nsymb)+(nsymb-1));
//msg("carrier_pos = %d\n",carrier_pos);
//subframe_offset = subframe*frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;
//symbol_offset = subframe_offset+(frame_parms->symbols_per_tti-1)*frame_parms->ofdm_symbol_size;
int32_t *txptr;
txptr = &txdataF[0][symbol_offset];
for (k=0; k<Msc_RS; k++) {
int32_t real = ((int32_t) amp * (int32_t) ul_ref_sigs[u][v][Msc_RS_idx][k<<1]) >> 15;
@@ -245,6 +234,7 @@ int generate_srs_tx_emul(PHY_VARS_UE *phy_vars_ue,uint8_t subframe)
return(0);
}
#if 0
int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
int *txdataF)
@@ -285,7 +275,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
}
if (k0<0) {
msg("Invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d\n",msrs0,msrsb,Nb,nb,k0);
LOG_E(PHY,"Invalid parameter set msrs0=%d, msrsb=%d, Nb=%d => nb=%d, k0=%d\n",msrs0,msrsb,Nb,nb,k0);
return(-1);
}
@@ -295,7 +285,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes;
else {
msg("generate_srs: index for Msc_RS=%d not found\n",Msc_RS);
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not found\n",Msc_RS);
return(-1);
}
@@ -306,23 +296,21 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
else if (Msc_RS==144)
Msc_RS_idx = 9;
else {
msg("generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
return(-1);
}
#endif
#ifdef DEBUG_SRS
msg("generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d\n",Msc_RS, Msc_RS_idx,k0);
LOG_I(PHY,"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d\n",Msc_RS, Msc_RS_idx,k0);
#endif
carrier_pos = (frame_parms->first_carrier_offset + k0) % frame_parms->ofdm_symbol_size;
for (k=0; k<Msc_RS; k++) {
((short*) txdataF)[carrier_pos<<2] = ul_ref_sigs_rx[0][0][Msc_RS_idx][k<<2];
((short*) txdataF)[(carrier_pos<<2)+1] = ul_ref_sigs_rx[0][0][Msc_RS_idx][(k<<2)+1];
((short*) txdataF)[(carrier_pos<<2)+2] = ul_ref_sigs_rx[0][0][Msc_RS_idx][(k<<2)+2];
((short*) txdataF)[(carrier_pos<<2)+3] = ul_ref_sigs_rx[0][0][Msc_RS_idx][(k<<2)+3];
((short*) txdataF)[carrier_pos<<1] = ul_ref_sigs_rx[0][0][Msc_RS_idx][k<<1];
((short*) txdataF)[(carrier_pos<<1)+1] = ul_ref_sigs_rx[0][0][Msc_RS_idx][(k<<1)+1];
carrier_pos+=2;
if (carrier_pos >= frame_parms->ofdm_symbol_size)
@@ -365,7 +353,7 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
// write_output("srs_rx.m","srsrx",txdataF,1024,2,1);
return(0);
}
#endif
#ifdef MAIN
main()
+1 -1
View File
@@ -47,7 +47,7 @@ int beam_precoding(int32_t **txdataF,
int aa)
{
uint8_t p;
uint16_t re=0;
//uint16_t re=0;
int slot_offset_F;
slot_offset_F = slot*(frame_parms->ofdm_symbol_size)*((frame_parms->Ncp==1) ? 6 : 7);
+7 -4
View File
@@ -84,7 +84,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
// Time-domain channel response
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "SRS Frequency Response (samples, abs)" );
fl_set_object_boxtype( fdui->chest_t, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->chest_t, FL_BLACK, FL_RED );
fl_set_object_lcolor( fdui->chest_t, FL_WHITE ); // Label color
@@ -196,7 +196,8 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
bit = malloc(coded_bits_per_codeword*sizeof(float));
rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdata[eNB_id];
chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id];
//chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id];
chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates[eNB_id];
chest_f = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates[eNB_id];
pusch_llr = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->llr;
pusch_comp = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[eNB_id][0];
@@ -232,8 +233,10 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
if (chest_t[0] !=NULL) {
for (i=0; i<(frame_parms->ofdm_symbol_size); i++) {
i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size;
time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1));
//i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size;
i2=i;
//time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1));
time2[i] = (float)i;
chest_t_abs[0][i] = 10*log10((float) (1+chest_t[0][2*i2]*chest_t[0][2*i2]+chest_t[0][2*i2+1]*chest_t[0][2*i2+1]));
if (chest_t_abs[0][i] > ymax)
+1 -1
View File
@@ -320,7 +320,7 @@ typedef struct {
uint16_t srs_ConfigIndex;
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
uint8_t cyclicShift;
// Parameter: ue srs subframe for internal implementation
// Parameter: internal implementation: UE SRS configured
uint8_t srsConfigDedicatedSetup;
// Parameter: cell srs subframe for internal implementation
uint8_t srsCellSubframe;
+5 -1
View File
@@ -104,7 +104,7 @@ void phy_procedures_eNB_lte(uint8_t subframe,PHY_VARS_eNB **phy_vars_eNB,uint8_t
*/
void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/*! \brief Top-level entry routine for relay node procedures when acting as eNB. This proc will make us of the existing eNB procs.
@param last_slot Index of last slot (0-19)
@param next_slot Index of next_slot (0-19)
@@ -514,6 +514,10 @@ void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid);
int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subframe_tx);
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
/*@}*/
+1 -1
View File
@@ -531,7 +531,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
}
else {
switch (eNB->frame_parms.N_RB_DL==6) {
switch (eNB->frame_parms.N_RB_DL) {
case 6:
((DCI0_1_5MHz_TDD_1_6_t*)&DCI_pdu->dci_alloc[1].dci_pdu[0])->type = 0;
((DCI0_1_5MHz_TDD_1_6_t*)&DCI_pdu->dci_alloc[1].dci_pdu[0])->hopping = 0;
+145
View File
@@ -942,3 +942,148 @@ MU_MIMO_mode *get_mu_mimo_mode (module_id_t Mod_id, uint8_t CC_id, rnti_t rnti)
return &PHY_vars_eNB_g[Mod_id][CC_id]->mu_mimo_mode[UE_id];
}
int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subframe_tx)
{
uint8_t isSubframeSRS = 0; // SRS Cell Occasion
//ue->ulsch[eNB_id]->srs_active = 0;
//ue->ulsch[eNB_id]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)- ue->ulsch[eNB_id]->srs_active;
if(frame_parms->soundingrs_ul_config_common.enabled_flag)
{
LOG_D(PHY," SRS SUBFRAMECONFIG: %d\n", frame_parms->soundingrs_ul_config_common.srs_SubframeConfig);
uint8_t TSFC;
uint16_t deltaTSFC; // bitmap
uint8_t srs_SubframeConfig;
// table resuming TSFC (Period) and deltaSFC (offset)
const uint16_t deltaTSFCTabType1[15][2] = { {1,1},{1,2},{2,2},{1,5},{2,5},{4,5},{8,5},{3,5},{12,5},{1,10},{2,10},{4,10},{8,10},{351,10},{383,10} }; // Table 5.5.3.3-2 3GPP 36.211 FDD
const uint16_t deltaTSFCTabType2[14][2] = { {2,5},{6,5},{10,5},{18,5},{14,5},{22,5},{26,5},{30,5},{70,10},{74,10},{194,10},{326,10},{586,10},{210,10} }; // Table 5.5.3.3-2 3GPP 36.211 TDD
srs_SubframeConfig = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
if (FDD == frame_parms->frame_type)
{
// srs_SubframeConfig =< 14
deltaTSFC = deltaTSFCTabType1[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType1[srs_SubframeConfig][1];
}
else
{
// srs_SubframeConfig =< 13
deltaTSFC = deltaTSFCTabType2[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType2[srs_SubframeConfig][1];
}
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t tmp = (subframe_tx % TSFC);
if((1<<tmp) & deltaTSFC)
{
// This is a Sounding reference signal subframes
isSubframeSRS = 1;
}
LOG_D(PHY," ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d\n", frame_parms->frame_type, TSFC, deltaTSFC, frame_tx, subframe_tx);
}
return(isSubframeSRS);
}
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset)
{
if(TDD == frameType)
{
if(isrs<10)
{
mac_xface->macphy_exit("2 ms SRS periodicity not supported");
}
if((isrs>9)&&(isrs<15))
{
*psrsPeriodicity=5;
*psrsOffset=isrs-10;
}
if((isrs>14)&&(isrs<25))
{
*psrsPeriodicity=10;
*psrsOffset=isrs-15;
}
if((isrs>24)&&(isrs<45))
{
*psrsPeriodicity=20;
*psrsOffset=isrs-25;
}
if((isrs>44)&&(isrs<85))
{
*psrsPeriodicity=40;
*psrsOffset=isrs-45;
}
if((isrs>84)&&(isrs<165))
{
*psrsPeriodicity=80;
*psrsOffset=isrs-85;
}
if((isrs>164)&&(isrs<325))
{
*psrsPeriodicity=160;
*psrsOffset=isrs-165;
}
if((isrs>324)&&(isrs<645))
{
*psrsPeriodicity=320;
*psrsOffset=isrs-325;
}
if(isrs>644)
{
mac_xface->macphy_exit("Isrs out of range");
}
}
else
{
if(isrs<2)
{
*psrsPeriodicity=2;
*psrsOffset=isrs;
}
if((isrs>1)&&(isrs<7))
{
*psrsPeriodicity=5;
*psrsOffset=isrs-2;
}
if((isrs>6)&&(isrs<17))
{
*psrsPeriodicity=10;
*psrsOffset=isrs-7;
}
if((isrs>16)&&(isrs<37))
{
*psrsPeriodicity=20;
*psrsOffset=isrs-17;
}
if((isrs>36)&&(isrs<77))
{
*psrsPeriodicity=40;
*psrsOffset=isrs-37;
}
if((isrs>76)&&(isrs<157))
{
*psrsPeriodicity=80;
*psrsOffset=isrs-77;
}
if((isrs>156)&&(isrs<317))
{
*psrsPeriodicity=160;
*psrsOffset=isrs-157;
}
if((isrs>316)&&(isrs<637))
{
*psrsPeriodicity=320;
*psrsOffset=isrs-317;
}
if(isrs>636)
{
mac_xface->macphy_exit("Isrs out of range");
}
}
}
+72 -34
View File
@@ -307,8 +307,6 @@ void phy_procedures_emos_eNB_TX(unsigned char subframe, PHY_VARS_eNB *eNB)
}
#endif
void phy_procedures_eNB_S_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type)
{
UNUSED(r_type);
@@ -409,7 +407,7 @@ DCI_PDU DCI_pdu_tmp;
void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,relaying_type_t r_type) {
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
MCH_PDU *mch_pduP;
MCH_PDU mch_pdu;
// uint8_t sync_area=255;
@@ -425,7 +423,7 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,rel
subframe<<1,1);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// if mcch is active, send regardless of the node type: eNB or RN
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
mch_pduP = mac_xface->get_mch_sdu(eNB->Mod_id,
@@ -824,6 +822,13 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
int frame = proc->frame_tx;
int subframe = proc->subframe_tx;
/*
uint16_t srsPeriodicity=0;
uint16_t srsOffset=0;
uint16_t srsConfigIndex=0;
uint16_t do_srs=0;
*/
uint16_t is_srs_pos=0;
LOG_D(PHY,
"[eNB %"PRIu8"][PUSCH %"PRIu8"] Frame %d subframe %d UL Frame %"PRIu32", UL Subframe %"PRIu8", Generated ULSCH (format0) DCI (rnti %"PRIx16", dci %"PRIx8"), aggregation %d\n",
@@ -839,6 +844,20 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
dci_alloc->dci_pdu[0],
1<<dci_alloc->L);
is_srs_pos = is_srs_occasion_common(fp,pdcch_alloc2ul_frame(fp,frame,subframe),pdcch_alloc2ul_subframe(fp,subframe));
/*
if (is_srs_pos && eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup) {
srsConfigIndex = eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex;
compute_srs_pos(fp->frame_type, srsConfigIndex, &srsPeriodicity, &srsOffset);
if ((((10*pdcch_alloc2ul_frame(fp,frame,subframe)+pdcch_alloc2ul_subframe(fp,subframe)) % srsPeriodicity) == srsOffset)) {
do_srs = 1;
}
}
LOG_D(PHY,"frame %d (%d), subframe %d (%d), UE_id %d: is_srs_pos %d, do_SRS %d, index %d, period %d, offset %d \n",
frame,pdcch_alloc2ul_frame(fp,frame,subframe),subframe,pdcch_alloc2ul_subframe(fp,subframe),
UE_id,is_srs_pos,do_srs,srsConfigIndex,srsPeriodicity,srsOffset);
*/
generate_eNB_ulsch_params_from_dci(eNB,
proc,
&dci_alloc->dci_pdu[0],
@@ -849,7 +868,7 @@ void generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
0,
P_RNTI,
CBA_RNTI,
0); // do_srs
is_srs_pos);
LOG_T(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resources for UE spec DCI (PUSCH %"PRIx16") => %d\n",
eNB->Mod_id,frame,subframe,dci_alloc->rnti,
@@ -989,17 +1008,10 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
generate_eNB_ulsch_params_from_rar(DLSCH_pdu,
frame,
(subframe),
subframe,
eNB->ulsch[(uint32_t)UE_id],
fp);
eNB->ulsch[(uint32_t)UE_id]->Msg3_active = 1;
get_Msg3_alloc(fp,
subframe,
frame,
&eNB->ulsch[(uint32_t)UE_id]->Msg3_frame,
&eNB->ulsch[(uint32_t)UE_id]->Msg3_subframe);
LOG_D(PHY,"[eNB][RAPROC] Frame %d subframe %d, Activated Msg3 demodulation for UE %"PRId8" in frame %"PRIu32", subframe %"PRIu8"\n",
frame,
subframe,
@@ -1344,7 +1356,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
// Apply physicalConfigDedicated if needed
// This is for UEs that have received this IE, which changes these DL and UL configuration, we apply after a delay for the eNodeB UL parameters
phy_config_dedicated_eNB_step2(eNB);
// Now loop again over the DCIs for UL configuration
for (i=0; i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) {
dci_alloc = &DCI_pdu->dci_alloc[i];
@@ -2071,7 +2083,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,0);
}
void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq_pid)
void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq_pid,uint8_t do_srs)
{
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
uint8_t SR_payload = 0,*pucch_payload=NULL,pucch_payload0[2]= {0,0},pucch_payload1[2]= {0,0};
@@ -2150,7 +2162,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex,
0, // n2_pucch
0, // shortened format, should be use_srs flag, later
do_srs, // shortened format
&SR_payload,
frame,
subframe,
@@ -2190,7 +2202,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
(uint16_t)n1_pucch0,
0, //n2_pucch
0, // shortened format
do_srs, // shortened format
pucch_payload0,
frame,
subframe,
@@ -2220,7 +2232,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex,
0, //n2_pucch
0, // shortened format
do_srs, // shortened format
pucch_payload0,
frame,
subframe,
@@ -2281,7 +2293,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex,
0, //n2_pucch
0, // shortened format
do_srs, // shortened format
pucch_payload0,
frame,
subframe,
@@ -2313,7 +2325,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
(uint16_t)n1_pucch0,
0, // n2_pucch
0, // shortened format
do_srs, // shortened format
pucch_payload0,
frame,
subframe,
@@ -2338,7 +2350,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
UE_id,
(uint16_t)n1_pucch1,
0, //n2_pucch
0, // shortened format
do_srs, // shortened format
pucch_payload1,
frame,
subframe,
@@ -2866,6 +2878,16 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
const int frame = proc->frame_rx;
int offset = eNB->CC_id;//(proc == &eNB->proc.proc_rxtx[0]) ? 0 : 1;
uint16_t srsPeriodicity;
uint16_t srsOffset;
uint16_t do_srs=0;
uint16_t is_srs_pos=0;
T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
T(T_ENB_PHY_INPUT_SIGNAL, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(0),
T_BUFFER(&eNB->common_vars.rxdata[0][0][subframe*eNB->frame_parms.samples_per_tti],
eNB->frame_parms.samples_per_tti * 4));
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
@@ -2875,19 +2897,12 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
#endif
T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
T(T_ENB_PHY_INPUT_SIGNAL, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(0),
T_BUFFER(&eNB->common_vars.rxdata[0][0][subframe*eNB->frame_parms.samples_per_tti],
eNB->frame_parms.samples_per_tti * 4));
eNB->rb_mask_ul[0]=0;
eNB->rb_mask_ul[1]=0;
eNB->rb_mask_ul[2]=0;
eNB->rb_mask_ul[3]=0;
// Check for active processes in current subframe
harq_pid = subframe2harq_pid(fp,
frame,subframe);
@@ -2897,13 +2912,36 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
eNB->cba_last_reception[i]=0;
}
// Do PUCCH processing first
is_srs_pos = is_srs_occasion_common(fp,frame,subframe);
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
pucch_procedures(eNB,proc,i,harq_pid);
}
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
// Do SRS processing
// check if there is SRS and we have to use shortened format
// TODO: check for exceptions in transmission of SRS together with ACK/NACK
do_srs=0;
if (is_srs_pos && eNB->soundingrs_ul_config_dedicated[i].srsConfigDedicatedSetup ) {
compute_srs_pos(fp->frame_type, eNB->soundingrs_ul_config_dedicated[i].srs_ConfigIndex, &srsPeriodicity, &srsOffset);
if (((10*frame+subframe) % srsPeriodicity) == srsOffset) {
do_srs = 1;
}
}
if (do_srs==1) {
if (lte_srs_channel_estimation(fp,
&eNB->common_vars,
&eNB->srs_vars[i],
&eNB->soundingrs_ul_config_dedicated[i],
subframe,
0/*eNB_id*/)) {
LOG_E(PHY,"problem processing SRS\n");
}
}
// Do PUCCH processing
pucch_procedures(eNB,proc,i,harq_pid, do_srs);
// check for Msg3
if (eNB->mac_enabled==1) {
@@ -3461,7 +3499,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
#undef DEBUG_PHY_PROC
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int phy_procedures_RN_eNB_TX(unsigned char last_slot, unsigned char next_slot, relaying_type_t r_type)
{
+42 -166
View File
@@ -259,7 +259,6 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s
write_output("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1);
}
void phy_reset_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
{
@@ -416,7 +415,9 @@ uint8_t is_cqi_TXOp(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id)
// cqirep->cqi_PMI_ConfigIndex,
// (((10*frame + subframe) % cqirep->Npd) == cqirep->N_OFFSET_CQI));
if (((10*frame + subframe) % cqirep->Npd) == cqirep->N_OFFSET_CQI)
if (cqirep->cqi_PMI_ConfigIndex==-1)
return(0);
else if (((10*frame + subframe) % cqirep->Npd) == cqirep->N_OFFSET_CQI)
return(1);
else
return(0);
@@ -435,170 +436,34 @@ uint8_t is_ri_TXOp(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id)
// ue->Mod_id,ue->pdcch_vars[eNB_id]->crnti,frame,subframe,
// cqirep->ri_ConfigIndex,
// (((10*frame + subframe + cqirep->N_OFFSET_CQI - N_OFFSET_RI) % (cqirep->Npd<<log2Mri)) == 0));
if (((10*frame + subframe + cqirep->N_OFFSET_CQI - N_OFFSET_RI) % (cqirep->Npd<<log2Mri)) == 0)
if (cqirep->ri_ConfigIndex==-1)
return(0);
else if (((10*frame + subframe + cqirep->N_OFFSET_CQI - N_OFFSET_RI) % (cqirep->Npd<<log2Mri)) == 0)
return(1);
else
return(0);
}
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset)
void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t isSubframeSRS)
{
if(TDD == frameType)
{
if(isrs<10)
{
mac_xface->macphy_exit("2 ms SRS periodicity not supported");
}
if((isrs>9)&&(isrs<15))
{
*psrsPeriodicity=5;
*psrsOffset=isrs-10;
}
if((isrs>14)&&(isrs<25))
{
*psrsPeriodicity=10;
*psrsOffset=isrs-15;
}
if((isrs>24)&&(isrs<45))
{
*psrsPeriodicity=20;
*psrsOffset=isrs-25;
}
if((isrs>44)&&(isrs<85))
{
*psrsPeriodicity=40;
*psrsOffset=isrs-45;
}
if((isrs>84)&&(isrs<165))
{
*psrsPeriodicity=80;
*psrsOffset=isrs-85;
}
if((isrs>164)&&(isrs<325))
{
*psrsPeriodicity=160;
*psrsOffset=isrs-165;
}
if((isrs>324)&&(isrs<645))
{
*psrsPeriodicity=320;
*psrsOffset=isrs-325;
}
if(isrs>644)
{
mac_xface->macphy_exit("Isrs out of range");
}
}
else
{
if(isrs<2)
{
*psrsPeriodicity=2;
*psrsOffset=isrs;
}
if((isrs>1)&&(isrs<7))
{
*psrsPeriodicity=5;
*psrsOffset=isrs-2;
}
if((isrs>6)&&(isrs<17))
{
*psrsPeriodicity=10;
*psrsOffset=isrs-7;
}
if((isrs>16)&&(isrs<37))
{
*psrsPeriodicity=20;
*psrsOffset=isrs-17;
}
if((isrs>36)&&(isrs<77))
{
*psrsPeriodicity=40;
*psrsOffset=isrs-37;
}
if((isrs>76)&&(isrs<157))
{
*psrsPeriodicity=80;
*psrsOffset=isrs-77;
}
if((isrs>156)&&(isrs<317))
{
*psrsPeriodicity=160;
*psrsOffset=isrs-157;
}
if((isrs>316)&&(isrs<637))
{
*psrsPeriodicity=320;
*psrsOffset=isrs-317;
}
if(isrs>636)
{
mac_xface->macphy_exit("Isrs out of range");
}
}
}
void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id)
{
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int frame_tx = proc->frame_tx;
int subframe_tx = proc->subframe_tx;
uint8_t isSubframeSRS = 0; // SRS Cell Occasion
uint8_t is_pucch2_subframe = 0;
uint8_t is_sr_an_subframe = 0;
SOUNDINGRS_UL_CONFIG_DEDICATED *pSoundingrs_ul_config_dedicated=&ue->soundingrs_ul_config_dedicated[eNB_id];
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int frame_tx = proc->frame_tx;
int subframe_tx = proc->subframe_tx;
SOUNDINGRS_UL_CONFIG_DEDICATED *pSoundingrs_ul_config_dedicated=&ue->soundingrs_ul_config_dedicated[eNB_id];
uint16_t srsPeriodicity;
uint16_t srsOffset;
uint8_t is_pucch2_subframe = 0;
uint8_t is_sr_an_subframe = 0;
// check for SRS opportunity
pSoundingrs_ul_config_dedicated->srsUeSubframe = 0;
pSoundingrs_ul_config_dedicated->srsCellSubframe = 0;
pSoundingrs_ul_config_dedicated->srsCellSubframe = isSubframeSRS;
ue->ulsch[eNB_id]->srs_active = 0;
ue->ulsch[eNB_id]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)- ue->ulsch[eNB_id]->srs_active;
if(frame_parms->soundingrs_ul_config_common.enabled_flag)
{
LOG_D(PHY," SRS SUBFRAMECONFIG: %d, Isrs: %d \n", frame_parms->soundingrs_ul_config_common.srs_SubframeConfig, pSoundingrs_ul_config_dedicated->srs_ConfigIndex);
uint8_t TSFC;
uint16_t deltaTSFC; // bitmap
uint8_t srs_SubframeConfig;
uint16_t srsPeriodicity;
uint16_t srsOffset;
// table resuming TSFC (Period) and deltaSFC (offset)
const uint16_t deltaTSFCTabType1[15][2] = { {1,1},{1,2},{2,2},{1,5},{2,5},{4,5},{8,5},{3,5},{12,5},{1,10},{2,10},{4,10},{8,10},{351,10},{383,10} }; // Table 5.5.3.3-2 3GPP 36.211 FDD
const uint16_t deltaTSFCTabType2[14][2] = { {2,5},{6,5},{10,5},{18,5},{14,5},{22,5},{26,5},{30,5},{70,10},{74,10},{194,10},{326,10},{586,10},{210,10} }; // Table 5.5.3.3-2 3GPP 36.211 TDD
srs_SubframeConfig = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
if (FDD == frame_parms->frame_type)
{
// srs_SubframeConfig =< 14
deltaTSFC = deltaTSFCTabType1[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType1[srs_SubframeConfig][1];
}
else
{
// srs_SubframeConfig =< 13
deltaTSFC = deltaTSFCTabType2[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType2[srs_SubframeConfig][1];
}
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t tmp = (subframe_tx % TSFC);
if((1<<tmp) & deltaTSFC)
{
// This is a Sounding reference signal subframes
isSubframeSRS = 1;
pSoundingrs_ul_config_dedicated->srsCellSubframe = 1;
}
LOG_D(PHY," ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d, srsCellSubframe: %d \n", frame_parms->frame_type, TSFC, deltaTSFC, frame_tx, subframe_tx, pSoundingrs_ul_config_dedicated->srsCellSubframe);
LOG_D(PHY," SrsDedicatedSetup: %d \n",pSoundingrs_ul_config_dedicated->srsConfigDedicatedSetup);
if (isSubframeSRS) {
LOG_D(PHY," SrsDedicatedSetup: %d \n",pSoundingrs_ul_config_dedicated->srsConfigDedicatedSetup);
if(pSoundingrs_ul_config_dedicated->srsConfigDedicatedSetup)
{
compute_srs_pos(frame_parms->frame_type, pSoundingrs_ul_config_dedicated->srs_ConfigIndex, &srsPeriodicity, &srsOffset);
@@ -673,6 +538,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
}
}
void get_cqipmiri_params(PHY_VARS_UE *ue,uint8_t eNB_id)
{
@@ -1728,7 +1594,13 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
nb_rb_srs,
tx_amp);
generate_srs_tx(ue, eNB_id, tx_amp, subframe_tx);
uint16_t nsymb = (ue->frame_parms.Ncp==0) ? 14:12;
uint16_t symbol_offset = (int)ue->frame_parms.ofdm_symbol_size*((subframe_tx*nsymb)+(nsymb-1));
generate_srs(&ue->frame_parms,
&ue->soundingrs_ul_config_dedicated[eNB_id],
&ue->common_vars.txdataF[eNB_id][symbol_offset],
tx_amp,
subframe_tx);
}
}
@@ -1819,7 +1691,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
uint8_t pucch_ack_payload[2];
uint8_t n2_pucch;
uint8_t n2_pucch = -1;
uint16_t pucch_resource;
ANFBmode_t bundling_flag;
PUCCH_FMT_t format;
@@ -2140,8 +2012,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
int subframe_tx = proc->subframe_tx;
int frame_tx = proc->frame_tx;
unsigned int aa;
uint8_t isSubframeSRS;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN);
@@ -2170,7 +2041,9 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
if (ue->UE_mode[eNB_id] != PRACH) {
// check cell srs subframe and ue srs subframe. This has an impact on pusch encoding
ue_compute_srs_occasion(ue,proc,eNB_id);
isSubframeSRS = is_srs_occasion_common(&ue->frame_parms,proc->frame_tx,proc->subframe_tx);
ue_compute_srs_occasion(ue,proc,eNB_id,isSubframeSRS);
ue_ulsch_uespec_procedures(ue,proc,eNB_id,abstraction_flag);
@@ -3121,7 +2994,9 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
int subframe_rx = proc->subframe_rx;
int frame_rx = proc->frame_rx;
int pmch_mcs=-1;
#if defined(Rel10) || defined(Rel14)
int CC_id = ue->CC_id;
#endif
uint8_t sync_area=255;
uint8_t mcch_active;
int l;
@@ -3132,7 +3007,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n",
ue->Mod_id,(subframe_rx==9?-1:0)+frame_rx,subframe_rx);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
pmch_mcs = mac_xface->ue_query_mch(ue->Mod_id,
CC_id,
frame_rx,
@@ -3230,7 +3105,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
if (subframe_rx==9)
mac_xface->macphy_exit("Why are we exiting here?");
} else { // decoding successful
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (mcch_active == 1) {
mac_xface->ue_send_mch_sdu(ue->Mod_id,
@@ -3252,7 +3127,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
}
#endif // Rel10
#endif // Rel10 || Rel14
} // decoding sucessful
} // pmch_mcs>=0
} // is_pmch_subframe=true
@@ -4151,7 +4026,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
return (0);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int phy_procedures_RN_UE_RX(uint8_t slot_rx, uint8_t next_slot, relaying_type_t r_type)
{
@@ -4247,7 +4123,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
if ((subframe_select(&ue->frame_parms,subframe_rx)==SF_DL) ||
(ue->frame_parms.frame_type == FDD)) {
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (phy_procedures_RN_UE_RX(subframe_rx, subframe_tx, r_type) != 0 )
#endif
@@ -4261,7 +4137,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
if ((subframe_select(&ue->frame_parms,subframe_rx)==SF_S) &&
(slot==0)) {
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (phy_procedures_RN_UE_RX(subframe_rx, subframe_tx, r_type) != 0 )
#endif
+15 -11
View File
@@ -270,7 +270,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
int *num_dci) {
int k;
int dci_length,dci_length_bytes;
int dci_length = -1,dci_length_bytes = -1;
// printf("Generating DCIs for %d users, TM %d, mcs1 %d\n",n_users,transmission_mode,mcs1);
for(k=0; k<n_users; k++) {
@@ -1227,12 +1227,13 @@ DCI_PDU *get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t
DCI_pdu.Num_ue_spec_dci = num_ue_spec_dci;
DCI_pdu.Num_common_dci = num_common_dci;
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
return(&DCI_pdu);
} else {
DCI_pdu.Num_ue_spec_dci = 0;
DCI_pdu.Num_common_dci = 0;
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
}
return &DCI_pdu;
}
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP) {
@@ -1268,7 +1269,7 @@ int main(int argc, char **argv)
int s,Kr,Kr_bytes;
double SNR,snr0=-2.0,snr1,rate;
double SNR,snr0=-2.0,snr1,rate = 0;
double snr_step=1,input_snr_step=1, snr_int=30;
LTE_DL_FRAME_PARMS *frame_parms;
@@ -1298,10 +1299,10 @@ int main(int argc, char **argv)
DCI_ALLOC_t *dci_alloc = &DCI_pdu.dci_alloc[0];
unsigned int ret;
unsigned int coded_bits_per_codeword=0,nsymb,tbs=0;
unsigned int coded_bits_per_codeword=0,nsymb; //,tbs=0;
unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0;//,num_layers;
int re_allocated;
//int re_allocated;
char fname[32],vname[32];
FILE *bler_fd;
char bler_fname[256];
@@ -1328,16 +1329,16 @@ int main(int argc, char **argv)
int n_frames;
int n_ch_rlz = 1;
channel_desc_t *eNB2UE[4];
uint8_t num_pdcch_symbols_2=0;
//uint8_t num_pdcch_symbols_2=0;
uint8_t rx_sample_offset = 0;
//char stats_buffer[4096];
//int len;
uint8_t num_rounds = 4;//,fix_rounds=0;
int u;
//int u;
int n=0;
int abstx=0;
int iii;
//int iii;
int ch_realization;
int pmi_feedback=0;
@@ -1346,7 +1347,7 @@ int main(int argc, char **argv)
// void *data;
// int ii;
// int bler;
double blerr[4],uncoded_ber,avg_ber;
double blerr[4],uncoded_ber; //,avg_ber;
short *uncoded_ber_bit=NULL;
uint8_t N_RB_DL=25,osf=1;
frame_t frame_type = FDD;
@@ -1355,7 +1356,7 @@ int main(int argc, char **argv)
char title[255];
int numCCE=0;
int dci_length_bytes=0,dci_length=0;
//int dci_length_bytes=0,dci_length=0;
//double channel_bandwidth = 5.0, sampling_rate=7.68;
int common_flag=0,TPC=0;
@@ -1391,7 +1392,7 @@ int main(int argc, char **argv)
char csv_fname[32];
int dci_flag=1;
int two_thread_flag=0;
int DLSCH_RB_ALLOC;
int DLSCH_RB_ALLOC = 0;
#if defined(__arm__)
FILE *proc_fd = NULL;
@@ -1828,6 +1829,8 @@ int main(int argc, char **argv)
}
else {
eNB->te = dlsch_encoding_2threads;
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
init_td_thread(eNB,NULL);
init_te_thread(eNB,NULL);
}
@@ -2186,6 +2189,7 @@ int main(int argc, char **argv)
while ((!feof(input_trch_fd)) && (i<input_buffer_length0<<3)) {
ret=fscanf(input_trch_fd,"%s",input_trch_val);
if (ret != 1) printf("ERROR: error reading file\n");
if (input_trch_val[0] == '1')
input_buffer0[k][i>>3]+=(1<<(7-(i&7)));
+45 -14
View File
@@ -42,6 +42,7 @@
#include "SCHED/vars.h"
#include "LAYER2/MAC/vars.h"
#include "OCG_vars.h"
#include "intertask_interface_init.h"
#include "unitary_defs.h"
@@ -163,8 +164,8 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,void *UL_dci,int first_rb,int nb_rb,int mc
}
extern void eNB_fep_full(PHY_VARS_eNB *eNB);
extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB);
extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
int main(int argc, char **argv)
{
@@ -196,7 +197,7 @@ int main(int argc, char **argv)
int chMod = 0 ;
int UE_id = 0;
unsigned char nb_rb=25,first_rb=0,mcs=0,round=0,bundling_flag=1;
unsigned char l;
//unsigned char l;
unsigned char awgn_flag = 0 ;
SCM_t channel_model=Rice1;
@@ -245,7 +246,7 @@ int main(int argc, char **argv)
int hold_channel=0;
channel_desc_t *UE2eNB;
uint8_t control_only_flag = 0;
//uint8_t control_only_flag = 0;
int delay = 0;
double maxDoppler = 0.0;
uint8_t srs_flag = 0;
@@ -285,8 +286,15 @@ int main(int argc, char **argv)
printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz);
logInit();
/*
// enable these lines if you need debug info
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
set_comp_log(PHY,LOG_DEBUG,LOG_MED,1);
set_glog(LOG_DEBUG,LOG_MED);
*/
while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF")) != -1) {
switch (c) {
@@ -568,6 +576,11 @@ int main(int argc, char **argv)
osf,
0);
// for a call to phy_reset_ue later we need PHY_vars_UE_g allocated and pointing to UE
PHY_vars_UE_g = (PHY_VARS_UE***)malloc(sizeof(PHY_VARS_UE**));
PHY_vars_UE_g[0] = (PHY_VARS_UE**) malloc(sizeof(PHY_VARS_UE*));
PHY_vars_UE_g[0][0] = UE;
if (nb_rb_set == 0)
nb_rb = eNB->frame_parms.N_RB_UL;
@@ -582,8 +595,6 @@ int main(int argc, char **argv)
txdata = UE->common_vars.txdata;
nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12;
@@ -634,21 +645,29 @@ int main(int argc, char **argv)
UE->pdcch_vars[0][0]->crnti = 14;
UE->frame_parms.soundingrs_ul_config_common.enabled_flag = srs_flag;
UE->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig = 2;
UE->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 7;
UE->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 3;
UE->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = srs_flag;
UE->soundingrs_ul_config_dedicated[eNB_id].duration = 1;
UE->soundingrs_ul_config_dedicated[eNB_id].srs_ConfigIndex = 2;
UE->soundingrs_ul_config_dedicated[eNB_id].srs_Bandwidth = 0;
UE->soundingrs_ul_config_dedicated[eNB_id].transmissionComb = 0;
UE->soundingrs_ul_config_dedicated[eNB_id].freqDomainPosition = 0;
UE->soundingrs_ul_config_dedicated[eNB_id].cyclicShift = 0;
eNB->frame_parms.soundingrs_ul_config_common.enabled_flag = srs_flag;
eNB->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig = 2;
eNB->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 7;
eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex = 1;
eNB->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 3;
eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup = srs_flag;
eNB->soundingrs_ul_config_dedicated[UE_id].duration = 1;
eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex = 2;
eNB->soundingrs_ul_config_dedicated[UE_id].srs_Bandwidth = 0;
eNB->soundingrs_ul_config_dedicated[UE_id].transmissionComb = 0;
eNB->soundingrs_ul_config_dedicated[UE_id].freqDomainPosition = 0;
eNB->soundingrs_ul_config_dedicated[UE_id].cyclicShift = 0;
eNB->cooperation_flag = cooperation_flag;
// eNB->eNB_UE_stats[0].SRS_parameters = UE->SRS_parameters;
eNB->pusch_config_dedicated[UE_id].betaOffset_ACK_Index = beta_ACK;
eNB->pusch_config_dedicated[UE_id].betaOffset_RI_Index = beta_RI;
@@ -659,6 +678,11 @@ int main(int argc, char **argv)
UE->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled = 1;
// disable periodic cqi/ri reporting
UE->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = -1;
UE->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = -1;
printf("PUSCH Beta : ACK %f, RI %f, CQI %f\n",(double)beta_ack[beta_ACK]/8,(double)beta_ri[beta_RI]/8,(double)beta_cqi[beta_CQI]/8);
UE2eNB = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
@@ -677,6 +701,8 @@ int main(int argc, char **argv)
UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0);
if (parallel_flag == 1) {
extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
init_fep_thread(eNB,NULL);
init_td_thread(eNB,NULL);
}
@@ -700,8 +726,8 @@ int main(int argc, char **argv)
}
UE->dlsch_SI[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
UE->dlsch_ra[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
UE->measurements.rank[0] = 0;
UE->transmission_mode[0] = 2;
@@ -843,6 +869,7 @@ int main(int argc, char **argv)
while (!feof(input_fdUL)) {
ret=fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2);
if (ret != 2) printf("ERROR: error reading file\n");
if ((i%4)==0) {
((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL));
@@ -917,6 +944,10 @@ int main(int argc, char **argv)
initialize(&time_vector_rx_dec);
ndi=0;
phy_reset_ue(0,0,0);
UE->UE_mode[eNB_id]=PUSCH;
for (trials = 0; trials<n_frames; trials++) {
// printf("*");
// UE->frame++;
+2 -2
View File
@@ -33,7 +33,7 @@
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "MeasGapConfig.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h"
#endif
@@ -380,7 +380,7 @@ typedef struct {
TDD_Config_t *tdd_Config,
uint8_t *SIwindowsize,
uint16_t *SIperiod
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
MBMS_flag_t MBMS_Flag,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
+1 -1
View File
@@ -86,7 +86,7 @@
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
#else
// Do not allocate unused memory
+1 -1
View File
@@ -122,7 +122,7 @@ typedef struct RrcConfigurationReq_s {
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
long pucch_nCS_AN[MAX_NUM_CCs];
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
long pucch_n1_AN[MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[MAX_NUM_CCs];
+1 -1
View File
@@ -151,7 +151,7 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[CC_id] = enb_properties->properties[enb_id]->pucch_delta_shift[CC_id];
RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[CC_id] = enb_properties->properties[enb_id]->pucch_nRB_CQI[CC_id];
RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[CC_id] = enb_properties->properties[enb_id]->pucch_nCS_AN[CC_id];
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[CC_id] = enb_properties->properties[enb_id]->pucch_n1_AN[CC_id];
#endif
+26 -26
View File
@@ -115,7 +115,7 @@
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
#endif
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
@@ -418,7 +418,7 @@ void enb_config_display(void)
printf( "\tpucch_delta_shift for CC %d:\t%ld:\n",j,enb_properties.properties[i]->pucch_delta_shift[j]);
printf( "\tpucch_nRB_CQI for CC %d:\t%ld:\n",j,enb_properties.properties[i]->pucch_nRB_CQI[j]);
printf( "\tpucch_nCS_AN for CC %d:\t%ld:\n",j,enb_properties.properties[i]->pucch_nCS_AN[j]);
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
printf( "\tpucch_n1_AN for CC %d:\t%ld:\n",j,enb_properties.properties[i]->pucch_n1_AN[j]);
#endif
@@ -427,7 +427,7 @@ void enb_config_display(void)
if (enb_properties.properties[i]->srs_enable[j]) {
printf( "\tsrs_BandwidthConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_BandwidthConfig[j]);
printf( "\tsrs_BandwidthConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_SubframeConfig[j]);
printf( "\tsrs_SubframeConfig for CC %d:\t%ld:\n",j,enb_properties.properties[i]->srs_SubframeConfig[j]);
printf( "\tsrs_ackNackST for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_ackNackST[j]);
printf( "\tsrs_MaxUpPts for CC %d:\t%d:\n",j,enb_properties.properties[i]->srs_MaxUpPts[j]);
}
@@ -589,7 +589,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int pucch_delta_shift = 0;
libconfig_int pucch_nRB_CQI = 0;
libconfig_int pucch_nCS_AN = 0;
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
libconfig_int pucch_n1_AN = 0;
#endif
libconfig_int pdsch_referenceSignalPower = 0;
@@ -868,7 +868,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, &pucch_delta_shift)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_NRB_CQI, &pucch_nRB_CQI)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_NCS_AN, &pucch_nCS_AN)
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PUCCH_N1_AN, &pucch_n1_AN)
#endif
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_PDSCH_RS_EPRE, &pdsch_referenceSignalPower)
@@ -913,7 +913,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode)
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#endif
)) {
@@ -1162,7 +1162,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
lib_config_file_name_pP, i, pucch_nCS_AN);
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
enb_properties.properties[enb_properties_index]->pucch_n1_AN[j] = pucch_n1_AN;
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
@@ -1347,21 +1347,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
lib_config_file_name_pP, i, pusch_p0_Nominal);
if (strcmp(pusch_alpha,"AL0")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al0;
} else if (strcmp(pusch_alpha,"AL04")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al04;
} else if (strcmp(pusch_alpha,"AL05")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al05;
} else if (strcmp(pusch_alpha,"AL06")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al06;
} else if (strcmp(pusch_alpha,"AL07")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al07;
} else if (strcmp(pusch_alpha,"AL08")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al08;
} else if (strcmp(pusch_alpha,"AL09")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al08;
} else if (strcmp(pusch_alpha,"AL1")==0) {
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1;
enb_properties.properties[enb_properties_index]->pusch_alpha[j] = Alpha_r12_al1;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
@@ -1553,47 +1553,47 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
switch (rach_preambleTransMax) {
case 3:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n3;
break;
case 4:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n4;
break;
case 5:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n5;
break;
case 6:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n6;
break;
case 7:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n7;
break;
case 8:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n8;
break;
case 10:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n10;
break;
case 20:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n20;
break;
case 50:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n50;
break;
case 100:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n100;
break;
case 200:
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200;
enb_properties.properties[enb_properties_index]->rach_preambleTransMax[j] = PreambleTransMax_n200;
break;
default:
+1 -1
View File
@@ -154,7 +154,7 @@ typedef struct Enb_properties_s {
long pucch_delta_shift[1+MAX_NUM_CCs];
long pucch_nRB_CQI[1+MAX_NUM_CCs];
long pucch_nCS_AN[1+MAX_NUM_CCs];
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
long pucch_n1_AN[1+MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[1+MAX_NUM_CCs];
+9 -9
View File
@@ -42,7 +42,7 @@
#include "extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-AreaInfo-r9.h"
#include "MBSFN-SubframeConfigList.h"
@@ -93,7 +93,7 @@ rrc_mac_config_req(
uint8_t eNB_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
struct PhysicalConfigDedicated *physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t *sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -110,7 +110,7 @@ rrc_mac_config_req(
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
PMCH_InfoList_r9_t *pmch_InfoList
@@ -217,7 +217,7 @@ rrc_mac_config_req(
if (mac_MainConfig->ul_SCH_Config->periodicBSR_Timer) {
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) *mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
} else {
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity;
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) PeriodicBSR_Timer_r12_infinity;
}
if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx) {
@@ -230,11 +230,11 @@ rrc_mac_config_req(
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t) mac_MainConfig->ul_SCH_Config->retxBSR_Timer;
} else {
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t)MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t)RetxBSR_Timer_r12_sf2560;
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (mac_MainConfig->ext1 && mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer = (uint16_t) *mac_MainConfig->ext1->sr_ProhibitTimer_r9;
@@ -310,7 +310,7 @@ rrc_mac_config_req(
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (sCellToAddMod_r10 != NULL) {
@@ -449,7 +449,7 @@ rrc_mac_config_req(
eNB_mac_inst[Mod_idP].common_channels[0].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
eNB_mac_inst[Mod_idP].common_channels[0].MBMS_flag = MBMS_Flag;
#endif
} else { // UE
@@ -465,7 +465,7 @@ rrc_mac_config_req(
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (mbsfn_AreaInfoList != NULL) {
if (eNB_flagP == 1) {
+7 -7
View File
@@ -57,7 +57,7 @@
#include "RACH-ConfigCommon.h"
#include "MeasObjectToAddModList.h"
#include "MobilityControlInfo.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h"
#include "PMCH-InfoList-r9.h"
@@ -80,7 +80,7 @@
#define SCH_PAYLOAD_SIZE_MAX 4096
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// Mask for identifying subframe for MBMS
#define MBSFN_TDD_SF3 0x80// for TDD
@@ -276,7 +276,7 @@ typedef struct {
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
} __attribute__((__packed__))PCCH_PDU;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/*! \brief MCCH payload */
typedef struct {
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;
@@ -327,7 +327,7 @@ typedef struct {
/*!\brief LCID of padding LCID for DLSCH */
#define SHORT_PADDING 31
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
/*!\brief LCID of MCCH for DL */
#define MCCH_LCHANID 0
@@ -889,7 +889,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// MBMS Flag
uint8_t MBMS_flag;
/// Outgoing MCCH pdu for PHY
@@ -1058,7 +1058,7 @@ typedef struct {
struct RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration
struct PhysicalConfigDedicated *physicalConfigDedicated;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// pointer to RRC PHY configuration SCEll
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
#endif
@@ -1132,7 +1132,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// number of active MBSFN area
uint8_t num_active_mbsfn_area;
/// MBSFN Area Info
+5 -5
View File
@@ -127,7 +127,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
DCI_pdu[CC_id]->Num_common_dci = 0;
DCI_pdu[CC_id]->Num_ue_spec_dci = 0;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active =0;
#endif
eNB_mac_inst[module_idP].frame = frameP;
@@ -305,7 +305,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// TODO process CCCH data req.
break;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
case RRC_MAC_MCCH_DATA_REQ:
LOG_D(MAC, "Received %s from %s: instance %d, frameP %d, eNB_index %d, mbsfn_sync_area %d\n",
@@ -346,7 +346,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
0, // eNB index, unused in eNB
CC_id);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (eNB_mac_inst[module_idP].common_channels[CC_id].MBMS_flag >0) {
@@ -383,10 +383,10 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
if (mac_xface->frame_parms->frame_type == FDD) { //FDD
schedule_ulsch(module_idP,frameP,cooperation_flag,0,4);//,calibration_flag);
} else if ((mac_xface->frame_parms->tdd_config == TDD) || //TDD
} else if ((mac_xface->frame_parms->tdd_config == 0) || //TDD
(mac_xface->frame_parms->tdd_config == 3) ||
(mac_xface->frame_parms->tdd_config == 6)) {
//schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);//,calibration_flag);
schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);//,calibration_flag);
}
#ifndef FLEXRAN_AGENT_SB_IF
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
+3 -3
View File
@@ -61,7 +61,7 @@
#define DEBUG_eNB_SCHEDULER 1
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area)
{
// currently there is one-to-one mapping between sf allocation pattern and sync area
@@ -466,7 +466,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
}
TBS = mac_xface->get_TBS_DL(eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs, mac_xface->frame_parms->N_RB_DL);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// do not let mcch and mtch multiplexing when relaying is active
// for sync area 1, so not transmit data
//if ((i == 0) && ((eNB_mac_inst[module_idP].MBMS_flag != multicast_relay) || (eNB_mac_inst[module_idP].mcch_active==0))) {
@@ -538,7 +538,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// }
#endif
@@ -525,7 +525,7 @@ void swap_UEs(UE_list_t *listP,int nodeiP, int nodejP, int ul_flag)
/*
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
unsigned char generate_mch_header( unsigned char *mac_header,
unsigned char num_sdus,
unsigned short *sdu_lengths,
+1 -1
View File
@@ -885,7 +885,7 @@ abort();
rb_table_index=UE_template->pre_allocated_rb_table_index_ul;
} else {
mcs=10;//cmin (10, openair_daq_vars.target_ue_ul_mcs);
rb_table_index=5; // for PHR
rb_table_index=13; // for PHR
}
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=mcs;
+4 -4
View File
@@ -181,7 +181,7 @@ int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, ui
#ifdef PHY_EMUL
Mac_rlc_xface->Is_cluster_head[Mod_id]=2;//0: MR, 1: CH, 2: not CH neither MR
#endif
/*#ifdef Rel10
/*#if defined(Rel10) || defined(Rel14)
int n;
for (n=0;n<4096;n++)
eNB_mac_inst[Mod_id].MCH_pdu.payload[n] = taus();
@@ -479,7 +479,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->ue_decode_si = ue_decode_si;
mac_xface->ue_decode_p = ue_decode_p;
mac_xface->ue_send_sdu = ue_send_sdu;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
mac_xface->ue_send_mch_sdu = ue_send_mch_sdu;
mac_xface->ue_query_mch = ue_query_mch;
#endif
@@ -517,7 +517,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->phy_config_sib2_eNB = phy_config_sib2_eNB;
mac_xface->phy_config_sib2_ue = phy_config_sib2_ue;
mac_xface->phy_config_afterHO_ue = phy_config_afterHO_ue;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
mac_xface->phy_config_sib13_eNB = phy_config_sib13_eNB;
mac_xface->phy_config_sib13_ue = phy_config_sib13_ue;
#endif
@@ -542,7 +542,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->get_prach_prb_offset = get_prach_prb_offset;
mac_xface->is_prach_subframe = is_prach_subframe;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
mac_xface->get_mch_sdu = get_mch_sdu;
mac_xface->phy_config_dedicated_scell_eNB= phy_config_dedicated_scell_eNB;
mac_xface->phy_config_dedicated_scell_ue= phy_config_dedicated_scell_ue;
+3 -3
View File
@@ -405,7 +405,7 @@ void ue_decode_p(module_id_t module_idP, int CC_id,frame_t frame, uint8_t CH_ind
void ue_send_sdu(module_id_t module_idP, uint8_t CC_id,frame_t frame, sub_frame_t subframe, uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
@param Mod_id Index of module instance
@param frame Frame index
@@ -754,7 +754,7 @@ int rrc_mac_config_req(module_id_t module_idP,
uint8_t eNB_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
struct PhysicalConfigDedicated *physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t *sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -771,7 +771,7 @@ int rrc_mac_config_req(module_id_t module_idP,
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
+11 -11
View File
@@ -499,37 +499,37 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
(rach_ConfigCommon->powerRampingParameters.powerRampingStep<<1); // 2dB increments in ASN.1 definition
int preambleTransMax = -1;
switch (rach_ConfigCommon->ra_SupervisionInfo.preambleTransMax) {
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3:
case PreambleTransMax_n3:
preambleTransMax = 3;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4:
case PreambleTransMax_n4:
preambleTransMax = 4;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5:
case PreambleTransMax_n5:
preambleTransMax = 5;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6:
case PreambleTransMax_n6:
preambleTransMax = 6;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7:
case PreambleTransMax_n7:
preambleTransMax = 7;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8:
case PreambleTransMax_n8:
preambleTransMax = 8;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10:
case PreambleTransMax_n10:
preambleTransMax = 10;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20:
case PreambleTransMax_n20:
preambleTransMax = 20;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50:
case PreambleTransMax_n50:
preambleTransMax = 50;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100:
case PreambleTransMax_n100:
preambleTransMax = 100;
break;
case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200:
case PreambleTransMax_n200:
preambleTransMax = 200;
break;
}
+26 -26
View File
@@ -93,8 +93,8 @@ void ue_init_mac(module_id_t module_idP)
// default values as deined in 36.331 sec 9.2.2
LOG_I(MAC,"[UE%d] Applying default macMainConfig\n",module_idP);
//UE_mac_inst[module_idP].scheduling_info.macConfig=NULL;
UE_mac_inst[module_idP].scheduling_info.retxBSR_Timer= MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240;
UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer=MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity;
UE_mac_inst[module_idP].scheduling_info.retxBSR_Timer= RetxBSR_Timer_r12_sf10240;
UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer=PeriodicBSR_Timer_r12_infinity;
UE_mac_inst[module_idP].scheduling_info.periodicPHR_Timer = MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
UE_mac_inst[module_idP].scheduling_info.prohibitPHR_Timer = MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
UE_mac_inst[module_idP].scheduling_info.PathlossChange_db = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
@@ -579,7 +579,7 @@ void ue_decode_p(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_in
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
unsigned char *parse_mch_header(unsigned char *mac_header,
unsigned char *num_sdu,
unsigned char *rx_lcids,
@@ -1352,7 +1352,7 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
}
// periodicBSR-Timer expires, trigger BSR
if ((UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer != MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity)
if ((UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer != PeriodicBSR_Timer_r12_infinity)
&& (UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF == 0)){
// Trigger BSR Periodic
UE_mac_inst[module_idP].BSR_reporting_active |= BSR_TRIGGER_PERIODIC;
@@ -1904,7 +1904,7 @@ if (UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] == LCID_NOT_EMPTY)
UE_mac_inst[module_idP].scheduling_info.retxBSR_SF);
// Reset Periodic Timer except when BSR is truncated
if ((bsr_t == NULL) && (UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer != MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity))
if ((bsr_t == NULL) && (UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer != PeriodicBSR_Timer_r12_infinity))
{
UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF = get_sf_periodicBSRTimer(UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer);
@@ -2530,63 +2530,63 @@ int get_sf_periodicBSRTimer(uint8_t sf_offset)
{
switch (sf_offset) {
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf5:
case PeriodicBSR_Timer_r12_sf5:
return 5;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf10:
case PeriodicBSR_Timer_r12_sf10:
return 10;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf16:
case PeriodicBSR_Timer_r12_sf16:
return 16;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf20:
case PeriodicBSR_Timer_r12_sf20:
return 20;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf32:
case PeriodicBSR_Timer_r12_sf32:
return 32;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf40:
case PeriodicBSR_Timer_r12_sf40:
return 40;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64:
case PeriodicBSR_Timer_r12_sf64:
return 64;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf80:
case PeriodicBSR_Timer_r12_sf80:
return 80;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf128:
case PeriodicBSR_Timer_r12_sf128:
return 128;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf160:
case PeriodicBSR_Timer_r12_sf160:
return 160;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf320:
case PeriodicBSR_Timer_r12_sf320:
return 320;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf640:
case PeriodicBSR_Timer_r12_sf640:
return 640;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf1280:
case PeriodicBSR_Timer_r12_sf1280:
return 1280;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf2560:
case PeriodicBSR_Timer_r12_sf2560:
return 2560;
break;
case MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity:
case PeriodicBSR_Timer_r12_infinity:
default:
return 0xFFFF;
break;
@@ -2597,27 +2597,27 @@ int get_sf_retxBSRTimer(uint8_t sf_offset)
{
switch (sf_offset) {
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320:
case RetxBSR_Timer_r12_sf320:
return 320;
break;
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf640:
case RetxBSR_Timer_r12_sf640:
return 640;
break;
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf1280:
case RetxBSR_Timer_r12_sf1280:
return 1280;
break;
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560:
case RetxBSR_Timer_r12_sf2560:
return 2560;
break;
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf5120:
case RetxBSR_Timer_r12_sf5120:
return 5120;
break;
case MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240:
case RetxBSR_Timer_r12_sf10240:
return 10240;
break;
+1 -1
View File
@@ -132,7 +132,7 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
DCI1C_5MHz_t MCCH_alloc_pdu;
#endif
+7 -7
View File
@@ -1070,7 +1070,7 @@ rrc_pdcp_config_asn1_req (
uint8_t *const kRRCenc_pP,
uint8_t *const kRRCint_pP,
uint8_t *const kUPenc_pP
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
#endif
,rb_id_t *const defaultDRB
@@ -1097,7 +1097,7 @@ rrc_pdcp_config_asn1_req (
hashtable_rc_t h_rc;
hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_defaultDRB_rc;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int i,j;
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
@@ -1395,7 +1395,7 @@ rrc_pdcp_config_asn1_req (
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
@@ -1590,7 +1590,7 @@ pdcp_config_req_asn1 (
memset(pdcp_pP, 0, sizeof(pdcp_t));
break;
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
case CONFIG_ACTION_MBMS_ADD:
case CONFIG_ACTION_MBMS_MODIFY:
@@ -1908,7 +1908,7 @@ void pdcp_layer_init(void)
{
module_id_t instance;
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
mbms_session_id_t session_id;
mbms_service_id_t service_id;
#endif
@@ -1920,7 +1920,7 @@ void pdcp_layer_init(void)
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
for (instance = 0; instance < NUMBER_OF_UE_MAX; instance++) {
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
for (service_id = 0; service_id < maxServiceCount; service_id++) {
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
@@ -1934,7 +1934,7 @@ void pdcp_layer_init(void)
for (instance = 0; instance < NUMBER_OF_eNB_MAX; instance++) {
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
for (service_id = 0; service_id < maxServiceCount; service_id++) {
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
+4 -4
View File
@@ -74,7 +74,7 @@
#include "DRB-ToAddModList.h"
#include "SRB-ToAddMod.h"
#include "SRB-ToAddModList.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MBMS-SessionInfoList-r9.h"
#include "PMCH-InfoList-r9.h"
#endif
@@ -184,7 +184,7 @@ typedef struct pdcp_s {
} pdcp_t;
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
typedef struct pdcp_mbms_s {
boolean_t instanciated_instance;
rb_id_t rb_id;
@@ -284,7 +284,7 @@ public_pdcp(
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,PMCH_InfoList_r9_t *pmch_InfoList_r9
#endif
,rb_id_t *const defaultDRB
@@ -448,7 +448,7 @@ public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];)
protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[NUMBER_OF_UE_MAX];)
protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[NUMBER_OF_UE_MAX];) // for noS1 mode
protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;)
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#endif
+1 -1
View File
@@ -431,7 +431,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
if ((data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ ||
(data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST) /*TRAFFIC_IPV4_TYPE_MULTICAST */ ||
(data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_BROADCAST) /*TRAFFIC_IPV4_TYPE_BROADCAST */ ) {
#if defined (Rel10)
#if defined(Rel10) || defined(Rel14)
PDCP_TRANSMISSION_MODE_TRANSPARENT;
#else
pdcp_mode= PDCP_TRANSMISSION_MODE_DATA;
+12
View File
@@ -153,9 +153,15 @@ config_req_rlc_am (
uint32_t pollPDU_tab[PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,1024}; // What is PollPDU_pInfinity??? 1024 for now
uint32_t maxRetxThreshold_tab[UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
uint32_t pollByte_tab[PollByte_spare1]= {25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,10000}; // What is PollByte_kBinfinity??? 10000 for now
#if defined(Rel14)
uint32_t PollRetransmit_tab[T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
#else
uint32_t PollRetransmit_tab[T_PollRetransmit_spare9]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
uint32_t am_t_Reordering_tab[T_Reordering_spare1]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare8]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
#endif
//-----------------------------------------------------------------------------
void config_req_rlc_am_asn1 (
@@ -178,9 +184,15 @@ void config_req_rlc_am_asn1 (
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= UL_AM_RLC__maxRetxThreshold_t32) &&
(config_am_pP->ul_AM_RLC.pollPDU<=PollPDU_pInfinity) &&
(config_am_pP->ul_AM_RLC.pollByte<PollByte_spare1) &&
#if defined(Rel14)
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare5) &&
(config_am_pP->dl_AM_RLC.t_Reordering<32) &&
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare2) ) {
#else
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare9) &&
(config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) &&
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ) {
#endif
MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
@@ -78,7 +78,11 @@ void config_req_rlc_um (
}
}
//-----------------------------------------------------------------------------
#if defined(Rel14)
const uint32_t const t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
#else
const uint32_t const t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
#endif
void config_req_rlc_um_asn1 (
const protocol_ctxt_t* const ctxt_pP,
@@ -99,7 +103,7 @@ void config_req_rlc_um_asn1 (
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
#if Rel10
#if defined(Rel10) || defined(Rel14)
if (mbms_flagP) {
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
@@ -194,7 +198,11 @@ void config_req_rlc_um_asn1 (
return;
}
#if defined(Rel14)
if (dl_rlc_pP->t_Reordering<32) {
#else
if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
#endif
t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
} else {
LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID T_Reordering %ld, RLC NOT CONFIGURED\n",
+8 -8
View File
@@ -328,7 +328,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t log_ch_id = 0;
#endif
@@ -342,7 +342,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
sdu_sizeP,
sdu_pP);
#endif
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#else
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
#endif
@@ -366,13 +366,13 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
DevAssert(sdu_pP != NULL);
DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0);
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -499,7 +499,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
} else { /* MBMS_flag != 0 */
// LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
if (sdu_pP != NULL) {
@@ -538,7 +538,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
else /* MBMS_flag != 0 */
{
free_mem_block(sdu_pP, __func__);
LOG_E(RLC, "MBMS_flag != 0 while Rel10 is not defined...\n");
LOG_E(RLC, "MBMS_flag != 0 while Rel10/Rel14 is not defined...\n");
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
return RLC_OP_STATUS_BAD_PARAMETER;
@@ -617,7 +617,7 @@ rlc_module_init (void)
AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed");
for (module_id1=0; module_id1 < NUMBER_OF_UE_MAX; module_id1++) {
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_ue[module_id1][k].service_id = 0;
@@ -632,7 +632,7 @@ rlc_module_init (void)
}
for (module_id1=0; module_id1 < NUMBER_OF_eNB_MAX; module_id1++) {
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_eNB[module_id1][k].service_id = 0;
+3 -3
View File
@@ -55,7 +55,7 @@
# include "SRB-ToAddModList.h"
# include "DRB-ToReleaseList.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "PMCH-InfoList-r9.h"
#endif
@@ -224,7 +224,7 @@ typedef struct rlc_mbms_id_s {
mbms_session_id_t session_id;
} rlc_mbms_id_t;
#if !defined(Rel10)
#if !defined(Rel10) && !defined(Rel14)
# if !defined(maxServiceCount)
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
# define maxServiceCount 1
@@ -309,7 +309,7 @@ private_rlc_mac(struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t,
//-----------------------------------------------------------------------------
// PUBLIC INTERFACE WITH RRC
//-----------------------------------------------------------------------------
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
* \brief Function for RRC to configure a Radio Bearer.
* \param[in] ctxtP Running context.
+9 -9
View File
@@ -42,7 +42,7 @@
#include "SRB-ToAddMod.h"
#include "SRB-ToAddModList.h"
#include "DL-UM-RLC.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "PMCH-InfoList-r9.h"
#endif
@@ -53,7 +53,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
const SRB_ToAddModList_t * const srb2add_listP,
const DRB_ToAddModList_t * const drb2add_listP,
const DRB_ToReleaseList_t * const drb2release_listP
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
,const PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP
#endif
)
@@ -69,7 +69,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
rlc_union_t *rlc_union_p = NULL;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
int i, j;
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
@@ -344,7 +344,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
}
}
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
@@ -487,7 +487,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_lcid_rc;
rlc_union_t *rlc_union_p = NULL;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
rlc_mbms_id_t *mbms_id_p = NULL;
#endif
#ifdef OAI_EMU
@@ -498,7 +498,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
/* for no gcc warnings */
(void)lcid;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -592,7 +592,7 @@ rlc_union_t* rrc_rlc_add_rlc (
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_lcid_rc;
rlc_union_t *rlc_union_p = NULL;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t lcid = 0;
#endif
@@ -608,7 +608,7 @@ rlc_union_t* rrc_rlc_add_rlc (
AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -650,7 +650,7 @@ rlc_union_t* rrc_rlc_add_rlc (
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flagP == TRUE) {
LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
+22 -15
View File
@@ -36,7 +36,8 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -109,7 +110,7 @@ void IAL_NAS_ioctl_init(int inst)
{
struct nas_msg_statistic_reply *msgrep;
int err,rc;
int err;
sprintf(gifr.name, "oai%d",inst);
@@ -132,7 +133,6 @@ void IAL_NAS_ioctl_init(int inst)
if (err<0) {
printf("IOCTL error, err=%d\n",err);
rc = -1;
}
printf("tx_packets = %u, rx_packets = %u\n", msgrep->tx_packets, msgrep->rx_packets);
@@ -151,19 +151,13 @@ void IAL_NAS_ioctl_init(int inst)
int main(int argc,char **argv)
//---------------------------------------------------------------------------
{
int done = 0, rc = 0, meas_polling_counter = 0;
fd_set readfds;
struct timeval tv;
int i = 0;
int err = 0;
char * buffer;
int c = 0;
int action=0,rbset=0,cxset=0,instset=0,saddr_ipv4set=0,saddr_ipv6set=0,daddr_ipv4set=0,daddr_ipv6set=0,dscpset=0,mpls_outlabelset=0,mpls_inlabelset=0;
char rb[100],cx[100],dscp[100],inst[100],mpls_outgoinglabel[100],mpls_incominglabel[100];
int index = 0;
struct nas_msg_rb_establishment_request *msgreq = NULL;
struct nas_msg_class_add_request *msgreq_class = NULL;
in_addr_t saddr_ipv4,daddr_ipv4;
in_addr_t saddr_ipv4 = 0,daddr_ipv4 = 0;
struct in6_addr saddr_ipv6,daddr_ipv6;
unsigned int mpls_outlabel=0,mpls_inlabel=0;
@@ -213,15 +207,21 @@ int main(int argc,char **argv)
mpls_inlabelset=1;
break;
case 's':
inet_aton(optarg,&saddr_ipv4);
case 's': {
struct in_addr a;
inet_aton(optarg,&a);
saddr_ipv4 = a.s_addr;
saddr_ipv4set = 1;
break;
}
case 't':
inet_aton(optarg,&daddr_ipv4);
case 't': {
struct in_addr a;
inet_aton(optarg,&a);
daddr_ipv4 = a.s_addr;
daddr_ipv4set = 1;
break;
}
case 'x':
printf("IPv6: %s\n",optarg);
@@ -303,7 +303,7 @@ int main(int argc,char **argv)
if (action == ADD_RB) {
gifr.type = NAS_MSG_RB_ESTABLISHMENT_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
if (saddr_ipv4set == 1) {
@@ -329,6 +329,7 @@ int main(int argc,char **argv)
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
msgreq_class->rab_id = atoi(rb);
msgreq_class->lcr = atoi(cx);
@@ -340,6 +341,7 @@ int main(int argc,char **argv)
msgreq_class->saddr.ipv4 = daddr_ipv4;
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
}
if (saddr_ipv6set == 1) {
@@ -370,6 +372,7 @@ int main(int argc,char **argv)
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
msgreq_class->rab_id = atoi(rb);
msgreq_class->lcr = atoi(cx);
@@ -380,6 +383,7 @@ int main(int argc,char **argv)
memcpy(&msgreq_class->saddr.ipv6,&daddr_ipv6,16);
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
}
@@ -411,6 +415,7 @@ int main(int argc,char **argv)
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
msgreq_class->rab_id = atoi(rb);
msgreq_class->lcr = atoi(cx);
@@ -430,12 +435,14 @@ int main(int argc,char **argv)
gifr.type = NAS_MSG_CLASS_ADD_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
}
} else if (action == DEL_RB) {
gifr.type = NAS_MSG_RB_RELEASE_REQUEST;
err=ioctl(fd, NAS_IOCTL_RRM, &gifr);
if (err == -1) perror("ioctl");
}
+3 -3
View File
@@ -605,12 +605,12 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
//---------------------------------------------------------------------------
struct classifier_entity *p, *sp;
uint8_t *protocolh,version;
uint8_t protocol, dscp, exp,label;
uint8_t protocol, dscp /*, exp,label*/ ;
uint16_t classref;
struct cx_entity *cx;
unsigned int i;
//unsigned int i;
unsigned int router_adv = 0;
//unsigned int router_adv = 0;
struct net_device *dev=nasdev[inst];
struct nas_priv *gpriv=netdev_priv(dev);
+6 -6
View File
@@ -59,14 +59,14 @@ void nas_COMMON_receive(uint16_t dlen,
struct nas_priv *gpriv=netdev_priv(nasdev[inst]);
uint32_t odaddr,osaddr;
int i;
//int i;
unsigned char protocol;
unsigned char *addr,*daddr,*saddr,*ifaddr,sn;
unsigned char /**addr,*/ *daddr,*saddr,*ifaddr /*,sn*/;
struct udphdr *uh;
struct tcphdr *th;
//struct udphdr *uh;
//struct tcphdr *th;
uint16_t *cksum,check;
struct iphdr *network_header;
@@ -340,7 +340,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
int i;
#endif
unsigned int bytes_wrote;
unsigned char j;
//unsigned char j;
// Start debug information
#ifdef NAS_DEBUG_SEND
printk("NAS_COMMON_QOS_SEND - inst %d begin \n",inst);
@@ -595,7 +595,7 @@ struct rb_entity *nas_COMMON_search_rb(struct cx_entity *cx, nasRadioBearerId_t
struct classifier_entity *nas_COMMON_search_class_for_rb(nasRadioBearerId_t rab_id,struct nas_priv *priv)
{
struct rb_entity *rb;
//struct rb_entity *rb;
int dscp;
struct classifier_entity *rclass;
-1
View File
@@ -739,7 +739,6 @@ void nas_set_msg_imei_reply(struct nas_msg_l2id_reply *msgrep,
//---------------------------------------------------------------------------
struct cx_entity *cx;
int lcr=0; // Temp lcr->mt =0
int i;
cx=nas_COMMON_search_cx(lcr,priv);
+2 -2
View File
@@ -387,7 +387,7 @@ void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb,
{
//---------------------------------------------------------------------------
struct nas_ue_dc_element *p;
char data_type = 'A';
//char data_type = 'A';
int bytes_wrote=0;
// Start debug information
@@ -466,7 +466,7 @@ void nas_mesh_DC_send_peer_sig_data_request(struct cx_entity *cx, uint8_t sig_ca
struct nas_ue_dc_element *p;
uint8_t nas_data[10];
unsigned int nas_length;
char data_type = 'Z';
//char data_type = 'Z';
int bytes_wrote=0;
// Start debug information
+2 -2
View File
@@ -50,7 +50,7 @@
static struct sock *nas_nl_sk = NULL;
static int exit_netlink_thread=0;
static int nas_netlink_rx_thread(void *);
//static int nas_netlink_rx_thread(void *);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
struct netlink_kernel_cfg oai_netlink_cfg;
#endif
@@ -76,7 +76,7 @@ static void nas_nl_data_ready (struct sk_buff *skb)
//nasmesh_unlock();
struct nlmsghdr *nlh = NULL;
int j;
//int j;
if (skb) {
+4 -4
View File
@@ -112,7 +112,7 @@ typedef struct {
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// Configure Common PHY parameters from SIB13
void (*phy_config_sib13_eNB)(module_id_t Mod_id,int CC_id, int mbsfn_Area_idx,
long mbsfn_AreaId_r9);
@@ -127,7 +127,7 @@ typedef struct {
void (*phy_config_dedicated_eNB)(module_id_t Mod_id,int CC_id,rnti_t rnti,
struct PhysicalConfigDedicated *physicalConfigDedicated);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// Get MCH sdu and corresponding MCS for particular MBSFN subframe
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id, int CC_id, frame_t frameP,sub_frame_t subframe);
#endif
@@ -154,7 +154,7 @@ typedef struct {
/// Send a received DLSCH sdu to MAC
void (*ue_send_sdu)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,sub_frame_t subframe,uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// Send a received MCH sdu to MAC
void (*ue_send_mch_sdu)(module_id_t Mod_id,uint8_t CC_id, frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area);
@@ -202,7 +202,7 @@ typedef struct {
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/// Configure Common PHY parameters from SIB13
void (*phy_config_sib13_ue)(uint8_t Mod_id,int CC_id, uint8_t eNB_index,int mbsfn_Area_idx,
long mbsfn_AreaId_r9);
+4 -4
View File
@@ -222,7 +222,7 @@ mac_rrc_data_req(
return (Sdu_size);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if((Srb_id & RAB_OFFSET) == MCCH) {
if(eNB_rrc_inst[Mod_idP].carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
@@ -281,7 +281,7 @@ mac_rrc_data_req(
//return(0);
}
#endif //Rel10
#endif //Rel10 || Rel14
} else { //This is an UE
LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
@@ -428,7 +428,7 @@ mac_rrc_data_ind(
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if ((srb_idP & RAB_OFFSET) == MCCH) {
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n",
@@ -459,7 +459,7 @@ mac_rrc_data_ind(
#endif
}
#endif // Rel10
#endif // Rel10 || Rel14
} else { // This is an eNB
Srb_info = &eNB_rrc_inst[module_idP].carrier[CC_id].Srb0;
+43 -18
View File
@@ -58,7 +58,7 @@
#include "RRCConnectionSetup.h"
#include "SRB-ToAddModList.h"
#include "DRB-ToAddModList.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h"
//#define MRB1 1
#endif
@@ -614,7 +614,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
BCCH_DL_SCH_Message_t *bcch_message,
SystemInformationBlockType2_t **sib2,
SystemInformationBlockType3_t **sib3
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
SystemInformationBlockType13_r9_t **sib13,
uint8_t MBMS_flag
@@ -625,7 +625,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
)
{
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part;
MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList;
MBSFN_AreaInfoList_r9_t *MBSFNArea_list;
@@ -650,7 +650,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
exit(-1);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
LOG_I(RRC,"[eNB %d] Configuration SIB2/3, MBMS = %d\n", Mod_id, MBMS_flag);
#else
LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id);
@@ -666,7 +666,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
*sib2 = &sib2_part->choice.sib2;
*sib3 = &sib3_part->choice.sib3;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flag > 0) {
sib13_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
@@ -680,7 +680,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
// sib2
(*sib2)->ac_BarringInfo = NULL;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#if 0
(*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL;
(*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL;
@@ -769,7 +769,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
= configuration->pucch_nRB_CQI[CC_id];
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN
= configuration->pucch_nCS_AN[CC_id];
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN
= configuration->pucch_n1_AN[CC_id];
#endif
@@ -929,7 +929,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->freqInfo.ul_Bandwidth = NULL;
// (*sib2)->mbsfn_SubframeConfigList = NULL;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flag > 0) {
LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2\n");
@@ -985,7 +985,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->timeAlignmentTimerCommon=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
/// (*SIB3)
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(*sib3)->ext1 = NULL;
#if 0
(*sib3)->s_IntraSearch_v920=NULL;
@@ -1020,7 +1020,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
// SIB13
// fill in all elements of SIB13 if present
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flag > 0 ) {
// Notification for mcch change
@@ -1102,7 +1102,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
sib2_part);
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib3_part);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (MBMS_flag > 0) {
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part);
@@ -1563,7 +1563,7 @@ do_RRCConnectionSetup(
// CQI ReportConfig
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic));
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic= CQI_ReportModeAperiodic_rm30;
#else
*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI
@@ -1593,8 +1593,33 @@ do_RRCConnectionSetup(
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=45;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb=0;
if (frame_parms->frame_type==FDD) {
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=0)
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n",
enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]);
if (ue_context_pP->local_uid >=20)
LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
ue_context_pP->local_uid);
//the current code will allow for 20 UEs - to be revised for more
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=7+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
}
else {
if (enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id]!=7) {
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n",
enb_properties.properties[ctxt_pP->module_id]->srs_SubframeConfig[CC_id],
enb_properties.properties[ctxt_pP->module_id]->tdd_config[CC_id]);
}
if (ue_context_pP->local_uid >=6)
LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
ue_context_pP->local_uid);
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
}
LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb);
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0;
}
@@ -1776,7 +1801,7 @@ do_SecurityModeCommand(
SecurityModeCommand__criticalExtensions__c1_PR_securityModeCommand_r8;
// the two following information could be based on the mod_id
dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm
= (e_SecurityAlgorithmConfig__cipheringAlgorithm)cipheringAlgorithm;
= (CipheringAlgorithm_r12_t)cipheringAlgorithm;
dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm
= (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm;
@@ -1929,7 +1954,7 @@ do_RRCConnectionReconfiguration(
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
*dedicatedInfoNASList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, SCellToAddMod_r10_t *SCell_config
#endif
)
@@ -2224,7 +2249,7 @@ uint8_t do_RRCConnectionRelease(
uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t sync_area,
@@ -2396,7 +2421,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension));
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult=rsrp_s;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrqResult=rsrq_s;
#else
+3 -3
View File
@@ -93,7 +93,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
BCCH_DL_SCH_Message_t *systemInformation,
SystemInformationBlockType2_t **sib2,
SystemInformationBlockType3_t **sib3
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
SystemInformationBlockType13_r9_t **sib13,
uint8_t MBMS_flag
@@ -197,7 +197,7 @@ do_RRCConnectionReconfiguration(
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, SCellToAddMod_r10_t *SCell_config
#endif
);
@@ -238,7 +238,7 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_
* @returns Size of encoded bit stream in bytes
*/
uint8_t do_MCCHMessage(uint8_t *buffer);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/***
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
File diff suppressed because it is too large Load Diff
+60 -9
View File
@@ -61,7 +61,7 @@
#include "RRCConnectionReestablishmentRequest.h"
#include "BCCH-DL-SCH-Message.h"
#include "BCCH-BCH-Message.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h"
#include "MBSFNAreaConfiguration-r9.h"
#include "SCellToAddMod-r10.h"
@@ -71,8 +71,59 @@
#include "UE-EUTRA-Capability.h"
#include "MeasResults.h"
/* correct Rel(8|10)/Rel14 differences
* the code is in favor of Rel14, those defines do the translation
*/
#if !defined(Rel14)
# define CipheringAlgorithm_r12_t e_SecurityAlgorithmConfig__cipheringAlgorithm
# define CipheringAlgorithm_r12_eea0 SecurityAlgorithmConfig__cipheringAlgorithm_eea0
# define CipheringAlgorithm_r12_eea1 SecurityAlgorithmConfig__cipheringAlgorithm_eea1
# define CipheringAlgorithm_r12_eea2 SecurityAlgorithmConfig__cipheringAlgorithm_eea2
# define CipheringAlgorithm_r12_spare1 SecurityAlgorithmConfig__cipheringAlgorithm_spare1
# define Alpha_r12_al0 UplinkPowerControlCommon__alpha_al0
# define Alpha_r12_al04 UplinkPowerControlCommon__alpha_al04
# define Alpha_r12_al05 UplinkPowerControlCommon__alpha_al05
# define Alpha_r12_al06 UplinkPowerControlCommon__alpha_al06
# define Alpha_r12_al07 UplinkPowerControlCommon__alpha_al07
# define Alpha_r12_al08 UplinkPowerControlCommon__alpha_al08
# define Alpha_r12_al09 UplinkPowerControlCommon__alpha_al09
# define Alpha_r12_al1 UplinkPowerControlCommon__alpha_al1
# define PreambleTransMax_n3 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3
# define PreambleTransMax_n4 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4
# define PreambleTransMax_n5 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5
# define PreambleTransMax_n6 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6
# define PreambleTransMax_n7 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7
# define PreambleTransMax_n8 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8
# define PreambleTransMax_n10 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10
# define PreambleTransMax_n20 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20
# define PreambleTransMax_n50 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50
# define PreambleTransMax_n100 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100
# define PreambleTransMax_n200 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200
# define PeriodicBSR_Timer_r12_sf5 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf5
# define PeriodicBSR_Timer_r12_sf10 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf10
# define PeriodicBSR_Timer_r12_sf16 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf16
# define PeriodicBSR_Timer_r12_sf20 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf20
# define PeriodicBSR_Timer_r12_sf32 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf32
# define PeriodicBSR_Timer_r12_sf40 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf40
# define PeriodicBSR_Timer_r12_sf64 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64
# define PeriodicBSR_Timer_r12_sf80 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf80
# define PeriodicBSR_Timer_r12_sf128 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf128
# define PeriodicBSR_Timer_r12_sf160 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf160
# define PeriodicBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf320
# define PeriodicBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf640
# define PeriodicBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf1280
# define PeriodicBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf2560
# define PeriodicBSR_Timer_r12_infinity MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
# define RetxBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320
# define RetxBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf640
# define RetxBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf1280
# define RetxBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560
# define RetxBSR_Timer_r12_sf5120 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf5120
# define RetxBSR_Timer_r12_sf10240 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240
#endif
// This corrects something generated by asn1c which is different between Rel8 and Rel10
#ifndef Rel10
#if !defined(Rel10) && !defined(Rel14)
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3
@@ -86,7 +137,7 @@
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
#endif
/*
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
#endif
@@ -194,7 +245,7 @@ typedef struct UE_RRC_INFO_s {
uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus;
uint32_t SIcnt;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
@@ -301,7 +352,7 @@ typedef struct HANDOVER_INFO_UE_s {
typedef struct eNB_RRC_UE_s {
uint8_t primaryCC_id;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t sCell_config[2];
#endif
SRB_ToAddModList_t* SRB_configList;
@@ -329,7 +380,7 @@ typedef struct eNB_RRC_UE_s {
uint8_t kenb[32];
#endif
/* Used integrity/ciphering algorithms */
e_SecurityAlgorithmConfig__cipheringAlgorithm ciphering_algorithm;
CipheringAlgorithm_r12_t ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status;
@@ -400,7 +451,7 @@ typedef struct {
SystemInformationBlockType1_t *sib1;
SystemInformationBlockType2_t *sib2;
SystemInformationBlockType3_t *sib3;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
SystemInformationBlockType13_r9_t *sib13;
uint8_t MBMS_flag;
uint8_t num_mbsfn_sync_area;
@@ -489,7 +540,7 @@ typedef struct UE_RRC_INST_s {
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
uint8_t MBMS_flag;
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
@@ -535,7 +586,7 @@ typedef struct UE_RRC_INST_s {
#endif
/* Used integrity/ciphering algorithms */
e_SecurityAlgorithmConfig__cipheringAlgorithm ciphering_algorithm;
CipheringAlgorithm_r12_t ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
} UE_RRC_INST;
+50 -48
View File
@@ -53,7 +53,7 @@
#include "DL-DCCH-Message.h"
#include "BCCH-DL-SCH-Message.h"
#include "PCCH-Message.h"
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h"
#endif
#include "MeasConfig.h"
@@ -145,7 +145,7 @@ static uint8_t check_trigger_meas_event(
Q_OffsetRange_t ofn, Q_OffsetRange_t ocn, Hysteresis_t hys,
Q_OffsetRange_t ofs, Q_OffsetRange_t ocs, long a3_offset, TimeToTrigger_t ttt);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
#endif
@@ -256,7 +256,7 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
UE_rrc_inst[ctxt_pP->module_id].sib9[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType9_t) );
UE_rrc_inst[ctxt_pP->module_id].sib10[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType10_t) );
UE_rrc_inst[ctxt_pP->module_id].sib11[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType11_t) );
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType12_r9_t) );
UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType13_r9_t) );
#endif
@@ -268,7 +268,7 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIcnt = 0;
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
//-----------------------------------------------------------------------------
#if 0
static void init_MCCH_UE(module_id_t ue_mod_idP, uint8_t eNB_index)
@@ -328,8 +328,8 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_
UE_rrc_inst[ctxt.module_id].Srb1[eNB_index].Active=0;
UE_rrc_inst[ctxt.module_id].Srb2[eNB_index].Active=0;
UE_rrc_inst[ctxt.module_id].HandoverInfoUe.measFlag=1;
UE_rrc_inst[ctxt.module_id].ciphering_algorithm = SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
#ifdef Rel10
UE_rrc_inst[ctxt.module_id].ciphering_algorithm = CipheringAlgorithm_r12_eea0;
#if defined(Rel10) || defined(Rel14)
UE_rrc_inst[ctxt.module_id].integrity_algorithm = SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920;
#else
UE_rrc_inst[ctxt.module_id].integrity_algorithm = SecurityAlgorithmConfig__integrityProtAlgorithm_reserved;
@@ -821,7 +821,7 @@ rrc_ue_process_measConfig(
rrc_mac_config_req(ctxt_pP->module_id,0,ENB_FLAG_NO,0,eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -838,7 +838,7 @@ rrc_ue_process_measConfig(
NULL,
NULL,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *)NULL,
@@ -1270,7 +1270,7 @@ rrc_ue_process_radioResourceConfigDedicated(
kRRCenc,
kRRCint,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,(PMCH_InfoList_r9_t *)NULL
#endif
,NULL);
@@ -1280,7 +1280,7 @@ rrc_ue_process_radioResourceConfigDedicated(
radioResourceConfigDedicated->srb_ToAddModList,
(DRB_ToAddModList_t*)NULL,
(DRB_ToReleaseList_t*)NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,(PMCH_InfoList_r9_t *)NULL
#endif
);
@@ -1319,7 +1319,7 @@ rrc_ue_process_radioResourceConfigDedicated(
rrc_mac_config_req(ctxt_pP->module_id,0,ENB_FLAG_NO,0,eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -1336,7 +1336,7 @@ rrc_ue_process_radioResourceConfigDedicated(
NULL,
NULL,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *)NULL,
@@ -1377,7 +1377,7 @@ rrc_ue_process_radioResourceConfigDedicated(
rrc_mac_config_req(ctxt_pP->module_id,0,ENB_FLAG_NO,0,eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -1394,7 +1394,7 @@ rrc_ue_process_radioResourceConfigDedicated(
NULL,
NULL,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *)NULL,
@@ -1450,7 +1450,7 @@ rrc_ue_process_radioResourceConfigDedicated(
NULL,
NULL,
kUPenc
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,(PMCH_InfoList_r9_t *)NULL
#endif
, UE_rrc_inst[ctxt_pP->module_id].defaultDRB);
@@ -1460,7 +1460,7 @@ rrc_ue_process_radioResourceConfigDedicated(
(SRB_ToAddModList_t*)NULL,
radioResourceConfigDedicated->drb_ToAddModList,
(DRB_ToReleaseList_t*)NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,(PMCH_InfoList_r9_t *)NULL
#endif
);
@@ -1484,7 +1484,7 @@ rrc_ue_process_radioResourceConfigDedicated(
rrc_mac_config_req(ctxt_pP->module_id,0,ENB_FLAG_NO,0,eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
UE_rrc_inst[ctxt_pP->module_id].physicalConfigDedicated[eNB_index],
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -1501,7 +1501,7 @@ rrc_ue_process_radioResourceConfigDedicated(
NULL,
NULL,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *)NULL,
@@ -1555,26 +1555,26 @@ rrc_ue_process_securityModeCommand(
ctxt_pP->module_id,ctxt_pP->frame,eNB_index);
switch (securityModeCommand->criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm) {
case SecurityAlgorithmConfig__cipheringAlgorithm_eea0:
case CipheringAlgorithm_r12_eea0:
LOG_I(RRC,"[UE %d] Security algorithm is set to eea0\n",
ctxt_pP->module_id);
securityMode= SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
securityMode= CipheringAlgorithm_r12_eea0;
break;
case SecurityAlgorithmConfig__cipheringAlgorithm_eea1:
case CipheringAlgorithm_r12_eea1:
LOG_I(RRC,"[UE %d] Security algorithm is set to eea1\n",ctxt_pP->module_id);
securityMode= SecurityAlgorithmConfig__cipheringAlgorithm_eea1;
securityMode= CipheringAlgorithm_r12_eea1;
break;
case SecurityAlgorithmConfig__cipheringAlgorithm_eea2:
case CipheringAlgorithm_r12_eea2:
LOG_I(RRC,"[UE %d] Security algorithm is set to eea2\n",
ctxt_pP->module_id);
securityMode = SecurityAlgorithmConfig__cipheringAlgorithm_eea2;
securityMode = CipheringAlgorithm_r12_eea2;
break;
default:
LOG_I(RRC,"[UE %d] Security algorithm is set to none\n",ctxt_pP->module_id);
securityMode = SecurityAlgorithmConfig__cipheringAlgorithm_spare1;
securityMode = CipheringAlgorithm_r12_spare1;
break;
}
@@ -2000,18 +2000,18 @@ rrc_ue_process_mobilityControlInfo(
NULL, // key rrc encryption
NULL, // key rrc integrity
NULL // key encryption
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,NULL
#endif
#endif
,NULL);
rrc_rlc_config_asn1_req(NB_eNB_INST+ue_mod_idP, frameP,0,eNB_index,
NULL,// SRB_ToAddModList
NULL,// DRB_ToAddModList
drb2release_list // DRB_ToReleaseList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,NULL
#endif
#endif
,NULL);
*/
@@ -2046,7 +2046,7 @@ rrc_ue_process_mobilityControlInfo(
eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -2063,7 +2063,7 @@ rrc_ue_process_mobilityControlInfo(
NULL,
NULL,
NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
@@ -2416,7 +2416,7 @@ rrc_ue_decode_dcch(
case DL_DCCH_MessageType__c1_PR_counterCheck:
break;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
case DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
break;
@@ -2431,7 +2431,9 @@ rrc_ue_decode_dcch(
case DL_DCCH_MessageType__c1_PR_spare1:
case DL_DCCH_MessageType__c1_PR_spare2:
case DL_DCCH_MessageType__c1_PR_spare3:
#if !defined(Rel14)
case DL_DCCH_MessageType__c1_PR_spare4:
#endif
break;
default:
@@ -2900,7 +2902,7 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
rrc_mac_config_req(ctxt_pP->module_id, 0, ENB_FLAG_NO, 0, eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -2917,7 +2919,7 @@ static int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
NULL,
NULL,
(MBSFN_SubframeConfigList_t *)NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
@@ -3174,7 +3176,7 @@ static void dump_sib2( SystemInformationBlockType2_t *sib2 )
LOG_I( RRC, "radioResourceConfigCommon.ul_CyclicPrefixLength : %ld\n",
sib2->radioResourceConfigCommon.ul_CyclicPrefixLength );
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// UplinkPowerControlCommon_v1020
// ...
#endif
@@ -3206,7 +3208,7 @@ static void dump_sib2( SystemInformationBlockType2_t *sib2 )
LOG_I( RRC, "timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon );
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (sib2->lateNonCriticalExtension) {
LOG_I( RRC, "lateNonCriticalExtension : %p\n", sib2->lateNonCriticalExtension );
@@ -3475,7 +3477,7 @@ static void dump_sib5( SystemInformationBlockType5_t *sib5 )
}
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (ifcfInfo->ext1 && ifcfInfo->ext1->q_QualMin_r9)
LOG_I(RRC," Q_QualMin_r9 : %ld\n",*ifcfInfo->ext1->q_QualMin_r9);
@@ -3488,7 +3490,7 @@ static void dump_sib5( SystemInformationBlockType5_t *sib5 )
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
static void dump_sib13( SystemInformationBlockType13_r9_t *sib13 )
{
LOG_I( RRC, "[UE] Dumping SIB13\n" );
@@ -3536,7 +3538,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
rrc_mac_config_req(ctxt_pP->module_id, 0, ENB_FLAG_NO, 0, eNB_index,
&UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->radioResourceConfigCommon,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
#endif
(MeasObjectToAddMod_t **)NULL,
@@ -3552,7 +3554,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth,
&UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.additionalSpectrumEmission,
UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->mbsfn_SubframeConfigList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
@@ -3563,7 +3565,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
#endif
);
// After SI is received, prepare RRCConnectionRequest
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
#endif
@@ -3694,7 +3696,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
}
break;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&2048) == 0) {
@@ -4103,7 +4105,7 @@ static uint8_t check_trigger_meas_event(
return 0;
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
//-----------------------------------------------------------------------------
int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t* const Sdu, const uint8_t Sdu_len, const uint8_t mbsfn_sync_area )
{
@@ -4177,7 +4179,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
rrc_mac_config_req(ue_mod_idP,0,ENB_FLAG_NO,0,eNB_index,
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -4194,7 +4196,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
NULL,
NULL,
(MBSFN_SubframeConfigList_t *)NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *)NULL,
@@ -4220,7 +4222,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
NULL, // key rrc encryption
NULL, // key rrc integrity
NULL // key encryption
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,&(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9)
#endif
,NULL);
@@ -4229,7 +4231,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
NULL,// SRB_ToAddModList
NULL,// DRB_ToAddModList
NULL,// DRB_ToReleaseList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
&(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9)
#endif
);
@@ -4336,7 +4338,7 @@ void *rrc_ue_task( void *args_p )
RRC_MAC_CCCH_DATA_IND (msg_p).enb_index);
break;
# ifdef Rel10
# if defined(Rel10) || defined(Rel14)
case RRC_MAC_MCCH_DATA_IND:
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d, mbsfn SA %d\n", ue_mod_id, msg_name,
+2 -2
View File
@@ -265,7 +265,7 @@ openair_rrc_top_init(
UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size;
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active);
for (module_id=0; module_id<NB_UE_INST; module_id++) {
@@ -286,7 +286,7 @@ openair_rrc_top_init(
eNB_rrc_inst[module_id].HO_flag = (uint8_t)HO_active;
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
LOG_I(RRC,"[eNB] eMBMS active state is %d \n", eMBMS_active);
for (module_id=0; module_id<NB_eNB_INST; module_id++) {
+49 -45
View File
@@ -57,7 +57,7 @@
#include "T.h"
//#ifdef Rel10
//#if defined(Rel10) || defined(Rel14)
#include "MeasResults.h"
//#endif
@@ -125,7 +125,7 @@ init_SI(
{
uint8_t SIwindowsize = 1;
uint16_t SIperiod = 8;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
int i;
#endif
/*
@@ -223,7 +223,7 @@ init_SI(
&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].systemInformation,
&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2,
&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib3
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13,
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag
#endif
@@ -281,7 +281,7 @@ init_SI(
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.cyclicShift);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag > 0) {
for (i = 0; i < eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count; i++) {
@@ -326,7 +326,7 @@ init_SI(
(RadioResourceConfigCommonSIB_t *) &
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -341,7 +341,7 @@ init_SI(
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->freqInfo.ul_Bandwidth,
&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->freqInfo.additionalSpectrumEmission,
(MBSFN_SubframeConfigList_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag,
(MBSFN_AreaInfoList_r9_t*) & eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9,
@@ -359,7 +359,7 @@ init_SI(
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
/*------------------------------------------------------------------------------*/
static void
init_MCCH(
@@ -422,7 +422,7 @@ init_MCCH(
rrc_mac_config_req(enb_mod_idP, CC_id, ENB_FLAG_YES, 0, 0,
(RadioResourceConfigCommonSIB_t *) NULL,
(struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -433,7 +433,7 @@ init_MCCH(
(MeasGapConfig_t *) NULL,
(TDD_Config_t *) NULL,
NULL, (uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
# ifdef Rel10
# if defined(Rel10) || defined(Rel14)
,
0,
(MBSFN_AreaInfoList_r9_t *) NULL,
@@ -473,7 +473,7 @@ static void init_MBMS(
NULL, // key rrc encryption
NULL, // key rrc integrity
NULL // key encryption
# ifdef Rel10
# if defined(Rel10) || defined(Rel14)
, &(eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->pmch_InfoList_r9)
# endif
,NULL);
@@ -693,7 +693,7 @@ rrc_eNB_free_mem_UE_context(
PROTOCOL_RRC_CTXT_UE_FMT" Clearing UE context 0x%p (free internal structs)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
ue_context_pP);
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[0]);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[1]);
#endif
@@ -1369,7 +1369,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
NULL, NULL, NULL, NULL,NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
(struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (SCellToAddMod_r10_t*)NULL
#endif
);
@@ -1469,7 +1469,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
*ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
MeasIdToAddModList_t *MeasId_list = NULL;
MeasIdToAddMod_t *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
#if Rel10
#if defined(Rel10) || defined(Rel14)
long *sr_ProhibitTimer_r9 = NULL;
// uint8_t sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1);
//uint8_t sCellIndexToAdd = 0;
@@ -1671,9 +1671,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
*maxHARQ_Tx = MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
periodicBSR_Timer = CALLOC(1, sizeof(long));
*periodicBSR_Timer = MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64;
*periodicBSR_Timer = PeriodicBSR_Timer_r12_sf64;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->timeAlignmentTimerDedicated = TimeAlignmentTimer_infinity;
@@ -1689,7 +1689,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
*sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
mac_MainConfig->ext1 = CALLOC(1, sizeof(struct MAC_MainConfig__ext1));
@@ -1756,7 +1756,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
//feedback mode needs to be set as well
//TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
printf("setting cqi reporting mode to rm31\n");
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
*((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportModeAperiodic_rm31;
#else
*((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic)=CQI_ReportConfig__cqi_ReportModeAperiodic_rm31; // HLC CQI, no PMI
@@ -2102,7 +2102,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
(RSRP_Range_t*)rsrp,
(C_RNTI_t*)cba_RNTI,
(struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)dedicatedInfoNASList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (SCellToAddMod_r10_t*)NULL
#endif
);
@@ -2173,7 +2173,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
uint8_t size;
uint8_t buffer[100];
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
uint8_t sCellIndexToAdd = 0; //one SCell so far
// uint8_t sCellIndexToAdd;
@@ -2207,7 +2207,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
(C_RNTI_t*)NULL,
(struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList*)NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, ue_context_pP->ue_context.sCell_config
#endif
);
@@ -2264,7 +2264,7 @@ rrc_eNB_process_MeasurementReport(
measResult.rsrqResult));
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
LOG_I(RRC, "RSRP of Source %ld\n", measResults2->measResultPCell.rsrpResult);
LOG_I(RRC, "RSRQ of Source %ld\n", measResults2->measResultPCell.rsrqResult);
#else
@@ -2531,7 +2531,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
// HandoverCommand_t handoverCommand;
//uint8_t sourceModId =
// get_adjacent_cell_mod_id(ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->sourcePhysCellId);
#if Rel10
#if defined(Rel10) || defined(Rel14)
long *sr_ProhibitTimer_r9;
#endif
@@ -2779,7 +2779,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
0,
(RadioResourceConfigCommonSIB_t*) NULL,
ue_context_pP->ue_context.physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -2796,7 +2796,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
NULL,
NULL,
(MBSFN_SubframeConfigList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif
#ifdef CBA
@@ -2899,10 +2899,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
periodicBSR_Timer = CALLOC(1, sizeof(long));
*periodicBSR_Timer = MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64;
*periodicBSR_Timer = PeriodicBSR_Timer_r12_sf64;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
@@ -2917,7 +2917,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
*sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
mac_MainConfig->ext1 = CALLOC(1, sizeof(struct MAC_MainConfig__ext1));
@@ -3279,7 +3279,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
rrc_pdcp_config_asn1_req(&ctxt,
ue_context_pP->ue_context.SRB_configList,
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
#endif
,NULL);
@@ -3287,7 +3287,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
rrc_rlc_config_asn1_req(&ctxt,
ue_context_pP->ue_context.SRB_configList,
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
#endif
);
@@ -3318,7 +3318,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
NULL,
NULL,
dedicatedInfoNASList
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, NULL // SCellToAddMod_r10_t
#endif
);
@@ -3353,7 +3353,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
0,
(RadioResourceConfigCommonSIB_t *) NULL,
ue_context_pP->ue_context.physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -3365,7 +3365,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
(TDD_Config_t *) NULL,
(MobilityControlInfo_t *) mobilityInfo,
(uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif
#ifdef CBA
@@ -3521,7 +3521,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
kRRCenc,
kRRCint,
kUPenc
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
#endif
,NULL);
@@ -3531,7 +3531,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
SRB_configList, // NULL, //LG-RK 14/05/2014 SRB_configList,
DRB_configList,
(DRB_ToReleaseList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
#endif
);
@@ -3651,7 +3651,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
0,
(RadioResourceConfigCommonSIB_t *) NULL,
ue_context_pP->ue_context.physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -3664,7 +3664,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
NULL,
(uint8_t *) NULL,
(uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif
#ifdef CBA
@@ -3699,7 +3699,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
0,
(RadioResourceConfigCommonSIB_t *) NULL,
ue_context_pP->ue_context.physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -3710,7 +3710,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
(MeasGapConfig_t *) NULL,
(TDD_Config_t *) NULL,
NULL, (uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL, NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif
#ifdef CBA
@@ -3794,7 +3794,7 @@ rrc_eNB_generate_RRCConnectionSetup(
0,
(RadioResourceConfigCommonSIB_t *) NULL,
ue_context_pP->ue_context.physicalConfigDedicated,
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
@@ -3807,7 +3807,7 @@ rrc_eNB_generate_RRCConnectionSetup(
NULL,
(uint8_t *) NULL,
(uint16_t *) NULL, NULL, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif
#ifdef CBA
@@ -3923,11 +3923,15 @@ while ( eNB_rrc_inst == NULL ) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt));
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
// This has to come from some top-level configuration
// only CC_id 0 is logged
#if defined(Rel10)
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel10 RRC detected, MBMS flag %d\n",
#else
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel14 RRC detected, MBMS flag %d\n",
#endif
PROTOCOL_RRC_CTXT_ARGS(&ctxt),
eNB_rrc_inst[ctxt.module_id].carrier[0].MBMS_flag);
@@ -3966,7 +3970,7 @@ while ( eNB_rrc_inst == NULL ) {
);
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
switch (eNB_rrc_inst[ctxt.module_id].carrier[CC_id].MBMS_flag) {
@@ -4349,7 +4353,7 @@ rrc_eNB_decode_ccch(
NULL,
NULL,
NULL
# ifdef Rel10
# if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
# endif
,NULL);
@@ -4358,7 +4362,7 @@ rrc_eNB_decode_ccch(
ue_context_p->ue_context.SRB_configList,
(DRB_ToAddModList_t*) NULL,
(DRB_ToReleaseList_t*) NULL
# ifdef Rel10
# if defined(Rel10) || defined(Rel14)
, (PMCH_InfoList_r9_t *) NULL
# endif
);
@@ -4871,7 +4875,7 @@ rrc_eNB_decode_dcch(
break;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
case UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
T(T_ENB_RRC_UE_INFORMATION_RESPONSE_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
+7 -7
View File
@@ -69,7 +69,7 @@ static const uint16_t S1AP_ENCRYPTION_EEA2_MASK = 0x4000;
static const uint16_t S1AP_INTEGRITY_EIA1_MASK = 0x8000;
static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000;
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
#else
#ifdef EXMIMO_IOT
@@ -228,21 +228,21 @@ rrc_eNB_get_ue_context_from_s1ap_ids(
*\param algorithms The bit mask of available algorithms received from S1AP.
*\return the selected algorithm.
*/
static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(uint16_t algorithms)
static CipheringAlgorithm_r12_t rrc_eNB_select_ciphering(uint16_t algorithms)
{
//#warning "Forced return SecurityAlgorithmConfig__cipheringAlgorithm_eea0, to be deleted in future"
return SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
return CipheringAlgorithm_r12_eea0;
if (algorithms & S1AP_ENCRYPTION_EEA2_MASK) {
return SecurityAlgorithmConfig__cipheringAlgorithm_eea2;
return CipheringAlgorithm_r12_eea2;
}
if (algorithms & S1AP_ENCRYPTION_EEA1_MASK) {
return SecurityAlgorithmConfig__cipheringAlgorithm_eea1;
return CipheringAlgorithm_r12_eea1;
}
return SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
return CipheringAlgorithm_r12_eea0;
}
/*! \fn e_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_integrity(uint16_t algorithms)
@@ -279,7 +279,7 @@ rrc_eNB_process_security(
)
{
boolean_t changed = FALSE;
e_SecurityAlgorithmConfig__cipheringAlgorithm cipheringAlgorithm;
CipheringAlgorithm_r12_t cipheringAlgorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrityProtAlgorithm;
/* Save security parameters */
+3 -3
View File
@@ -80,7 +80,7 @@ struct LogicalChannelConfig__ul_SpecificParameters LCSRB2 = {3,
};
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9
};
@@ -88,14 +88,14 @@ struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
// These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6)
LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
ext1: &logicalChannelSR_Mask_r9_ext1
#endif
};
LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
,
ext1: &logicalChannelSR_Mask_r9_ext1
#endif
+4 -4
View File
@@ -86,14 +86,14 @@ UE0:
};
SIM: {
MSIN="000001234";
USIM_API_K="000102030405060708090A0B0C0D0E0F";
MSIN="0100001111";
USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f";
OPC="C42449363BBAD02B66D16BC975D77CC1";
MSISDN="000000000000";//"33611123456";
MSISDN="33611123456";
};
# Home PLMN Selector with Access Technology
HPLMN= "00101";
HPLMN= "20893";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
+13 -1
View File
@@ -47,6 +47,7 @@ Description Defines functions used to handle EPS bearer contexts.
#include "esm_ebr_context.h"
#include "emm_sap.h"
#include "system.h"
#if defined(ENABLE_ITTI)
# include "assertions.h"
@@ -286,7 +287,18 @@ int esm_ebr_context_create(
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
command_line);
if (system(command_line)) ; /* TODO: what to do? */
/* Calling system() here disrupts UE's realtime processing in some cases.
* This may be because of the call to fork(), which, for some
* unidentified reason, interacts badly with other (realtime) threads.
* background_system() is a replacement mechanism relying on a
* background process that does the system() and reports result to
* the parent process (lte-softmodem, oaisim, ...). The background
* process is created very early in the life of the parent process.
* The processes interact through standard pipes. See
* common/utils/system.c for details.
*/
if (background_system(command_line) != 0)
LOG_TRACE(ERROR, "ESM-PROC - failed command '%s'", command_line);
break;
@@ -418,7 +418,6 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
int trx_eth_read_raw_IF5_mobipass(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) {
// Read nblocks info from packet itself
int nblocks = nsamps;
int bytes_received=0;
eth_state_t *eth = (eth_state_t*)device->priv;
@@ -139,7 +139,7 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0]);
int block_cnt=0;
int again_cnt=0;
//int again_cnt=0;
packet_size = max(UDP_IF4p5_PRACH_SIZE_BYTES, max(UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks), UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks)));
while(bytes_received == -1) {
@@ -410,7 +410,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
eth->pck_seq_num_cur = *(uint16_t *)buff2;
if ( ( eth->pck_seq_num_cur != (eth->pck_seq_num_prev + 1) ) && !((eth->pck_seq_num_prev==MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame)) && (eth->pck_seq_num_cur==1 )) && !((eth->pck_seq_num_prev==1) && (eth->pck_seq_num_cur==1))) {
//#if DEBUG
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%llu\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%"PRId64"\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
//#endif
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,eth->pck_seq_num_cur);
@@ -448,7 +448,7 @@ int eth_set_dev_conf_udp(openair0_device *device) {
if (sendto(eth->sockfd,msg,msg_len,0,(struct sockaddr *)&eth->dest_addr,eth->addr_len)==-1) {
perror("ETHERNET: sendto conf_udp");
printf("addr_len : %d, msg_len %d\n",eth->addr_len,msg_len);
printf("addr_len : %d, msg_len %zd\n",eth->addr_len,msg_len);
exit(0);
}
@@ -193,7 +193,7 @@ int exmimo_assign_shm_vars(int card_id)
int exmimo_allocate_rx_tx_buffers(int card_id)
{
size_t size;
int j,i;
int j;
dma_addr_t dma_addr_dummy;
// Round up to the next PAGE_SIZE (typ. 4096 bytes)
size = (ADAC_BUFFERSZ_PERCHAN_B >> PAGE_SHIFT) + 1;
@@ -243,8 +243,6 @@ int exmimo_allocate_rx_tx_buffers(int card_id)
*/
int exmimo_memory_alloc(int card)
{
int i;
if ( bigshm_init( card ) ) {
printk("exmimo_memory_alloc(): bigshm_init failed for card %d.\n", card);
return -ENOMEM;
+22 -17
View File
@@ -1,25 +1,30 @@
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
#define NUMBER_OF_eNB_MAX 1
#define NUMBER_OF_UE_MAX 16
#define NUMBER_OF_CONNECTED_eNB_MAX 3
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
# define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_CONNECTED_eNB_MAX 3
#else
#define NUMBER_OF_eNB_MAX 7
#define NUMBER_OF_UE_MAX 20
#define NUMBER_OF_CONNECTED_eNB_MAX 3
# define NUMBER_OF_eNB_MAX 7
# define NUMBER_OF_UE_MAX 20
# define NUMBER_OF_CONNECTED_eNB_MAX 3
#if STANDALONE==1
#define NUMBER_OF_eNB_MAX 3
#define NUMBER_OF_UE_MAX 3
#endif
# if defined(STANDALONE) && STANDALONE==1
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_UE_MAX 3
# endif
#if LARGE_SCALE
#define NUMBER_OF_eNB_MAX 2
#define NUMBER_OF_UE_MAX 120
#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
#endif
# if defined(LARGE_SCALE) && LARGE_SCALE
# undef NUMBER_OF_eNB_MAX
# undef NUMBER_OF_UE_MAX
# undef NUMBER_OF_CONNECTED_eNB_MAX
# define NUMBER_OF_eNB_MAX 2
# define NUMBER_OF_UE_MAX 120
# define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
# endif
#endif
#endif
#endif /* OPENAIRINTERFACE5G_LIMITS_H_ */
@@ -62,11 +62,11 @@ eNBs =
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
srs_enable = "ENABLE";
srs_BandwidthConfig = 2;
srs_SubframeConfig = 7;
srs_ackNackST = "DISABLE";
srs_MaxUpPts = "DISABLE";
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "94";
mobile_network_code = "92";
////////// Physical parameters:
@@ -63,10 +63,10 @@ eNBs =
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
srs_BandwidthConfig = 2;
srs_SubframeConfig = 0;
srs_ackNackST = "DISABLE";
srs_MaxUpPts = "DISABLE";
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
@@ -137,7 +137,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.70";
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
@@ -147,10 +147,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.147/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.147/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
+9 -9
View File
@@ -87,7 +87,6 @@ void config_UE_mod( rrh_module_t *dev_ue, uint8_t RT_flag,uint8_t NRT_flag) {
int i;
int error_code_UE, error_code_proc_UE;
void *tmp;
RT_flag_UE=RT_flag;
NRT_flag_UE=NRT_flag;
@@ -245,8 +244,7 @@ void *rrh_UE_thread(void *arg) {
struct sched_param sched_param_UE_rx, sched_param_UE_tx;
int16_t i,cmd; //,nsamps,antenna_index;
ssize_t bytes_received;
struct timespec time_req_1us, time_rem_1us;
//struct timespec time_req_1us;
pthread_t UE_rx_thread, UE_tx_thread;
pthread_attr_t attr_UE_rx, attr_UE_tx;
int error_code_UE_rx, error_code_UE_tx;
@@ -254,8 +252,8 @@ void *rrh_UE_thread(void *arg) {
unsigned int samples_per_frame=0;
samples_per_frame= dev->eth_dev.openair0_cfg->samples_per_frame;
time_req_1us.tv_sec = 0;
time_req_1us.tv_nsec = 1000;
//time_req_1us.tv_sec = 0;
//time_req_1us.tv_nsec = 1000;
while (rrh_exit==0) {
@@ -338,12 +336,15 @@ void *rrh_UE_rx_thread(void *arg) {
int trace_cnt=0;
unsigned long long max_rx_time=0, min_rx_time=133333, total_rx_time=0, average_rx_time=133333, s_period=0, trial=0;
unsigned int samples_per_frame=0;
openair0_timestamp temp, last_hw_counter=0;
openair0_timestamp last_hw_counter=0;
antenna_index = 0;
nsamps = dev->eth_dev.openair0_cfg->samples_per_packet;
samples_per_frame = dev->eth_dev.openair0_cfg->samples_per_frame;
/* TODO: check if setting time0 has to be done here */
clock_gettime(CLOCK_MONOTONIC,&time0);
while (rrh_exit == 0) {
if (!UE_rx_started) {
UE_rx_started=1; //Set this flag to 1 to indicate that a UE started retrieving data
@@ -446,7 +447,7 @@ void *rrh_UE_rx_thread(void *arg) {
if (s_period++ == PRINTF_PERIOD) {
s_period=0;
printf("Average UE RX time : %lu\tMax RX time : %lu\tMin RX time : %lu\n",average_rx_time,max_rx_time,min_rx_time);
printf("Average UE RX time : %llu\tMax RX time : %llu\tMin RX time : %llu\n",average_rx_time,max_rx_time,min_rx_time);
}
@@ -481,7 +482,6 @@ void *rrh_UE_tx_thread(void *arg) {
rrh_module_t *dev = (rrh_module_t *)arg;
ssize_t bytes_received;
int antenna_index, nsamps;
int trace_cnt=0;
unsigned int samples_per_frame=0;
antenna_index = 0;
@@ -504,7 +504,7 @@ void *rrh_UE_tx_thread(void *arg) {
if (NRT_flag_UE==1) {
nrt_UE_counter[antenna_index]++;
}
printf(" first part size: %d second part size: %d idx=%d \n",
printf(" first part size: %d second part size: %"PRId64" idx=%"PRId64"\n",
(int32_t)(((samples_per_frame)<<2)-((timestamp_UE_tx[antenna_index]%(samples_per_frame))<<2)),
(nsamps<<2)-((samples_per_frame)<<2)+((timestamp_UE_tx[antenna_index]%(samples_per_frame))<<2),
timestamp_UE_tx[antenna_index]%(samples_per_frame));
+3 -3
View File
@@ -539,13 +539,13 @@ void *rrh_eNB_rx_thread(void *arg) {
void *rrh_eNB_tx_thread(void *arg) {
struct timespec time0a,time0,time1,time2;
struct timespec time0,time1,time2;
rrh_module_t *dev = (rrh_module_t *)arg;
struct timespec time_req_1us, time_rem_1us;
ssize_t bytes_received;
int i;
openair0_timestamp last_hw_counter=0;
//openair0_timestamp last_hw_counter=0;
unsigned int samples_per_frame=0,samples_per_subframe=0;
unsigned int spp_rf=0, spp_eth=0;
uint8_t loopback=0,measurements=0;
@@ -634,7 +634,7 @@ void *rrh_eNB_tx_thread(void *arg) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TX_TS, timestamp_tx&0xffffffff );
if (dev->devs->type == NONE_DEV) last_hw_counter=hw_counter;
//if (dev->devs->type == NONE_DEV) last_hw_counter=hw_counter;
if (loopback ==1 ) {
+3 -1
View File
@@ -1724,7 +1724,7 @@ void init_eNB_proc(int inst) {
proc->CC_id = CC_id;
proc->instance_cnt_synch = -1;
proc->first_rx=2;
proc->first_rx=1;
proc->first_tx=1;
proc->frame_offset = 0;
@@ -2060,6 +2060,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
printf("Exiting, cannot initialize transport protocol\n");
exit(-1);
}
malloc_IF5_buffer(eNB);
break;
case NGFI_RRU_IF4p5:
eNB->do_precoding = 0;
@@ -2149,6 +2150,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
printf("Exiting, cannot initialize transport protocol\n");
exit(-1);
}
malloc_IF5_buffer(eNB);
break;
case NGFI_RCC_IF4p5:
eNB->do_precoding = 0;
+6 -2
View File
@@ -74,6 +74,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "create_tasks.h"
#endif
#include "system.h"
#ifdef XFORMS
#include "PHY/TOOLS/lte_phy_scope.h"
#include "stats.h"
@@ -319,8 +321,8 @@ void help (void) {
printf(" --ue-rxgain set UE RX gain\n");
printf(" --ue-rxgain-off external UE amplifier offset\n");
printf(" --ue-txgain set UE TX gain\n");
printf(" --ue-nb-ant-rx set UE number of rx antennas ");
printf(" --ue-scan_carrier set UE to scan around carrier\n");
printf(" --ue-nb-ant-rx set UE number of rx antennas\n");
printf(" --ue-scan-carrier set UE to scan around carrier\n");
printf(" --dlsch-demod-shift dynamic shift for LLR compuation for TM3/4 (default 0)\n");
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
@@ -1371,6 +1373,8 @@ int main( int argc, char **argv ) {
int ret;
#endif
start_background_system();
#ifdef DEBUG_CONSOLE
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
+5 -5
View File
@@ -65,7 +65,7 @@
/* local IP/MAC address is detected*/
char rrh_ip[20] = "0.0.0.0";
unsigned char rrh_mac[6] = "0:0:0:0:0:0";
unsigned char rrh_mac[20] = "0:0:0:0:0:0";
int rrh_port = 50000; // has to be an option
/* log */
@@ -197,7 +197,7 @@ static rrh_module_t new_module (unsigned int id) {
openair0_cfg.my_port = rrh_port;
LOG_I(RRH,"UDP mode selected for ethernet.\n");
} else if (eth_mode==ETH_RAW_MODE) {
openair0_cfg.my_addr = &rrh_mac[0];
openair0_cfg.my_addr = (char*)&rrh_mac[0];
openair0_cfg.my_port = rrh_port;
LOG_I(RRH,"RAW mode selected for ethernet.\n");
}
@@ -342,7 +342,7 @@ static int get_address(char* if_name, uint8_t flag) {
perror("IOCTL:");
exit(-1);
}
ether_ntoa_r ((unsigned char *)ifr.ifr_hwaddr.sa_data, rrh_mac);
ether_ntoa_r ((struct ether_addr *)ifr.ifr_hwaddr.sa_data, (char*)rrh_mac);
LOG_I(RRH,"%s: MAC address: %s\n",if_name,rrh_mac);
}
@@ -376,7 +376,7 @@ void *timer_proc(void *arg) {
timer_t timerid;
struct itimerspec *timer= (struct itimerspec *)arg ; // the timer data structure
struct itimerspec *old_value;
struct itimerspec old_value;
#ifdef DEADLINE_SCHEDULER
@@ -407,7 +407,7 @@ void *timer_proc(void *arg) {
signal(SIGALRM, timer_signal_handler);
LOG_I(RRH,"Timer has started!\n");
timer_settime (timerid, 0, timer, old_value);
timer_settime (timerid, 0, timer, &old_value);
while (!rrh_exit) {
sleep(1);
+22 -9
View File
@@ -59,6 +59,7 @@
#include "SCHED/defs.h"
#include "SCHED/vars.h"
#include "system.h"
#include "PHY/TOOLS/lte_phy_scope.h"
@@ -472,7 +473,7 @@ l2l1_task (void *args_p)
// Framing variables
int32_t sf;
char fname[64], vname[64];
//char fname[64], vname[64];
//#ifdef XFORMS
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
@@ -929,7 +930,7 @@ l2l1_task (void *args_p)
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
for (RN_id=oai_emulation.info.first_rn_local;
RN_id<oai_emulation.info.first_rn_local+oai_emulation.info.nb_rn_local;
@@ -1194,6 +1195,8 @@ main (int argc, char **argv)
clock_t t;
start_background_system();
#ifdef SMBV
// Rohde&Schwarz SMBV100A vector signal generator
strcpy(smbv_ip,DEFAULT_SMBV_IP);
@@ -1216,7 +1219,10 @@ main (int argc, char **argv)
for(int i =0; i<NUMBER_OF_UE_MAX; i++){
char command_line[100];
sprintf(command_line, "while ip rule del table %d; do true; done",i+201);
system(command_line);
/* we don't care about return value from system(), but let's the
* compiler be silent, so let's do "if (XX);"
*/
if (system(command_line)) /* nothing */;
}
// start thread for log gen
log_thread_init ();
@@ -1286,6 +1292,7 @@ main (int argc, char **argv)
init_openair2 ();
void init_openair0(void);
init_openair0();
init_ocm ();
@@ -1383,14 +1390,16 @@ reset_opp_meas_oaisim (void)
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc);
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx);
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0]);
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1]);
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx);
reset_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_channel_estimation_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_freq_offset_estimation_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0]);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1]);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_turbo_decoding_stats);
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats);
@@ -1552,8 +1561,10 @@ print_opp_meas_oaisim (void)
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc, "[UE][total_phy_proc]",
&oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx,
"[UE][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
"[UE][total_phy_proc_rx[0]]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1],
"[UE][total_phy_proc_rx[1]]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats,
"[UE][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats, "[UE][rx_dft]",
@@ -1566,8 +1577,10 @@ print_opp_meas_oaisim (void)
&oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_unscrambling_stats,
"[UE][unscrambling]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats,
"[UE][decoding]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0],
"[UE][decoding[0]]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1],
"[UE][decoding[1]]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats,
"[UE][rate_unmatching]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats,
+9 -6
View File
@@ -91,7 +91,9 @@ extern char smbv_ip[16];
#define K 2 // averaging coefficient
#define TARGET_SF_TIME_NS 1000000 // 1ms = 1000000 ns
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif
int otg_times = 0;
int if_times = 0;
@@ -161,7 +163,7 @@ extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs];
extern channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
extern mapping small_scale_names[];
#if defined(Rel10)
#if defined(Rel10) || defined(Rel14)
extern pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];
extern pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];
#endif
@@ -1014,8 +1016,8 @@ int eNB_trx_stop(openair0_device *device) {
int UE_trx_start(openair0_device *device) {
return(0);
}
int UE_trx_end(openair0_device *device) {
return(0);
void UE_trx_end(openair0_device *device) {
return;
}
int UE_trx_stop(openair0_device *device) {
return(0);
@@ -1293,7 +1295,7 @@ void init_devices(void){
void init_openair1(void)
{
module_id_t UE_id, eNB_id;
module_id_t UE_id, eNB_id = 0;
uint8_t CC_id;
#if ENABLE_RAL
int list_index;
@@ -1447,6 +1449,7 @@ void init_openair1(void)
} // CC_id
} // UE_id
extern void init_UE(int);
init_UE(NB_UE_INST);
}
@@ -1738,7 +1741,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
}
}
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
mbms_service_id_t service_id;
mbms_session_id_t session_id;
rb_id_t rb_id;
@@ -1773,7 +1776,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
// old version
/* // MBSM multicast traffic
#ifdef Rel10
#if defined(Rel10) || defined(Rel14)
if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH