Commit 805ed557 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/NR_add_new_BW' into integration_2025_w06 (!3245)

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.

Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
parents 1be038c8 f267641b
......@@ -188,18 +188,20 @@ uint64_t reverse_bits(uint64_t in, int n_bits)
return rev_bits;
}
static const int tables_5_3_2[5][12] = {
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
#define NUM_BW_ENTRIES 15
static const int tables_5_3_2[5][NUM_BW_ENTRIES] = {
{25, 52, 79, 106, 133, 160, 188, 216, 242, 270, -1, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 92, 106, 119, 133, 162, 189, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 44, 51, 58, 65, 79, 93, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
};
int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
{
int scs_index = scs + freq_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if(n_rbs == tables_5_3_2[scs_index][i])
return i;
}
......@@ -209,7 +211,7 @@ int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_range, int n_rbs)
{
int scs_index = scs + frequency_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if (n_rbs <= tables_5_3_2[scs_index][i])
return i;
}
......@@ -422,7 +424,7 @@ void check_ssb_raster(uint64_t freq, int band, int scs)
int get_supported_bw_mhz(frequency_range_t frequency_range, int bw_index)
{
if (frequency_range == FR1) {
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 40, 50, 60, 80, 90, 100};
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100};
AssertFatal(bw_index >= 0 && bw_index <= sizeofArray(bandwidth_index_to_mhz), "Bandwidth index %d is invalid\n", bw_index);
return bandwidth_index_to_mhz[bw_index];
} else {
......@@ -824,6 +826,18 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 50e6;
}
break;
case 242: // 45Mhz
case 188: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 242) ? 45e6 : 35e6;
*rx_bw = (n_rb == 242) ? 45e6 : 35e6;
break;
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
......@@ -924,6 +938,17 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 80e6;
}
break;
case 189:
if (threequarter_fs) {
*sample_rate = 92.16e6;
*samples_per_frame = 921600;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
}
*tx_bw = 70e6;
*rx_bw = 70e6;
break;
case 162 :
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
......@@ -949,6 +974,20 @@ void get_samplerate_and_bw(int mu,
}
break;
case 119: // 45Mhz
case 92: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 119) ? 45e6 : 35e6;
*rx_bw = (n_rb == 119) ? 45e6 : 35e6;
break;
case 106:
if (threequarter_fs) {
*sample_rate=46.08e6;
......
......@@ -233,7 +233,7 @@ float nr_get_Pcmax(int p_Max,
float nr_get_Pcmin(int bandwidth_index) {
const float table_38101_6_3_1_1[] = {
-40, -40, -40, -40, -39, -38.2, -37.5, -37, -36.5, -35.2, -34.6, -34, -33.5, -33
-40, -40, -40, -40, -39, -38.2, -37.5, -37, -36.5, -36, -35.2, -34.6, -34, -33.5, -33
};
return table_38101_6_3_1_1[bandwidth_index];
}
......
......@@ -178,7 +178,7 @@ TEST(test_pucch_power_state, test_accumulated_delta_pucch)
TEST(pc_min, check_all_bw_indexes)
{
const int bws[] = {5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100};
const int bws[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100};
for (auto i = 0U; i < sizeofArray(bws); i++) {
(void)nr_get_Pcmin(i);
}
......
......@@ -821,6 +821,48 @@ static NR_SetupRelease_SRS_Config_t *get_config_srs(const NR_ServingCellConfigCo
return setup_release_srs_Config;
}
static int get_SupportedBandwidth_fr1_bw_index(int bw_index)
{
int val = -1;
switch (bw_index) {
case NR_SupportedBandwidth_v1700__fr1_r17_mhz5:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz10:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz15:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz20:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz25:
val = bw_index;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz30:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz35:
val = NR_SupportedBandwidth__fr1_mhz30;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz40:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz45:
val = NR_SupportedBandwidth__fr1_mhz40;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz50:
val = NR_SupportedBandwidth__fr1_mhz50;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz60:
val = NR_SupportedBandwidth__fr1_mhz60;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz70:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz80:
val = NR_SupportedBandwidth__fr1_mhz80;
break;
case NR_SupportedBandwidth_v1700__fr1_r17_mhz90:
case NR_SupportedBandwidth_v1700__fr1_r17_mhz100:
val = NR_SupportedBandwidth__fr1_mhz100;
break;
default:
AssertFatal(1==0, "Invalid bw index\n");
}
return val;
}
void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
NR_ServingCellConfigCommon_t *scc,
int numerology,
......@@ -857,28 +899,41 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
fs->featureSetsDownlinkPerCC = calloc(1, sizeof(*fs->featureSetsDownlinkPerCC));
NR_FeatureSetDownlinkPerCC_t *fs_cc = calloc(1, sizeof(*fs_cc));
fs_cc->supportedSubcarrierSpacingDL = numerology;
int bw = get_supported_band_index(numerology, freq_range, rbsize);
if (bw == 10) // 90MHz
int bw_index = get_supported_band_index(numerology, freq_range, rbsize);
int bw = get_supported_bw_mhz(freq_range, bw_index);
if (bw == 90) // 90MHz
fs_cc->channelBW_90mhz = calloc(1, sizeof(*fs_cc->channelBW_90mhz));
if (bw == 11) // 100MHz
bw--;
if(freq_range == FR2) {
fs_cc->supportedBandwidthDL.present = NR_SupportedBandwidth_PR_fr2;
fs_cc->supportedBandwidthDL.choice.fr2 = bw;
fs_cc->supportedBandwidthDL.choice.fr2 = bw_index;
}
else{
fs_cc->supportedBandwidthDL.present = NR_SupportedBandwidth_PR_fr1;
fs_cc->supportedBandwidthDL.choice.fr1 = bw;
fs_cc->supportedBandwidthDL.choice.fr1 = get_SupportedBandwidth_fr1_bw_index(bw_index);
}
fs_cc->maxNumberMIMO_LayersPDSCH = calloc(1, sizeof(*fs_cc->maxNumberMIMO_LayersPDSCH));
*fs_cc->maxNumberMIMO_LayersPDSCH = NR_MIMO_LayersDL_fourLayers;
fs_cc->supportedModulationOrderDL = calloc(1, sizeof(*fs_cc->supportedModulationOrderDL));
*fs_cc->supportedModulationOrderDL = NR_ModulationOrder_qam256;
asn1cSeqAdd(&fs->featureSetsDownlinkPerCC->list, fs_cc);
if (bw == 35 || bw == 45 || bw == 70) {
fs->ext6 = calloc(1, sizeof(*fs->ext6));
fs->ext6->featureSetsDownlinkPerCC_v1700 = calloc(1, sizeof(*fs->ext6->featureSetsDownlinkPerCC_v1700));
NR_FeatureSetDownlinkPerCC_v1700_t *fs_dlcc_v1700 = calloc(1, sizeof(*fs_dlcc_v1700));
fs_dlcc_v1700->supportedBandwidthDL_v1710 = calloc(1, sizeof(*fs_dlcc_v1700->supportedBandwidthDL_v1710));
fs_dlcc_v1700->supportedBandwidthDL_v1710->present = NR_SupportedBandwidth_v1700_PR_fr1_r17;
fs_dlcc_v1700->supportedBandwidthDL_v1710->choice.fr1_r17 = bw_index;
asn1cSeqAdd(&fs->ext6->featureSetsDownlinkPerCC_v1700->list, fs_dlcc_v1700);
}
}
phy_Parameters->phy_ParametersFRX_Diff = calloc(1, sizeof(*phy_Parameters->phy_ParametersFRX_Diff));
phy_Parameters->phy_ParametersFRX_Diff->pucch_F0_2WithoutFH = NULL;
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NR_UE_NR_Capability, cap);
}
}
void nr_rrc_config_dl_tda(struct NR_PDSCH_TimeDomainResourceAllocationList *pdsch_TimeDomainAllocationList,
......
Active_gNBs = ( "gnb-rfsim");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
gNB_name = "gnb-rfsim";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
nr_cellid = 12345678L
# tr_s_preference = "local_mac"
////////// Physical parameters:
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
absoluteFrequencySSB = 621312;
# this is 3300.60 MHz
dl_absoluteFrequencyPointA = 620040;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 189
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=189 (275*(275-L+1) + 275-1-RBstart)
initialDLBWPlocationAndBandwidth = 24199;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 189;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 24199;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 12;
preambleReceivedTargetPower = -104;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.71.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
sf_extension = 0
sdr_addrs = "serial=XXXXXXX"
}
);
rfsimulator: {
serveraddr = "server";
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
f1ap_log_level ="debug";
};
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