Commit a30eabbe authored by Raymond Knopp's avatar Raymond Knopp

OTA testing 4G, configuration parameters for fairRR scheduler and common...

OTA testing 4G, configuration parameters for fairRR scheduler and common parameters for both fairRR and default
parent 37ef411c
......@@ -113,6 +113,7 @@ check_supported_distribution() {
"rhel7.6") return 0 ;;
"rhel7.7") return 0 ;;
"rhel7.8") return 0 ;;
"rhel7.9") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
......@@ -315,7 +316,7 @@ install_usrp_uhd_driver_from_source(){
rm -rf /tmp/uhd
git clone https://github.com/EttusResearch/uhd.git
cd uhd
git checkout tags/v4.0.0.0
git checkout tags/v3.14.0.0
mkdir -p host/build
cd host/build
$CMAKE ../
......
......@@ -60,6 +60,10 @@
#define CONFIG_STRING_MACRLC_PUCCH10xSNR "puCch10xSnr"
#define CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO "default_sched_dl_algo"
#define CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX "ue_multiple_max"
#define CONFIG_STRING_MACRLC_USE_MCS_OFFSET "use_mcs_offset"
#define CONFIG_STRING_MACRLC_BLER_TARGET_LOWER "bler_target_lower"
#define CONFIG_STRING_MACRLC_BLER_TARGET_UPPER "bler_target_upper"
#define CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX "max_ul_rb_index"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* MacRLC configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......@@ -86,7 +90,11 @@
{CONFIG_STRING_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}}
{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_USE_MCS_OFFSET, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_BLER_TARGET_LOWER, NULL, 0, iptr:NULL, defdblval:.5, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_BLER_TARGET_UPPER, NULL, 0, iptr:NULL, defdblval:2, TYPE_DOUBLE, 0}, \
{CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX, NULL, 0, iptr:NULL, defintval:22, TYPE_INT, 0}}
#define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
......@@ -110,6 +118,10 @@
#define MACRLC_PUCCH10xSNR_IDX 19
#define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 20
#define MACRLC_UE_MULTIPLE_MAX_IDX 21
#define MACRLC_USE_MCS_OFFSET_IDX 22
#define MACRLC_BLER_TARGET_LOWER_IDX 23
#define MACRLC_BLER_TARGET_UPPER_IDX 24
#define MACRLC_MAX_UL_RB_INDEX_IDX 25
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif
......@@ -220,6 +220,10 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr);
RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr);
RC.mac[j]->ue_multiple_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UE_MULTIPLE_MAX_IDX ].iptr);
RC.mac[j]->use_mcs_offset = *(MacRLC_ParamList.paramarray[j][MACRLC_USE_MCS_OFFSET_IDX ].iptr);
RC.mac[j]->bler_lower = *(MacRLC_ParamList.paramarray[j][MACRLC_BLER_TARGET_LOWER_IDX ].dblptr);
RC.mac[j]->bler_upper = *(MacRLC_ParamList.paramarray[j][MACRLC_BLER_TARGET_UPPER_IDX ].dblptr);
RC.mac[j]->max_ul_rb_index = *(MacRLC_ParamList.paramarray[j][MACRLC_MAX_UL_RB_INDEX_IDX ].iptr);
RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
......
......@@ -88,7 +88,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
LOG_E(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
sctp_new_association_resp->sctp_state,
instance,
(int)instance,
sctp_new_association_resp->ulp_cnx_id);
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
......
......@@ -2684,19 +2684,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
UE_info->UE_sched_ctrl[UE_id].pusch_rx_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id];
UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id];
if(bler < 0.5) {
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] !=0) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]--;
if (eNB->use_mcs_offset == 1) {
if(bler < eNB->bler_lower) {
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] !=0) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]--;
}
}
}
if(bler >= 2) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]++;
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] >= 20) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]=20;
if(bler >= eNB->bler_upper) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]++;
if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] >= 20) {
UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]=20;
}
}
}
}
snr = UE_info->UE_sched_ctrl[UE_id].pusch_snr_avg[CC_id];
mcs = 20 - UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id];
......@@ -2724,7 +2725,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
}
while ( (tbs < bytes_to_schedule) && (rb_table[rb_table_index]<(N_RB_UL-num_pucch_rb-first_rb[CC_id])) &&
((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) {
((UE_template->phr_info - tx_power) > 0) && (rb_table_index < eNB->max_ul_rb_index )) {
rb_table_index++;
tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0);
......
......@@ -1453,7 +1453,15 @@ typedef struct eNB_MAC_INST_s {
int32_t puSch10xSnr;
int32_t puCch10xSnr;
int max_ul_rb_index;
int ue_multiple_max;
int use_mcs_offset;
double bler_lower;
double bler_upper;
pthread_t mac_stats_thread;
} eNB_MAC_INST;
......
......@@ -801,7 +801,7 @@ int rr_ul_run(module_id_t Mod_id,
AssertFatal(num_contig_rb <= 2, "cannot handle more than two contiguous RB regions\n");
UE_info_t *UE_info = &RC.mac[Mod_id]->UE_info;
const int max_rb = num_contig_rb > 1 ? MAX(rbs[0].length, rbs[1].length) : rbs[0].length;
eNB_MAC_INST *mac = RC.mac[Mod_id];
/* for every UE: check whether we have to handle a retransmission (and
* allocate, if so). If not, compute how much RBs this UE would need */
int rb_idx_required[MAX_MOBILES_PER_ENB];
......@@ -809,7 +809,7 @@ int rr_ul_run(module_id_t Mod_id,
int num_ue_req = 0;
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
UE_TEMPLATE *UE_template = &UE_info->UE_template[CC_id][UE_id];
uint8_t harq_pid = subframe2harqpid(&RC.mac[Mod_id]->common_channels[CC_id],
uint8_t harq_pid = subframe2harqpid(&mac->common_channels[CC_id],
sched_frame, sched_subframe);
if (UE_info->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid] > 0) {
/* this UE has a retransmission, allocate it right away */
......@@ -845,11 +845,11 @@ int rr_ul_run(module_id_t Mod_id,
}
} else {
LOG_W(MAC,
"cannot allocate UL retransmission for UE %d (nb_rb %d)\n",
UE_id,
nb_rb);
"%d.%d cannot allocate UL retransmission for UE %d (nb_rb %d, rbs0.length %d, rbs1.length %d,rbs0.start %d,rbs1.start %d)\n",
sched_frame,sched_subframe,UE_id,
nb_rb, rbs[0].length,rbs[1].length,rbs[0].start,rbs[1].start);
UE_template->pre_dci_ul_pdu_idx = -1; // do not need CCE
RC.mac[Mod_id]->HI_DCI0_req[CC_id][subframe].hi_dci0_request_body.number_of_dci--;
mac->HI_DCI0_req[CC_id][subframe].hi_dci0_request_body.number_of_dci--;
continue;
}
LOG_D(MAC, "%4d.%d UE %d retx %d RBs at start %d\n",
......@@ -895,10 +895,9 @@ int rr_ul_run(module_id_t Mod_id,
&tx_power);
UE_template->pre_assigned_mcs_ul = mcs;
/* rb_idx_given >= 22: apparently the PHY cannot support more than 48
* RBs in the uplink. Hence, we limit every UE to 48 RBs, which is at
* index 22 */
rb_idx_required[UE_id] = min(22, rb_table_index);
/* rb_idx_given >= MAX index: limit RBs to value in configuration file
* RBs in the uplink. */
rb_idx_required[UE_id] = min(mac->max_ul_rb_index, rb_table_index);
//UE_template->pre_allocated_nb_rb_ul = rb_table[rb_table_index];
/* only print log when PHR changed */
static int phr = 0;
......
......@@ -1156,7 +1156,7 @@ void init_transport(PHY_VARS_eNB *eNB) {
void init_eNB_afterRU(void) {
int inst,CC_id,i,aa;
int inst,CC_id,i;
PHY_VARS_eNB *eNB;
LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst);
......@@ -1171,7 +1171,7 @@ void init_eNB_afterRU(void) {
eNB->frame_parms.nb_antennas_rx = 0;
LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);
AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is zero\n",eNB->Mod_id);
for (int ru_id=0,aa=0; ru_id<eNB->num_RU; ru_id++)
for (int ru_id=0; ru_id<eNB->num_RU; ru_id++)
eNB->frame_parms.nb_antennas_rx += eNB->RU_list[ru_id]->nb_rx;
phy_init_lte_eNB(eNB,0,0);
LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]);
......
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