git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6348 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -616,7 +616,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef PERFECT_CE
|
if (phy_vars_ue->perfect_ce == 0) {
|
||||||
// Temporal Interpolation
|
// Temporal Interpolation
|
||||||
// printf("ch_offset %d\n",ch_offset);
|
// printf("ch_offset %d\n",ch_offset);
|
||||||
|
|
||||||
@@ -691,7 +691,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*idft)(int16_t *,int16_t *, int);
|
void (*idft)(int16_t *,int16_t *, int);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PERFECT_CE
|
if (phy_vars_ue->perfect_ce == 0) {
|
||||||
if ((l==0) || (l==(4-frame_parms->Ncp))) {
|
if ((l==0) || (l==(4-frame_parms->Ncp))) {
|
||||||
for (aa=0;aa<frame_parms->nb_antennas_tx_eNB;aa++) {
|
for (aa=0;aa<frame_parms->nb_antennas_tx_eNB;aa++) {
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
#ifdef DEBUG_FEP
|
#ifdef DEBUG_FEP
|
||||||
msg("slot_fep: done\n");
|
msg("slot_fep: done\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
|||||||
// changed to invoke MBSFN channel estimation in symbols 2,6,10
|
// changed to invoke MBSFN channel estimation in symbols 2,6,10
|
||||||
if ((l==2)||(l==6)||(l==10)) {
|
if ((l==2)||(l==6)||(l==10)) {
|
||||||
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
|
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
|
||||||
#ifndef PERFECT_CE
|
if (phy_vars_ue->perfect_ce == 0) {
|
||||||
#ifdef DEBUG_FEP
|
#ifdef DEBUG_FEP
|
||||||
msg("Channel estimation eNB %d, aatx %d, subframe %d, symbol %d\n",eNB_id,aa,subframe,l);
|
msg("Channel estimation eNB %d, aatx %d, subframe %d, symbol %d\n",eNB_id,aa,subframe,l);
|
||||||
#endif
|
#endif
|
||||||
@@ -201,7 +201,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
|||||||
l,
|
l,
|
||||||
symbol); */
|
symbol); */
|
||||||
// }
|
// }
|
||||||
#endif
|
|
||||||
|
|
||||||
// do frequency offset estimation here!
|
// do frequency offset estimation here!
|
||||||
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
|
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
|
||||||
@@ -216,6 +215,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
|||||||
&ue_common_vars->freq_offset); */
|
&ue_common_vars->freq_offset); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#ifdef DEBUG_FEP
|
#ifdef DEBUG_FEP
|
||||||
msg("slot_fep_mbsfn: done\n");
|
msg("slot_fep_mbsfn: done\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -434,6 +434,7 @@ typedef struct
|
|||||||
uint32_t X_u[64][839];
|
uint32_t X_u[64][839];
|
||||||
|
|
||||||
uint32_t high_speed_flag;
|
uint32_t high_speed_flag;
|
||||||
|
uint32_t perfect_ce;
|
||||||
int16_t ch_est_alpha;
|
int16_t ch_est_alpha;
|
||||||
|
|
||||||
char ulsch_no_allocation_counter[NUMBER_OF_CONNECTED_eNB_MAX];
|
char ulsch_no_allocation_counter[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||||
|
|||||||
@@ -1907,8 +1907,10 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
|
|||||||
//LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d PHICH RX\n",phy_vars_ue->Mod_id,frame_rx,subframe_rx);
|
//LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d PHICH RX\n",phy_vars_ue->Mod_id,frame_rx,subframe_rx);
|
||||||
|
|
||||||
if (is_phich_subframe(&phy_vars_ue->lte_frame_parms,subframe_rx)) {
|
if (is_phich_subframe(&phy_vars_ue->lte_frame_parms,subframe_rx)) {
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH, VCD_FUNCTION_IN);
|
||||||
rx_phich(phy_vars_ue,
|
rx_phich(phy_vars_ue,
|
||||||
subframe_rx,eNB_id);
|
subframe_rx,eNB_id);
|
||||||
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH, VCD_FUNCTION_OUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef PHY_ABSTRACTION
|
#ifdef PHY_ABSTRACTION
|
||||||
@@ -2318,6 +2320,9 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
|
|||||||
int CC_id = phy_vars_ue->CC_id;
|
int CC_id = phy_vars_ue->CC_id;
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
|
||||||
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_UE, (slot_rx + 1) % 20);
|
||||||
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_UE, frame_rx);
|
||||||
|
|
||||||
start_meas(&phy_vars_ue->phy_proc_rx);
|
start_meas(&phy_vars_ue->phy_proc_rx);
|
||||||
#ifdef DEBUG_PHY_PROC
|
#ifdef DEBUG_PHY_PROC
|
||||||
LOG_D(PHY,"[%s %d] Frame %d subframe %d: Doing phy_procedures_UE_RX(%d)\n",
|
LOG_D(PHY,"[%s %d] Frame %d subframe %d: Doing phy_procedures_UE_RX(%d)\n",
|
||||||
@@ -3426,8 +3431,6 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
|||||||
prach_resources_local.ra_PreambleIndex = 0;
|
prach_resources_local.ra_PreambleIndex = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_UE, (slot_rx + 1) % 20);
|
|
||||||
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_UE, frame_rx);
|
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1);
|
||||||
#ifdef EXMIMO
|
#ifdef EXMIMO
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ extern unsigned char offset_mumimo_llr_drange_fix;
|
|||||||
|
|
||||||
|
|
||||||
//#define ABSTRACTION
|
//#define ABSTRACTION
|
||||||
//#define PERFECT_CE
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define RBmask0 0x00fc00fc
|
#define RBmask0 0x00fc00fc
|
||||||
@@ -107,7 +106,7 @@ void handler(int sig) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t fdd_flag, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,uint8_t osf) {
|
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t fdd_flag, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,uint8_t osf,uint32_t perfect_ce) {
|
||||||
|
|
||||||
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
||||||
int i;
|
int i;
|
||||||
@@ -186,6 +185,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
|
|||||||
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
|
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PHY_vars_UE->perfect_ce = perfect_ce;
|
||||||
|
|
||||||
printf("Done lte_param_init\n");
|
printf("Done lte_param_init\n");
|
||||||
|
|
||||||
@@ -344,6 +344,7 @@ int main(int argc, char **argv) {
|
|||||||
char channel_model_input[10]="I";
|
char channel_model_input[10]="I";
|
||||||
|
|
||||||
int TB0_active = 1;
|
int TB0_active = 1;
|
||||||
|
uint32_t perfect_ce = 0;
|
||||||
|
|
||||||
LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
|
LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
|
||||||
LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
|
LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
|
||||||
@@ -365,8 +366,9 @@ int main(int argc, char **argv) {
|
|||||||
n_frames = 1000;
|
n_frames = 1000;
|
||||||
snr0 = 0;
|
snr0 = 0;
|
||||||
num_layers = 1;
|
num_layers = 1;
|
||||||
|
perfect_ce = 0;
|
||||||
|
|
||||||
while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:")) != -1) {
|
while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) {
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -564,6 +566,9 @@ int main(int argc, char **argv) {
|
|||||||
case 'Z':
|
case 'Z':
|
||||||
dump_table=1;
|
dump_table=1;
|
||||||
break;
|
break;
|
||||||
|
case 'Y':
|
||||||
|
perfect_ce=1;
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6) -y TXant -z RXant -I trch_file\n",argv[0]);
|
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6) -y TXant -z RXant -I trch_file\n",argv[0]);
|
||||||
@@ -645,7 +650,7 @@ int main(int argc, char **argv) {
|
|||||||
printf("dual_stream_UE=%d\n", dual_stream_UE);
|
printf("dual_stream_UE=%d\n", dual_stream_UE);
|
||||||
}
|
}
|
||||||
|
|
||||||
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,fdd_flag,Nid_cell,tdd_config,N_RB_DL,osf);
|
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,fdd_flag,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce);
|
||||||
|
|
||||||
eNB_id_i = PHY_vars_UE->n_connected_eNB;
|
eNB_id_i = PHY_vars_UE->n_connected_eNB;
|
||||||
|
|
||||||
@@ -2718,7 +2723,7 @@ int main(int argc, char **argv) {
|
|||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
stop_meas(&PHY_vars_UE->ofdm_demod_stats);
|
stop_meas(&PHY_vars_UE->ofdm_demod_stats);
|
||||||
#ifdef PERFECT_CE
|
if (PHY_vars_UE->perfect_ce==1) {
|
||||||
if (awgn_flag==0) {
|
if (awgn_flag==0) {
|
||||||
// fill in perfect channel estimates
|
// fill in perfect channel estimates
|
||||||
freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
|
freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
|
||||||
@@ -2751,7 +2756,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((Ns==((2*subframe))) && (l==0)) {
|
if ((Ns==((2*subframe))) && (l==0)) {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
PHY_VARS_eNB *PHY_vars_eNB;
|
PHY_VARS_eNB *PHY_vars_eNB;
|
||||||
PHY_VARS_UE *PHY_vars_UE;
|
PHY_VARS_UE *PHY_vars_UE;
|
||||||
|
|
||||||
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,lte_frame_type_t frame_type, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,uint8_t osf) {
|
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,lte_frame_type_t frame_type, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,uint8_t osf,uint32_t perfect_ce) {
|
||||||
|
|
||||||
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
||||||
|
|
||||||
@@ -122,6 +122,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
|
|||||||
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
|
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
|
||||||
|
|
||||||
|
|
||||||
|
PHY_vars_UE->perfect_ce = perfect_ce;
|
||||||
printf("Done lte_param_init\n");
|
printf("Done lte_param_init\n");
|
||||||
|
|
||||||
|
|
||||||
@@ -174,6 +175,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
uint8_t N_RB_DL=25,osf=1;
|
uint8_t N_RB_DL=25,osf=1;
|
||||||
double BW=5.0;
|
double BW=5.0;
|
||||||
|
uint32_t perfect_ce = 0;
|
||||||
|
|
||||||
lte_frame_type_t frame_type = FDD;
|
lte_frame_type_t frame_type = FDD;
|
||||||
|
|
||||||
@@ -201,7 +203,7 @@ int main(int argc, char **argv) {
|
|||||||
rxdata[0] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
rxdata[0] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
||||||
rxdata[1] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
rxdata[1] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
||||||
*/
|
*/
|
||||||
while ((c = getopt (argc, argv, "ahA:Cp:n:s:S:t:x:y:z:N:F:R:O:dm:i:")) != -1)
|
while ((c = getopt (argc, argv, "ahA:Cp:n:s:S:t:x:y:z:N:F:R:O:dm:i:Y")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@@ -266,6 +268,9 @@ int main(int argc, char **argv) {
|
|||||||
case 'O':
|
case 'O':
|
||||||
osf = atoi(optarg);
|
osf = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'Y':
|
||||||
|
perfect_ce = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
case 'h':
|
case 'h':
|
||||||
printf("%s -h(elp) -p(subframe) -N cell_id -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -i snr increment -z RXant \n",argv[0]);
|
printf("%s -h(elp) -p(subframe) -N cell_id -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -i snr increment -z RXant \n",argv[0]);
|
||||||
@@ -309,7 +314,7 @@ int main(int argc, char **argv) {
|
|||||||
if (transmission_mode==2)
|
if (transmission_mode==2)
|
||||||
n_tx=2;
|
n_tx=2;
|
||||||
|
|
||||||
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,osf);
|
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ PHY_VARS_UE *PHY_vars_UE;
|
|||||||
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
|
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
|
||||||
#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
|
#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
|
||||||
|
|
||||||
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,lte_frame_type_t frame_type,uint8_t osf) {
|
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,lte_frame_type_t frame_type,uint8_t osf,uint32_t perfect_ce) {
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
LTE_DL_FRAME_PARMS *lte_frame_parms;
|
||||||
@@ -135,6 +135,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
|
|||||||
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
|
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
|
||||||
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
|
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
|
||||||
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
|
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
|
||||||
|
PHY_vars_UE->perfect_ce = perfect_ce;
|
||||||
for (i=0;i<3;i++)
|
for (i=0;i<3;i++)
|
||||||
lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
|
lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
|
||||||
|
|
||||||
@@ -548,10 +549,9 @@ int main(int argc, char **argv) {
|
|||||||
int re_offset;
|
int re_offset;
|
||||||
uint32_t *txptr;
|
uint32_t *txptr;
|
||||||
int aarx;
|
int aarx;
|
||||||
#ifdef PERFECT_CE
|
|
||||||
int k;
|
int k;
|
||||||
#endif
|
|
||||||
double BW=5.0;
|
double BW=5.0;
|
||||||
|
uint32_t perfect_ce = 0;
|
||||||
|
|
||||||
number_of_cards = 1;
|
number_of_cards = 1;
|
||||||
openair_daq_vars.rx_rf_mode = 1;
|
openair_daq_vars.rx_rf_mode = 1;
|
||||||
@@ -565,7 +565,7 @@ int main(int argc, char **argv) {
|
|||||||
rxdata[0] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
rxdata[0] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
||||||
rxdata[1] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
rxdata[1] = (int *)malloc16(FRAME_LENGTH_BYTES);
|
||||||
*/
|
*/
|
||||||
while ((c = getopt (argc, argv, "hapFg:R:c:n:s:x:y:z:L:M:N:I:f:i:S:P:")) != -1) {
|
while ((c = getopt (argc, argv, "hapFg:R:c:n:s:x:y:z:L:M:N:I:f:i:S:P:Y")) != -1) {
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -699,6 +699,9 @@ int main(int argc, char **argv) {
|
|||||||
case 'P':
|
case 'P':
|
||||||
num_phich_interf=atoi(optarg);
|
num_phich_interf=atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'Y':
|
||||||
|
perfect_ce = 1;
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
printf("%s -h(elp) -a(wgn on) -c tdd_config -n n_frames -r RiceanFactor -s snr0 -t Delayspread -x transmission mode (1,2,6) -y TXant -z RXant -L AggregLevelUEspec -M AggregLevelCommonDCI -N DCIFormat\n\n",argv[0]);
|
printf("%s -h(elp) -a(wgn on) -c tdd_config -n n_frames -r RiceanFactor -s snr0 -t Delayspread -x transmission mode (1,2,6) -y TXant -z RXant -L AggregLevelUEspec -M AggregLevelCommonDCI -N DCIFormat\n\n",argv[0]);
|
||||||
printf("-h This message\n");
|
printf("-h This message\n");
|
||||||
@@ -757,7 +760,8 @@ int main(int argc, char **argv) {
|
|||||||
Nid_cell,
|
Nid_cell,
|
||||||
tdd_config,
|
tdd_config,
|
||||||
N_RB_DL,frame_type,
|
N_RB_DL,frame_type,
|
||||||
osf);
|
osf,
|
||||||
|
perfect_ce);
|
||||||
|
|
||||||
#ifdef XFORMS
|
#ifdef XFORMS
|
||||||
fl_initialize (&argc, argv, NULL, 0, 0);
|
fl_initialize (&argc, argv, NULL, 0, 0);
|
||||||
@@ -1131,7 +1135,7 @@ int main(int argc, char **argv) {
|
|||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
#ifdef PERFECT_CE
|
if (PHY_vars_UE->perfect_ce == 1) {
|
||||||
if (awgn_flag==0) {
|
if (awgn_flag==0) {
|
||||||
// fill in perfect channel estimates
|
// fill in perfect channel estimates
|
||||||
freq_channel(eNB2UE,PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
|
freq_channel(eNB2UE,PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
|
||||||
@@ -1164,8 +1168,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
|
||||||
if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?4:3)) {
|
if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?4:3)) {
|
||||||
|
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
uint16_t TBS,i;
|
uint16_t TBS,i;
|
||||||
int32_t buffer_occupancy=0;
|
int32_t buffer_occupancy=0;
|
||||||
uint32_t cqi_req,cshift,ndi,mcs,rballoc,tpc;
|
uint32_t cqi_req,cshift,ndi,mcs,rballoc,tpc;
|
||||||
int32_t normalized_rx_power, target_rx_power=-75;
|
int32_t normalized_rx_power, target_rx_power=-90;
|
||||||
static int32_t tpc_accumulated=0;
|
static int32_t tpc_accumulated=0;
|
||||||
|
|
||||||
int n,CC_id;
|
int n,CC_id;
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP, uint16_t eNB
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){
|
int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active){
|
||||||
|
|
||||||
module_id_t Mod_id,i,j;
|
module_id_t Mod_id,i,j;
|
||||||
RA_TEMPLATE *RA_template;
|
RA_TEMPLATE *RA_template;
|
||||||
@@ -185,7 +185,7 @@ int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){
|
|||||||
if (Is_rrc_registered == 1){
|
if (Is_rrc_registered == 1){
|
||||||
LOG_I(MAC,"[MAIN] calling RRC\n");
|
LOG_I(MAC,"[MAIN] calling RRC\n");
|
||||||
#ifndef CELLULAR //nothing to be done yet for cellular
|
#ifndef CELLULAR //nothing to be done yet for cellular
|
||||||
openair_rrc_top_init(eMBMS_active, cba_group_active,HO_active);
|
openair_rrc_top_init(eMBMS_active, uecap_xer, cba_group_active,HO_active);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -401,7 +401,7 @@ void mac_top_cleanup(void){
|
|||||||
free( Mac_rlc_xface);
|
free( Mac_rlc_xface);
|
||||||
}
|
}
|
||||||
|
|
||||||
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active) {
|
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8_t HO_active) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_
|
|||||||
mac_xface->get_PHR = get_PHR;
|
mac_xface->get_PHR = get_PHR;
|
||||||
LOG_D(MAC,"[MAIN] ALL INIT OK\n");
|
LOG_D(MAC,"[MAIN] ALL INIT OK\n");
|
||||||
|
|
||||||
mac_xface->macphy_init(eMBMS_active,cba_group_active,HO_active);
|
mac_xface->macphy_init(eMBMS_active,uecap_xer,cba_group_active,HO_active);
|
||||||
|
|
||||||
//Mac_rlc_xface->Is_cluster_head[0] = 1;
|
//Mac_rlc_xface->Is_cluster_head[0] = 1;
|
||||||
//Mac_rlc_xface->Is_cluster_head[1] = 0;
|
//Mac_rlc_xface->Is_cluster_head[1] = 0;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ void chbch_phy_sync_success(module_id_t module_idP,frame_t frameP,uint8_t eNB_in
|
|||||||
|
|
||||||
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP,uint8_t free_eNB_index);
|
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP,uint8_t free_eNB_index);
|
||||||
|
|
||||||
int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active);
|
int mac_top_init(int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8_t HO_active);
|
||||||
|
|
||||||
char layer2_init_UE(module_id_t module_idP);
|
char layer2_init_UE(module_id_t module_idP);
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ uint8_t *parse_ulsch_header(uint8_t *mac_header,
|
|||||||
uint16_t tx_lenght);
|
uint16_t tx_lenght);
|
||||||
|
|
||||||
|
|
||||||
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active);
|
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
|
||||||
int mac_init(void);
|
int mac_init(void);
|
||||||
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid);
|
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti,int harq_pid);
|
||||||
int mac_remove_ue(module_id_t Mod_id, int UE_id,int frameP);
|
int mac_remove_ue(module_id_t Mod_id, int UE_id,int frameP);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ do {
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/// Pointer function that initializes L2
|
/// Pointer function that initializes L2
|
||||||
int (*macphy_init)(int eMBMS_active, uint8_t CBA_active,uint8_t HO_active);
|
int (*macphy_init)(int eMBMS_active, char *uecap_xer, uint8_t CBA_active,uint8_t HO_active);
|
||||||
|
|
||||||
/// Pointer function that stops the low-level scheduler due an exit condition
|
/// Pointer function that stops the low-level scheduler due an exit condition
|
||||||
void (*macphy_exit)(const char *);
|
void (*macphy_exit)(const char *);
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ uint8_t do_MIB(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame,
|
|||||||
(void*)&mib,
|
(void*)&mib,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -560,7 +560,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
|
|||||||
(void*)bcch_message,
|
(void*)bcch_message,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1074,7 +1074,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
|||||||
(void*)bcch_message,
|
(void*)bcch_message,
|
||||||
buffer,
|
buffer,
|
||||||
900);
|
900);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1164,7 +1164,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) {
|
|||||||
(void*)&ul_ccch_msg,
|
(void*)&ul_ccch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1242,7 +1242,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
|
|||||||
(void*)&ul_dcch_msg,
|
(void*)&ul_dcch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1296,7 +1296,7 @@ uint8_t do_RRCConnectionReconfigurationComplete(uint8_t Mod_id, uint8_t *buffer,
|
|||||||
(void*)&ul_dcch_msg,
|
(void*)&ul_dcch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1611,7 +1611,7 @@ uint8_t do_RRCConnectionSetup(uint8_t Mod_id,
|
|||||||
(void*)&dl_ccch_msg,
|
(void*)&dl_ccch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1678,7 +1678,7 @@ uint8_t do_SecurityModeCommand(uint8_t Mod_id,
|
|||||||
(void*)&dl_dcch_msg,
|
(void*)&dl_dcch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1745,7 +1745,7 @@ uint8_t do_UECapabilityEnquiry(uint8_t Mod_id,
|
|||||||
(void*)&dl_dcch_msg,
|
(void*)&dl_dcch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1891,7 +1891,7 @@ uint16_t do_RRCConnectionReconfiguration(uint8_t Mod
|
|||||||
(void*)&dl_dcch_msg,
|
(void*)&dl_dcch_msg,
|
||||||
buffer,
|
buffer,
|
||||||
RRC_BUF_SIZE);
|
RRC_BUF_SIZE);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#ifdef XER_PRINT
|
#ifdef XER_PRINT
|
||||||
@@ -2077,7 +2077,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
|||||||
(void*)mcch_message,
|
(void*)mcch_message,
|
||||||
buffer,
|
buffer,
|
||||||
100);
|
100);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -2202,7 +2202,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -2295,18 +2295,32 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t
|
|||||||
return encoded;
|
return encoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
OAI_UECapability_t *fill_ue_capability(void) {
|
//OAI_UECapability_t *fill_ue_capability(void) {
|
||||||
|
OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) {
|
||||||
static OAI_UECapability_t UECapability; /* TODO declared static to allow returning this has an address should be allocated in a cleaner way. */
|
static OAI_UECapability_t UECapability; /* TODO declared static to allow returning this has an address should be allocated in a cleaner way. */
|
||||||
SupportedBandEUTRA_t Bandlist[4];
|
SupportedBandEUTRA_t Bandlist[4];
|
||||||
// BandInfoEUTRA_t BandInfo_meas[4];
|
// BandInfoEUTRA_t BandInfo_meas[4];
|
||||||
InterFreqBandInfo_t InterFreqBandInfo[4][4];
|
InterFreqBandInfo_t InterFreqBandInfo[4][4];
|
||||||
BandInfoEUTRA_t BandInfoEUTRA[4];
|
BandInfoEUTRA_t BandInfoEUTRA[4];
|
||||||
|
|
||||||
UE_EUTRA_Capability_t *UE_EUTRA_Capability;
|
|
||||||
asn_enc_rval_t enc_rval;
|
asn_enc_rval_t enc_rval;
|
||||||
|
asn_dec_rval_t dec_rval;
|
||||||
|
|
||||||
long maxNumberROHC_ContextSessions = PDCP_Parameters__maxNumberROHC_ContextSessions_cs16;
|
long maxNumberROHC_ContextSessions = PDCP_Parameters__maxNumberROHC_ContextSessions_cs16;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
UE_EUTRA_Capability_t *UE_EUTRA_Capability;
|
||||||
|
char UE_EUTRA_Capability_xer[8192];
|
||||||
|
size_t size;
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
LOG_I(RRC,"Allocating %u bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability));
|
||||||
|
|
||||||
|
UE_EUTRA_Capability = CALLOC(1, sizeof(*UE_EUTRA_Capability));
|
||||||
|
|
||||||
|
assert(UE_EUTRA_Capability);
|
||||||
|
|
||||||
|
if (!UE_EUTRA_Capability_xer_fname) {
|
||||||
Bandlist[0].bandEUTRA = 33; // 1900-1920 TDD
|
Bandlist[0].bandEUTRA = 33; // 1900-1920 TDD
|
||||||
Bandlist[0].halfDuplex = 0;
|
Bandlist[0].halfDuplex = 0;
|
||||||
Bandlist[1].bandEUTRA = 38; // 2570-2620 TDD
|
Bandlist[1].bandEUTRA = 38; // 2570-2620 TDD
|
||||||
@@ -2337,9 +2351,6 @@ OAI_UECapability_t *fill_ue_capability(void) {
|
|||||||
InterFreqBandInfo[3][2].interFreqNeedForGaps = 1;
|
InterFreqBandInfo[3][2].interFreqNeedForGaps = 1;
|
||||||
InterFreqBandInfo[3][3].interFreqNeedForGaps = 0;
|
InterFreqBandInfo[3][3].interFreqNeedForGaps = 0;
|
||||||
|
|
||||||
LOG_I(RRC,"Allocating %d bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability));
|
|
||||||
|
|
||||||
UE_EUTRA_Capability = CALLOC(1, sizeof(*UE_EUTRA_Capability));
|
|
||||||
|
|
||||||
UE_EUTRA_Capability->accessStratumRelease = 0;//AccessStratumRelease_rel8;
|
UE_EUTRA_Capability->accessStratumRelease = 0;//AccessStratumRelease_rel8;
|
||||||
UE_EUTRA_Capability->ue_Category = 4;
|
UE_EUTRA_Capability->ue_Category = 4;
|
||||||
@@ -2391,6 +2402,21 @@ OAI_UECapability_t *fill_ue_capability(void) {
|
|||||||
// UE_EUTRA_Capability->measParameters.bandListEUTRA.list.count = 0; // no measurements on other bands
|
// UE_EUTRA_Capability->measParameters.bandListEUTRA.list.count = 0; // no measurements on other bands
|
||||||
// UE_EUTRA_Capability->featureGroupIndicators // null
|
// UE_EUTRA_Capability->featureGroupIndicators // null
|
||||||
// UE_EUTRA_Capability->interRAT_Parameters // null
|
// UE_EUTRA_Capability->interRAT_Parameters // null
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
f = fopen(UE_EUTRA_Capability_xer_fname, "r");
|
||||||
|
assert(f);
|
||||||
|
size = fread(UE_EUTRA_Capability_xer, 1, sizeof UE_EUTRA_Capability_xer, f);
|
||||||
|
if (size == 0 || size == sizeof UE_EUTRA_Capability_xer) {
|
||||||
|
LOG_E(RRC,"UE Capabilities XER file %s is too large\n", UE_EUTRA_Capability_xer_fname);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
dec_rval = xer_decode(0, &asn_DEF_UE_EUTRA_Capability, (void*)UE_EUTRA_Capability, UE_EUTRA_Capability_xer, size);
|
||||||
|
assert(dec_rval.code == RC_OK);
|
||||||
|
}
|
||||||
|
|
||||||
UECapability.UE_EUTRA_Capability = UE_EUTRA_Capability;
|
UECapability.UE_EUTRA_Capability = UE_EUTRA_Capability;
|
||||||
#ifdef XER_PRINT
|
#ifdef XER_PRINT
|
||||||
@@ -2400,7 +2426,7 @@ OAI_UECapability_t *fill_ue_capability(void) {
|
|||||||
(void*)UE_EUTRA_Capability,
|
(void*)UE_EUTRA_Capability,
|
||||||
&UECapability.sdu[0],
|
&UECapability.sdu[0],
|
||||||
MAX_UE_CAPABILITY_SIZE);
|
MAX_UE_CAPABILITY_SIZE);
|
||||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
|
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t trans
|
|||||||
|
|
||||||
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer);
|
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer);
|
||||||
|
|
||||||
OAI_UECapability_t *fill_ue_capability(void);
|
OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer);
|
||||||
|
|
||||||
uint8_t do_UECapabilityEnquiry(uint8_t Mod_id,
|
uint8_t do_UECapabilityEnquiry(uint8_t Mod_id,
|
||||||
uint8_t *buffer,
|
uint8_t *buffer,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
//main.c
|
//main.c
|
||||||
int rrc_init_global_param(void);
|
int rrc_init_global_param(void);
|
||||||
int L3_xface_init(void);
|
int L3_xface_init(void);
|
||||||
void openair_rrc_top_init(int eMBMS_active, uint8_t cba_group_active,uint8_t HO_enabled);
|
void openair_rrc_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,uint8_t HO_enabled);
|
||||||
char openair_rrc_lite_eNB_init(module_id_t module_idP);
|
char openair_rrc_lite_eNB_init(module_id_t module_idP);
|
||||||
char openair_rrc_lite_ue_init(module_id_t module_idP,uint8_t CH_IDX);
|
char openair_rrc_lite_ue_init(module_id_t module_idP,uint8_t CH_IDX);
|
||||||
void rrc_config_buffer(SRB_INFO *srb_info, uint8_t Lchan_type, uint8_t Role);
|
void rrc_config_buffer(SRB_INFO *srb_info, uint8_t Lchan_type, uint8_t Role);
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ void rrc_config_buffer(SRB_INFO *Srb_info, uint8_t Lchan_type, uint8_t Role) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
void openair_rrc_top_init(int eMBMS_active, uint8_t cba_group_active,uint8_t HO_active){
|
void openair_rrc_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,uint8_t HO_active){
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
module_id_t module_id;
|
module_id_t module_id;
|
||||||
@@ -221,16 +221,11 @@ void openair_rrc_top_init(int eMBMS_active, uint8_t cba_group_active,uint8_t HO_
|
|||||||
LOG_D(RRC, "ALLOCATE %d Bytes for UE_RRC_INST @ %p\n", (unsigned int)(NB_UE_INST*sizeof(UE_RRC_INST)), UE_rrc_inst);
|
LOG_D(RRC, "ALLOCATE %d Bytes for UE_RRC_INST @ %p\n", (unsigned int)(NB_UE_INST*sizeof(UE_RRC_INST)), UE_rrc_inst);
|
||||||
|
|
||||||
// fill UE capability
|
// fill UE capability
|
||||||
UECap = fill_ue_capability ();
|
UECap = fill_ue_capability (uecap_xer);
|
||||||
for (module_id = 0; module_id < NB_UE_INST; module_id++) {
|
for (module_id = 0; module_id < NB_UE_INST; module_id++) {
|
||||||
UE_rrc_inst[module_id].UECapability = UECap->sdu;
|
UE_rrc_inst[module_id].UECapability = UECap->sdu;
|
||||||
UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size;
|
UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
do_UECapabilityEnquiry(0,
|
|
||||||
dummy_buffer,
|
|
||||||
0,
|
|
||||||
0);*/
|
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active);
|
LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active);
|
||||||
for (module_id=0;module_id<NB_UE_INST;module_id++) {
|
for (module_id=0;module_id<NB_UE_INST;module_id++) {
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ const char* eurecomFunctionsNames[] = {
|
|||||||
"dlsch_decoding7",
|
"dlsch_decoding7",
|
||||||
"rx_pdcch",
|
"rx_pdcch",
|
||||||
"dci_decoding",
|
"dci_decoding",
|
||||||
|
"rx_phich",
|
||||||
"phy_ue_config_sib2",
|
"phy_ue_config_sib2",
|
||||||
"macxface_phy_config_sib1_eNB",
|
"macxface_phy_config_sib1_eNB",
|
||||||
"macxface_phy_config_sib2_eNB",
|
"macxface_phy_config_sib2_eNB",
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ typedef enum {
|
|||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
|
||||||
|
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ETHERNET_OBJ += $(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.o
|
ETHERNET_OBJ += $(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.o
|
||||||
ETHERNET_FILE_OBJ += $(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
|
ETHERNET_FILE_OBJ += $(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
|
||||||
ETHERNET_CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/COMMON -I$(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/COMMON
|
ETHERNET_CFLAGS += -O2 -I$(OPENAIR_TARGETS)/ARCH/COMMON -I$(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/COMMON
|
||||||
|
|
||||||
|
|||||||
@@ -106,15 +106,15 @@ int ethernet_write_data(int Mod_id, openair0_timestamp timestamp, const void **b
|
|||||||
((int16_t *)buff2)[0] = 1+(antenna_id<<1);
|
((int16_t *)buff2)[0] = 1+(antenna_id<<1);
|
||||||
((int16_t *)buff2)[1] = nsamps;
|
((int16_t *)buff2)[1] = nsamps;
|
||||||
*((openair0_timestamp *)(buff2+(sizeof(int16_t)*2))) = timestamp;
|
*((openair0_timestamp *)(buff2+(sizeof(int16_t)*2))) = timestamp;
|
||||||
printf("Timestamp TX sent : %d\n",timestamp);
|
//printf("Timestamp TX sent : %d\n",timestamp);
|
||||||
|
|
||||||
// printf("buffer head : %d %d %d %d \n",((int16_t *)buff2)[0],((int16_t *)buff2)[1],((int16_t *)buff2)[2],((int16_t *)buff2)[3]);
|
// printf("buffer head : %d %d %d %d \n",((int16_t *)buff2)[0],((int16_t *)buff2)[1],((int16_t *)buff2)[2],((int16_t *)buff2)[3]);
|
||||||
while(n_written < nsamps) {
|
while(n_written < (nsamps<<2)) {
|
||||||
/* Send packet */
|
/* Send packet */
|
||||||
if ((n_written += sendto(sockfd[Mod_id],
|
if ((n_written += sendto(sockfd[Mod_id],
|
||||||
buff2,
|
buff2,
|
||||||
(nsamps<<2)+sizeof(openair0_timestamp)+(2*sizeof(int16_t)),
|
(nsamps<<2)+sizeof(openair0_timestamp)+(2*sizeof(int16_t)),
|
||||||
0,
|
MSG_DONTWAIT,
|
||||||
(struct sockaddr*)&dest_addr[Mod_id],
|
(struct sockaddr*)&dest_addr[Mod_id],
|
||||||
dest_addr_len[Mod_id])) < 0) {
|
dest_addr_len[Mod_id])) < 0) {
|
||||||
printf("Send failed for Mod_id %d\n",Mod_id);
|
printf("Send failed for Mod_id %d\n",Mod_id);
|
||||||
@@ -137,16 +137,14 @@ int ethernet_read_data(int Mod_id,openair0_timestamp *timestamp,void **buff, int
|
|||||||
int ret;
|
int ret;
|
||||||
openair0_timestamp temp = *(openair0_timestamp*)(buff2);
|
openair0_timestamp temp = *(openair0_timestamp*)(buff2);
|
||||||
int16_t mesg[2];
|
int16_t mesg[2];
|
||||||
char str[INET_ADDRSTRLEN];
|
|
||||||
|
|
||||||
mesg[0] = 0+(antenna_id<<1);
|
mesg[0] = 0+(antenna_id<<1);
|
||||||
mesg[1] = nsamps;
|
mesg[1] = nsamps;
|
||||||
|
|
||||||
inet_ntop(AF_INET, &(dest_addr[Mod_id].sin_addr), str, INET_ADDRSTRLEN);
|
|
||||||
// send command RX for nsamps samples
|
|
||||||
printf("requesting %d samples from (%s:%d)\n",nsamps,str,ntohs(dest_addr[Mod_id].sin_port));
|
|
||||||
|
|
||||||
sendto(sockfd[Mod_id],mesg,4,0,(struct sockaddr *)&dest_addr[Mod_id],dest_addr_len[Mod_id]);
|
// send command RX for nsamps samples
|
||||||
|
|
||||||
|
sendto(sockfd[Mod_id],mesg,4,MSG_DONTWAIT,(struct sockaddr *)&dest_addr[Mod_id],dest_addr_len[Mod_id]);
|
||||||
|
|
||||||
bytes_received=0;
|
bytes_received=0;
|
||||||
block_cnt=0;
|
block_cnt=0;
|
||||||
@@ -178,7 +176,7 @@ int ethernet_read_data(int Mod_id,openair0_timestamp *timestamp,void **buff, int
|
|||||||
|
|
||||||
//printf("buffer head : %x %x %x %x \n",((int32_t *)buff2)[0],((int32_t *)buff2)[1],((int32_t *)buff2)[2],((int32_t *)buff2)[3]);
|
//printf("buffer head : %x %x %x %x \n",((int32_t *)buff2)[0],((int32_t *)buff2)[1],((int32_t *)buff2)[2],((int32_t *)buff2)[3]);
|
||||||
*timestamp = *(openair0_timestamp *)(buff2);
|
*timestamp = *(openair0_timestamp *)(buff2);
|
||||||
printf("Received %d samples, timestamp = %d\n",bytes_received>>2,*(int32_t*)timestamp);
|
// printf("Received %d samples, timestamp = %d\n",bytes_received>>2,*(int32_t*)timestamp);
|
||||||
*(openair0_timestamp *)(buff2) = temp;
|
*(openair0_timestamp *)(buff2) = temp;
|
||||||
return nsamps;
|
return nsamps;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<UE-EUTRA-Capability>
|
||||||
|
<accessStratumRelease><rel8/></accessStratumRelease>
|
||||||
|
<ue-Category>4</ue-Category>
|
||||||
|
<pdcp-Parameters>
|
||||||
|
<supportedROHC-Profiles>
|
||||||
|
<profile0x0001><false/></profile0x0001>
|
||||||
|
<profile0x0002><false/></profile0x0002>
|
||||||
|
<profile0x0003><false/></profile0x0003>
|
||||||
|
<profile0x0004><false/></profile0x0004>
|
||||||
|
<profile0x0006><false/></profile0x0006>
|
||||||
|
<profile0x0101><false/></profile0x0101>
|
||||||
|
<profile0x0102><false/></profile0x0102>
|
||||||
|
<profile0x0103><false/></profile0x0103>
|
||||||
|
<profile0x0104><false/></profile0x0104>
|
||||||
|
</supportedROHC-Profiles>
|
||||||
|
<maxNumberROHC-ContextSessions><cs16/></maxNumberROHC-ContextSessions>
|
||||||
|
</pdcp-Parameters>
|
||||||
|
<phyLayerParameters>
|
||||||
|
<ue-TxAntennaSelectionSupported><false/></ue-TxAntennaSelectionSupported>
|
||||||
|
<ue-SpecificRefSigsSupported><false/></ue-SpecificRefSigsSupported>
|
||||||
|
</phyLayerParameters>
|
||||||
|
<rf-Parameters>
|
||||||
|
<supportedBandListEUTRA>
|
||||||
|
<SupportedBandEUTRA>
|
||||||
|
<bandEUTRA>33</bandEUTRA>
|
||||||
|
<halfDuplex><false/></halfDuplex>
|
||||||
|
</SupportedBandEUTRA>
|
||||||
|
<SupportedBandEUTRA>
|
||||||
|
<bandEUTRA>38</bandEUTRA>
|
||||||
|
<halfDuplex><false/></halfDuplex>
|
||||||
|
</SupportedBandEUTRA>
|
||||||
|
<SupportedBandEUTRA>
|
||||||
|
<bandEUTRA>5</bandEUTRA>
|
||||||
|
<halfDuplex><false/></halfDuplex>
|
||||||
|
</SupportedBandEUTRA>
|
||||||
|
<SupportedBandEUTRA>
|
||||||
|
<bandEUTRA>7</bandEUTRA>
|
||||||
|
<halfDuplex><false/></halfDuplex>
|
||||||
|
</SupportedBandEUTRA>
|
||||||
|
</supportedBandListEUTRA>
|
||||||
|
</rf-Parameters>
|
||||||
|
<measParameters>
|
||||||
|
<bandListEUTRA>
|
||||||
|
<BandInfoEUTRA>
|
||||||
|
<interFreqBandList>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><false/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
</interFreqBandList>
|
||||||
|
</BandInfoEUTRA>
|
||||||
|
<BandInfoEUTRA>
|
||||||
|
<interFreqBandList>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><false/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
</interFreqBandList>
|
||||||
|
</BandInfoEUTRA>
|
||||||
|
<BandInfoEUTRA>
|
||||||
|
<interFreqBandList>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><false/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
</interFreqBandList>
|
||||||
|
</BandInfoEUTRA>
|
||||||
|
<BandInfoEUTRA>
|
||||||
|
<interFreqBandList>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><true/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
<InterFreqBandInfo>
|
||||||
|
<interFreqNeedForGaps><false/></interFreqNeedForGaps>
|
||||||
|
</InterFreqBandInfo>
|
||||||
|
</interFreqBandList>
|
||||||
|
</BandInfoEUTRA>
|
||||||
|
</bandListEUTRA>
|
||||||
|
</measParameters>
|
||||||
|
<interRAT-Parameters>
|
||||||
|
</interRAT-Parameters>
|
||||||
|
</UE-EUTRA-Capability>
|
||||||
@@ -113,11 +113,21 @@ eNBs =
|
|||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
|
<<<<<<< .mine
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||||
|
=======
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||||
|
>>>>>>> .r6319
|
||||||
|
|
||||||
|
<<<<<<< .mine
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||||
|
=======
|
||||||
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";
|
||||||
|
>>>>>>> .r6319
|
||||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,143 +0,0 @@
|
|||||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
|
||||||
# Asn1_verbosity, choice in: none, info, annoying
|
|
||||||
Asn1_verbosity = "none";
|
|
||||||
|
|
||||||
eNBs =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
# real_time choice in {hard, rt-preempt, no}
|
|
||||||
real_time = "no";
|
|
||||||
////////// Identification parameters:
|
|
||||||
eNB_ID = 0xe00;
|
|
||||||
|
|
||||||
cell_type = "CELL_MACRO_ENB";
|
|
||||||
|
|
||||||
eNB_name = "eNB_Eurecom_LTEBox";
|
|
||||||
|
|
||||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
|
||||||
tracking_area_code = "1";
|
|
||||||
|
|
||||||
mobile_country_code = "208";
|
|
||||||
|
|
||||||
mobile_network_code = "92";
|
|
||||||
|
|
||||||
////////// Physical parameters:
|
|
||||||
|
|
||||||
component_carriers = (
|
|
||||||
{
|
|
||||||
frame_type = "FDD";
|
|
||||||
tdd_config = 3;
|
|
||||||
tdd_config_s = 0;
|
|
||||||
prefix_type = "NORMAL";
|
|
||||||
eutra_band = 7;
|
|
||||||
downlink_frequency = 2660000000L;
|
|
||||||
uplink_frequency_offset = -120000000;
|
|
||||||
Nid_cell = 0;
|
|
||||||
N_RB_DL = 50;
|
|
||||||
Nid_cell_mbsfn = 0;
|
|
||||||
nb_antennas_tx = 1;
|
|
||||||
nb_antennas_rx = 1;
|
|
||||||
tx_gain = 90;
|
|
||||||
rx_gain = 135;
|
|
||||||
prach_root = 0;
|
|
||||||
prach_config_index = 0;
|
|
||||||
prach_high_speed = "DISABLE";
|
|
||||||
prach_zero_correlation = 1;
|
|
||||||
prach_freq_offset = 2;
|
|
||||||
pucch_delta_shift = 1;
|
|
||||||
pucch_nRB_CQI = 1;
|
|
||||||
pucch_nCS_AN = 0;
|
|
||||||
pucch_n1_AN = 32;
|
|
||||||
pdsch_referenceSignalPower = -26;
|
|
||||||
pdsch_p_b = 0;
|
|
||||||
pusch_n_SB = 1;
|
|
||||||
pusch_enable64QAM = "DISABLE";
|
|
||||||
pusch_hoppingMode = "interSubFrame";
|
|
||||||
pusch_hoppingOffset = 0;
|
|
||||||
pusch_groupHoppingEnabled = "ENABLE";
|
|
||||||
pusch_groupAssignment = 0;
|
|
||||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
|
||||||
pusch_nDMRS1 = 1;
|
|
||||||
phich_duration = "NORMAL";
|
|
||||||
phich_resource = "ONESIXTH";
|
|
||||||
srs_enable = "DISABLE";
|
|
||||||
/* srs_BandwidthConfig =;
|
|
||||||
srs_SubframeConfig =;
|
|
||||||
srs_ackNackST =;
|
|
||||||
srs_MaxUpPts =;*/
|
|
||||||
|
|
||||||
pusch_p0_Nominal = -108;
|
|
||||||
pusch_alpha = "AL1";
|
|
||||||
pucch_p0_Nominal = -108;
|
|
||||||
msg3_delta_Preamble = 6;
|
|
||||||
pucch_deltaF_Format1 = "deltaF2";
|
|
||||||
pucch_deltaF_Format1b = "deltaF3";
|
|
||||||
pucch_deltaF_Format2 = "deltaF0";
|
|
||||||
pucch_deltaF_Format2a = "deltaF0";
|
|
||||||
pucch_deltaF_Format2b = "deltaF0";
|
|
||||||
|
|
||||||
rach_numberOfRA_Preambles = 64;
|
|
||||||
rach_preamblesGroupAConfig = "DISABLE";
|
|
||||||
/*
|
|
||||||
rach_sizeOfRA_PreamblesGroupA = ;
|
|
||||||
rach_messageSizeGroupA = ;
|
|
||||||
rach_messagePowerOffsetGroupB = ;
|
|
||||||
*/
|
|
||||||
rach_powerRampingStep = 4;
|
|
||||||
rach_preambleInitialReceivedTargetPower = -108;
|
|
||||||
rach_preambleTransMax = 10;
|
|
||||||
rach_raResponseWindowSize = 10;
|
|
||||||
rach_macContentionResolutionTimer = 48;
|
|
||||||
rach_maxHARQ_Msg3Tx = 4;
|
|
||||||
|
|
||||||
pcch_default_PagingCycle = 128;
|
|
||||||
pcch_nB = "oneT";
|
|
||||||
bcch_modificationPeriodCoeff = 2;
|
|
||||||
ue_TimersAndConstants_t300 = 1000;
|
|
||||||
ue_TimersAndConstants_t301 = 1000;
|
|
||||||
ue_TimersAndConstants_t310 = 1000;
|
|
||||||
ue_TimersAndConstants_t311 = 10000;
|
|
||||||
ue_TimersAndConstants_n310 = 20;
|
|
||||||
ue_TimersAndConstants_n311 = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
////////// MME parameters:
|
|
||||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
|
||||||
ipv6 = "192:168:30::17";
|
|
||||||
active = "yes";
|
|
||||||
preference = "ipv4";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
NETWORK_INTERFACES :
|
|
||||||
{
|
|
||||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
|
||||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
|
||||||
|
|
||||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
|
||||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
|
||||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
|
||||||
};
|
|
||||||
|
|
||||||
log_config :
|
|
||||||
{
|
|
||||||
global_log_level ="info";
|
|
||||||
global_log_verbosity ="medium";
|
|
||||||
hw_log_level ="info";
|
|
||||||
hw_log_verbosity ="medium";
|
|
||||||
phy_log_level ="info";
|
|
||||||
phy_log_verbosity ="medium";
|
|
||||||
mac_log_level ="info";
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
@@ -98,9 +98,11 @@ include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
|
|||||||
ifeq ($(USRP),1)
|
ifeq ($(USRP),1)
|
||||||
|
|
||||||
include $(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/Makefile.inc
|
include $(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/Makefile.inc
|
||||||
CFLAGS += -I/opt/include/uhd -L/opt/lib -luhd -lpthread -lstdc++
|
#CFLAGS += -I/opt/include/uhd -L/opt/lib -luhd -lpthread -lstdc++
|
||||||
|
CFLAGS += -I/usr/include/uhd -L/usr/lib -luhd -lpthread -lstdc++
|
||||||
CFLAGS += -DUSRP
|
CFLAGS += -DUSRP
|
||||||
LDFLAGS += -L/opt/lib -luhd -lpthread -lstdc++
|
#LDFLAGS += -L/opt/lib -luhd -lpthread -lstdc++
|
||||||
|
LDFLAGS += -L/usr/lib/ -luhd -lpthread -lstdc++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ETHERNET),1)
|
ifeq ($(ETHERNET),1)
|
||||||
|
|||||||
+153
-68
@@ -214,10 +214,6 @@ static pthread_t forms_thread; //xforms
|
|||||||
static pthread_t thread3; //emos
|
static pthread_t thread3; //emos
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPECTRA
|
|
||||||
static pthread_t sensing_thread;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
openair0_device openair0;
|
openair0_device openair0;
|
||||||
openair0_timestamp timestamp;
|
openair0_timestamp timestamp;
|
||||||
|
|
||||||
@@ -258,7 +254,7 @@ static char *conf_config_file_name = NULL;
|
|||||||
static char *itti_dump_file = NULL;
|
static char *itti_dump_file = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USRP
|
#ifdef EXMIMO
|
||||||
double tx_gain[MAX_NUM_CCs][4] = {{20,20,0,0},{20,20,0,0}};
|
double tx_gain[MAX_NUM_CCs][4] = {{20,20,0,0},{20,20,0,0}};
|
||||||
double rx_gain[MAX_NUM_CCs][4] = {{20,20,0,0},{20,20,0,0}};
|
double rx_gain[MAX_NUM_CCs][4] = {{20,20,0,0},{20,20,0,0}};
|
||||||
// these are for EXMIMO2 target only
|
// these are for EXMIMO2 target only
|
||||||
@@ -293,6 +289,22 @@ unsigned int samples_per_frame = 307200;
|
|||||||
unsigned int samples_per_packets = 2048; // samples got every recv or send
|
unsigned int samples_per_packets = 2048; // samples got every recv or send
|
||||||
unsigned int tx_forward_nsamps;
|
unsigned int tx_forward_nsamps;
|
||||||
|
|
||||||
|
#ifndef USRP
|
||||||
|
//256 sample blocks
|
||||||
|
int sf_bounds_1_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
||||||
|
int sf_bounds_1_5_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
|
||||||
|
|
||||||
|
int sf_bounds_5[10] = {5,10,15,20,25,30,35,40,45,50};
|
||||||
|
int sf_bounds_5_tx[10] = {3,8,13,18,23,28,33,38,43,48};
|
||||||
|
|
||||||
|
int sf_bounds_10[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
|
||||||
|
int sf_bounds_10_tx[10] = {5, 15, 25, 35, 45, 55, 65, 75, 85,95};
|
||||||
|
|
||||||
|
int sf_bounds_20[10] = {20, 40, 60, 80, 100, 120, 140, 160, 180, 200};
|
||||||
|
int sf_bounds_20_tx[10] = {10, 30, 50, 70, 90, 110, 130, 150, 170, 190};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
int sf_bounds_1_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
int sf_bounds_1_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
|
||||||
int sf_bounds_1_5_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
|
int sf_bounds_1_5_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
|
||||||
|
|
||||||
@@ -304,6 +316,7 @@ int sf_bounds_10_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
|
|||||||
|
|
||||||
int sf_bounds_20[10] = {15, 30, 45, 60, 75, 90, 105, 120, 135, 150};
|
int sf_bounds_20[10] = {15, 30, 45, 60, 75, 90, 105, 120, 135, 150};
|
||||||
int sf_bounds_20_tx[10] = {7, 22, 37, 52, 67, 82, 97, 112, 127, 142};
|
int sf_bounds_20_tx[10] = {7, 22, 37, 52, 67, 82, 97, 112, 127, 142};
|
||||||
|
#endif
|
||||||
|
|
||||||
int *sf_bounds;
|
int *sf_bounds;
|
||||||
int *sf_bounds_tx;
|
int *sf_bounds_tx;
|
||||||
@@ -338,7 +351,7 @@ static char do_forms=0;
|
|||||||
int otg_enabled;
|
int otg_enabled;
|
||||||
#endif
|
#endif
|
||||||
//int number_of_cards = 1;
|
//int number_of_cards = 1;
|
||||||
#ifndef USRP
|
#ifdef EXMIMO
|
||||||
static int mbox_bounds[20] = {8,16,24,30,38,46,54,60,68,76,84,90,98,106,114,120,128,136,144, 0}; ///boundaries of slots in terms ob mbox counter rounded up to even numbers
|
static int mbox_bounds[20] = {8,16,24,30,38,46,54,60,68,76,84,90,98,106,114,120,128,136,144, 0}; ///boundaries of slots in terms ob mbox counter rounded up to even numbers
|
||||||
//static int mbox_bounds[20] = {6,14,22,28,36,44,52,58,66,74,82,88,96,104,112,118,126,134,142, 148}; ///boundaries of slots in terms ob mbox counter rounded up to even numbers
|
//static int mbox_bounds[20] = {6,14,22,28,36,44,52,58,66,74,82,88,96,104,112,118,126,134,142, 148}; ///boundaries of slots in terms ob mbox counter rounded up to even numbers
|
||||||
#endif
|
#endif
|
||||||
@@ -351,14 +364,16 @@ uint32_t target_ul_mcs = 10;
|
|||||||
uint8_t exit_missed_slots=1;
|
uint8_t exit_missed_slots=1;
|
||||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||||
|
|
||||||
|
|
||||||
time_stats_t softmodem_stats_mt; // main thread
|
time_stats_t softmodem_stats_mt; // main thread
|
||||||
time_stats_t softmodem_stats_hw; // hw acquisation
|
time_stats_t softmodem_stats_hw; // hw acquisition
|
||||||
time_stats_t softmodem_stats_tx_sf[10]; // total tx time
|
time_stats_t softmodem_stats_tx_sf[10]; // total tx time
|
||||||
time_stats_t softmodem_stats_rx_sf[10]; // total rx time
|
time_stats_t softmodem_stats_rx_sf[10]; // total rx time
|
||||||
void reset_opp_meas(void);
|
void reset_opp_meas(void);
|
||||||
void print_opp_meas(void);
|
void print_opp_meas(void);
|
||||||
int transmission_mode=1;
|
int transmission_mode=1;
|
||||||
|
|
||||||
|
|
||||||
int16_t glog_level = LOG_DEBUG;
|
int16_t glog_level = LOG_DEBUG;
|
||||||
int16_t glog_verbosity = LOG_MED;
|
int16_t glog_verbosity = LOG_MED;
|
||||||
int16_t hw_log_level = LOG_DEBUG;
|
int16_t hw_log_level = LOG_DEBUG;
|
||||||
@@ -384,6 +399,16 @@ int16_t osa_log_level = LOG_INFO;
|
|||||||
int16_t osa_log_verbosity = LOG_MED;
|
int16_t osa_log_verbosity = LOG_MED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ETHERNET
|
||||||
|
char rrh_eNB_ip[20] = "127.0.0.1";
|
||||||
|
int rrh_eNB_port = 1500;
|
||||||
|
char *rrh_UE_ip = "127.0.0.1";
|
||||||
|
int rrh_UE_port = 1600;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char uecap_xer[1024],uecap_xer_in=0;
|
||||||
|
|
||||||
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));
|
||||||
@@ -746,37 +771,6 @@ void *emos_thread (void *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPECTRA
|
|
||||||
void *sensing (void *arg)
|
|
||||||
{
|
|
||||||
struct sched_param sched_param;
|
|
||||||
|
|
||||||
sched_param.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
|
||||||
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
|
||||||
|
|
||||||
printf("[SPECTRA] sensing thread started with priority %d\n",sched_param.sched_priority);
|
|
||||||
|
|
||||||
while (oai_exit==0) {
|
|
||||||
|
|
||||||
|
|
||||||
openair0_cfg[0].rx_freq[2]+= 5e6;
|
|
||||||
if (openair0_cfg[0].rx_freq[2] >= 750000000)
|
|
||||||
openair0_cfg[0].rx_freq[2] = 727500000;
|
|
||||||
|
|
||||||
|
|
||||||
//LOG_I(HW,"[SPECTRA] changing frequency to %u \n",(uint32_t)openair0_cfg[1].rx_freq[0]);
|
|
||||||
|
|
||||||
openair0_reconfig(&openair0_cfg[0]);
|
|
||||||
|
|
||||||
usleep(200000);
|
|
||||||
//sleep(1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_exit((void*) arg);
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1389,9 +1383,12 @@ static void *eNB_thread(void *arg)
|
|||||||
void *rxp[2],*txp[2];
|
void *rxp[2],*txp[2];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
int trace_cnt=0;
|
||||||
hw_subframe = 0;
|
hw_subframe = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct timespec trx_time0,trx_time1,trx_time2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
// Wait for eNB application initialization to be complete (eNB registration to MME)
|
// Wait for eNB application initialization to be complete (eNB registration to MME)
|
||||||
@@ -1548,6 +1545,7 @@ static void *eNB_thread(void *arg)
|
|||||||
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,rx_cnt*samples_per_packets);
|
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,rx_cnt*samples_per_packets);
|
||||||
|
|
||||||
|
|
||||||
|
clock_gettime(CLOCK_MONOTONIC,&trx_time0);
|
||||||
for (i=0;i<PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx;i++)
|
for (i=0;i<PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx;i++)
|
||||||
rxp[i] = (void*)&rxdata[i][rx_cnt*samples_per_packets];
|
rxp[i] = (void*)&rxdata[i][rx_cnt*samples_per_packets];
|
||||||
start_meas(&softmodem_stats_hw);
|
start_meas(&softmodem_stats_hw);
|
||||||
@@ -1559,6 +1557,7 @@ static void *eNB_thread(void *arg)
|
|||||||
samples_per_packets,
|
samples_per_packets,
|
||||||
PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx);
|
PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx);
|
||||||
stop_meas(&softmodem_stats_hw);
|
stop_meas(&softmodem_stats_hw);
|
||||||
|
clock_gettime(CLOCK_MONOTONIC,&trx_time1);
|
||||||
|
|
||||||
if (rxs != samples_per_packets)
|
if (rxs != samples_per_packets)
|
||||||
oai_exit=1;
|
oai_exit=1;
|
||||||
@@ -1571,6 +1570,7 @@ static void *eNB_thread(void *arg)
|
|||||||
|
|
||||||
for (i=0;i<PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx;i++)
|
for (i=0;i<PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx;i++)
|
||||||
txp[i] = (void*)&txdata[i][tx_cnt*samples_per_packets];
|
txp[i] = (void*)&txdata[i][tx_cnt*samples_per_packets];
|
||||||
|
|
||||||
openair0.trx_write_func(&openair0,
|
openair0.trx_write_func(&openair0,
|
||||||
(timestamp+samples_per_packets*tx_delay-tx_forward_nsamps),
|
(timestamp+samples_per_packets*tx_delay-tx_forward_nsamps),
|
||||||
txp,
|
txp,
|
||||||
@@ -1579,7 +1579,13 @@ static void *eNB_thread(void *arg)
|
|||||||
1);
|
1);
|
||||||
|
|
||||||
stop_meas(&softmodem_stats_mt);
|
stop_meas(&softmodem_stats_mt);
|
||||||
|
clock_gettime(CLOCK_MONOTONIC,&trx_time2);
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,0);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,0);
|
||||||
|
|
||||||
|
if (trace_cnt++<10)
|
||||||
|
printf("TRX: t1 %llu (trx_read), t2 %llu (trx_write)\n",(long long unsigned int)(trx_time1.tv_nsec - trx_time0.tv_nsec), (long long unsigned int)(trx_time2.tv_nsec - trx_time1.tv_nsec));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
rt_sleep_ns(1000000);
|
rt_sleep_ns(1000000);
|
||||||
#endif
|
#endif
|
||||||
@@ -1877,6 +1883,11 @@ static void *UE_thread_synch(void *arg) {
|
|||||||
|
|
||||||
static void *UE_thread_tx(void *arg) {
|
static void *UE_thread_tx(void *arg) {
|
||||||
|
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
struct sched_attr attr;
|
||||||
|
unsigned int flags = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
PHY_VARS_UE *UE = (PHY_VARS_UE*)arg;
|
PHY_VARS_UE *UE = (PHY_VARS_UE*)arg;
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
#ifndef OPENAIR2
|
||||||
@@ -1887,6 +1898,24 @@ static void *UE_thread_tx(void *arg) {
|
|||||||
#endif
|
#endif
|
||||||
UE->instance_cnt_tx=-1;
|
UE->instance_cnt_tx=-1;
|
||||||
|
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
attr.size = sizeof(attr);
|
||||||
|
attr.sched_flags = 0;
|
||||||
|
attr.sched_nice = 0;
|
||||||
|
attr.sched_priority = 0;
|
||||||
|
|
||||||
|
/* This creates a 1ms reservation every 10ms period*/
|
||||||
|
attr.sched_policy = SCHED_DEADLINE;
|
||||||
|
attr.sched_runtime = 1 * 1000000; // each tx thread requires 1ms to finish its job
|
||||||
|
attr.sched_deadline =1 * 1000000; // each tx thread will finish within 1ms
|
||||||
|
attr.sched_period = 1 * 10000000; // each tx thread has a period of 10ms from the starting point
|
||||||
|
|
||||||
|
if (sched_setattr(0, &attr, flags) < 0 ){
|
||||||
|
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
|
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
@@ -1941,8 +1970,31 @@ static void *UE_thread_rx(void *arg) {
|
|||||||
PHY_VARS_UE *UE = (PHY_VARS_UE*)arg;
|
PHY_VARS_UE *UE = (PHY_VARS_UE*)arg;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
struct sched_attr attr;
|
||||||
|
unsigned int flags = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
UE->instance_cnt_rx=-1;
|
UE->instance_cnt_rx=-1;
|
||||||
|
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
attr.size = sizeof(attr);
|
||||||
|
attr.sched_flags = 0;
|
||||||
|
attr.sched_nice = 0;
|
||||||
|
attr.sched_priority = 0;
|
||||||
|
|
||||||
|
/* This creates a 1ms reservation every 10ms period*/
|
||||||
|
attr.sched_policy = SCHED_DEADLINE;
|
||||||
|
attr.sched_runtime = 1 * 1000000; // each tx thread requires 1ms to finish its job
|
||||||
|
attr.sched_deadline =1 * 1000000; // each tx thread will finish within 1ms
|
||||||
|
attr.sched_period = 1 * 10000000; // each tx thread has a period of 10ms from the starting point
|
||||||
|
|
||||||
|
if (sched_setattr(0, &attr, flags) < 0 ){
|
||||||
|
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
|
|
||||||
#ifndef EXMIMO
|
#ifndef EXMIMO
|
||||||
@@ -2041,6 +2093,13 @@ static void *UE_thread(void *arg) {
|
|||||||
unsigned int rxs;
|
unsigned int rxs;
|
||||||
void *rxp[2],*txp[2];
|
void *rxp[2],*txp[2];
|
||||||
|
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
struct sched_attr attr;
|
||||||
|
unsigned int flags = 0;
|
||||||
|
unsigned long mask = 1; /* processor 0 */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
printf("waiting for sync (UE_thread)\n");
|
printf("waiting for sync (UE_thread)\n");
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
rt_sem_wait(sync_sem);
|
rt_sem_wait(sync_sem);
|
||||||
@@ -2054,6 +2113,32 @@ static void *UE_thread(void *arg) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("starting UE thread\n");
|
printf("starting UE thread\n");
|
||||||
|
#ifdef LOWLATENCY
|
||||||
|
attr.size = sizeof(attr);
|
||||||
|
attr.sched_flags = 0;
|
||||||
|
attr.sched_nice = 0;
|
||||||
|
attr.sched_priority = 0;
|
||||||
|
|
||||||
|
/* This creates a .5 ms reservation */
|
||||||
|
attr.sched_policy = SCHED_DEADLINE;
|
||||||
|
attr.sched_runtime = 0.5 * 1000000;
|
||||||
|
attr.sched_deadline = 0.5 * 1000000;
|
||||||
|
attr.sched_period = 1 * 1000000;
|
||||||
|
|
||||||
|
/* pin the UE main thread to CPU0*/
|
||||||
|
/* if (pthread_setaffinity_np(pthread_self(), sizeof(mask),&mask) <0) {
|
||||||
|
perror("[MAIN_ENB_THREAD] pthread_setaffinity_np failed\n");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (sched_setattr(0, &attr, flags) < 0 ){
|
||||||
|
perror("[SCHED] main eNB thread: sched_setattr failed\n");
|
||||||
|
exit_fun("Nothing to add");
|
||||||
|
} else {
|
||||||
|
LOG_I(HW,"[SCHED][eNB] eNB main deadline thread %ld started on CPU %d\n",
|
||||||
|
gettid(),sched_getcpu());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
|
|
||||||
T0 = rt_get_time_ns();
|
T0 = rt_get_time_ns();
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
@@ -2544,9 +2629,15 @@ static void get_options (int argc, char **argv) {
|
|||||||
int clock_src;
|
int clock_src;
|
||||||
#endif
|
#endif
|
||||||
int CC_id;
|
int CC_id;
|
||||||
|
#ifdef EXMIMO
|
||||||
char rxg_fname[256], line[1000];
|
char rxg_fname[256], line[1000];
|
||||||
FILE *rxg_fd;
|
FILE *rxg_fd;
|
||||||
int l;
|
int l;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
size_t size;
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
const Enb_properties_array_t *enb_properties;
|
const Enb_properties_array_t *enb_properties;
|
||||||
|
|
||||||
@@ -2569,7 +2660,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:g:F:G:qO:m:SUVRMr:P:s:t:x:",long_options,NULL)) != -1) {
|
while ((c = getopt_long (argc, argv, "C:dK:g:F:G:qO:m:SUVRM:r:P:s:t:x:",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);
|
||||||
@@ -2602,7 +2693,9 @@ static void get_options (int argc, char **argv) {
|
|||||||
mode = no_L2_connect;
|
mode = no_L2_connect;
|
||||||
break;
|
break;
|
||||||
case 'M':
|
case 'M':
|
||||||
multi_thread=0;
|
#ifdef ETHERNET
|
||||||
|
strcpy(rrh_eNB_ip,optarg);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||||
@@ -2848,6 +2941,13 @@ static void get_options (int argc, char **argv) {
|
|||||||
} // CC_id
|
} // CC_id
|
||||||
}// i
|
}// i
|
||||||
}
|
}
|
||||||
|
else if ((UE_flag == 1) && (conf_config_file_name != NULL)) {
|
||||||
|
|
||||||
|
// Here the configuration file is the XER encoded UE capabilities
|
||||||
|
// Read it in and store in asn1c data structures
|
||||||
|
strcpy(uecap_xer,conf_config_file_name);
|
||||||
|
uecap_xer_in=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
@@ -2857,8 +2957,8 @@ int main(int argc, char **argv) {
|
|||||||
int *eNB_thread_status_p;
|
int *eNB_thread_status_p;
|
||||||
// int *eNB_thread_status_rx[10],*eNB_thread_status_tx[10];
|
// int *eNB_thread_status_rx[10],*eNB_thread_status_tx[10];
|
||||||
#endif
|
#endif
|
||||||
int i,j,aa,card;
|
int i,aa,card;
|
||||||
#if defined (XFORMS) || defined (EMOS) || (! defined (RTAI)) || defined (SPECTRA)
|
#if defined (XFORMS) || defined (EMOS)
|
||||||
void *status;
|
void *status;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2873,19 +2973,7 @@ int main(int argc, char **argv) {
|
|||||||
unsigned int tcxo = 114;
|
unsigned int tcxo = 114;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ETHERNET
|
#if defined (XFORMS)
|
||||||
char *rrh_eNB_ip = "192.168.12.196";
|
|
||||||
int rrh_eNB_port = 50000;
|
|
||||||
char *rrh_UE_ip = "192.168.12.196";
|
|
||||||
int rrh_UE_port = 22222;
|
|
||||||
#endif
|
|
||||||
// int amp;
|
|
||||||
// uint8_t prach_fmt;
|
|
||||||
// int N_ZC;
|
|
||||||
|
|
||||||
// int ret, ant;
|
|
||||||
int ant_offset=0;
|
|
||||||
#if defined (XFORMS) || defined (SPECTRA)
|
|
||||||
int ret;
|
int ret;
|
||||||
#endif
|
#endif
|
||||||
#if defined (EMOS) || (! defined (RTAI))
|
#if defined (EMOS) || (! defined (RTAI))
|
||||||
@@ -3272,10 +3360,18 @@ int main(int argc, char **argv) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ETHERNET
|
||||||
|
if (frame_parms[0]->N_RB_DL == 6) samples_per_packets = 256;
|
||||||
|
else samples_per_packets = 1536;
|
||||||
|
|
||||||
|
max_cnt = sf_bounds[9];
|
||||||
|
printf("HW: samples_per_packets %d, max_cnt %d\n",samples_per_packets,max_cnt);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
for (card=0;card<MAX_CARDS;card++) {
|
for (card=0;card<MAX_CARDS;card++) {
|
||||||
#ifndef EXMIMO
|
#ifndef EXMIMO
|
||||||
openair0_cfg[card].samples_per_packet = 1024;//samples_per_packets;
|
openair0_cfg[card].samples_per_packet = samples_per_packets;
|
||||||
#endif
|
#endif
|
||||||
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
|
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
|
||||||
((UE_flag==0) ? PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->lte_frame_parms.nb_antennas_tx),
|
((UE_flag==0) ? PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->lte_frame_parms.nb_antennas_tx),
|
||||||
@@ -3330,7 +3426,7 @@ int main(int argc, char **argv) {
|
|||||||
#ifdef OPENAIR2
|
#ifdef OPENAIR2
|
||||||
int eMBMS_active=0;
|
int eMBMS_active=0;
|
||||||
|
|
||||||
l2_init(frame_parms[0],eMBMS_active,
|
l2_init(frame_parms[0],eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL,
|
||||||
0,// cba_group_active
|
0,// cba_group_active
|
||||||
0); // HO flag
|
0); // HO flag
|
||||||
if (UE_flag == 1)
|
if (UE_flag == 1)
|
||||||
@@ -3530,11 +3626,6 @@ int main(int argc, char **argv) {
|
|||||||
printf("EMOS thread created, ret=%d\n",ret);
|
printf("EMOS thread created, ret=%d\n",ret);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPECTRA
|
|
||||||
ret = pthread_create(&sensing_thread, NULL, sensing, NULL);
|
|
||||||
printf("sensing thread created, ret=%d\n",ret);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rt_sleep_ns(10*FRAME_PERIOD);
|
rt_sleep_ns(10*FRAME_PERIOD);
|
||||||
|
|
||||||
#ifndef RTAI
|
#ifndef RTAI
|
||||||
@@ -3722,12 +3813,6 @@ int main(int argc, char **argv) {
|
|||||||
printf("[OPENAIR][SCHED][CLEANUP] EMOS FIFO closed, error_code %d\n", error_code);
|
printf("[OPENAIR][SCHED][CLEANUP] EMOS FIFO closed, error_code %d\n", error_code);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPECTRA
|
|
||||||
printf("waiting for sensing thread\n");
|
|
||||||
pthread_cancel(sensing_thread);
|
|
||||||
pthread_join(sensing_thread,&status);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ouput_vcd)
|
if (ouput_vcd)
|
||||||
vcd_signal_dumper_close();
|
vcd_signal_dumper_close();
|
||||||
|
|
||||||
|
|||||||
+16
-9
@@ -1,22 +1,24 @@
|
|||||||
[*]
|
[*]
|
||||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||||
[*] Tue Sep 9 07:03:39 2014
|
[*] Sat Jan 3 21:45:58 2015
|
||||||
[*]
|
[*]
|
||||||
[dumpfile] "/tmp/openair_dump_UE.vcd"
|
[dumpfile] "/tmp/openair_dump_UE.vcd"
|
||||||
[dumpfile_mtime] "Tue Sep 9 06:37:26 2014"
|
[dumpfile_mtime] "Sat Jan 3 21:45:33 2015"
|
||||||
[dumpfile_size] 94912
|
[dumpfile_size] 98393197
|
||||||
[savefile] "/homes/knopp/Devel/openair4G/trunk/targets/RT/USER/ue.gtkw"
|
[savefile] "/home/haswell/openair4G_knopp/targets/RT/USER/ue.gtkw"
|
||||||
[timestart] 12883150000
|
[timestart] 72755430000
|
||||||
[size] 1221 600
|
[size] 1221 600
|
||||||
[pos] 90 3
|
[pos] 251 123
|
||||||
*-21.000000 12886782928 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
*-21.000000 72759034000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||||
[sst_width] 224
|
[sst_width] 224
|
||||||
[signals_width] 262
|
[signals_width] 262
|
||||||
[sst_expanded] 1
|
[sst_expanded] 1
|
||||||
[sst_vpaned_height] 143
|
[sst_vpaned_height] 143
|
||||||
@24
|
@24
|
||||||
variables.frame_number_UE[63:0]
|
|
||||||
variables.hw_subframe[63:0]
|
variables.hw_subframe[63:0]
|
||||||
|
variables.frame_number_UE[63:0]
|
||||||
|
@25
|
||||||
|
variables.slot_number_UE[63:0]
|
||||||
@28
|
@28
|
||||||
functions.phy_procedures_ue_rx
|
functions.phy_procedures_ue_rx
|
||||||
functions.ue_slot_fep
|
functions.ue_slot_fep
|
||||||
@@ -25,7 +27,12 @@ functions.ue_rrc_measurements
|
|||||||
functions.ue_gain_control
|
functions.ue_gain_control
|
||||||
functions.ue_adjust_synch
|
functions.ue_adjust_synch
|
||||||
functions.lte_ue_pbch_procedures
|
functions.lte_ue_pbch_procedures
|
||||||
@29
|
|
||||||
functions.lte_ue_pdcch_procedures
|
functions.lte_ue_pdcch_procedures
|
||||||
|
functions.rx_pdcch
|
||||||
|
functions.dci_decoding
|
||||||
|
functions.phy_ue_ulsch_encoding
|
||||||
|
functions.phy_ue_ulsch_modulation
|
||||||
|
functions.phy_ue_ulsch_scrambling
|
||||||
|
functions.phy_ue_config_sib2
|
||||||
[pattern_trace] 1
|
[pattern_trace] 1
|
||||||
[pattern_trace] 0
|
[pattern_trace] 0
|
||||||
|
|||||||
@@ -922,6 +922,7 @@ void init_openair2(void) {
|
|||||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++)
|
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++)
|
||||||
l2_init (&PHY_vars_eNB_g[0][CC_id]->lte_frame_parms,
|
l2_init (&PHY_vars_eNB_g[0][CC_id]->lte_frame_parms,
|
||||||
oai_emulation.info.eMBMS_active_state,
|
oai_emulation.info.eMBMS_active_state,
|
||||||
|
NULL,
|
||||||
oai_emulation.info.cba_group_active,
|
oai_emulation.info.cba_group_active,
|
||||||
oai_emulation.info.handover_active);
|
oai_emulation.info.handover_active);
|
||||||
|
|
||||||
|
|||||||
@@ -253,19 +253,19 @@ check_install_freediamter(){
|
|||||||
|
|
||||||
echo "Downloading gnutls archive"
|
echo "Downloading gnutls archive"
|
||||||
|
|
||||||
if [ -f gnutls-3.1.0.tar.xz ]; then
|
if [ -f gnutls-3.1.23.tar.xz ]; then
|
||||||
$SUDO rm -f gnutls-3.1.0.tar.xz
|
$SUDO rm -f gnutls-3.1.23.tar.xz
|
||||||
fi
|
fi
|
||||||
if [ -d gnutls-3.1.0/ ]; then
|
if [ -d gnutls-3.1.23/ ]; then
|
||||||
$SUDO rm -rf gnutls-3.1.0/
|
$SUDO rm -rf gnutls-3.1.23/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test_uninstall_package libgnutls-dev
|
test_uninstall_package libgnutls-dev
|
||||||
|
|
||||||
$SUDO wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.0.tar.xz
|
$SUDO wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
|
||||||
$SUDO tar -xf gnutls-3.1.0.tar.xz
|
$SUDO tar -xf gnutls-3.1.23.tar.xz
|
||||||
echo "Uncompressing gnutls archive ($PWD)"
|
echo "Uncompressing gnutls archive ($PWD)"
|
||||||
cd gnutls-3.1.0/
|
cd gnutls-3.1.23/
|
||||||
$SUDO ./configure --prefix=/usr
|
$SUDO ./configure --prefix=/usr
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit -1
|
exit -1
|
||||||
|
|||||||
Reference in New Issue
Block a user