Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into RU-RAU-split
Conflicts: openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/RRC/LITE/L2_interface.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
This commit is contained in:
@@ -99,7 +99,7 @@ schedule_SIB1_BR(
|
|||||||
int *Sj;
|
int *Sj;
|
||||||
int n_NB = 0;
|
int n_NB = 0;
|
||||||
int TBS;
|
int TBS;
|
||||||
int k,rvidx;
|
int k=0,rvidx;
|
||||||
|
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
|
|
||||||
@@ -143,6 +143,7 @@ schedule_SIB1_BR(
|
|||||||
switch (N_RB_DL) {
|
switch (N_RB_DL) {
|
||||||
case 6:
|
case 6:
|
||||||
case 15:
|
case 15:
|
||||||
|
default:
|
||||||
m=1;
|
m=1;
|
||||||
n_NB=0;
|
n_NB=0;
|
||||||
N_S_NB=0;
|
N_S_NB=0;
|
||||||
@@ -196,9 +197,8 @@ schedule_SIB1_BR(
|
|||||||
|
|
||||||
AssertFatal(bcch_sdu_length <= TBS, "length returned by RRC %d is not compatible with the TBS %d from MIB\n",bcch_sdu_length,TBS);
|
AssertFatal(bcch_sdu_length <= TBS, "length returned by RRC %d is not compatible with the TBS %d from MIB\n",bcch_sdu_length,TBS);
|
||||||
|
|
||||||
|
LOG_D(MAC,"[eNB %d] Frame %d : BCCH_BR->DLSCH CC_id %d, Received %d bytes \n",module_idP,frameP,CC_id,bcch_sdu_length);
|
||||||
if ((frameP%1000) < 40) LOG_D(MAC,"[eNB %d] Frame %d : BCCH_BR->DLSCH (SIB1) CC_id %d, Received %d bytes for NB %d\n",module_idP,frameP,CC_id,bcch_sdu_length,n_NB);
|
|
||||||
|
|
||||||
// allocate all 6 PRBs in narrowband for SIB1_BR
|
// allocate all 6 PRBs in narrowband for SIB1_BR
|
||||||
first_rb = n_NB*6;
|
first_rb = n_NB*6;
|
||||||
vrb_map[first_rb] = 1;
|
vrb_map[first_rb] = 1;
|
||||||
@@ -281,7 +281,6 @@ schedule_SIB1_BR(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,10 +562,10 @@ schedule_SI(
|
|||||||
nfapi_dl_config_request_body_t *dl_req;
|
nfapi_dl_config_request_body_t *dl_req;
|
||||||
|
|
||||||
start_meas(&eNB->schedule_si);
|
start_meas(&eNB->schedule_si);
|
||||||
|
|
||||||
// Only schedule LTE System Information in subframe 5
|
// Only schedule LTE System Information in subframe 5
|
||||||
if (subframeP == 5) {
|
if (subframeP == 5) {
|
||||||
|
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
|
|
||||||
cc = &eNB->common_channels[CC_id];
|
cc = &eNB->common_channels[CC_id];
|
||||||
@@ -753,7 +752,6 @@ schedule_SI(
|
|||||||
schedule_SI_BR(module_idP,frameP,subframeP);
|
schedule_SI_BR(module_idP,frameP,subframeP);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// this might be misleading when bcch is inactive
|
|
||||||
stop_meas(&eNB->schedule_si);
|
stop_meas(&eNB->schedule_si);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -302,7 +302,8 @@ mac_rrc_data_req(
|
|||||||
//else
|
//else
|
||||||
//return(0);
|
//return(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif //Rel10 || Rel14
|
||||||
|
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){
|
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){
|
||||||
@@ -320,6 +321,7 @@ mac_rrc_data_req(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else { //This is an UE
|
} else { //This is an UE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -341,8 +341,9 @@ int trx_usrp_set_gains(openair0_device* device,
|
|||||||
openair0_config_t *openair0_cfg) {
|
openair0_config_t *openair0_cfg) {
|
||||||
|
|
||||||
usrp_state_t *s = (usrp_state_t*)device->priv;
|
usrp_state_t *s = (usrp_state_t*)device->priv;
|
||||||
|
::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(0);
|
||||||
|
s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[0]);
|
||||||
|
|
||||||
s->usrp->set_tx_gain(89.0-openair0_cfg[0].tx_gain[0]);
|
|
||||||
::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(0);
|
::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(0);
|
||||||
// limit to maximum gain
|
// limit to maximum gain
|
||||||
if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) {
|
if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) {
|
||||||
@@ -641,11 +642,13 @@ extern "C" {
|
|||||||
openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop());
|
openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<s->usrp->get_tx_num_channels(); i++) {
|
for(int i=0; i<s->usrp->get_tx_num_channels(); i++) {
|
||||||
|
::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i);
|
||||||
if (i<openair0_cfg[0].tx_num_channels) {
|
if (i<openair0_cfg[0].tx_num_channels) {
|
||||||
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
|
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
|
||||||
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
|
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
|
||||||
s->usrp->set_tx_gain(89.0-openair0_cfg[0].tx_gain[i],i);
|
s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1638,7 +1638,7 @@ void fill_rf_config(RU_t *ru,const char *rf_config_file) {
|
|||||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||||
|
|
||||||
cfg->tx_gain[i] = (double)fp->att_tx;
|
cfg->tx_gain[i] = (double)fp->att_tx;
|
||||||
cfg->rx_gain[i] = (double)fp->att_rx;
|
cfg->rx_gain[i] = ru->max_rxgain-(double)fp->att_rx;
|
||||||
|
|
||||||
cfg->configFilename = rf_config_file;
|
cfg->configFilename = rf_config_file;
|
||||||
printf("channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
|
printf("channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user