Commit 49cf701a authored by francescomani's avatar francescomani

Merge branch 'nr-fdd-scheduling' of...

Merge branch 'nr-fdd-scheduling' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr-fdd-scheduling
parents 52b05b8f 0e0b7a34
......@@ -179,15 +179,15 @@ With the RF simulator (on the same machine):
## IF setup with OAI
The `if_freq` and `if_freq_off` options can be used to set (via command line) custom downlink and uplink FR1 arbitrary frequencies for the IF equipment both.
OAI is also compatible with Intermediate Frequency (IF) equipment. This allows to use RF front-end that with arbitrary frequencies bands that do not comply with the standardised 3GPP NR bands.
In the same way, the following parameters must be configured in the RUs section of the gNB configuration file:
To configure the IF frequencies it is necessary to use two command-line options at UE side:
- `if_freq`, downlink frequency in Hz
- `if_freq_off`, uplink frequency offset in Hz
`if_freq`
`if_offset`
The values must be given in Hz.
Accordingly, the following parameters must be configured in the RUs section of the gNB configuration file:
- `if_freq`
- `if_offset`
### Run OAI with custom DL/UL arbitrary frequencies
......
......@@ -348,7 +348,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
lte_frame_type_t frame_type = get_frame_type((int)*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
if (frame_type == FDD) {
free(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;
} else { // TDD
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320 ) {
......
......@@ -42,14 +42,14 @@ void set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg,
int mu,
NR_TDD_UL_DL_ConfigCommon_t *tdd_config) {
int nrofDownlinkSlots = tdd_config->pattern1.nrofDownlinkSlots;
int nrofDownlinkSymbols = tdd_config->pattern1.nrofDownlinkSymbols;
int nrofUplinkSlots = tdd_config->pattern1.nrofUplinkSlots;
int nrofUplinkSymbols = tdd_config->pattern1.nrofUplinkSymbols;
const int nrofDownlinkSlots = tdd_config->pattern1.nrofDownlinkSlots;
const int nrofDownlinkSymbols = tdd_config->pattern1.nrofDownlinkSymbols;
const int nrofUplinkSlots = tdd_config->pattern1.nrofUplinkSlots;
const int nrofUplinkSymbols = tdd_config->pattern1.nrofUplinkSymbols;
int slot_number = 0;
int nb_periods_per_frame = get_nb_periods_per_frame(tdd_config->pattern1.dl_UL_TransmissionPeriodicity);
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
int nb_slots_per_period = ((1<<mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame;
const int nb_periods_per_frame = get_nb_periods_per_frame(tdd_config->pattern1.dl_UL_TransmissionPeriodicity);
const int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
const int nb_slots_per_period = ((1<<mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame;
cfg->tdd_table.tdd_period_in_slots = nb_slots_per_period;
if ( (nrofDownlinkSymbols + nrofUplinkSymbols) == 0 )
......@@ -105,7 +105,14 @@ void set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg,
}
}
LOG_I(NR_MAC, "TDD has been properly configurated\n");
if (tdd_config->pattern1.ext1 == NULL) {
cfg->tdd_table.tdd_period = tdd_config->pattern1.dl_UL_TransmissionPeriodicity;
} else {
AssertFatal(tdd_config->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530 != NULL, "scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530 is null\n");
cfg->tdd_table.tdd_period = *tdd_config->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530;
}
LOG_I(NR_MAC, "TDD has been properly configured\n");
}
......
......@@ -422,7 +422,7 @@ void nr_schedule_msg2(uint16_t rach_frame, uint16_t rach_slot,
}
else{
if(frame_type == TDD)
AssertFatal(1==0,"Dynamic TDD not handled yet\n");
AssertFatal(frame_type == FDD, "Dynamic TDD not handled yet\n");
}
......
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