Add missing configuration for NSA
This commit is contained in:
@@ -71,6 +71,7 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx);
|
||||
int get_subband_size(int NPRB,int size);
|
||||
void SLIV2SL(int SLIV,int *S,int *L);
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -61,6 +61,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
||||
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
|
||||
|
||||
// This assert will never happen in the current implementation because NUMBER_OF_UE_MAX = 4.
|
||||
// However, if in the future NUMBER_OF_UE_MAX is increased, it will be necessary to improve the allocation of SRS resources,
|
||||
// where the startPosition = 1, 2 or 3 and sl40 = 7, 17, 27 or 37 only give us 12 different allocations.
|
||||
AssertFatal(uid>=0 && uid<12, "gNB cannot allocate the SRS resources\n");
|
||||
|
||||
uint64_t bitmap=0;
|
||||
switch (servingcellconfigcommon->ssb_PositionsInBurst->present) {
|
||||
case 1 :
|
||||
@@ -796,13 +801,21 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
*srs_resset0_id=0;
|
||||
ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id);
|
||||
srs_Config->srs_ResourceToReleaseList=NULL;
|
||||
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_aperiodic;
|
||||
srs_resset0->resourceType.choice.aperiodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.aperiodic));
|
||||
srs_resset0->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger=1;
|
||||
srs_resset0->resourceType.choice.aperiodic->csi_RS=NULL;
|
||||
srs_resset0->resourceType.choice.aperiodic->slotOffset= calloc(1,sizeof(*srs_resset0->resourceType.choice.aperiodic->slotOffset));
|
||||
*srs_resset0->resourceType.choice.aperiodic->slotOffset=2;
|
||||
srs_resset0->resourceType.choice.aperiodic->ext1=NULL;
|
||||
|
||||
if(0) {
|
||||
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_aperiodic;
|
||||
srs_resset0->resourceType.choice.aperiodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.aperiodic));
|
||||
srs_resset0->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger=1;
|
||||
srs_resset0->resourceType.choice.aperiodic->csi_RS=NULL;
|
||||
srs_resset0->resourceType.choice.aperiodic->slotOffset= calloc(1,sizeof(*srs_resset0->resourceType.choice.aperiodic->slotOffset));
|
||||
*srs_resset0->resourceType.choice.aperiodic->slotOffset=2;
|
||||
srs_resset0->resourceType.choice.aperiodic->ext1=NULL;
|
||||
} else {
|
||||
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic;
|
||||
srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic));
|
||||
srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL;
|
||||
}
|
||||
|
||||
srs_resset0->usage=NR_SRS_ResourceSet__usage_codebook;
|
||||
srs_resset0->alpha = calloc(1,sizeof(*srs_resset0->alpha));
|
||||
*srs_resset0->alpha = NR_Alpha_alpha1;
|
||||
@@ -821,17 +834,28 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
srs_res0->transmissionComb.choice.n2=calloc(1,sizeof(*srs_res0->transmissionComb.choice.n2));
|
||||
srs_res0->transmissionComb.choice.n2->combOffset_n2=0;
|
||||
srs_res0->transmissionComb.choice.n2->cyclicShift_n2=0;
|
||||
srs_res0->resourceMapping.startPosition=2;
|
||||
srs_res0->resourceMapping.startPosition = 1 + uid%3;
|
||||
srs_res0->resourceMapping.nrofSymbols=NR_SRS_Resource__resourceMapping__nrofSymbols_n1;
|
||||
srs_res0->resourceMapping.repetitionFactor=NR_SRS_Resource__resourceMapping__repetitionFactor_n1;
|
||||
srs_res0->freqDomainPosition=0;
|
||||
srs_res0->freqDomainShift=0;
|
||||
srs_res0->freqHopping.c_SRS = 0;
|
||||
srs_res0->freqHopping.b_SRS=0;
|
||||
srs_res0->freqHopping.b_hop=0;
|
||||
srs_res0->freqHopping.c_SRS = rrc_get_max_nr_csrs(
|
||||
NRRIV2BW(servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, 275),
|
||||
srs_res0->freqHopping.b_SRS);
|
||||
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
|
||||
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_aperiodic;
|
||||
srs_res0->resourceType.choice.aperiodic=calloc(1,sizeof(*srs_res0->resourceType.choice.aperiodic));
|
||||
|
||||
if(0) {
|
||||
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_aperiodic;
|
||||
srs_res0->resourceType.choice.aperiodic=calloc(1,sizeof(*srs_res0->resourceType.choice.aperiodic));
|
||||
} else {
|
||||
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic;
|
||||
srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic));
|
||||
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl40;
|
||||
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.choice.sl40 = 7 + (uid/3)*10; // 7/17/27/37 are mixed slots
|
||||
}
|
||||
|
||||
srs_res0->sequenceId=40;
|
||||
srs_res0->spatialRelationInfo=calloc(1,sizeof(*srs_res0->spatialRelationInfo));
|
||||
srs_res0->spatialRelationInfo->servingCellId=NULL;
|
||||
|
||||
Reference in New Issue
Block a user