Commit b1bffcee authored by Francesco Mani's avatar Francesco Mani

extend bitmap for SSB in RRC to FR2

parent 3d60e953
...@@ -231,8 +231,8 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) { ...@@ -231,8 +231,8 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] |= curr_bit<<i; scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] |= curr_bit<<i;
} }
}else if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap){ }else if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap){
scc->ssb_PositionsInBurst->choice.mediumBitmap.size = 1; scc->ssb_PositionsInBurst->choice.mediumBitmap.size = 1;
scc->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0; scc->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0;
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf = CALLOC(1,1); scc->ssb_PositionsInBurst->choice.mediumBitmap.buf = CALLOC(1,1);
scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0; scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0;
for (int i=0; i<8; i++) for (int i=0; i<8; i++)
......
...@@ -57,9 +57,22 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -57,9 +57,22 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n"); AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n"); AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
if(servingcellconfigcommon->ssb_PositionsInBurst->present !=2) uint64_t bitmap=0;
AssertFatal(1==0,"Currenrly implemented only for medium size SSB bitmap\n"); switch (servingcellconfigcommon->ssb_PositionsInBurst->present) {
uint8_t bitmap = servingcellconfigcommon->ssb_PositionsInBurst->choice.mediumBitmap.buf[0]; case 1 :
bitmap = ((uint64_t) servingcellconfigcommon->ssb_PositionsInBurst->choice.shortBitmap.buf[0])<<56;
break;
case 2 :
bitmap = ((uint64_t) servingcellconfigcommon->ssb_PositionsInBurst->choice.mediumBitmap.buf[0])<<56;
break;
case 3 :
for (int i=0; i<8; i++) {
bitmap |= (((uint64_t) servingcellconfigcommon->ssb_PositionsInBurst->choice.longBitmap.buf[i])<<((7-i)*8));
}
break;
default:
AssertFatal(1==0,"SSB bitmap size value %d undefined (allowed values 1,2,3) \n", servingcellconfigcommon->ssb_PositionsInBurst->present);
}
memset(secondaryCellGroup,0,sizeof(NR_CellGroupConfig_t)); memset(secondaryCellGroup,0,sizeof(NR_CellGroupConfig_t));
secondaryCellGroup->cellGroupId = scg_id; secondaryCellGroup->cellGroupId = scg_id;
...@@ -251,9 +264,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -251,9 +264,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->tci_StatesToAddModList=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->tci_StatesToAddModList)); secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->tci_StatesToAddModList=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->tci_StatesToAddModList));
int n_ssb = 0; int n_ssb = 0;
NR_TCI_State_t *tcic[8]; NR_TCI_State_t *tcic[64];
for (int i=0;i<8;i++) { for (int i=0;i<64;i++) {
if ((bitmap>>(7-i))&0x01){ if ((bitmap>>(63-i))&0x01){
tcic[i]=calloc(1,sizeof(*tcic[i])); tcic[i]=calloc(1,sizeof(*tcic[i]));
tcic[i]->tci_StateId=n_ssb; tcic[i]->tci_StateId=n_ssb;
tcic[i]->qcl_Type1.cell=NULL; tcic[i]->qcl_Type1.cell=NULL;
...@@ -429,9 +442,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -429,9 +442,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
coreset->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle; coreset->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle;
coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList)); coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList));
NR_TCI_StateId_t *tci[8]; NR_TCI_StateId_t *tci[64];
for (int i=0;i<8;i++) { for (int i=0;i<64;i++) {
if ((bitmap>>(7-i))&0x01){ if ((bitmap>>(63-i))&0x01){
tci[i]=calloc(1,sizeof(*tci[i])); tci[i]=calloc(1,sizeof(*tci[i]));
*tci[i] = i; *tci[i] = i;
ASN_SEQUENCE_ADD(&coreset->tci_StatesPDCCH_ToAddList->list,tci[i]); ASN_SEQUENCE_ADD(&coreset->tci_StatesPDCCH_ToAddList->list,tci[i]);
...@@ -653,9 +666,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -653,9 +666,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
n_ssb = 0; n_ssb = 0;
NR_TCI_State_t *tcid[8]; NR_TCI_State_t *tcid[64];
for (int i=0;i<8;i++) { for (int i=0;i<64;i++) {
if ((bitmap>>(7-i))&0x01){ if ((bitmap>>(63-i))&0x01){
tcid[i]=calloc(1,sizeof(*tcid[i])); tcid[i]=calloc(1,sizeof(*tcid[i]));
tcid[i]->tci_StateId=n_ssb; tcid[i]->tci_StateId=n_ssb;
tcid[i]->qcl_Type1.cell=NULL; tcid[i]->qcl_Type1.cell=NULL;
...@@ -1076,45 +1089,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ...@@ -1076,45 +1089,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CSI_SSB_ResourceSet_t *ssbresset0 = calloc(1,sizeof(*ssbresset0)); NR_CSI_SSB_ResourceSet_t *ssbresset0 = calloc(1,sizeof(*ssbresset0));
ssbresset0->csi_SSB_ResourceSetId=0; ssbresset0->csi_SSB_ResourceSetId=0;
if ((bitmap>>7)&0x01){
NR_SSB_Index_t *ssbresset00=calloc(1,sizeof(*ssbresset00)); NR_SSB_Index_t *ssbresset[64];
*ssbresset00=0; for (int i=0;i<64;i++) {
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset00); if ((bitmap>>(63-i))&0x01){
} ssbresset[i]=calloc(1,sizeof(*ssbresset[i]));
if ((bitmap>>6)&0x01) { *ssbresset[i] = i;
NR_SSB_Index_t *ssbresset01=calloc(1,sizeof(*ssbresset01)); ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset[i]);
*ssbresset01=1; }
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset01);
}
if ((bitmap>>5)&0x01) {
NR_SSB_Index_t *ssbresset02=calloc(1,sizeof(*ssbresset02));
*ssbresset02=2;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset02);
}
if ((bitmap>>4)&0x01) {
NR_SSB_Index_t *ssbresset03=calloc(1,sizeof(*ssbresset03));
*ssbresset03=3;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset03);
}
if ((bitmap>>3)&0x01) {
NR_SSB_Index_t *ssbresset04=calloc(1,sizeof(*ssbresset04));
*ssbresset04=4;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset04);
}
if ((bitmap>>2)&0x01) {
NR_SSB_Index_t *ssbresset05=calloc(1,sizeof(*ssbresset05));
*ssbresset05=5;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset05);
}
if ((bitmap>>1)&0x01) {
NR_SSB_Index_t *ssbresset06=calloc(1,sizeof(*ssbresset06));
*ssbresset06=6;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset06);
}
if ((bitmap)&0x01) {
NR_SSB_Index_t *ssbresset07=calloc(1,sizeof(*ssbresset07));
*ssbresset07=7;
ASN_SEQUENCE_ADD(&ssbresset0->csi_SSB_ResourceList.list,ssbresset07);
} }
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list,ssbresset0); ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list,ssbresset0);
......
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