UE: Add UL_IND message in IF module, for trigger L2 scheduler per TTI(slot).

Add Type0-PDCCH search space & coreset right after decode MIB and storage corresponding parameters in L2.
This commit is contained in:
Calvin HSU
2018-07-25 15:22:22 +02:00
parent bf6744686e
commit a4ee72dbaf
9 changed files with 465 additions and 38 deletions
+37 -18
View File
@@ -214,26 +214,28 @@ void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_
void init_UE(int nb_inst)
{
int inst;
for (inst=0; inst < nb_inst; inst++) {
// UE->rfdevice.type = NONE_DEV;
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];
LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]);
PHY_vars_UE_g[inst][0] = init_nr_ue_vars(NULL,inst,0);
int inst;
NR_UE_MAC_INST_t *mac_inst;
for (inst=0; inst < nb_inst; inst++) {
// UE->rfdevice.type = NONE_DEV;
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];
LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]);
PHY_vars_UE_g[inst][0] = init_nr_ue_vars(NULL,inst,0);
AssertFatal((UE->if_inst = nr_ue_if_module_init(inst)) != NULL,"Can't register interface module\n");
nr_l3_init_ue();
nr_l2_init_ue();
NR_UE_MAC_INST_t *UE_MAC_INST = get_mac_inst(0);
UE_MAC_INST->if_module = UE->if_inst;
UE->if_inst->scheduled_response = nr_ue_scheduled_response;
UE->if_inst->phy_config_request = nr_ue_phy_config_request;
AssertFatal((UE->if_inst = nr_ue_if_module_init(inst)) != NULL, "can not initial IF module\n");
nr_l3_init_ue();
nr_l2_init_ue();
mac_inst = get_mac_inst(0);
mac_inst->if_module = UE->if_inst;
UE->if_inst->scheduled_response = nr_ue_scheduled_response;
UE->if_inst->phy_config_request = nr_ue_phy_config_request;
AssertFatal(0 == pthread_create(&UE->proc.pthread_ue,
&UE->proc.attr_ue,
UE_thread,
(void*)UE), "");
}
AssertFatal(0 == pthread_create(&UE->proc.pthread_ue,
&UE->proc.attr_ue,
UE_thread,
(void*)UE), "");
}
printf("UE threads created by %ld\n", gettid());
#if 0
@@ -621,6 +623,23 @@ static void *UE_thread_rxn_txnp4(void *arg) {
#endif
if (UE->mac_enabled==1) {
// trigger L2 to run ue_scheduler thru IF module
// [TODO] mapping right after NR initial sync
if(1)
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL){
UE->ul_indication.module_id = 0;
UE->ul_indication.gNB_index = 0;
UE->ul_indication.cc_id = 0;
// [TODO] mapping right after NR initial sync
//UE->ul_indication.frame = ;
//UE->ul_indication.slot = ;
UE->if_inst->ul_indication(&UE->ul_indication);
}
#ifdef NEW_MAC
ret = mac_xface->ue_scheduler(UE->Mod_id,
proc->frame_rx,