Merge remote-tracking branch 'origin/NR_RRCConfiguration' into NR_RRC_CP_bugfix
This commit is contained in:
@@ -301,7 +301,7 @@
|
||||
{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,defint64val:NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0/*72*/},\
|
||||
{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,defint64val:0,TYPE_INT64,0/*73*/},\
|
||||
{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,defint64val:13,TYPE_INT64,0/*74*/},\
|
||||
{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,iptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defintval:-118,TYPE_INT32,0/*75*/},\
|
||||
{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defintval:-118,TYPE_INT64,0/*75*/},\
|
||||
{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,defint64val:NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0/*76*/},\
|
||||
{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,defint64val:NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0/*77*/},\
|
||||
{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,defint64val:NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0/*78*/},\
|
||||
|
||||
@@ -212,23 +212,40 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
|
||||
void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
|
||||
|
||||
int ssbmaplen = (int)scc->ssb_PositionsInBurst->present;
|
||||
uint8_t curr_bit;
|
||||
|
||||
AssertFatal(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap || ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap || ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap, "illegal ssbmaplen %d\n",ssbmaplen);
|
||||
|
||||
// changing endianicity of ssbmap and filling the ssb_PositionsInBurst buffers
|
||||
if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap){
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.size = 1;
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.bits_unused = 4;
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.buf = CALLOC(1,1);
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = ssbmap;
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = 0;
|
||||
for (int i=0; i<8; i++) {
|
||||
if (i<scc->ssb_PositionsInBurst->choice.shortBitmap.bits_unused)
|
||||
curr_bit = 0;
|
||||
else
|
||||
curr_bit = (ssbmap>>(7-i))&0x01;
|
||||
scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] |= curr_bit<<i;
|
||||
}
|
||||
}else if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap){
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.size = 1;
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0;
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf = CALLOC(1,1);
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = ssbmap;
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0;
|
||||
for (int i=0; i<8; i++)
|
||||
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] |= (((ssbmap>>(7-i))&0x01)<<i);
|
||||
}else {
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.size = 8;
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.bits_unused = 0;
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.buf = CALLOC(1,8);
|
||||
for (int i=0; i<8; i++)
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.buf[i] = (ssbmap>>(i<<3))&(0xff);
|
||||
for (int j=0; j<8; j++) {
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.buf[7-j] = 0;
|
||||
curr_bit = (ssbmap>>(j<<3))&(0xff);
|
||||
for (int i=0; i<8; i++)
|
||||
scc->ssb_PositionsInBurst->choice.longBitmap.buf[7-j] |= (((curr_bit>>(7-i))&0x01)<<i);
|
||||
}
|
||||
}
|
||||
|
||||
// fix UL absolute frequency
|
||||
|
||||
@@ -224,21 +224,22 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
|
||||
cfg->ssb_table.ssb_offset_point_a = absolute_diff/(12*scs_scaling) - 10;
|
||||
cfg->ssb_table.ssb_period = *scc->ssb_periodicityServingCell;
|
||||
cfg->ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
|
||||
|
||||
switch (scc->ssb_PositionsInBurst->present) {
|
||||
case 1 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0];
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0;
|
||||
break;
|
||||
case 2 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0];
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0]<<24;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0;
|
||||
break;
|
||||
case 3 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask = 0;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask = 0;
|
||||
for (i=0; i<4; i++) {
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i+4]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i+4]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i]<<i*8);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -49,15 +49,20 @@ void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pd
|
||||
|
||||
LOG_D(MAC,"Filling search candidates for DCI\n");
|
||||
|
||||
rel15->number_of_candidates=1;
|
||||
rel15->number_of_candidates=3;
|
||||
rel15->CCE[0]=0;
|
||||
rel15->L[0]=4;
|
||||
rel15->CCE[1]=4;
|
||||
rel15->L[1]=4;
|
||||
rel15->CCE[2]=8;
|
||||
rel15->L[2]=4;
|
||||
|
||||
}
|
||||
|
||||
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
|
||||
if (is_nr_DL_slot(mac->scc->tdd_UL_DL_ConfigurationCommon,slot)==1) {
|
||||
if (is_nr_DL_slot(mac->scc,slot)==1) {
|
||||
|
||||
// get BWP 1, Coreset 0, SearchSpace 0
|
||||
if (mac->DLbwp[0]==NULL) {
|
||||
|
||||
@@ -207,6 +207,8 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
|
||||
if (scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666)
|
||||
scs_scaling = scs_scaling>>2;
|
||||
uint32_t absolute_diff = (*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
uint16_t sco = absolute_diff%(12*scs_scaling);
|
||||
AssertFatal(sco==0,"absoluteFrequencySSB has a subcarrier offset of %d while it should be alligned with CRBs\n",sco);
|
||||
cfg->ssb_table.ssb_offset_point_a.value = absolute_diff/(12*scs_scaling) - 10; //absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
|
||||
cfg->ssb_table.ssb_offset_point_a.tl.tag = NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG;
|
||||
cfg->num_tlv++;
|
||||
@@ -216,19 +218,19 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
|
||||
|
||||
switch (scc->ssb_PositionsInBurst->present) {
|
||||
case 1 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0];
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0;
|
||||
break;
|
||||
case 2 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0];
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0]<<24;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0;
|
||||
break;
|
||||
case 3 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = 0;
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value = 0;
|
||||
for (i=0; i<4; i++) {
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i+4]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i+4]<<i*8);
|
||||
cfg->ssb_table.ssb_mask_list[1].ssb_mask.value += (scc->ssb_PositionsInBurst->choice.longBitmap.buf[i]<<i*8);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -505,7 +505,6 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[gNB_mac->TX_req[CC_id].Number_of_PDUs];
|
||||
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
nfapi_nr_config_request_t *cfg = &gNB_mac->config[0];
|
||||
|
||||
NR_UE_list_t *UE_list = &gNB_mac->UE_list;
|
||||
|
||||
@@ -775,7 +774,7 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
|
||||
//pusch_pdu->tx_direct_current_location;//The uplink Tx Direct Current location for the carrier. Only values in the value range of this field between 0 and 3299, which indicate the subcarrier index within the carrier corresponding 1o the numerology of the corresponding uplink BWP and value 3300, which indicates "Outside the carrier" and value 3301, which indicates "Undetermined position within the carrier" are used. [TS38.331, UplinkTxDirectCurrentBWP IE]
|
||||
pusch_pdu->uplink_frequency_shift_7p5khz = 0;
|
||||
//Resource Allocation in time domain
|
||||
pusch_pdu->start_symbol_index = 2;
|
||||
pusch_pdu->start_symbol_index = 0;
|
||||
pusch_pdu->nr_of_symbols = 12;
|
||||
//Optional Data only included if indicated in pduBitmap
|
||||
pusch_pdu->pusch_data.rv_index = 0;
|
||||
@@ -835,4 +834,4 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
|
||||
pdcch_pdu_rel15->PayloadSizeBits[0]=nr_dci_size(dci_formats[0],rnti_types[0],pdcch_pdu_rel15->BWPSize);
|
||||
fill_dci_pdu_rel15(pdcch_pdu_rel15,&dci_pdu_rel15[0],dci_formats,rnti_types);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,4 +69,4 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
if (sduP != NULL)
|
||||
UE_scheduling_control->ta_update = timing_advance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ typedef struct {
|
||||
|
||||
DLSCH_PDU DLSCH_pdu[4][MAX_MOBILES_PER_GNB];
|
||||
/// scheduling control info
|
||||
NR_UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_GNB];
|
||||
UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_GNB];
|
||||
int next[MAX_MOBILES_PER_GNB];
|
||||
int head;
|
||||
int next_ul[MAX_MOBILES_PER_GNB];
|
||||
|
||||
Reference in New Issue
Block a user