Commit af9e5542 authored by vijay chadachan's avatar vijay chadachan

Changes to support multiple TDD patterns

- Updated the configuration changes for 2 Patterns
- Update the TDD table configuration for NFAPI
- Added the tdd config map for the period
parent 92491310
...@@ -186,12 +186,13 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) { ...@@ -186,12 +186,13 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
scc->n_TimingAdvanceOffset = CALLOC(1, sizeof(long)); scc->n_TimingAdvanceOffset = CALLOC(1, sizeof(long));
scc->ssb_PositionsInBurst = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__ssb_PositionsInBurst)); scc->ssb_PositionsInBurst = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__ssb_PositionsInBurst));
scc->ssb_periodicityServingCell = CALLOC(1,sizeof(long)); scc->ssb_periodicityServingCell = CALLOC(1,sizeof(long));
// scc->rateMatchPatternToAddModList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToAddModList)); // scc->rateMatchPatternToAddModList = CALLOC(1,sizeof(struct
// scc->rateMatchPatternToReleaseList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList)); // NR_ServingCellConfigCommon__rateMatchPatternToAddModList)); scc->rateMatchPatternToReleaseList =
// CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList));
scc->ssbSubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); scc->ssbSubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
scc->tdd_UL_DL_ConfigurationCommon = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon)); scc->tdd_UL_DL_ConfigurationCommon = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon));
scc->tdd_UL_DL_ConfigurationCommon->pattern2 = CALLOC(1,sizeof(struct NR_TDD_UL_DL_Pattern)); scc->tdd_UL_DL_ConfigurationCommon->pattern2 = CALLOC(1,sizeof(struct NR_TDD_UL_DL_Pattern));
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t)); scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t));
dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t));
...@@ -378,6 +379,39 @@ void fill_scc_sim(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_R ...@@ -378,6 +379,39 @@ void fill_scc_sim(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_R
*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing=-1; *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing=-1;
} }
static void fix_tdd_pattern(NR_ServingCellConfigCommon_t *scc)
{
int pattern_ext = scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity - 7;
/* The pattern1 extension is not configured so free the ext1 and dl_UL_TransmissionPeriodicity_v1530
* as these shall not be encoded with default values in SIB1
*/
if (pattern_ext > 0) {
scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1 = CALLOC(1, sizeof(struct NR_TDD_UL_DL_Pattern__ext1));
scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530 = CALLOC(1, sizeof(long));
*scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530 = pattern_ext - 1 ;
scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity = 5;
}
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2 != NULL) {
/* The pattern2 is not configured free the memory these shall not be encoded with default values in SIB1 */
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320) {
free(scc->tdd_UL_DL_ConfigurationCommon->pattern2);
scc->tdd_UL_DL_ConfigurationCommon->pattern2 = NULL;
}
} else {
/* The pattern2 extension is not configured so free the ext1 and dl_UL_TransmissionPeriodicity_v1530
* as these shall not be encoded with default values in SIB1
*/
pattern_ext = scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity - 7;
if (pattern_ext > 0) {
scc->tdd_UL_DL_ConfigurationCommon->pattern2->ext1 = CALLOC(1, sizeof(struct NR_TDD_UL_DL_Pattern__ext1));
scc->tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530 = CALLOC(1, sizeof(long));
*scc->tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530 = pattern_ext - 1;
scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity = 5;
}
}
}
void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) { void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
...@@ -452,11 +486,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) { ...@@ -452,11 +486,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
ASN_STRUCT_FREE(asn_DEF_NR_TDD_UL_DL_ConfigCommon, scc->tdd_UL_DL_ConfigurationCommon); ASN_STRUCT_FREE(asn_DEF_NR_TDD_UL_DL_ConfigCommon, scc->tdd_UL_DL_ConfigurationCommon);
scc->tdd_UL_DL_ConfigurationCommon = NULL; scc->tdd_UL_DL_ConfigurationCommon = NULL;
} else { // TDD } else { // TDD
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320 ) { fix_tdd_pattern(scc);
free(scc->tdd_UL_DL_ConfigurationCommon->pattern2);
scc->tdd_UL_DL_ConfigurationCommon->pattern2 = NULL;
}
} }
if ((int)*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing == -1) { if ((int)*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing == -1) {
...@@ -2015,6 +2045,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) { ...@@ -2015,6 +2045,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
memset((void*)scc,0,sizeof(NR_ServingCellConfigCommon_t)); memset((void*)scc,0,sizeof(NR_ServingCellConfigCommon_t));
prepare_scc(scc); prepare_scc(scc);
paramdef_t SCCsParams[] = SCCPARAMS_DESC(scc); paramdef_t SCCsParams[] = SCCPARAMS_DESC(scc);
paramlist_def_t SCCsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON, NULL, 0}; paramlist_def_t SCCsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON, NULL, 0};
AssertFatal(i < GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt, AssertFatal(i < GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
......
This diff is collapsed.
...@@ -722,6 +722,13 @@ typedef struct f1_config_t { ...@@ -722,6 +722,13 @@ typedef struct f1_config_t {
uint32_t gnb_id; // associated gNB's ID, not used in DU itself uint32_t gnb_id; // associated gNB's ID, not used in DU itself
} f1_config_t; } f1_config_t;
enum slot_type { TDD_NR_DOWNLINK_SLOT, TDD_NR_UPLINK_SLOT, TDD_NR_MIXED_SLOT };
typedef struct tdd_bitmap {
enum slot_type slot_type;
uint8_t num_dl_symbols;
uint8_t num_ul_symbols;
} tdd_bitmap_t;
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
typedef struct gNB_MAC_INST_s { typedef struct gNB_MAC_INST_s {
/// Ethernet parameters for northbound midhaul interface /// Ethernet parameters for northbound midhaul interface
...@@ -811,6 +818,7 @@ typedef struct gNB_MAC_INST_s { ...@@ -811,6 +818,7 @@ typedef struct gNB_MAC_INST_s {
uint64_t dlsch_slot_bitmap[3]; uint64_t dlsch_slot_bitmap[3];
/// bitmap of ULSCH slots, can hold up to 160 slots /// bitmap of ULSCH slots, can hold up to 160 slots
uint64_t ulsch_slot_bitmap[3]; uint64_t ulsch_slot_bitmap[3];
tdd_bitmap_t tdd_slot_bitmap[64];
/// maximum number of slots before a UE will be scheduled ULSCH automatically /// maximum number of slots before a UE will be scheduled ULSCH automatically
uint32_t ulsch_max_frame_inactivity; uint32_t ulsch_max_frame_inactivity;
......
...@@ -2209,7 +2209,10 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, c ...@@ -2209,7 +2209,10 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, c
AssertFatal(ServCellCom->tdd_UL_DL_ConfigurationCommon != NULL, "out of memory\n"); AssertFatal(ServCellCom->tdd_UL_DL_ConfigurationCommon != NULL, "out of memory\n");
ServCellCom->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing = scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing; ServCellCom->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing = scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing;
ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern1 = scc->tdd_UL_DL_ConfigurationCommon->pattern1; ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern1 = scc->tdd_UL_DL_ConfigurationCommon->pattern1;
ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = scc->tdd_UL_DL_ConfigurationCommon->pattern2; if (scc->tdd_UL_DL_ConfigurationCommon->pattern2) {
ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = CALLOC(1, sizeof(struct NR_TDD_UL_DL_Pattern));
*ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = *scc->tdd_UL_DL_ConfigurationCommon->pattern2;
}
} }
ServCellCom->ss_PBCH_BlockPower = scc->ss_PBCH_BlockPower; ServCellCom->ss_PBCH_BlockPower = scc->ss_PBCH_BlockPower;
......
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