Commit 578af2f8 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/NR_new_bands' into integration_2024_w18

parents f49dbf47 1056e53a
......@@ -118,10 +118,12 @@ const nr_bandentry_t nr_bandtable[] = {
{5, 824000, 849000, 869000, 894000, 20, 173800, 100},
{7, 2500000, 2570000, 2620000, 2690000, 20, 524000, 100},
{8, 880000, 915000, 925000, 960000, 20, 185000, 100},
{12, 698000, 716000, 729000, 746000, 20, 145800, 100},
{12, 699000, 716000, 729000, 746000, 20, 145800, 100},
{13, 777000, 787000, 746000, 756000, 20, 149200, 100},
{14, 788000, 798000, 758000, 768000, 20, 151600, 100},
{18, 815000, 830000, 860000, 875000, 20, 172000, 100},
{20, 832000, 862000, 791000, 821000, 20, 158200, 100},
{24, 1627500, 1656500, 1526000, 1536000, 20, 305000, 100},
{25, 1850000, 1915000, 1930000, 1995000, 20, 386000, 100},
{26, 814000, 849000, 859000, 894000, 20, 171800, 100},
{28, 703000, 758000, 758000, 813000, 20, 151600, 100},
......@@ -141,6 +143,7 @@ const nr_bandentry_t nr_bandtable[] = {
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
{65, 1920000, 2010000, 2110000, 2200000, 20, 422000, 100},
{66, 1710000, 1780000, 2110000, 2200000, 20, 422000, 100},
{67, 000, 000, 738000, 758000, 20, 147600, 100},
{70, 1695000, 1710000, 1995000, 2020000, 20, 399000, 100},
{71, 663000, 698000, 617000, 652000, 20, 123400, 100},
{74, 1427000, 1470000, 1475000, 1518000, 20, 295000, 100},
......@@ -157,6 +160,7 @@ const nr_bandentry_t nr_bandtable[] = {
{82, 832000, 862000, 000, 000, 20, 166400, 100},
{83, 703000, 748000, 000, 000, 20, 140600, 100},
{84, 1920000, 1980000, 000, 000, 20, 384000, 100},
{85, 698000, 716000, 728000, 746000, 20, 145600, 100},
{86, 1710000, 1785000, 000, 000, 20, 342000, 100},
{89, 824000, 849000, 000, 000, 20, 342000, 100},
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
......
......@@ -29,17 +29,61 @@ static const uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3,
static const uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
// Table 5.4.3.3-1 38-101
static const int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A}, {2, 15, nr_ssb_type_A}, {3, 15, nr_ssb_type_A}, {5, 15, nr_ssb_type_A}, {5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A}, {8, 15, nr_ssb_type_A}, {12, 15, nr_ssb_type_A}, {14, 15, nr_ssb_type_A}, {18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A}, {25, 15, nr_ssb_type_A}, {26, 15, nr_ssb_type_A}, {28, 15, nr_ssb_type_A}, {29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A}, {34, 15, nr_ssb_type_A}, {34, 30, nr_ssb_type_C}, {38, 15, nr_ssb_type_A}, {38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A}, {39, 30, nr_ssb_type_C}, {40, 30, nr_ssb_type_C}, {41, 15, nr_ssb_type_A}, {41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C}, {48, 30, nr_ssb_type_C}, {50, 30, nr_ssb_type_C}, {51, 15, nr_ssb_type_A}, {53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A}, {66, 15, nr_ssb_type_A}, {66, 30, nr_ssb_type_B}, {70, 15, nr_ssb_type_A}, {71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A}, {75, 15, nr_ssb_type_A}, {76, 15, nr_ssb_type_A}, {77, 30, nr_ssb_type_C}, {78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C}, {90, 15, nr_ssb_type_A}, {90, 30, nr_ssb_type_C}, {91, 15, nr_ssb_type_A}, {92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}};
static const int nr_ssb_table[54][3] = {
{1, 15, nr_ssb_type_A},
{2, 15, nr_ssb_type_A},
{3, 15, nr_ssb_type_A},
{5, 15, nr_ssb_type_A},
{5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A},
{8, 15, nr_ssb_type_A},
{12, 15, nr_ssb_type_A},
{13, 15, nr_ssb_type_A},
{14, 15, nr_ssb_type_A},
{18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A},
{24, 15, nr_ssb_type_A},
{24, 30, nr_ssb_type_B},
{25, 15, nr_ssb_type_A},
{26, 15, nr_ssb_type_A},
{28, 15, nr_ssb_type_A},
{29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A},
{34, 15, nr_ssb_type_A},
{34, 30, nr_ssb_type_C},
{38, 15, nr_ssb_type_A},
{38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A},
{39, 30, nr_ssb_type_C},
{40, 30, nr_ssb_type_C},
{41, 15, nr_ssb_type_A},
{41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C},
{48, 30, nr_ssb_type_C},
{50, 30, nr_ssb_type_C},
{51, 15, nr_ssb_type_A},
{53, 15, nr_ssb_type_A},
{53, 30, nr_ssb_type_C},
{65, 15, nr_ssb_type_A},
{66, 15, nr_ssb_type_A},
{66, 30, nr_ssb_type_B},
{67, 15, nr_ssb_type_A},
{70, 15, nr_ssb_type_A},
{71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A},
{75, 15, nr_ssb_type_A},
{76, 15, nr_ssb_type_A},
{77, 30, nr_ssb_type_C},
{78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C},
{85, 15, nr_ssb_type_A},
{90, 15, nr_ssb_type_A},
{90, 30, nr_ssb_type_C},
{91, 15, nr_ssb_type_A},
{92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A},
{94, 15, nr_ssb_type_A},
{96, 30, nr_ssb_type_C}};
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
if (get_softmodem_params()->sl_mode == 2) {
......
......@@ -73,8 +73,8 @@ int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
void nr_fill_prach(PHY_VARS_gNB *gNB,
int SFN,
int Slot,
nfapi_nr_prach_pdu_t *prach_pdu) {
nfapi_nr_prach_pdu_t *prach_pdu)
{
int prach_id = find_nr_prach(gNB,SFN,Slot,SEARCH_EXIST_OR_FREE);
AssertFatal(((prach_id >= 0) && (prach_id < NUMBER_OF_NR_PRACH_MAX)), "illegal or no prach_id found!!! prach_id %d\n", prach_id);
......
......@@ -81,7 +81,7 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_
fp->print_ue_help_cmdline_log = false;
if (fp->dl_CarrierFreq != fp->ul_CarrierFreq)
LOG_A(PHY,
"Command line parameters for the UE: -C %lu --CO %lu -r %d --numerology %d --ssb %d\n",
"Command line parameters for the UE: -C %lu --CO %ld -r %d --numerology %d --ssb %d\n",
fp->dl_CarrierFreq,
fp->dl_CarrierFreq - fp->ul_CarrierFreq,
fp->N_RB_DL,
......
......@@ -108,20 +108,35 @@ const sync_raster_t sync_raster[] = {
{7, 0, 6554, 1, 6718},
{8, 0, 2318, 1, 2395},
{12, 0, 1828, 1, 1858},
{13, 0, 1871, 1, 1885},
{14, 0, 1901, 1, 1915},
{18, 0, 2156, 1, 2182},
{20, 0, 1982, 1, 2047},
{24, 0, 3818, 1, 3892},
{24, 1, 3824, 1, 3886},
{25, 0, 4829, 1, 4981},
{26, 0, 2153, 1, 2230},
{28, 0, 1901, 1, 2002},
{29, 0, 1798, 1, 1813},
{30, 0, 5879, 1, 5893},
{34, 0, 5030, 1, 5056},
{34, 1, 5036, 1, 5050},
{38, 0, 6431, 1, 6544},
{38, 1, 6437, 1, 6538},
{39, 0, 4706, 1, 4795},
{39, 1, 4712, 1, 4789},
{40, 1, 5762, 1, 5989},
{41, 0, 6246, 3, 6717},
{41, 1, 6252, 3, 6714},
{48, 1, 7884, 1, 7982},
{50, 0, 3584, 1, 3787},
{51, 0, 3572, 1, 3574},
{53, 0, 6215, 1, 6232},
{53, 1, 6221, 1, 6226},
{65, 0, 5279, 1, 5494},
{66, 0, 5279, 1, 5494},
{66, 1, 5285, 1, 5488},
{67, 0, 1850, 1, 1888},
{70, 0, 4993, 1, 5044},
{71, 0, 1547, 1, 1624},
{74, 0, 3692, 1, 3790},
......@@ -130,6 +145,12 @@ const sync_raster_t sync_raster[] = {
{77, 1, 7711, 1, 8329},
{78, 1, 7711, 1, 8051},
{79, 1, 8480, 16, 8880},
{85, 0, 1826, 1, 1858},
{90, 1, 6252, 1, 6714},
{91, 0, 3572, 1, 3574},
{92, 0, 3584, 1, 3787},
{93, 0, 3572, 1, 3574},
{94, 0, 3584, 1, 3587},
{257, 3, 22388, 1, 22558},
{257, 4, 22390, 2, 22556},
{258, 3, 22257, 1, 22443},
......
......@@ -702,8 +702,8 @@ static const int16_t N_RA_RB[16] = {6, 3, 2, 24, 12, 6, 12, 6, 3, 24, 12, 6, 12,
/* Function to get number of RBs required for prach occasion based on
* 38.211 Table 6.3.3.2-1 */
int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
int16_t get_N_RA_RB (int delta_f_RA_PRACH, int delta_f_PUSCH)
{
int8_t index = 0;
switch(delta_f_RA_PRACH) {
case 0 :
......
......@@ -266,9 +266,10 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
NR_COMMON_channels_t *cc = gNB->common_channels;
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
NR_RACH_ConfigCommon_t *rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup;
int mu;
if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing)
mu = *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing;
if (rach_ConfigCommon->msg1_SubcarrierSpacing)
mu = *rach_ConfigCommon->msg1_SubcarrierSpacing;
else
mu = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
int index = ul_buffer_index(frameP, slotP, mu, gNB->UL_tti_req_ahead_size);
......@@ -276,8 +277,8 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[module_idP]->config[0];
if (is_nr_UL_slot(scc->tdd_UL_DL_ConfigurationCommon, slotP, cc->frame_type)) {
uint8_t config_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex;
const NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &rach_ConfigCommon->rach_ConfigGeneric;
uint8_t config_index = rach_ConfigGeneric->prach_ConfigurationIndex;
uint8_t N_dur, N_t_slot, start_symbol = 0, N_RA_slot;
uint16_t RA_sfn_index = -1;
uint8_t config_period = 1;
......@@ -289,22 +290,22 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
uint8_t fdm = cfg->prach_config.num_prach_fd_occasions.value;
// prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4
if ( get_nr_prach_info_from_index(config_index,
(int)frameP,
(int)slotP,
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,
mu,
cc->frame_type,
&format,
&start_symbol,
&N_t_slot,
&N_dur,
&RA_sfn_index,
&N_RA_slot,
&config_period) ) {
uint16_t format0 = format&0xff; // first column of format from table
uint16_t format1 = (format>>8)&0xff; // second column of format from table
if (get_nr_prach_info_from_index(config_index,
(int)frameP,
(int)slotP,
scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,
mu,
cc->frame_type,
&format,
&start_symbol,
&N_t_slot,
&N_dur,
&RA_sfn_index,
&N_RA_slot,
&config_period)) {
uint16_t format0 = format & 0xff; // first column of format from table
uint16_t format1 = (format >> 8) & 0xff; // second column of format from table
if (N_RA_slot > 1) { //more than 1 PRACH slot in a subframe
if (slotP%2 == 1)
......@@ -339,15 +340,19 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
prach_pdu->num_prach_ocas = N_t_slot;
prach_pdu->prach_start_symbol = start_symbol;
prach_pdu->num_ra = fdm_index;
prach_pdu->num_cs = get_NCS(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,
prach_pdu->num_cs = get_NCS(rach_ConfigGeneric->zeroCorrelationZoneConfig,
format0,
scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig);
LOG_D(NR_MAC, "Frame %d, Slot %d: Prach Occasion id = %u fdm index = %u start symbol = %u slot index = %u subframe index = %u \n",
frameP, slotP,
prach_occasion_id, prach_pdu->num_ra,
rach_ConfigCommon->restrictedSetConfig);
LOG_D(NR_MAC,
"Frame %d, Slot %d: Prach Occasion id = %u fdm index = %u start symbol = %u slot index = %u subframe index = %u \n",
frameP,
slotP,
prach_occasion_id,
prach_pdu->num_ra,
prach_pdu->prach_start_symbol,
slot_index, RA_sfn_index);
slot_index,
RA_sfn_index);
// SCF PRACH PDU format field does not consider A1/B1 etc. possibilities
// We added 9 = A1/B1 10 = A2/B2 11 A3/B3
if (format1!=0xff) {
......@@ -409,15 +414,13 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
}
// block resources in vrb_map_UL
const NR_RACH_ConfigGeneric_t *rach_ConfigGeneric =
&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric;
const uint8_t mu_pusch =
scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
const int16_t N_RA_RB = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch);
const int16_t n_ra_rb = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch);
index = ul_buffer_index(frameP, slotP, mu, gNB->vrb_map_UL_size);
uint16_t *vrb_map_UL = &cc->vrb_map_UL[index * MAX_BWP_SIZE];
for (int i = 0; i < N_RA_RB * fdm; ++i)
vrb_map_UL[bwp_start + rach_ConfigGeneric->msg1_FrequencyStart + i] |= SL_to_bitmap(start_symbol, N_t_slot*N_dur);
for (int i = 0; i < n_ra_rb * fdm; ++i)
vrb_map_UL[bwp_start + rach_ConfigGeneric->msg1_FrequencyStart + i] |= SL_to_bitmap(start_symbol, N_t_slot * N_dur);
}
}
}
......
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