Commit 6b615410 authored by Navid Nikaein's avatar Navid Nikaein

add configuration for component carriers

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5707 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5c3e0c95
...@@ -140,8 +140,8 @@ enum transmission_access_mode{ ...@@ -140,8 +140,8 @@ enum transmission_access_mode{
/// Context data structure for eNB subframe processing /// Context data structure for eNB subframe processing
typedef struct { typedef struct {
/// Component Carrier index /// Component Carrier index
int CC_id; uint8_t CC_id;
/// subframe index /// subframe index
int subframe; int subframe;
/// subframe to act upon for transmission /// subframe to act upon for transmission
......
This diff is collapsed.
...@@ -100,7 +100,12 @@ typedef struct Enb_properties_s { ...@@ -100,7 +100,12 @@ typedef struct Enb_properties_s {
int16_t eutra_band; int16_t eutra_band;
uint32_t downlink_frequency; uint32_t downlink_frequency;
int32_t uplink_frequency_offset; int32_t uplink_frequency_offset;
/* Nb of component carrier for a given enb */
int16_t nb_cc;
int16_t cell_id[2];//cell_id[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[2];//N_RB_DL[MAX_NUM_CCs];// for testing, change later
/* Nb of MME to connect to */ /* Nb of MME to connect to */
uint8_t nb_mme; uint8_t nb_mme;
/* List of MME to connect to */ /* List of MME to connect to */
...@@ -112,6 +117,22 @@ typedef struct Enb_properties_s { ...@@ -112,6 +117,22 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME; char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME; in_addr_t enb_ipv4_address_for_S1_MME;
// log config
int16_t glog_level;
int16_t glog_verbosity;
int16_t hw_log_level;
int16_t hw_log_verbosity;
int16_t phy_log_level;
int16_t phy_log_verbosity;
int16_t mac_log_level;
int16_t mac_log_verbosity;
int16_t rlc_log_level;
int16_t rlc_log_verbosity;
int16_t pdcp_log_level;
int16_t pdcp_log_verbosity;
int16_t rrc_log_level;
int16_t rrc_log_verbosity;
} Enb_properties_t; } Enb_properties_t;
typedef struct Enb_properties_array_s { typedef struct Enb_properties_array_s {
......
...@@ -30,22 +30,53 @@ eNBs = ...@@ -30,22 +30,53 @@ eNBs =
downlink_frequency = 2680000000L; downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
component_carriers = (
{
cell_id = 0;
N_RB_DL = 25;
},
{
cell_id = 1;
N_RB_DL = 50;
}
);
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.14.11"; mme_ip_address = ( { ipv4 = "192.168.13.11";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
} }
); );
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.14.10/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.14.10/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
}; };
# available options for level: error, warn, notice, info, debug, trace
# available options for verbosity: none, low, medium, high, full
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="debug";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
} }
); );
...@@ -32,6 +32,17 @@ eNBs = ...@@ -32,6 +32,17 @@ eNBs =
downlink_frequency = 2680000000; downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
component_carriers = (
{
cell_id = 0;
N_RB_DL = 25;
},
{
cell_id = 1;
N_RB_DL = 50;
}
);
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.13.11"; mme_ip_address = ( { ipv4 = "192.168.13.11";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
...@@ -48,6 +59,24 @@ eNBs = ...@@ -48,6 +59,24 @@ eNBs =
ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
}; };
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="debug";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
} }
); );
...@@ -24,6 +24,8 @@ endif ...@@ -24,6 +24,8 @@ endif
CFLAGS += -O2 CFLAGS += -O2
CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON
CFLAGS += -DMAX_NUM_CCs=1
ifeq ($(USRP),0) ifeq ($(USRP),0)
CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/DEFS -DENABLE_VCD_FIFO CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/DEFS -DENABLE_VCD_FIFO
endif endif
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
/*! \file lte-softmodem.c /*! \file lte-softmodem.c
* \brief main program to control HW and scheduling * \brief main program to control HW and scheduling
* \author R. Knopp, F. Kaltenberger * \author R. Knopp, F. Kaltenberger, Navid Nikaein
* \date 2012 * \date 2012
* \version 0.1 * \version 0.1
* \company Eurecom * \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr * \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
* \note * \note
* \warning * \warning
*/ */
...@@ -306,6 +306,21 @@ static LTE_DL_FRAME_PARMS *frame_parms; ...@@ -306,6 +306,21 @@ static LTE_DL_FRAME_PARMS *frame_parms;
int multi_thread=1; int multi_thread=1;
int N_RB_DL=25; int N_RB_DL=25;
int16_t glog_level=LOG_DEBUG;
int16_t glog_verbosity=LOG_MED;
int16_t hw_log_level=LOG_DEBUG;
int16_t hw_log_verbosity=LOG_MED;
int16_t phy_log_level=LOG_DEBUG;
int16_t phy_log_verbosity=LOG_MED;
int16_t mac_log_level=LOG_DEBUG;
int16_t mac_log_verbosity=LOG_MED;
int16_t rlc_log_level=LOG_DEBUG;
int16_t rlc_log_verbosity=LOG_MED;
int16_t pdcp_log_level=LOG_DEBUG;
int16_t pdcp_log_verbosity=LOG_MED;
int16_t rrc_log_level=LOG_DEBUG;
int16_t rrc_log_verbosity=LOG_MED;
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq) unsigned int build_rflocal(int txi, int txq, int rxi, int rxq)
{ {
return (txi + (txq<<6) + (rxi<<12) + (rxq<<18)); return (txi + (txq<<6) + (rxi<<12) + (rxq<<18));
...@@ -1695,6 +1710,7 @@ static void get_options (int argc, char **argv) { ...@@ -1695,6 +1710,7 @@ static void get_options (int argc, char **argv) {
int c; int c;
// char line[1000]; // char line[1000];
// int l; // int l;
int i,j,k;
#ifdef USRP #ifdef USRP
int clock_src; int clock_src;
#endif #endif
...@@ -1722,7 +1738,7 @@ static void get_options (int argc, char **argv) { ...@@ -1722,7 +1738,7 @@ static void get_options (int argc, char **argv) {
{"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT}, {"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT},
{NULL, 0, NULL, 0}}; {NULL, 0, NULL, 0}};
while ((c = getopt_long (argc, argv, "C:dK:qO:SUVRMr:s:",long_options,NULL)) != -1) { while ((c = getopt_long (argc, argv, "C:dK:g:G:qO:SUVRMr:s:",long_options,NULL)) != -1) {
switch (c) { switch (c) {
case LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS: case LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS:
ULSCH_max_consecutive_errors = atoi(optarg); ULSCH_max_consecutive_errors = atoi(optarg);
...@@ -1834,6 +1850,12 @@ static void get_options (int argc, char **argv) { ...@@ -1834,6 +1850,12 @@ static void get_options (int argc, char **argv) {
printf("Note: -s not defined for ExpressMIMO2\n"); printf("Note: -s not defined for ExpressMIMO2\n");
#endif #endif
break; break;
case 'g':
glog_level=atoi(optarg); // value between 1 - 9
break;
case 'G':
glog_verbosity=atoi(optarg);// value from 0, 0x5, 0x15, 0x35, 0x75
break;
default: default:
break; break;
} }
...@@ -1852,14 +1874,41 @@ static void get_options (int argc, char **argv) { ...@@ -1852,14 +1874,41 @@ static void get_options (int argc, char **argv) {
conf_config_file_name, NB_eNB_INST, enb_properties->number); conf_config_file_name, NB_eNB_INST, enb_properties->number);
/* Update some simulation parameters */ /* Update some simulation parameters */
frame_parms->frame_type = enb_properties->properties[0]->frame_type; for (i=0; i < enb_properties->number; i++) {
frame_parms->tdd_config = enb_properties->properties[0]->tdd_config;
frame_parms->tdd_config_S = enb_properties->properties[0]->tdd_config_s; frame_parms->frame_type = enb_properties->properties[i]->frame_type;
for (i = 0 ; i < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); i++) { frame_parms->tdd_config = enb_properties->properties[i]->tdd_config;
downlink_frequency[i] = enb_properties->properties[0]->downlink_frequency; frame_parms->tdd_config_S = enb_properties->properties[i]->tdd_config_s;
printf("Downlink frequency set to %u\n", downlink_frequency[i]);
uplink_frequency_offset[i] = enb_properties->properties[0]->uplink_frequency_offset; for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
} frame_parms->Nid_cell = enb_properties->properties[i]->cell_id;
frame_parms->N_RB_DL = enb_properties->properties[i]->N_RB_DL;
} // j
glog_level = enb_properties->properties[i]->glog_level;
glog_verbosity = enb_properties->properties[i]->glog_verbosity;
hw_log_level = enb_properties->properties[i]->hw_log_level;
hw_log_verbosity = enb_properties->properties[i]->hw_log_verbosity ;
phy_log_level = enb_properties->properties[i]->phy_log_level;
phy_log_verbosity = enb_properties->properties[i]->phy_log_verbosity;
mac_log_level = enb_properties->properties[i]->mac_log_level;
mac_log_verbosity = enb_properties->properties[i]->mac_log_verbosity;
rlc_log_level = enb_properties->properties[i]->rlc_log_level;
rlc_log_verbosity = enb_properties->properties[i]->rlc_log_verbosity;
pdcp_log_level = enb_properties->properties[i]->pdcp_log_level;
pdcp_log_verbosity = enb_properties->properties[i]->pdcp_log_verbosity;
rrc_log_level = enb_properties->properties[i]->rrc_log_level;
rrc_log_verbosity = enb_properties->properties[i]->rrc_log_verbosity;
// adjust the log
for (k = 0 ; k < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); k++) {
downlink_frequency[k] = enb_properties->properties[i]->downlink_frequency;
printf("Downlink frequency set to %u\n", downlink_frequency[k]);
uplink_frequency_offset[k] = enb_properties->properties[i]->uplink_frequency_offset;
} // k
}// i
} }
} }
...@@ -1916,7 +1965,7 @@ int main(int argc, char **argv) { ...@@ -1916,7 +1965,7 @@ int main(int argc, char **argv) {
// initialize the log (see log.h for details) // initialize the log (see log.h for details)
logInit(); logInit();
set_glog(LOG_DEBUG, LOG_MED); set_glog(glog_level, glog_verbosity);
if (UE_flag==1) if (UE_flag==1)
{ {
printf("configuring for UE\n"); printf("configuring for UE\n");
...@@ -1943,17 +1992,16 @@ int main(int argc, char **argv) { ...@@ -1943,17 +1992,16 @@ int main(int argc, char **argv) {
{ {
printf("configuring for eNB\n"); printf("configuring for eNB\n");
set_comp_log(HW, LOG_DEBUG, LOG_HIGH, 1); set_comp_log(HW, hw_log_level, hw_log_verbosity, 1);
#ifdef OPENAIR2 #ifdef OPENAIR2
set_comp_log(PHY, LOG_DEBUG, LOG_HIGH, 1); set_comp_log(PHY, phy_log_level, phy_log_verbosity, 1);
#else #else
set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1); set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1);
#endif #endif
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1); set_comp_log(MAC, mac_log_level, mac_log_verbosity, 1);
set_comp_log(RLC, LOG_TRACE, LOG_HIGH, 1); set_comp_log(RLC, rlc_log_level, rlc_log_verbosity, 1);
set_comp_log(PDCP, LOG_DEBUG, LOG_HIGH, 1); set_comp_log(PDCP, pdcp_log_level, pdcp_log_verbosity, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1); set_comp_log(RRC, rrc_log_level, rrc_log_verbosity, 1);
set_comp_log(RRC, LOG_DEBUG, LOG_HIGH, 1);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
set_comp_log(EMU, LOG_INFO, LOG_MED, 1); set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
...@@ -1967,6 +2015,7 @@ int main(int argc, char **argv) { ...@@ -1967,6 +2015,7 @@ int main(int argc, char **argv) {
#endif #endif
#endif #endif
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1); set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
if (online_log_messages == 1) { if (online_log_messages == 1) {
set_component_filelog(RRC); set_component_filelog(RRC);
set_component_filelog(PDCP); set_component_filelog(PDCP);
......
...@@ -223,6 +223,7 @@ static void * dlsch_thread(void *param) { ...@@ -223,6 +223,7 @@ static void * dlsch_thread(void *param) {
#ifdef OPENAIR2 #ifdef OPENAIR2
mac_xface->ue_send_sdu(phy_vars_ue->Mod_id, mac_xface->ue_send_sdu(phy_vars_ue->Mod_id,
0, // CC_id
phy_vars_ue->frame, phy_vars_ue->frame,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->b, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->b,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS>>3, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS>>3,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment