added NR_CellGroupConfig to mac in UE
This commit is contained in:
@@ -656,7 +656,7 @@ int main(int argc, char **argv)
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0);
|
||||
|
||||
nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup->spCellConfig);
|
||||
nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup);
|
||||
|
||||
|
||||
nr_dcireq_t dcireq;
|
||||
|
||||
@@ -470,7 +470,7 @@ int main(int argc, char **argv)
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0);
|
||||
|
||||
nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup->spCellConfig);
|
||||
nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup);
|
||||
|
||||
nr_ue_phy_config_request(&UE_mac->phy_config);
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ int nr_rrc_mac_config_req_ue(
|
||||
// NR_ServingCellConfigCommon_t *sccP,
|
||||
// NR_MAC_CellGroupConfig_t *mac_cell_group_configP,
|
||||
// NR_PhysicalCellGroupConfig_t *phy_cell_group_configP,
|
||||
NR_SpCellConfig_t *spCell_ConfigP ){
|
||||
NR_CellGroupConfig_t *cell_group_config ){
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
|
||||
@@ -294,15 +294,15 @@ int nr_rrc_mac_config_req_ue(
|
||||
}
|
||||
|
||||
|
||||
if(spCell_ConfigP != NULL ){
|
||||
mac->servCellIndex = *spCell_ConfigP->servCellIndex;
|
||||
if (spCell_ConfigP->reconfigurationWithSync) {
|
||||
mac->scc = spCell_ConfigP->reconfigurationWithSync->spCellConfigCommon;
|
||||
if(cell_group_config != NULL ){
|
||||
mac->servCellIndex = *cell_group_config->spCellConfig->servCellIndex;
|
||||
if (cell_group_config->spCellConfig->reconfigurationWithSync) {
|
||||
mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
|
||||
config_common_ue(mac,module_id,cc_idP);
|
||||
mac->crnti = spCell_ConfigP->reconfigurationWithSync->newUE_Identity;
|
||||
mac->crnti = cell_group_config->spCellConfig->reconfigurationWithSync->newUE_Identity;
|
||||
LOG_I(MAC,"Configuring CRNTI %x\n",mac->crnti);
|
||||
}
|
||||
mac->scd = spCell_ConfigP->spCellConfigDedicated;
|
||||
mac->scg = cell_group_config;
|
||||
|
||||
/*
|
||||
if(mac_cell_group_configP != NULL){
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_MAC-CellGroupConfig.h"
|
||||
#include "NR_PhysicalCellGroupConfig.h"
|
||||
#include "NR_SpCellConfig.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_ServingCellConfig.h"
|
||||
#include "fapi_nr_ue_interface.h"
|
||||
#include "NR_IF_Module.h"
|
||||
@@ -141,7 +141,7 @@ typedef enum {
|
||||
typedef struct {
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc;
|
||||
NR_ServingCellConfig_t *scd;
|
||||
NR_CellGroupConfig_t *scg;
|
||||
int servCellIndex;
|
||||
//// MAC config
|
||||
NR_DRX_Config_t *drx_Config;
|
||||
|
||||
@@ -72,7 +72,7 @@ int nr_rrc_mac_config_req_ue(
|
||||
uint8_t gNB_index,
|
||||
NR_MIB_t *mibP,
|
||||
//NR_ServingCellConfigCommon_t *sccP,
|
||||
NR_SpCellConfig_t *spCell_ConfigP);
|
||||
NR_CellGroupConfig_t *cell_group_config);
|
||||
|
||||
/**\brief initialization NR UE MAC instance(s), total number of MAC instance based on NB_NR_UE_MAC_INST*/
|
||||
NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst);
|
||||
|
||||
@@ -52,7 +52,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
|
||||
//init mac here
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)malloc(sizeof(NR_UE_MAC_INST_t)*NB_NR_UE_MAC_INST);
|
||||
if (rrc_inst) {
|
||||
nr_rrc_mac_config_req_ue(0,0,0,NULL,rrc_inst->cell_group_config->spCellConfig);
|
||||
nr_rrc_mac_config_req_ue(0,0,0,NULL,rrc_inst->cell_group_config);
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
if (rlc_module_init(0) != 0) {
|
||||
|
||||
@@ -62,14 +62,15 @@ void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pd
|
||||
void ue_dci_configuration(NR_UE_MAC_INST_t *mac,fapi_nr_dl_config_request_t *dl_config,int frame,int slot) {
|
||||
|
||||
// check if DL slot
|
||||
dci_pdu_rel15_t dci_pdu_rel15;
|
||||
if (is_nr_DL_slot(mac->scc,slot)==1) {
|
||||
|
||||
// get BWP 1, Coreset 0, SearchSpace 0
|
||||
if (mac->DLbwp[0]==NULL) {
|
||||
AssertFatal(mac->scd->downlinkBWP_ToAddModList!=NULL,"downlinkBWP_ToAddModList is null\n");
|
||||
AssertFatal(mac->scd->downlinkBWP_ToAddModList->list.count==1,"downlinkBWP_ToAddModList->list->count is %d\n",
|
||||
mac->scd->downlinkBWP_ToAddModList->list.count);
|
||||
mac->DLbwp[0] = mac->scd->downlinkBWP_ToAddModList->list.array[0];
|
||||
AssertFatal(mac->scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList!=NULL,"downlinkBWP_ToAddModList is null\n");
|
||||
AssertFatal(mac->scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count==1,"downlinkBWP_ToAddModList->list->count is %d\n",
|
||||
mac->scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count);
|
||||
mac->DLbwp[0] = mac->scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0];
|
||||
AssertFatal(mac->DLbwp[0]->bwp_Dedicated!=NULL,"bwp_Dedicated is null\n");
|
||||
AssertFatal(mac->DLbwp[0]->bwp_Dedicated->pdcch_Config!=NULL,"pdcch_Config is null\n");
|
||||
AssertFatal(mac->DLbwp[0]->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList!=NULL,"controlResourceSetToAddModList is null\n");
|
||||
@@ -96,10 +97,10 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac,fapi_nr_dl_config_request_t *dl_
|
||||
}
|
||||
}
|
||||
if (mac->ULbwp[0]==NULL) {
|
||||
AssertFatal(mac->scd->uplinkConfig->uplinkBWP_ToAddModList!=NULL,"uplinkBWP_ToAddModList is null\n");
|
||||
AssertFatal(mac->scd->uplinkConfig->uplinkBWP_ToAddModList->list.count==1,"uplinkBWP_ToAddModList->list->count is %d\n",
|
||||
mac->scd->uplinkConfig->uplinkBWP_ToAddModList->list.count);
|
||||
mac->ULbwp[0] = mac->scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0];
|
||||
AssertFatal(mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList!=NULL,"uplinkBWP_ToAddModList is null\n");
|
||||
AssertFatal(mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count==1,"uplinkBWP_ToAddModList->list->count is %d\n",
|
||||
mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count);
|
||||
mac->ULbwp[0] = mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[0];
|
||||
AssertFatal(mac->ULbwp[0]->bwp_Dedicated!=NULL,"bwp_Dedicated is null\n");
|
||||
}
|
||||
// check search spaces
|
||||
@@ -171,7 +172,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac,fapi_nr_dl_config_request_t *dl_
|
||||
rel15->coreset.pdcch_dmrs_scrambling_id = *mac->scc->physCellId;
|
||||
fill_dci_search_candidates(mac->SSpace[0][0][ss_id],rel15);
|
||||
rel15->dci_format = NR_DL_DCI_FORMAT_1_0;
|
||||
rel15->dci_length = nr_dci_size(rel15->dci_format,NR_RNTI_C,rel15->BWPSize);
|
||||
rel15->dci_length = nr_dci_size(mac->scg,&dci_pdu_rel15,rel15->dci_format,NR_RNTI_C,rel15->BWPSize);
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DCI;
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(const module_id_t module_id,
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
|
||||
// check type0 from 38.213 13 if we have no CellGroupConfig
|
||||
if ( mac->scd == NULL) {
|
||||
if ( mac->scg == NULL) {
|
||||
if( ssb_index != -1){
|
||||
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 1){
|
||||
@@ -2725,10 +2725,10 @@ void nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
|
||||
AssertFatal(rnti_type!=-1,"no identified/handled rnti\n");
|
||||
AssertFatal(mac->DLbwp[0] != NULL, "DLbwp[0] shouldn't be null here!\n");
|
||||
AssertFatal(mac->ULbwp[0] != NULL, "ULbwp[0] shouldn't be null here!\n");
|
||||
int N_RB = (mac->scd != NULL) ?
|
||||
int N_RB = (mac->scg != NULL) ?
|
||||
NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275) :
|
||||
NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,275);
|
||||
int N_RB_UL = (mac->scd != NULL) ?
|
||||
int N_RB_UL = (mac->scg != NULL) ?
|
||||
NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth,275) :
|
||||
NRRIV2BW(mac->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth,275);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user