Merge branch 'bandwidth-testing' of https://gitlab.eurecom.fr/oai/openairinterface5g into bandwidth-testing
Conflicts: openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c openair1/PHY/NR_TRANSPORT/pucch_rx.c openair1/PHY/defs_gNB.h openair1/SCHED_NR/phy_procedures_nr_gNB.c
This commit is contained in:
@@ -0,0 +1,317 @@
|
|||||||
|
Active_gNBs = ( "gNB-OAI");
|
||||||
|
# Asn1_verbosity, choice in: none, info, annoying
|
||||||
|
Asn1_verbosity = "none";
|
||||||
|
|
||||||
|
gNBs =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
////////// Identification parameters:
|
||||||
|
gNB_CU_ID = 0xe00;
|
||||||
|
|
||||||
|
# cell_type = "CELL_MACRO_GNB";
|
||||||
|
|
||||||
|
gNB_name = "gNB-OAI";
|
||||||
|
|
||||||
|
// 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 = 0x010203; // 0 false, else true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sst = 1;
|
||||||
|
sd = 0x112233; // 0 false, else true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
nr_cellid = 12345678L
|
||||||
|
|
||||||
|
# tr_s_preference = "local_mac"
|
||||||
|
|
||||||
|
////////// Physical parameters:
|
||||||
|
|
||||||
|
ssb_SubcarrierOffset = 0;
|
||||||
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 2;
|
||||||
|
|
||||||
|
pdcch_ConfigSIB1 = (
|
||||||
|
{
|
||||||
|
controlResourceSetZero = 10;
|
||||||
|
searchSpaceZero = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
servingCellConfigCommon = (
|
||||||
|
{
|
||||||
|
#spCellConfigCommon
|
||||||
|
|
||||||
|
physCellId = 0;
|
||||||
|
|
||||||
|
# downlinkConfigCommon
|
||||||
|
#frequencyInfoDL
|
||||||
|
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||||
|
absoluteFrequencySSB = 620640;
|
||||||
|
# this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2
|
||||||
|
#absoluteFrequencySSB = 634080;
|
||||||
|
# this is 3600.48 MHz
|
||||||
|
#absoluteFrequencySSB = 640032;
|
||||||
|
#dl_frequencyBand = 78;
|
||||||
|
# this is 3301.68 MHz
|
||||||
|
dl_absoluteFrequencyPointA = 620112;
|
||||||
|
# this is 3502.56 MHz
|
||||||
|
#dl_absoluteFrequencyPointA = 633552;
|
||||||
|
# this is 3600.48 MHz
|
||||||
|
#dl_absoluteFrequencyPointA = 640032;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
dl_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
dl_subcarrierSpacing = 1;
|
||||||
|
dl_carrierBandwidth = 106;
|
||||||
|
#initialDownlinkBWP
|
||||||
|
#genericParameters
|
||||||
|
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||||
|
initialDLBWPlocationAndBandwidth = 28875;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
initialDLBWPsubcarrierSpacing = 1;
|
||||||
|
#pdcch-ConfigCommon
|
||||||
|
initialDLBWPcontrolResourceSetZero = 10;
|
||||||
|
initialDLBWPsearchSpaceZero = 0;
|
||||||
|
#pdsch-ConfigCommon
|
||||||
|
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||||
|
initialDLBWPk0_0 = 0;
|
||||||
|
#initialULBWPmappingType
|
||||||
|
#0=typeA,1=typeB
|
||||||
|
initialDLBWPmappingType_0 = 0;
|
||||||
|
#this is SS=1,L=13
|
||||||
|
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||||
|
|
||||||
|
initialDLBWPk0_1 = 0;
|
||||||
|
initialDLBWPmappingType_1 = 0;
|
||||||
|
#this is SS=1,L=5
|
||||||
|
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||||
|
|
||||||
|
#uplinkConfigCommon
|
||||||
|
#frequencyInfoUL
|
||||||
|
ul_frequencyBand = 78;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
ul_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
ul_subcarrierSpacing = 1;
|
||||||
|
ul_carrierBandwidth = 106;
|
||||||
|
pMax = 20;
|
||||||
|
#initialUplinkBWP
|
||||||
|
#genericParameters
|
||||||
|
initialULBWPlocationAndBandwidth = 28875;
|
||||||
|
# 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 = 4;
|
||||||
|
#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 = 3;
|
||||||
|
#oneHalf (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,
|
||||||
|
|
||||||
|
# pusch-ConfigCommon (up to 16 elements)
|
||||||
|
initialULBWPk2_0 = 6;
|
||||||
|
initialULBWPmappingType_0 = 1
|
||||||
|
# this is SS=2 L=13
|
||||||
|
initialULBWPstartSymbolAndLength_0 = 41;
|
||||||
|
|
||||||
|
initialULBWPk2_1 = 6;
|
||||||
|
initialULBWPmappingType_1 = 1;
|
||||||
|
# this is SS=0 L=4
|
||||||
|
initialULBWPstartSymbolAndLength_1 = 52;
|
||||||
|
|
||||||
|
initialULBWPk2_2 = 7;
|
||||||
|
initialULBWPmappingType_2 = 1;
|
||||||
|
# this is SS=10 L=4
|
||||||
|
initialULBWPstartSymbolAndLength_2 = 52;
|
||||||
|
|
||||||
|
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_PositionsInBurs_BitmapPR
|
||||||
|
# 1=short, 2=medium, 3=long
|
||||||
|
ssb_PositionsInBurst_PR = 2;
|
||||||
|
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.69.131";
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
|
||||||
|
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.194/24";
|
||||||
|
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.194/24";
|
||||||
|
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 = 150;
|
||||||
|
ulsch_max_slots_inactivity=20;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "local_mac";
|
||||||
|
pusch_proc_threads = 2;
|
||||||
|
prach_dtx_threshold = 120;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 2
|
||||||
|
nb_rx = 2
|
||||||
|
att_tx = 0
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [78];
|
||||||
|
max_pdschReferenceSignalPower = -27;
|
||||||
|
max_rxgain = 75;
|
||||||
|
eNB_instances = [0];
|
||||||
|
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
|
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
|
## beamforming 2x2 matrix:
|
||||||
|
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
|
## beamforming 4x4 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
|
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
THREAD_STRUCT = (
|
||||||
|
{
|
||||||
|
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||||
|
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||||
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
|
worker_config = "WORKER_ENABLE";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
f1ap_log_level ="debug";
|
||||||
|
f1ap_log_verbosity ="medium";
|
||||||
|
};
|
||||||
@@ -0,0 +1,318 @@
|
|||||||
|
Active_gNBs = ( "gNB-OAI");
|
||||||
|
# Asn1_verbosity, choice in: none, info, annoying
|
||||||
|
Asn1_verbosity = "none";
|
||||||
|
Num_Threads_PUSCH = 8;
|
||||||
|
|
||||||
|
gNBs =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
////////// Identification parameters:
|
||||||
|
gNB_CU_ID = 0xe00;
|
||||||
|
|
||||||
|
# cell_type = "CELL_MACRO_GNB";
|
||||||
|
|
||||||
|
gNB_name = "gNB-OAI";
|
||||||
|
|
||||||
|
// 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 = 0x010203; // 0 false, else true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sst = 1;
|
||||||
|
sd = 0x112233; // 0 false, else true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
nr_cellid = 12345678L
|
||||||
|
|
||||||
|
# tr_s_preference = "local_mac"
|
||||||
|
|
||||||
|
////////// Physical parameters:
|
||||||
|
|
||||||
|
ssb_SubcarrierOffset = 0;
|
||||||
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 2;
|
||||||
|
|
||||||
|
pdcch_ConfigSIB1 = (
|
||||||
|
{
|
||||||
|
controlResourceSetZero = 10;
|
||||||
|
searchSpaceZero = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
servingCellConfigCommon = (
|
||||||
|
{
|
||||||
|
#spCellConfigCommon
|
||||||
|
|
||||||
|
physCellId = 0;
|
||||||
|
|
||||||
|
# downlinkConfigCommon
|
||||||
|
#frequencyInfoDL
|
||||||
|
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||||
|
absoluteFrequencySSB = 620640;
|
||||||
|
# this is 3502.56 MHz
|
||||||
|
#absoluteFrequencySSB = 633504;
|
||||||
|
# this is 3600.48 MHz
|
||||||
|
#absoluteFrequencySSB = 640032;
|
||||||
|
#dl_frequencyBand = 78;
|
||||||
|
# this is 3301.68 MHz
|
||||||
|
dl_absoluteFrequencyPointA = 620112;
|
||||||
|
# this is 3502.56 MHz
|
||||||
|
#dl_absoluteFrequencyPointA = 633504;
|
||||||
|
# this is 3600.48 MHz
|
||||||
|
#dl_absoluteFrequencyPointA = 640032;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
dl_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
dl_subcarrierSpacing = 1;
|
||||||
|
dl_carrierBandwidth = 133;
|
||||||
|
#initialDownlinkBWP
|
||||||
|
#genericParameters
|
||||||
|
# this is RBstart=0,L=133 (275*(L-1))+RBstart
|
||||||
|
initialDLBWPlocationAndBandwidth = 36300;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
initialDLBWPsubcarrierSpacing = 1;
|
||||||
|
#pdcch-ConfigCommon
|
||||||
|
initialDLBWPcontrolResourceSetZero = 10;
|
||||||
|
initialDLBWPsearchSpaceZero = 0;
|
||||||
|
#pdsch-ConfigCommon
|
||||||
|
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||||
|
initialDLBWPk0_0 = 0;
|
||||||
|
#initialULBWPmappingType
|
||||||
|
#0=typeA,1=typeB
|
||||||
|
initialDLBWPmappingType_0 = 0;
|
||||||
|
#this is SS=1,L=13
|
||||||
|
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||||
|
|
||||||
|
initialDLBWPk0_1 = 0;
|
||||||
|
initialDLBWPmappingType_1 = 0;
|
||||||
|
#this is SS=1,L=5
|
||||||
|
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||||
|
|
||||||
|
#uplinkConfigCommon
|
||||||
|
#frequencyInfoUL
|
||||||
|
ul_frequencyBand = 78;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
ul_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
ul_subcarrierSpacing = 1;
|
||||||
|
ul_carrierBandwidth = 133;
|
||||||
|
pMax = 20;
|
||||||
|
#initialUplinkBWP
|
||||||
|
#genericParameters
|
||||||
|
initialULBWPlocationAndBandwidth = 36300;
|
||||||
|
# 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 = -108;
|
||||||
|
#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 = 4;
|
||||||
|
#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 = 3;
|
||||||
|
#oneHalf (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,
|
||||||
|
|
||||||
|
# pusch-ConfigCommon (up to 16 elements)
|
||||||
|
initialULBWPk2_0 = 6;
|
||||||
|
initialULBWPmappingType_0 = 1
|
||||||
|
# this is SS=2 L=13
|
||||||
|
initialULBWPstartSymbolAndLength_0 = 41;
|
||||||
|
|
||||||
|
initialULBWPk2_1 = 6;
|
||||||
|
initialULBWPmappingType_1 = 1;
|
||||||
|
# this is SS=0 L=4
|
||||||
|
initialULBWPstartSymbolAndLength_1 = 52;
|
||||||
|
|
||||||
|
initialULBWPk2_2 = 7;
|
||||||
|
initialULBWPmappingType_2 = 1;
|
||||||
|
# this is SS=10 L=4
|
||||||
|
initialULBWPstartSymbolAndLength_2 = 52;
|
||||||
|
|
||||||
|
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_PositionsInBurs_BitmapPR
|
||||||
|
# 1=short, 2=medium, 3=long
|
||||||
|
ssb_PositionsInBurst_PR = 2;
|
||||||
|
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.69.131";
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
|
||||||
|
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.194/24";
|
||||||
|
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.194/24";
|
||||||
|
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 = 150;
|
||||||
|
ulsch_max_slots_inactivity=20;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "local_mac";
|
||||||
|
pusch_proc_threads = 2;
|
||||||
|
prach_dtx_threshold = 120;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 2
|
||||||
|
nb_rx = 2
|
||||||
|
att_tx = 0
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [78];
|
||||||
|
max_pdschReferenceSignalPower = -27;
|
||||||
|
max_rxgain = 75;
|
||||||
|
eNB_instances = [0];
|
||||||
|
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
|
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
|
## beamforming 2x2 matrix:
|
||||||
|
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
|
## beamforming 4x4 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
|
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
THREAD_STRUCT = (
|
||||||
|
{
|
||||||
|
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||||
|
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||||
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
|
worker_config = "WORKER_ENABLE";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
f1ap_log_level ="debug";
|
||||||
|
f1ap_log_verbosity ="medium";
|
||||||
|
};
|
||||||
+2
-1
@@ -1371,11 +1371,12 @@ void *ru_thread( void *param ) {
|
|||||||
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
|
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
|
||||||
|
|
||||||
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
|
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
|
||||||
LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
|
/* LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
|
||||||
|
|
||||||
for (aa=0;aa<ru->nb_rx;aa++)
|
for (aa=0;aa<ru->nb_rx;aa++)
|
||||||
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
|
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
|
||||||
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||||
|
*/
|
||||||
if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData)
|
if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData)
|
||||||
((scopeData_t*)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData);
|
((scopeData_t*)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData);
|
||||||
// Do PRACH RU processing
|
// Do PRACH RU processing
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
// allocate FFT output buffers (RX)
|
// allocate FFT output buffers (RX)
|
||||||
ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||||
for (i=0; i<ru->nb_rx; i++) {
|
for (i=0; i<ru->nb_rx; i++) {
|
||||||
// allocate 2 subframes of I/Q signal data (frequency)
|
// allocate 4 slots of I/Q signal data (frequency)
|
||||||
ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(2*fp->samples_per_subframe_wCP) );
|
ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(4*fp->symbols_per_slot*fp->ofdm_symbol_size) );
|
||||||
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx);
|
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -348,15 +348,15 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
|
|
||||||
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||||
|
int soffset = (slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
|
||||||
for (int symbol=0;symbol<nsymb;symbol++) {
|
for (int symbol=0;symbol<nsymb;symbol++) {
|
||||||
|
|
||||||
uint32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[1])[symbol + symb_offset];
|
uint32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[1])[symbol + symb_offset];
|
||||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
||||||
rotate_cpx_vector((int16_t *)&rxdataF[frame_parms->ofdm_symbol_size*symbol],
|
rotate_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||||
(int16_t*)&rot2,
|
(int16_t*)&rot2,
|
||||||
(int16_t *)&rxdataF[frame_parms->ofdm_symbol_size*symbol],
|
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||||
length,
|
length,
|
||||||
15);
|
15);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,15 +88,21 @@ void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB) {
|
|||||||
if (i%25 == 24) fprintf(fd,"\n");
|
if (i%25 == 24) fprintf(fd,"\n");
|
||||||
}
|
}
|
||||||
fprintf(fd,"\n");
|
fprintf(fd,"\n");
|
||||||
fprintf(fd,"max_IO = %d (%d), min_I0 = %d (%d), avg_I0 = %d dB\n",max_I0,amax,min_I0,amin,gNB->measurements.n0_subband_power_avg_dB);
|
fprintf(fd,"max_IO = %d (%d), min_I0 = %d (%d), avg_I0 = %d dB",max_I0,amax,min_I0,amin,gNB->measurements.n0_subband_power_avg_dB);
|
||||||
fprintf(fd,"PRACH I0 = %d.%d dB\n",gNB->measurements.prach_I0/10,gNB->measurements.prach_I0%10);
|
if (gNB->frame_parms.nb_antennas_rx>1) {
|
||||||
|
fprintf(fd,"(");
|
||||||
|
for (int aarx=0;aarx<gNB->frame_parms.nb_antennas_rx;aarx++)
|
||||||
|
fprintf(fd,"%d.",gNB->measurements.n0_subband_power_avg_perANT_dB[aarx]);
|
||||||
|
fprintf(fd,")");
|
||||||
|
}
|
||||||
|
fprintf(fd,"\nPRACH I0 = %d.%d dB\n",gNB->measurements.prach_I0/10,gNB->measurements.prach_I0%10);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
|
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb) {
|
||||||
|
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
NR_gNB_COMMON *common_vars = &gNB->common_vars;
|
NR_gNB_COMMON *common_vars = &gNB->common_vars;
|
||||||
@@ -112,7 +118,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
|
|||||||
n0_power_tot[rb]=0;
|
n0_power_tot[rb]=0;
|
||||||
nb_symb[rb]=0;
|
nb_symb[rb]=0;
|
||||||
}
|
}
|
||||||
offset0 = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
|
offset0 = (slot&3)*(frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size) + (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
|
||||||
if ((gNB->rb_mask_ul[s][rb>>5]&(1<<(rb&31))) == 0) { // check that rb was not used in this subframe
|
if ((gNB->rb_mask_ul[s][rb>>5]&(1<<(rb&31))) == 0) { // check that rb was not used in this subframe
|
||||||
nb_symb[rb]++;
|
nb_symb[rb]++;
|
||||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||||
@@ -134,23 +140,31 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
|
|||||||
int nb_rb=0;
|
int nb_rb=0;
|
||||||
int32_t n0_subband_tot=0;
|
int32_t n0_subband_tot=0;
|
||||||
int32_t n0_subband_tot_perPRB=0;
|
int32_t n0_subband_tot_perPRB=0;
|
||||||
|
int32_t n0_subband_tot_perANT[1+frame_parms->nb_antennas_rx];
|
||||||
|
|
||||||
for (int rb = 0 ; rb<frame_parms->N_RB_UL;rb++) {
|
for (int rb = 0 ; rb<frame_parms->N_RB_UL;rb++) {
|
||||||
n0_subband_tot_perPRB=0;
|
n0_subband_tot_perPRB=0;
|
||||||
if (nb_symb[rb] > 0) {
|
if (nb_symb[rb] > 0) {
|
||||||
for (int aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
|
for (int aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
|
||||||
measurements->n0_subband_power[aarx][rb]/=nb_symb[rb];
|
measurements->n0_subband_power[aarx][rb]/=nb_symb[rb];
|
||||||
n0_subband_tot_perPRB+=measurements->n0_subband_power[aarx][rb];
|
n0_subband_tot_perPRB+=measurements->n0_subband_power[aarx][rb];
|
||||||
|
if (rb==0) n0_subband_tot_perANT[aarx]=measurements->n0_subband_power[aarx][rb];
|
||||||
|
else n0_subband_tot_perANT[aarx]+=measurements->n0_subband_power[aarx][rb];
|
||||||
}
|
}
|
||||||
n0_subband_tot_perPRB/=frame_parms->nb_antennas_rx;
|
n0_subband_tot_perPRB/=frame_parms->nb_antennas_rx;
|
||||||
measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_subband_tot_perPRB);
|
measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_subband_tot_perPRB);
|
||||||
measurements->n0_subband_power_tot_dBm[rb] = measurements->n0_subband_power_tot_dB[rb] - gNB->rx_total_gain_dB - dB_fixed(frame_parms->N_RB_UL);
|
measurements->n0_subband_power_tot_dBm[rb] = measurements->n0_subband_power_tot_dB[rb] - gNB->rx_total_gain_dB - dB_fixed(frame_parms->N_RB_UL);
|
||||||
//printf("n0_subband_power_tot_dB[%d] => %d, over %d symbols\n",rb,measurements->n0_subband_power_tot_dB[rb],nb_symb[rb]);
|
//printf("n0_subband_power_tot_dB[%d] => %d, over %d symbols\n",rb,measurements->n0_subband_power_tot_dB[rb],nb_symb[rb]);
|
||||||
n0_subband_tot += n0_subband_tot;
|
n0_subband_tot += n0_subband_tot_perPRB;
|
||||||
nb_rb++;
|
nb_rb++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nb_rb>0) measurements->n0_subband_power_avg_dB = dB_fixed(n0_subband_tot/nb_rb);
|
if (nb_rb>0) {
|
||||||
|
measurements->n0_subband_power_avg_dB = dB_fixed(n0_subband_tot/nb_rb);
|
||||||
|
for (int aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
|
||||||
|
measurements->n0_subband_power_avg_perANT_dB[aarx] = dB_fixed(n0_subband_tot_perANT[aarx]/nb_rb);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
uint8_t nushift;
|
uint8_t nushift;
|
||||||
int **ul_ch_estimates = gNB->pusch_vars[ul_id]->ul_ch_estimates;
|
int **ul_ch_estimates = gNB->pusch_vars[ul_id]->ul_ch_estimates;
|
||||||
int **rxdataF = gNB->common_vars.rxdataF;
|
int **rxdataF = gNB->common_vars.rxdataF;
|
||||||
|
int soffset = (Ns&3)*gNB->frame_parms.symbols_per_slot*gNB->frame_parms.ofdm_symbol_size;
|
||||||
nushift = (p>>1)&1;
|
nushift = (p>>1)&1;
|
||||||
gNB->frame_parms.nushift = nushift;
|
gNB->frame_parms.nushift = nushift;
|
||||||
|
|
||||||
@@ -79,16 +79,14 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
uint16_t nb_rb_pusch = pusch_pdu->rb_size;
|
uint16_t nb_rb_pusch = pusch_pdu->rb_size;
|
||||||
|
|
||||||
#ifdef DEBUG_CH
|
LOG_D(PHY, "In %s: ch_offset %d, soffset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n",
|
||||||
LOG_I(PHY, "In %s: ch_offset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n",
|
|
||||||
__FUNCTION__,
|
__FUNCTION__,
|
||||||
ch_offset,
|
ch_offset, soffset,
|
||||||
symbol_offset,
|
symbol_offset,
|
||||||
gNB->frame_parms.ofdm_symbol_size,
|
gNB->frame_parms.ofdm_symbol_size,
|
||||||
Ns,
|
Ns,
|
||||||
k,
|
k,
|
||||||
symbol);
|
symbol);
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (nushift) {
|
switch (nushift) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -170,7 +168,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
re_offset = k; /* Initializing the Resource element offset for each Rx antenna */
|
re_offset = k; /* Initializing the Resource element offset for each Rx antenna */
|
||||||
|
|
||||||
pil = (int16_t *)&pilot[0];
|
pil = (int16_t *)&pilot[0];
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];
|
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+k+nushift)];
|
||||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||||
re_offset = k;
|
re_offset = k;
|
||||||
|
|
||||||
@@ -212,7 +210,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
8);
|
8);
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||||
//for (int i= 0; i<8; i++)
|
//for (int i= 0; i<8; i++)
|
||||||
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
|
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
|
||||||
|
|
||||||
@@ -243,7 +241,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
8);
|
8);
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||||
//printf("ul_ch addr %p\n",ul_ch);
|
//printf("ul_ch addr %p\n",ul_ch);
|
||||||
|
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
@@ -277,7 +275,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||||
ul_ch+=8;
|
ul_ch+=8;
|
||||||
|
|
||||||
for (pilot_cnt=3; pilot_cnt<(6*nb_rb_pusch-3); pilot_cnt+=2) {
|
for (pilot_cnt=3; pilot_cnt<(6*nb_rb_pusch-3); pilot_cnt+=2) {
|
||||||
@@ -295,7 +293,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
8);
|
8);
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||||
//printf("ul_ch addr %p\n",ul_ch);
|
//printf("ul_ch addr %p\n",ul_ch);
|
||||||
|
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
@@ -315,7 +313,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
ul_ch+=8;
|
ul_ch+=8;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -337,7 +335,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
|
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
@@ -353,7 +351,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
pil+=2;
|
pil+=2;
|
||||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
ul_ch+=8;
|
ul_ch+=8;
|
||||||
|
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
@@ -379,7 +377,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
ul_ch += (idxDC-4);
|
ul_ch += (idxDC-4);
|
||||||
ul_ch = memset(ul_ch, 0, sizeof(int16_t)*10);
|
ul_ch = memset(ul_ch, 0, sizeof(int16_t)*10);
|
||||||
re_offset = (re_offset+idxDC/2-2) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+idxDC/2-2) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
|
|
||||||
@@ -410,7 +408,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
pil += 4;
|
pil += 4;
|
||||||
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
|
|
||||||
@@ -434,7 +432,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
// Treat first DMRS specially (left edge)
|
// Treat first DMRS specially (left edge)
|
||||||
|
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
|
|
||||||
ul_ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ul_ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ul_ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ul_ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
@@ -446,7 +444,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
for (re_cnt = 1; re_cnt < (nb_rb_pusch*NR_NB_SC_PER_RB) - 5; re_cnt+=6){
|
for (re_cnt = 1; re_cnt < (nb_rb_pusch*NR_NB_SC_PER_RB) - 5; re_cnt+=6){
|
||||||
|
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
|
|
||||||
ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch_l[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch_l[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
@@ -464,7 +462,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
re_offset = (re_offset+5)%gNB->frame_parms.ofdm_symbol_size;
|
re_offset = (re_offset+5)%gNB->frame_parms.ofdm_symbol_size;
|
||||||
|
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+symbol_offset+nushift+re_offset];
|
||||||
|
|
||||||
ch_r[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch_r[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch_r[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch_r[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
@@ -492,7 +490,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
// Treat last pilot specially (right edge)
|
// Treat last pilot specially (right edge)
|
||||||
|
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol_offset+nushift+re_offset)];
|
||||||
|
|
||||||
ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||||
ch_l[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
ch_l[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||||
|
|
||||||
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb);
|
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot,int first_symb,int num_symb);
|
||||||
|
|
||||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol);
|
void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol);
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
*/
|
*/
|
||||||
void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||||
NR_gNB_PUSCH *pusch_vars,
|
NR_gNB_PUSCH *pusch_vars,
|
||||||
|
int slot,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
uint8_t is_dmrs_symbol,
|
uint8_t is_dmrs_symbol,
|
||||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ void nr_idft(int32_t *z, uint32_t Msc_PUSCH)
|
|||||||
|
|
||||||
void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||||
NR_gNB_PUSCH *pusch_vars,
|
NR_gNB_PUSCH *pusch_vars,
|
||||||
|
int slot,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
uint8_t is_dmrs_symbol,
|
uint8_t is_dmrs_symbol,
|
||||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||||
@@ -319,7 +320,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
|||||||
int16_t *rxF,*rxF_ext;
|
int16_t *rxF,*rxF_ext;
|
||||||
int *ul_ch0,*ul_ch0_ext;
|
int *ul_ch0,*ul_ch0_ext;
|
||||||
uint8_t delta = 0;
|
uint8_t delta = 0;
|
||||||
|
int soffset = (slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
|
||||||
#ifdef DEBUG_RB_EXT
|
#ifdef DEBUG_RB_EXT
|
||||||
|
|
||||||
printf("--------------------symbol = %d-----------------------\n", symbol);
|
printf("--------------------symbol = %d-----------------------\n", symbol);
|
||||||
@@ -338,7 +339,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
|||||||
|
|
||||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||||
|
|
||||||
rxF = (int16_t *)&rxdataF[aarx][symbol * frame_parms->ofdm_symbol_size];
|
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol * frame_parms->ofdm_symbol_size)];
|
||||||
rxF_ext = (int16_t *)&pusch_vars->rxdataF_ext[aarx][symbol * nb_re_pusch2]; // [hna] rxdataF_ext isn't contiguous in order to solve an alignment problem ib llr computation in case of mod_order = 4, 6
|
rxF_ext = (int16_t *)&pusch_vars->rxdataF_ext[aarx][symbol * nb_re_pusch2]; // [hna] rxdataF_ext isn't contiguous in order to solve an alignment problem ib llr computation in case of mod_order = 4, 6
|
||||||
|
|
||||||
ul_ch0 = &pusch_vars->ul_ch_estimates[aarx][pusch_vars->dmrs_symbol*frame_parms->ofdm_symbol_size]; // update channel estimates if new dmrs symbol are available
|
ul_ch0 = &pusch_vars->ul_ch_estimates[aarx][pusch_vars->dmrs_symbol*frame_parms->ofdm_symbol_size]; // update channel estimates if new dmrs symbol are available
|
||||||
@@ -1116,20 +1117,20 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
int off = 0;
|
int off = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (frame_parms->nb_antennas_rx>1) {
|
if (0/*frame_parms->nb_antennas_rx>1*/) {
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
int nb_re = nb_rb*12;
|
int nb_re = nb_rb*12;
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
||||||
rxdataF_comp128[aa] = (__m128i *)&rxdataF_comp[aa][(symbol*(nb_re + off))];
|
rxdataF_comp128[aa] = (__m128i *)&rxdataF_comp[aa][(symbol*(nb_re + off))];
|
||||||
ul_ch_mag128[aa] = (__m128i *)&ul_ch_mag[aa][(symbol*(nb_re + off))];
|
ul_ch_mag128[aa] = (__m128i *)&ul_ch_mag[aa][(symbol*(nb_re + off))];
|
||||||
ul_ch_mag128b[aa] = (__m128i *)&ul_ch_magb[aa][(symbol*(nb_re + off))];
|
ul_ch_mag128b[aa] = (__m128i *)&ul_ch_magb[aa][(symbol*(nb_re + off))];
|
||||||
|
}
|
||||||
|
for (int aa=1;aa<frame_parms->nb_antennas_rx;aa++) {
|
||||||
// MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
|
// MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
|
||||||
for (i=0; i<nb_rb*3; i++) {
|
for (i=0; i<nb_rb*3; i++) {
|
||||||
rxdataF_comp128[0][i] = _mm_adds_epi16(_mm_srai_epi16(rxdataF_comp128[aa][i],1),_mm_srai_epi16(rxdataF_comp128[aa][i],1));
|
rxdataF_comp128[0][i] = _mm_adds_epi16(rxdataF_comp128[0][i],rxdataF_comp128[aa][i]);
|
||||||
ul_ch_mag128[0][i] = _mm_adds_epi16(_mm_srai_epi16(ul_ch_mag128[aa][i],1),_mm_srai_epi16(ul_ch_mag128[aa][i],1));
|
ul_ch_mag128[0][i] = _mm_adds_epi16(ul_ch_mag128[0][i], ul_ch_mag128[aa][i]);
|
||||||
ul_ch_mag128b[0][i] = _mm_adds_epi16(_mm_srai_epi16(ul_ch_mag128b[aa][i],1),_mm_srai_epi16(ul_ch_mag128b[aa][i],1));
|
ul_ch_mag128b[0][i] = _mm_adds_epi16(ul_ch_mag128b[0][i],ul_ch_mag128b[aa][i]);
|
||||||
// rxdataF_comp128[0][i] = _mm_add_epi16(rxdataF_comp128_0[i],(*(__m128i *)&jitterc[0]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
@@ -1175,8 +1176,8 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
gNB->pusch_vars[ulsch_id]->cl_done = 0;
|
gNB->pusch_vars[ulsch_id]->cl_done = 0;
|
||||||
|
|
||||||
bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size;
|
bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size;
|
||||||
LOG_D(PHY,"bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n", bwp_start_subcarrier, rel15_ul->rb_start, frame_parms->first_carrier_offset);
|
LOG_D(PHY,"pusch %d.%d : bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n", frame,slot,bwp_start_subcarrier, rel15_ul->rb_start, frame_parms->first_carrier_offset);
|
||||||
LOG_D(PHY,"ul_dmrs_symb_pos %x\n",rel15_ul->ul_dmrs_symb_pos);
|
LOG_D(PHY,"pusch %d.%d : ul_dmrs_symb_pos %x\n",frame,slot,rel15_ul->ul_dmrs_symb_pos);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
//--------------------- Channel estimation ---------------------
|
//--------------------- Channel estimation ---------------------
|
||||||
@@ -1255,6 +1256,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
start_meas(&gNB->ulsch_rbs_extraction_stats);
|
start_meas(&gNB->ulsch_rbs_extraction_stats);
|
||||||
nr_ulsch_extract_rbs_single(gNB->common_vars.rxdataF,
|
nr_ulsch_extract_rbs_single(gNB->common_vars.rxdataF,
|
||||||
gNB->pusch_vars[ulsch_id],
|
gNB->pusch_vars[ulsch_id],
|
||||||
|
slot,
|
||||||
symbol,
|
symbol,
|
||||||
dmrs_symbol_flag,
|
dmrs_symbol_flag,
|
||||||
rel15_ul,
|
rel15_ul,
|
||||||
@@ -1294,6 +1296,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
//--------------------- Channel Compensation ---------------
|
//--------------------- Channel Compensation ---------------
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
start_meas(&gNB->ulsch_channel_compensation_stats);
|
start_meas(&gNB->ulsch_channel_compensation_stats);
|
||||||
|
LOG_D(PHY,"Doing channel compensations log2_maxh %d, avgs %d (%d,%d)\n",gNB->pusch_vars[ulsch_id]->log2_maxh,avgs,avg[0],avg[1]);
|
||||||
nr_ulsch_channel_compensation(gNB->pusch_vars[ulsch_id]->rxdataF_ext,
|
nr_ulsch_channel_compensation(gNB->pusch_vars[ulsch_id]->rxdataF_ext,
|
||||||
gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext,
|
gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext,
|
||||||
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
|
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
|
int soffset=(slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
|
||||||
int nr_sequences;
|
int nr_sequences;
|
||||||
const uint8_t *mcs;
|
const uint8_t *mcs;
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
||||||
|
|
||||||
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
||||||
/*
|
/*
|
||||||
@@ -240,12 +240,12 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
|
int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
|
||||||
|
|
||||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
|
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
|
||||||
LOG_I(PHY,"pucch0: cs_ind %d, u %d, v %d\n",cs_ind,u[0],v[0]);
|
LOG_D(PHY,"pucch0: u %d, v %d\n",u[0],v[0]);
|
||||||
|
|
||||||
|
|
||||||
if (pucch_pdu->freq_hop_flag == 1) {
|
if (pucch_pdu->freq_hop_flag == 1) {
|
||||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,slot,&u[1],&v[1]); // calculating u and v value second hop
|
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,slot,&u[1],&v[1]); // calculating u and v value second hop
|
||||||
LOG_I(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]);
|
LOG_D(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]);
|
||||||
prb_offset[1] = pucch_pdu->bwp_start+pucch_pdu->second_hop_prb;
|
prb_offset[1] = pucch_pdu->bwp_start+pucch_pdu->second_hop_prb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
AssertFatal(re_offset[l]+12 < frame_parms->ofdm_symbol_size,"pucch straddles DC carrier, handle this!\n");
|
AssertFatal(re_offset[l]+12 < frame_parms->ofdm_symbol_size,"pucch straddles DC carrier, handle this!\n");
|
||||||
int16_t *r;
|
int16_t *r;
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
||||||
r=(int16_t*)&rxdataF[aa][(l2*frame_parms->ofdm_symbol_size)+re_offset[l]];
|
r=(int16_t*)&rxdataF[aa][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[l]];
|
||||||
n2=0;
|
n2=0;
|
||||||
for (n=0;n<12;n++,n2+=2) {
|
for (n=0;n<12;n++,n2+=2) {
|
||||||
xr[aa][l][n2] +=(int16_t)(((int32_t)x_re[l][n]*r[n2]+(int32_t)x_im[l][n]*r[n2+1])>>15);
|
xr[aa][l][n2] +=(int16_t)(((int32_t)x_re[l][n]*r[n2]+(int32_t)x_im[l][n]*r[n2+1])>>15);
|
||||||
@@ -377,7 +377,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
LOG_D(PHY,"n00[%d] = %d, n01[%d] = %d\n",prb_offset[0],uci_stats->pucch0_n00,prb_offset[1],uci_stats->pucch0_n01);
|
LOG_D(PHY,"n00[%d] = %d, n01[%d] = %d\n",prb_offset[0],uci_stats->pucch0_n00,prb_offset[1],uci_stats->pucch0_n01);
|
||||||
// estimate CQI for MAC (from antenna port 0 only)
|
// estimate CQI for MAC (from antenna port 0 only)
|
||||||
int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01;
|
int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01;
|
||||||
int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12)) - (10*max_n0);
|
int SNRtimes10,sigenergy=0;
|
||||||
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++)
|
||||||
|
sigenergy += signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12);
|
||||||
|
SNRtimes10 = dB_fixed_times10(sigenergy)-(10*max_n0);
|
||||||
int cqi;
|
int cqi;
|
||||||
if (SNRtimes10 < -640) cqi=0;
|
if (SNRtimes10 < -640) cqi=0;
|
||||||
else if (SNRtimes10 > 635) cqi=255;
|
else if (SNRtimes10 > 635) cqi=255;
|
||||||
@@ -396,7 +399,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
uci_pdu->rnti = pucch_pdu->rnti;
|
uci_pdu->rnti = pucch_pdu->rnti;
|
||||||
uci_pdu->ul_cqi = cqi;
|
uci_pdu->ul_cqi = cqi;
|
||||||
uci_pdu->timing_advance = 0xffff; // currently not valid
|
uci_pdu->timing_advance = 0xffff; // currently not valid
|
||||||
uci_pdu->rssi = 1280 - (10*dB_fixed(32767*32767)-dB_fixed_times10(signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12)));
|
uci_pdu->rssi = 1280 - (10*dB_fixed(32767*32767))-dB_fixed_times10(sigenergy);
|
||||||
|
|
||||||
if (pucch_pdu->bit_len_harq==0) {
|
if (pucch_pdu->bit_len_harq==0) {
|
||||||
uci_pdu->harq = NULL;
|
uci_pdu->harq = NULL;
|
||||||
@@ -469,6 +472,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
|||||||
* Implement TS 38.211 Subclause 6.3.2.4.1 Sequence modulation
|
* Implement TS 38.211 Subclause 6.3.2.4.1 Sequence modulation
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
int soffset = (nr_tti_tx&3)*frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size;
|
||||||
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
|
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
|
||||||
int16_t d_re=0, d_im=0,d1_re=0,d1_im=0;
|
int16_t d_re=0, d_im=0,d1_re=0,d1_im=0;
|
||||||
#ifdef DEBUG_NR_PUCCH_RX
|
#ifdef DEBUG_NR_PUCCH_RX
|
||||||
@@ -563,23 +567,23 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (l%2 == 1) { // mapping PUCCH according to TS38.211 subclause 6.4.1.3.1
|
if (l%2 == 1) { // mapping PUCCH according to TS38.211 subclause 6.4.1.3.1
|
||||||
z_re_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[0];
|
z_re_rx[i+n] = ((int16_t *)&rxdataF[0][soffset+re_offset])[0];
|
||||||
z_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
z_im_rx[i+n] = ((int16_t *)&rxdataF[0][soffset+re_offset])[1];
|
||||||
#ifdef DEBUG_NR_PUCCH_RX
|
#ifdef DEBUG_NR_PUCCH_RX
|
||||||
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
l,n,((int16_t *)&rxdataF[0][soffset+re_offset])[0],((int16_t *)&rxdataF[0][soffset+re_offset])[1]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l%2 == 0) { // mapping DM-RS signal according to TS38.211 subclause 6.4.1.3.1
|
if (l%2 == 0) { // mapping DM-RS signal according to TS38.211 subclause 6.4.1.3.1
|
||||||
z_dmrs_re_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[0];
|
z_dmrs_re_rx[i+n] = ((int16_t *)&rxdataF[0][soffset+re_offset])[0];
|
||||||
z_dmrs_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
z_dmrs_im_rx[i+n] = ((int16_t *)&rxdataF[0][soffset+re_offset])[1];
|
||||||
// printf("%d\t%d\t%d\n",l,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
// printf("%d\t%d\t%d\n",l,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
||||||
#ifdef DEBUG_NR_PUCCH_RX
|
#ifdef DEBUG_NR_PUCCH_RX
|
||||||
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
l,n,((int16_t *)&rxdataF[0][soffset+re_offset])[0],((int16_t *)&rxdataF[0][soffset+re_offset])[1]);
|
||||||
#endif
|
#endif
|
||||||
// printf("l=%d\ti=%d\tre_offset=%d\treceived dmrs re=%d\tim=%d\n",l,i,re_offset,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
// printf("l=%d\ti=%d\tre_offset=%d\treceived dmrs re=%d\tim=%d\n",l,i,re_offset,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
||||||
}
|
}
|
||||||
@@ -1647,7 +1651,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
int re_off = (12*pucch_pdu->prb_start) + (12*pucch_pdu->bwp_start) + frame_parms->first_carrier_offset;
|
int re_off = (12*pucch_pdu->prb_start) + (12*pucch_pdu->bwp_start) + frame_parms->first_carrier_offset;
|
||||||
// estimate CQI for MAC (from antenna port 0 only)
|
// estimate CQI for MAC (from antenna port 0 only)
|
||||||
int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][(l2*frame_parms->ofdm_symbol_size)+re_off],12*pucch_pdu->prb_size)) - (10*gNB->measurements.n0_power_tot_dB);
|
int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset],12*pucch_pdu->prb_size)) - (10*gNB->measurements.n0_power_tot_dB);
|
||||||
int cqi,bit_left;
|
int cqi,bit_left;
|
||||||
if (SNRtimes10 < -640) cqi=0;
|
if (SNRtimes10 < -640) cqi=0;
|
||||||
else if (SNRtimes10 > 635) cqi=255;
|
else if (SNRtimes10 > 635) cqi=255;
|
||||||
@@ -1660,7 +1664,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
|||||||
uci_pdu->pucch_format=0;
|
uci_pdu->pucch_format=0;
|
||||||
uci_pdu->ul_cqi=cqi;
|
uci_pdu->ul_cqi=cqi;
|
||||||
uci_pdu->timing_advance=0xffff; // currently not valid
|
uci_pdu->timing_advance=0xffff; // currently not valid
|
||||||
uci_pdu->rssi=1280 - (10*dB_fixed(32767*32767)-dB_fixed_times10(signal_energy_nodc(&rxdataF[0][(l2*frame_parms->ofdm_symbol_size)+re_off],12*pucch_pdu->prb_size)));
|
uci_pdu->rssi=1280 - (10*dB_fixed(32767*32767)-dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset],12*pucch_pdu->prb_size)));
|
||||||
if (pucch_pdu->bit_len_harq>0) {
|
if (pucch_pdu->bit_len_harq>0) {
|
||||||
int harq_bytes=pucch_pdu->bit_len_harq>>3;
|
int harq_bytes=pucch_pdu->bit_len_harq>>3;
|
||||||
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
|
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
|
||||||
|
|||||||
@@ -667,6 +667,8 @@ typedef struct {
|
|||||||
unsigned short n0_subband_power_dB[MAX_NUM_RU_PER_gNB][275];
|
unsigned short n0_subband_power_dB[MAX_NUM_RU_PER_gNB][275];
|
||||||
//! estimated avg subband noise power (dB)
|
//! estimated avg subband noise power (dB)
|
||||||
unsigned short n0_subband_power_avg_dB;
|
unsigned short n0_subband_power_avg_dB;
|
||||||
|
//! estimated avg subband noise power per antenna (dB)
|
||||||
|
unsigned short n0_subband_power_avg_perANT_dB[NB_ANTENNAS_RX];
|
||||||
//! estimated avg noise power per RB (dB)
|
//! estimated avg noise power per RB (dB)
|
||||||
short n0_subband_power_tot_dB[275];
|
short n0_subband_power_tot_dB[275];
|
||||||
//! estimated avg noise power per RB (dBm)
|
//! estimated avg noise power per RB (dBm)
|
||||||
|
|||||||
@@ -529,12 +529,12 @@ void nr_fep0(RU_t *ru, int first_half) {
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+proc->tti_rx, 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+proc->tti_rx, 1);
|
||||||
|
|
||||||
// remove_7_5_kHz(ru,(slot&1)+(proc->tti_rx<<1));
|
int offset = (proc->tti_rx&3) * fp->symbols_per_slot * fp->ofdm_symbol_size;
|
||||||
for (l = start_symbol; l < end_symbol; l++) {
|
for (l = start_symbol; l < end_symbol; l++) {
|
||||||
for (aa = 0; aa < fp->nb_antennas_rx; aa++) {
|
for (aa = 0; aa < fp->nb_antennas_rx; aa++) {
|
||||||
nr_slot_fep_ul(fp,
|
nr_slot_fep_ul(fp,
|
||||||
ru->common.rxdata[aa],
|
ru->common.rxdata[aa],
|
||||||
ru->common.rxdataF[aa],
|
&ru->common.rxdataF[aa][offset],
|
||||||
l,
|
l,
|
||||||
proc->tti_rx,
|
proc->tti_rx,
|
||||||
ru->N_TA_offset);
|
ru->N_TA_offset);
|
||||||
@@ -663,14 +663,15 @@ void nr_fep_full(RU_t *ru, int slot) {
|
|||||||
start_meas(&ru->ofdm_demod_stats);
|
start_meas(&ru->ofdm_demod_stats);
|
||||||
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
|
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
|
||||||
|
|
||||||
|
|
||||||
// remove_7_5_kHz(ru,proc->tti_rx<<1);
|
// remove_7_5_kHz(ru,proc->tti_rx<<1);
|
||||||
// remove_7_5_kHz(ru,1+(proc->tti_rx<<1));
|
// remove_7_5_kHz(ru,1+(proc->tti_rx<<1));
|
||||||
|
int offset = (proc->tti_rx&3)*(fp->symbols_per_slot * fp->ofdm_symbol_size);
|
||||||
for (l = 0; l < fp->symbols_per_slot; l++) {
|
for (l = 0; l < fp->symbols_per_slot; l++) {
|
||||||
for (aa = 0; aa < fp->nb_antennas_rx; aa++) {
|
for (aa = 0; aa < fp->nb_antennas_rx; aa++) {
|
||||||
nr_slot_fep_ul(fp,
|
nr_slot_fep_ul(fp,
|
||||||
ru->common.rxdata[aa],
|
ru->common.rxdata[aa],
|
||||||
ru->common.rxdataF[aa],
|
&ru->common.rxdataF[aa][offset],
|
||||||
l,
|
l,
|
||||||
proc->tti_rx,
|
proc->tti_rx,
|
||||||
ru->N_TA_offset);
|
ru->N_TA_offset);
|
||||||
|
|||||||
@@ -257,10 +257,10 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
|||||||
ulsch_harq->round = 0;
|
ulsch_harq->round = 0;
|
||||||
ulsch->harq_mask &= ~(1 << rdata->harq_pid);
|
ulsch->harq_mask &= ~(1 << rdata->harq_pid);
|
||||||
|
|
||||||
LOG_I(PHY, "ULSCH received ok \n");
|
LOG_D(PHY, "ULSCH received ok \n");
|
||||||
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 0);
|
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 0);
|
||||||
} else {
|
} else {
|
||||||
LOG_I(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n",
|
LOG_D(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n",
|
||||||
gNB->Mod_id, ulsch_harq->frame, ulsch_harq->slot,
|
gNB->Mod_id, ulsch_harq->frame, ulsch_harq->slot,
|
||||||
rdata->harq_pid,ulsch_harq->status, ulsch_harq->round,ulsch_harq->TBS,r);
|
rdata->harq_pid,ulsch_harq->status, ulsch_harq->round,ulsch_harq->TBS,r);
|
||||||
if (ulsch_harq->round >= ulsch->Mlimit) {
|
if (ulsch_harq->round >= ulsch->Mlimit) {
|
||||||
@@ -274,7 +274,8 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
|||||||
LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id);
|
LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id);
|
||||||
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 1);
|
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 1);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
/*
|
||||||
if (ulsch_harq->ulsch_pdu.mcs_index == 9) {
|
if (ulsch_harq->ulsch_pdu.mcs_index == 9) {
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
int off = ((ulsch_harq->ulsch_pdu.rb_size&1) == 1)? 4:0;
|
int off = ((ulsch_harq->ulsch_pdu.rb_size&1) == 1)? 4:0;
|
||||||
@@ -413,19 +414,54 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
|||||||
if (timing_advance_update < 0) timing_advance_update = 0;
|
if (timing_advance_update < 0) timing_advance_update = 0;
|
||||||
if (timing_advance_update > 63) timing_advance_update = 63;
|
if (timing_advance_update > 63) timing_advance_update = 63;
|
||||||
|
|
||||||
LOG_I(PHY, "%d.%d : Estimated timing advance PUSCH is = %d, timing_advance_update is %d \n", frame,slot_rx,sync_pos,timing_advance_update);
|
LOG_D(PHY, "%d.%d : Estimated timing advance PUSCH is = %d, timing_advance_update is %d \n", frame,slot_rx,sync_pos,timing_advance_update);
|
||||||
|
|
||||||
// estimate UL_CQI for MAC
|
// estimate UL_CQI for MAC
|
||||||
|
|
||||||
int SNRtimes10 = dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot) -
|
int SNRtimes10 = dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot) -
|
||||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot);
|
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot);
|
||||||
|
|
||||||
LOG_I(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
|
LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
|
||||||
|
|
||||||
if (SNRtimes10 < -640) cqi=0;
|
if (SNRtimes10 < -640) cqi=0;
|
||||||
else if (SNRtimes10 > 635) cqi=255;
|
else if (SNRtimes10 > 635) cqi=255;
|
||||||
else cqi=(640+SNRtimes10)/5;
|
else cqi=(640+SNRtimes10)/5;
|
||||||
|
|
||||||
|
|
||||||
|
if (0/*pusch_pdu->mcs_index == 9*/) {
|
||||||
|
#ifdef __AVX2__
|
||||||
|
int off = ((pusch_pdu->rb_size&1) == 1)? 4:0;
|
||||||
|
#else
|
||||||
|
int off = 0;
|
||||||
|
#endif
|
||||||
|
LOG_M("rxsigF0.m","rxsF0",&gNB->common_vars.rxdataF[0][(slot_rx&3)*gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot],gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot,1,1);
|
||||||
|
LOG_M("rxsigF0_ext.m","rxsF0_ext",
|
||||||
|
&gNB->pusch_vars[0]->rxdataF_ext[0][pusch_pdu->start_symbol_index*NR_NB_SC_PER_RB * pusch_pdu->rb_size],pusch_pdu->nr_of_symbols*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
LOG_M("chestF0.m","chF0",
|
||||||
|
&gNB->pusch_vars[0]->ul_ch_estimates[0][pusch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size],gNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
|
LOG_M("chestF0_ext.m","chF0_ext",
|
||||||
|
&gNB->pusch_vars[0]->ul_ch_estimates_ext[0][(pusch_pdu->start_symbol_index+1)*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size))],
|
||||||
|
(pusch_pdu->nr_of_symbols-1)*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
LOG_M("rxsigF0_comp.m","rxsF0_comp",
|
||||||
|
&gNB->pusch_vars[0]->rxdataF_comp[0][pusch_pdu->start_symbol_index*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size))],pusch_pdu->nr_of_symbols*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
LOG_M("rxsigF0_llr.m","rxsF0_llr",
|
||||||
|
&gNB->pusch_vars[0]->llr[0],(pusch_pdu->nr_of_symbols-1)*NR_NB_SC_PER_RB *pusch_pdu->rb_size * pusch_pdu->qam_mod_order,1,0);
|
||||||
|
if (gNB->frame_parms.nb_antennas_rx > 1) {
|
||||||
|
LOG_M("rxsigF1.m","rxsF1",&gNB->common_vars.rxdataF[1][(slot_rx&3)*gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot],gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot,1,1);
|
||||||
|
LOG_M("rxsigF1_ext.m","rxsF1_ext",
|
||||||
|
&gNB->pusch_vars[0]->rxdataF_ext[1][pusch_pdu->start_symbol_index*NR_NB_SC_PER_RB * pusch_pdu->rb_size],pusch_pdu->nr_of_symbols*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
LOG_M("chestF1.m","chF1",
|
||||||
|
&gNB->pusch_vars[0]->ul_ch_estimates[1][pusch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size],gNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
|
LOG_M("chestF1_ext.m","chF1_ext",
|
||||||
|
&gNB->pusch_vars[0]->ul_ch_estimates_ext[1][(pusch_pdu->start_symbol_index+1)*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size))],
|
||||||
|
(pusch_pdu->nr_of_symbols-1)*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
LOG_M("rxsigF1_comp.m","rxsF1_comp",
|
||||||
|
&gNB->pusch_vars[0]->rxdataF_comp[1][pusch_pdu->start_symbol_index*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size))],pusch_pdu->nr_of_symbols*(off+(NR_NB_SC_PER_RB * pusch_pdu->rb_size)),1,1);
|
||||||
|
}
|
||||||
|
exit(-1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// crc indication
|
// crc indication
|
||||||
uint16_t num_crc = gNB->UL_INFO.crc_ind.number_crcs;
|
uint16_t num_crc = gNB->UL_INFO.crc_ind.number_crcs;
|
||||||
gNB->UL_INFO.crc_ind.crc_list = &gNB->crc_pdu_list[0];
|
gNB->UL_INFO.crc_ind.crc_list = &gNB->crc_pdu_list[0];
|
||||||
@@ -471,61 +507,59 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
|||||||
void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||||
|
|
||||||
int rb2, rb, nb_rb;
|
int rb2, rb, nb_rb;
|
||||||
for (int symbol=0;symbol<14;symbol++) {
|
if (1/*(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[slot_rx].max_num_of_symbol_per_slot_list[symbol].slot_config.value==1*/){
|
||||||
if (gNB->gNB_config.tdd_table.max_tdd_periodicity_list[slot_rx].max_num_of_symbol_per_slot_list[symbol].slot_config.value==1){
|
nb_rb = 0;
|
||||||
nb_rb = 0;
|
for (int symbol=0;symbol<14;symbol++)
|
||||||
for (int m=0;m<9;m++) gNB->rb_mask_ul[symbol][m] = 0;
|
for (int m=0;m<9;m++) gNB->rb_mask_ul[symbol][m] = 0;
|
||||||
|
|
||||||
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
||||||
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
||||||
if (pucch) {
|
if (pucch) {
|
||||||
if ((pucch->active == 1) &&
|
if ((pucch->active == 1) &&
|
||||||
(pucch->frame == frame_rx) &&
|
(pucch->frame == frame_rx) &&
|
||||||
(pucch->slot == slot_rx) ) {
|
(pucch->slot == slot_rx) ) {
|
||||||
nfapi_nr_pucch_pdu_t *pucch_pdu = &pucch->pucch_pdu;
|
nfapi_nr_pucch_pdu_t *pucch_pdu = &pucch->pucch_pdu;
|
||||||
if ((symbol>=pucch_pdu->start_symbol_index) &&
|
for (int symbol=pucch_pdu->start_symbol_index ; symbol<(pucch_pdu->start_symbol_index+pucch_pdu->nr_of_symbols);symbol++) {
|
||||||
(symbol<(pucch_pdu->start_symbol_index + pucch_pdu->nr_of_symbols))){
|
for (rb=0; rb<pucch_pdu->prb_size; rb++) {
|
||||||
for (rb=0; rb<pucch_pdu->prb_size; rb++) {
|
rb2 = rb+pucch_pdu->prb_start+pucch_pdu->bwp_start;
|
||||||
rb2 = rb+pucch_pdu->prb_start+pucch_pdu->bwp_start;
|
gNB->rb_mask_ul[symbol][rb2>>5] |= (1<<(rb2&31));
|
||||||
|
}
|
||||||
|
if (symbol==pucch_pdu->start_symbol_index) nb_rb+=pucch_pdu->prb_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int ULSCH_id=0;ULSCH_id<gNB->number_of_nr_ulsch_max;ULSCH_id++) {
|
||||||
|
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
|
||||||
|
int harq_pid;
|
||||||
|
NR_UL_gNB_HARQ_t *ulsch_harq;
|
||||||
|
|
||||||
|
if ((ulsch) &&
|
||||||
|
(ulsch->rnti > 0)) {
|
||||||
|
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
|
||||||
|
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
|
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
||||||
|
if ((ulsch_harq->status == NR_ACTIVE) &&
|
||||||
|
(ulsch_harq->frame == frame_rx) &&
|
||||||
|
(ulsch_harq->slot == slot_rx) &&
|
||||||
|
(ulsch_harq->handled == 0)){
|
||||||
|
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
|
||||||
|
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
|
||||||
|
for (int symbol=symbol_start ; symbol<symbol_end ; symbol++) {
|
||||||
|
LOG_D(PHY,"symbol %d Filling rb_mask_ul rb_size %d\n",symbol,ulsch_harq->ulsch_pdu.rb_size);
|
||||||
|
for (rb=0; rb<ulsch_harq->ulsch_pdu.rb_size; rb++) {
|
||||||
|
rb2 = rb+ulsch_harq->ulsch_pdu.rb_start+ulsch_harq->ulsch_pdu.bwp_start;
|
||||||
gNB->rb_mask_ul[symbol][rb2>>5] |= (1<<(rb2&31));
|
gNB->rb_mask_ul[symbol][rb2>>5] |= (1<<(rb2&31));
|
||||||
}
|
}
|
||||||
nb_rb+=pucch_pdu->prb_size;
|
if (symbol==symbol_start) nb_rb+=ulsch_harq->ulsch_pdu.rb_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int ULSCH_id=0;ULSCH_id<gNB->number_of_nr_ulsch_max;ULSCH_id++) {
|
|
||||||
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
|
|
||||||
int harq_pid;
|
|
||||||
NR_UL_gNB_HARQ_t *ulsch_harq;
|
|
||||||
|
|
||||||
if ((ulsch) &&
|
|
||||||
(ulsch->rnti > 0)) {
|
|
||||||
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
|
|
||||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
|
||||||
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
|
|
||||||
if ((ulsch_harq->status == NR_ACTIVE) &&
|
|
||||||
(ulsch_harq->frame == frame_rx) &&
|
|
||||||
(ulsch_harq->slot == slot_rx) &&
|
|
||||||
(ulsch_harq->handled == 0)){
|
|
||||||
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
|
|
||||||
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
|
|
||||||
if ((symbol>=symbol_start) &&
|
|
||||||
(symbol<symbol_end)){
|
|
||||||
for (rb=0; rb<ulsch_harq->ulsch_pdu.rb_size; rb++) {
|
|
||||||
rb2 = rb+ulsch_harq->ulsch_pdu.rb_start+ulsch_harq->ulsch_pdu.bwp_start;
|
|
||||||
gNB->rb_mask_ul[symbol][rb2>>5] |= (1<<(rb2&31));
|
|
||||||
}
|
|
||||||
nb_rb+=ulsch_harq->ulsch_pdu.rb_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//TODO Add check for PRACH as well?
|
|
||||||
}
|
|
||||||
if (nb_rb<gNB->frame_parms.N_RB_UL)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
//TODO Add check for PRACH as well?
|
||||||
|
if (nb_rb<gNB->frame_parms.N_RB_UL)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,7 +567,7 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
|||||||
|
|
||||||
uint8_t symbol;
|
uint8_t symbol;
|
||||||
unsigned char aa;
|
unsigned char aa;
|
||||||
|
int offset = (slot_rx&3) * (gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size);
|
||||||
for(symbol = 0; symbol < (gNB->frame_parms.Ncp==EXTENDED?12:14); symbol++) {
|
for(symbol = 0; symbol < (gNB->frame_parms.Ncp==EXTENDED?12:14); symbol++) {
|
||||||
for (aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
|
for (aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
|
||||||
nr_slot_fep_ul(&gNB->frame_parms,
|
nr_slot_fep_ul(&gNB->frame_parms,
|
||||||
@@ -576,7 +610,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else num_symb=NR_NUMBER_OF_SYMBOLS_PER_SLOT;
|
else num_symb=NR_NUMBER_OF_SYMBOLS_PER_SLOT;
|
||||||
gNB_I0_measurements(gNB,first_symb,num_symb);
|
gNB_I0_measurements(gNB,slot_rx,first_symb,num_symb);
|
||||||
|
|
||||||
int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset;
|
int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset;
|
||||||
int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset+(47*12)],12*18);
|
int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset+(47*12)],12*18);
|
||||||
@@ -607,7 +641,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
|
|
||||||
offset = pucch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
|
offset = pucch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
|
||||||
power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
|
power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
|
||||||
LOG_I(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
|
LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
|
||||||
|
|
||||||
nr_decode_pucch0(gNB,
|
nr_decode_pucch0(gNB,
|
||||||
frame_rx,
|
frame_rx,
|
||||||
@@ -707,7 +741,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power[aarx]/=num_dmrs;
|
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power[aarx]/=num_dmrs;
|
||||||
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot += gNB->pusch_vars[ULSCH_id]->ulsch_noise_power[aarx];
|
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot += gNB->pusch_vars[ULSCH_id]->ulsch_noise_power[aarx];
|
||||||
}
|
}
|
||||||
/*if (dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot) <
|
if (dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot) <
|
||||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot) + gNB->pusch_thres) {
|
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot) + gNB->pusch_thres) {
|
||||||
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
|
NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch);
|
||||||
|
|
||||||
@@ -719,7 +753,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
gNB->pusch_vars[ULSCH_id]->DTX=1;
|
gNB->pusch_vars[ULSCH_id]->DTX=1;
|
||||||
if (stats) stats->DTX++;
|
if (stats) stats->DTX++;
|
||||||
return 1;
|
return 1;
|
||||||
} else*/ gNB->pusch_vars[ULSCH_id]->DTX=0;
|
} else gNB->pusch_vars[ULSCH_id]->DTX=0;
|
||||||
|
|
||||||
stop_meas(&gNB->rx_pusch_stats);
|
stop_meas(&gNB->rx_pusch_stats);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
|
||||||
|
|||||||
@@ -107,9 +107,9 @@
|
|||||||
#define MACRLC_LOCAL_S_PORTD_IDX 15
|
#define MACRLC_LOCAL_S_PORTD_IDX 15
|
||||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||||
#define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17
|
#define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17
|
||||||
#define MACRLC_PUSCHTARGETSNRX10_IDX 17
|
#define MACRLC_PUSCHTARGETSNRX10_IDX 18
|
||||||
#define MACRLC_PUCCHTARGETSNRX10_IDX 18
|
#define MACRLC_PUCCHTARGETSNRX10_IDX 19
|
||||||
#define MACRLC_PUCCHFAILURETHRES_IDX 19
|
#define MACRLC_PUCCHFAILURETHRES_IDX 20
|
||||||
#define MACRLC_PUSCHFAILURETHRES_IDX 20
|
#define MACRLC_PUSCHFAILURETHRES_IDX 21
|
||||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -679,6 +679,11 @@ void RCconfig_nr_macrlc() {
|
|||||||
RC.nrmac[j]->pucch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHFAILURETHRES_IDX].iptr);
|
RC.nrmac[j]->pucch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHFAILURETHRES_IDX].iptr);
|
||||||
RC.nrmac[j]->pusch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCHFAILURETHRES_IDX].iptr);
|
RC.nrmac[j]->pusch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCHFAILURETHRES_IDX].iptr);
|
||||||
|
|
||||||
|
LOG_I(NR_MAC,"PUSCH Target %d, PUCCH Target %d, PUCCH Failure %d, PUSCH Failure %d\n",
|
||||||
|
RC.nrmac[j]->pusch_target_snrx10,
|
||||||
|
RC.nrmac[j]->pucch_target_snrx10,
|
||||||
|
RC.nrmac[j]->pucch_failure_thres,
|
||||||
|
RC.nrmac[j]->pusch_failure_thres);
|
||||||
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
|
if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
|
||||||
// check number of instances is same as RRC/PDCP
|
// check number of instances is same as RRC/PDCP
|
||||||
|
|
||||||
|
|||||||
@@ -1331,7 +1331,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
case NR_UL_DCI_FORMAT_0_0:
|
case NR_UL_DCI_FORMAT_0_0:
|
||||||
switch (rnti_type) {
|
switch (rnti_type) {
|
||||||
case NR_RNTI_C:
|
case NR_RNTI_C:
|
||||||
LOG_I(NR_MAC,"Filling format 0_0 DCI for CRNTI (size %d bits)\n",dci_size);
|
LOG_D(NR_MAC,"Filling format 0_0 DCI for CRNTI (size %d bits)\n",dci_size);
|
||||||
// indicating a UL DCI format 1bit
|
// indicating a UL DCI format 1bit
|
||||||
pos=1;
|
pos=1;
|
||||||
*dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 1) << (dci_size - pos);
|
*dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 1) << (dci_size - pos);
|
||||||
@@ -2053,7 +2053,7 @@ bool find_free_CCE(module_id_t module_id,
|
|||||||
const int cid = sched_ctrl->coreset->controlResourceSetId;
|
const int cid = sched_ctrl->coreset->controlResourceSetId;
|
||||||
const uint16_t Y = RC.nrmac[module_id]->UE_info.Y[UE_id][cid][slot];
|
const uint16_t Y = RC.nrmac[module_id]->UE_info.Y[UE_id][cid][slot];
|
||||||
const int m = RC.nrmac[module_id]->UE_info.num_pdcch_cand[UE_id][cid];
|
const int m = RC.nrmac[module_id]->UE_info.num_pdcch_cand[UE_id][cid];
|
||||||
if (UE_id >= 0) LOG_I(NR_MAC,"calling allocate_nr_CCEs with L %d, nr_of_candidates %d, Y %x\n",sched_ctrl->aggregation_level,nr_of_candidates,Y);
|
if (UE_id >= 0) LOG_D(NR_MAC,"calling allocate_nr_CCEs with L %d, nr_of_candidates %d, Y %x\n",sched_ctrl->aggregation_level,nr_of_candidates,Y);
|
||||||
sched_ctrl->cce_index = allocate_nr_CCEs(RC.nrmac[module_id],
|
sched_ctrl->cce_index = allocate_nr_CCEs(RC.nrmac[module_id],
|
||||||
sched_ctrl->active_bwp,
|
sched_ctrl->active_bwp,
|
||||||
sched_ctrl->coreset,
|
sched_ctrl->coreset,
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub
|
|||||||
nrmac->preferred_ul_tda[bwp_id][slot] = 0;
|
nrmac->preferred_ul_tda[bwp_id][slot] = 0;
|
||||||
else if (tdd && nr_mix_slots && sched_slot % nr_slots_period == tdd->nrofDownlinkSlots)
|
else if (tdd && nr_mix_slots && sched_slot % nr_slots_period == tdd->nrofDownlinkSlots)
|
||||||
nrmac->preferred_ul_tda[bwp_id][slot] = tdaMi;
|
nrmac->preferred_ul_tda[bwp_id][slot] = tdaMi;
|
||||||
LOG_I(MAC, "DL slot %d UL slot %d preferred_ul_tda %d\n", slot, sched_slot, nrmac->preferred_ul_tda[bwp_id][slot]);
|
LOG_D(MAC, "DL slot %d UL slot %d preferred_ul_tda %d\n", slot, sched_slot, nrmac->preferred_ul_tda[bwp_id][slot]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k2 < tdd->nrofUplinkSlots)
|
if (k2 < tdd->nrofUplinkSlots)
|
||||||
@@ -1110,7 +1110,7 @@ void pf_ul(module_id_t module_id,
|
|||||||
LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]);
|
LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else LOG_I(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n",frame,slot, UE_info->rnti[UE_id]);
|
else LOG_D(NR_MAC, "%4d.%2d free CCE for UL DCI UE %04x\n",frame,slot, UE_info->rnti[UE_id]);
|
||||||
|
|
||||||
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
|
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
|
||||||
max_num_ue--;
|
max_num_ue--;
|
||||||
@@ -1135,7 +1135,7 @@ void pf_ul(module_id_t module_id,
|
|||||||
UE_id, UE_info->rnti[UE_id],rbStart,min_rb,bwpSize);
|
UE_id, UE_info->rnti[UE_id],rbStart,min_rb,bwpSize);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else LOG_I(NR_MAC,"allocating UL data for UE %d/RNTI %04x (rbStsart %d, min_rb %d, bwpSize %d\n",UE_id, UE_info->rnti[UE_id],rbStart,min_rb,bwpSize);
|
else LOG_D(NR_MAC,"allocating UL data for UE %d/RNTI %04x (rbStsart %d, min_rb %d, bwpSize %d\n",UE_id, UE_info->rnti[UE_id],rbStart,min_rb,bwpSize);
|
||||||
|
|
||||||
/* Save PUSCH field */
|
/* Save PUSCH field */
|
||||||
/* we want to avoid a lengthy deduction of DMRS and other parameters in
|
/* we want to avoid a lengthy deduction of DMRS and other parameters in
|
||||||
@@ -1165,7 +1165,7 @@ void pf_ul(module_id_t module_id,
|
|||||||
&rbSize);
|
&rbSize);
|
||||||
sched_pusch->rbSize = rbSize;
|
sched_pusch->rbSize = rbSize;
|
||||||
sched_pusch->tb_size = TBS;
|
sched_pusch->tb_size = TBS;
|
||||||
LOG_I(NR_MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d, CCE %d\n",
|
LOG_D(NR_MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d, CCE %d\n",
|
||||||
rbSize, sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,sched_ctrl->cce_index);
|
rbSize, sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,sched_ctrl->cce_index);
|
||||||
|
|
||||||
/* Mark the corresponding RBs as used */
|
/* Mark the corresponding RBs as used */
|
||||||
@@ -1397,7 +1397,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
|||||||
sched_ctrl->last_ul_frame = sched_pusch->frame;
|
sched_ctrl->last_ul_frame = sched_pusch->frame;
|
||||||
sched_ctrl->last_ul_slot = sched_pusch->slot;
|
sched_ctrl->last_ul_slot = sched_pusch->slot;
|
||||||
|
|
||||||
LOG_I(NR_MAC,
|
LOG_D(NR_MAC,
|
||||||
"%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d dmrs_pos %x MCS %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d est %6d sched %6d est BSR %6d\n",
|
"%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d dmrs_pos %x MCS %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d est %6d sched %6d est BSR %6d\n",
|
||||||
frame,
|
frame,
|
||||||
slot,
|
slot,
|
||||||
@@ -1563,7 +1563,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
|||||||
pdcch_pdu_bwp_coreset[bwpid][coresetid] = pdcch_pdu;
|
pdcch_pdu_bwp_coreset[bwpid][coresetid] = pdcch_pdu;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
LOG_D(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
||||||
|
|
||||||
/* Fill PDCCH DL DCI PDU */
|
/* Fill PDCCH DL DCI PDU */
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci];
|
||||||
@@ -1592,7 +1592,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
|||||||
n_ubwp = CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count;
|
n_ubwp = CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count;
|
||||||
|
|
||||||
config_uldci(sched_ctrl->active_ubwp,
|
config_uldci(sched_ctrl->active_ubwp,
|
||||||
scc,
|
scc,
|
||||||
pusch_pdu,
|
pusch_pdu,
|
||||||
&uldci_payload,
|
&uldci_payload,
|
||||||
ps->dci_format,
|
ps->dci_format,
|
||||||
|
|||||||
Reference in New Issue
Block a user