Merge remote-tracking branch 'origin/develop' into bupt-ulmimo-4
This commit is contained in:
@@ -106,6 +106,9 @@ class Containerize():
|
||||
self.registrySvrId = ''
|
||||
self.testSvrId = ''
|
||||
|
||||
#checkers from xml
|
||||
self.ran_checkers={}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Container management functions
|
||||
#-----------------------------------------------------------
|
||||
@@ -624,7 +627,7 @@ class Containerize():
|
||||
else:
|
||||
if containerToKill:
|
||||
logging.debug('\u001B[1m Analyzing ' + nodeB_prefix + 'NB logfile \u001B[0m ' + self.eNB_logFile[self.eNB_instance])
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(self.eNB_logFile[self.eNB_instance], HTML)
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(self.eNB_logFile[self.eNB_instance], HTML, self.ran_checkers)
|
||||
else:
|
||||
logStatus = 0
|
||||
if (logStatus < 0):
|
||||
@@ -788,9 +791,10 @@ class Containerize():
|
||||
continue
|
||||
|
||||
logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m')
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML)
|
||||
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers)
|
||||
if (logStatus < 0):
|
||||
fullStatus = False
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
+26
-39
@@ -30,11 +30,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
import logging
|
||||
import math
|
||||
import sshconnection
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
|
||||
)
|
||||
|
||||
class Log_Mgt:
|
||||
|
||||
@@ -49,40 +53,25 @@ class Log_Mgt:
|
||||
#-----------------$
|
||||
|
||||
|
||||
def __CheckAvailSpace(self):
|
||||
def __CheckUsedSpace(self):
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="df "+ self.path
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
s=result[1].decode('utf-8').rstrip()#result[1] is the second line with the results we are looking for
|
||||
tmp=s.split()
|
||||
return tmp[3] #return avail space from the line
|
||||
used=s.split()[4] #get 4th field ex: 70%
|
||||
m = re.match('^(\d+)\%',used)
|
||||
if m is not None:
|
||||
return int(m.group(1))
|
||||
|
||||
def __GetOldestFile(self):
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="ls -rtl "+ self.path #-rtl will bring oldest file on top
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
s=result[1].decode('utf-8').rstrip()
|
||||
tmp=s.split()
|
||||
return tmp[8]#return filename from the line
|
||||
def __RemoveOldest(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.Username, self.Password)
|
||||
COMMAND='echo ' + self.Password + ' | sudo -S find ' + self.path + ' -type f -mtime +14 -delete'
|
||||
mySSH.command(COMMAND,'\$',20)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
def __AvgSize(self):
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="ls -rtl "+ self.path
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
result = ssh.stdout.readlines()
|
||||
if len(result)>1: #at least 1 file present
|
||||
total_size=0
|
||||
for i in range(1,len(result)):
|
||||
s=result[i].decode('utf-8').rstrip()
|
||||
tmp=s.split()
|
||||
total_size+=int(tmp[4]) #get filesize
|
||||
return math.floor(total_size/(len(result)-1)) #compute average file/artifact size
|
||||
else:#empty,no files
|
||||
return 0
|
||||
|
||||
|
||||
#-----------------$
|
||||
#PUBLIC Methods$
|
||||
@@ -90,17 +79,15 @@ class Log_Mgt:
|
||||
|
||||
|
||||
def LogRotation(self):
|
||||
avail_space =int(self.__CheckAvailSpace())*1000 #avail space in target folder, initially displayed in Gb
|
||||
avg_size=self.__AvgSize() #average size of artifacts in the target folder
|
||||
logging.debug("Avail Space : " + str(avail_space) + " / Artifact Avg Size : " + str(avg_size))
|
||||
if avail_space < 50*avg_size: #reserved space is 50x artifact file ; oldest file will be deleted
|
||||
oldestfile=self.__GetOldestFile()
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="echo " + self.Password + " | sudo -S rm "+ self.path + "/" + oldestfile
|
||||
logging.debug(COMMAND)
|
||||
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
used_space = self.__CheckUsedSpace() #avail space in target folder
|
||||
if used_space > 80 :
|
||||
logging.debug('\u001B[1;37;41m Used Disk > 80%, on ' + self.Username+'@'+self.IPAddress + '\u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Removing Artifacts older than 14 days \u001B[0m')
|
||||
self.__RemoveOldest()
|
||||
else:
|
||||
logging.debug("Still some space left for artifacts storage")
|
||||
logging.debug('Used Disk < 80%, on ' + self.Username+'@'+self.IPAddress +', no cleaning required')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
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 = 0x1; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x112233; // 0 false, else true
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
sib1_tda = 15;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 2;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 12 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 640288;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640000;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 24;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 6325;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 2;
|
||||
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 = 24;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 6325;
|
||||
# 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 = 13;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#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 = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#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_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.70.132";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 150;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
sf_extension = 0;
|
||||
eNB_instances = [0];
|
||||
#beamforming 1x4 matrix:
|
||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
||||
clock_src = "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";
|
||||
}
|
||||
);
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
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";
|
||||
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";
|
||||
ngap_log_level ="debug";
|
||||
ngap_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -45,6 +45,7 @@ ENB_PROCESS_REALTIME_ISSUE = -13
|
||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
|
||||
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
|
||||
ENB_REAL_TIME_PROCESSING_ISSUE = -16
|
||||
ENB_RETX_ISSUE = -17
|
||||
HSS_PROCESS_FAILED = -2
|
||||
HSS_PROCESS_OK = +2
|
||||
MME_PROCESS_FAILED = -3
|
||||
|
||||
@@ -50,10 +50,6 @@ memleak:openair1/PHY/CODING/TESTBENCH/ltetest.c
|
||||
invalidPrintfArgType_sint:openair1/PHY/CODING/TESTBENCH/pdcch_test.c
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// oaisim deprecated, remove?
|
||||
doubleFree:openair3/TEST/oaisim_mme_list_benchmark.c
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// is itti analyzer deprecated
|
||||
nullPointer:common/utils/itti_analyzer/itti_analyzer.c
|
||||
nullPointerRedundantCheck:common/utils/itti_analyzer/libbuffers/buffers.c
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
Title : Processing Time (us)
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average
|
||||
- Max
|
||||
- Average vs Reference Deviation (Reference Value ; Acceptability Threshold)
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
Ref :
|
||||
feprx : 120.0
|
||||
feptx_prec : 8.0
|
||||
feptx_ofdm : 50.0
|
||||
feptx_total : 75.0
|
||||
L1 Tx processing thread 0 : 300.0
|
||||
L1 Tx processing thread 1 : 300.0
|
||||
L1 Tx processing : 300.0
|
||||
DLSCH encoding : 230.0
|
||||
L1 Rx processing : 175.0
|
||||
PUSCH inner-receiver : 100.0
|
||||
@@ -25,8 +23,7 @@ Threshold :
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing thread 0 : 1.25
|
||||
L1 Tx processing thread 1 : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
Title : Processing Time (us)
|
||||
ColNames :
|
||||
- Metric
|
||||
- Average
|
||||
- Max
|
||||
- Average vs Reference Deviation (Reference Value ; Acceptability Threshold)
|
||||
- Average; Max; Count
|
||||
- Average vs Reference Deviation (Reference Value; Acceptability Threshold)
|
||||
Ref :
|
||||
feprx : 60.0
|
||||
feptx_prec : 8.0
|
||||
feptx_ofdm : 50.0
|
||||
feptx_total : 75.0
|
||||
L1 Tx processing thread 0 : 300.0
|
||||
L1 Tx processing thread 1 : 300.0
|
||||
L1 Tx processing : 300.0
|
||||
DLSCH encoding : 230.0
|
||||
L1 Rx processing : 175.0
|
||||
PUSCH inner-receiver : 100.0
|
||||
@@ -25,8 +23,7 @@ Threshold :
|
||||
feptx_prec : 1.25
|
||||
feptx_ofdm : 1.25
|
||||
feptx_total : 1.25
|
||||
L1 Tx processing thread 0 : 1.25
|
||||
L1 Tx processing thread 1 : 1.25
|
||||
L1 Tx processing : 1.25
|
||||
DLSCH encoding : 1.25
|
||||
L1 Rx processing : 1.25
|
||||
PUSCH inner-receiver : 1.25
|
||||
|
||||
+6
-8
@@ -478,21 +478,19 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n')
|
||||
self.htmlFile.write(' <th>' + DataLog['ColNames'][1] + '</th>\n')
|
||||
self.htmlFile.write(' <th>' + DataLog['ColNames'][2] + '</th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>'+ DataLog['ColNames'][3] +'</th>\n')
|
||||
self.htmlFile.write(' <th colspan="2">' + DataLog['ColNames'][1] + '</th>\n')
|
||||
self.htmlFile.write(' <th colspan=' + str(1+self.htmlUEConnected) + '>'+ DataLog['ColNames'][2] +'</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
for k in DataLog['Data']:
|
||||
# TestRow
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td colspan="3" bgcolor = "lightcyan" >' + k + ' </td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + DataLog['Data'][k][0] + ' </td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + DataLog['Data'][k][1] + ' </td>\n')
|
||||
if float(DataLog['Data'][k][2])> DataLog['Threshold'][k]:
|
||||
self.htmlFile.write(' <th bgcolor = "red" >' + DataLog['Data'][k][2] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + DataLog['Data'][k][0] + '; ' + DataLog['Data'][k][1] + '; ' + DataLog['Data'][k][2] + ' </td>\n')
|
||||
if float(DataLog['Data'][k][3])> DataLog['Threshold'][k]:
|
||||
self.htmlFile.write(' <th bgcolor = "red" >' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "green" ><font color="white">' + DataLog['Data'][k][2] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "green" ><font color="white">' + DataLog['Data'][k][3] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
|
||||
@@ -401,6 +401,12 @@ def GetParametersFromXML(action):
|
||||
string_field=test.findtext('nb_healthy')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.nb_healthy[0] = int(string_field)
|
||||
string_field=test.findtext('d_retx_th')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.ran_checkers['d_retx_th']= string_field
|
||||
string_field=test.findtext('u_retx_th')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.ran_checkers['u_retx_th']= string_field
|
||||
|
||||
elif action == 'PingFromContainer':
|
||||
string_field = test.findtext('container_name')
|
||||
|
||||
+87
-20
@@ -39,6 +39,7 @@ import time
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
import yaml
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
@@ -758,7 +759,7 @@ class RANManagement():
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log.png log/*/*.log log/*/*.pcap', '\$', 15)
|
||||
mySSH.close()
|
||||
|
||||
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML):
|
||||
def AnalyzeLogFile_eNB(self, eNBlogFile, HTML, checkers={}):
|
||||
if (not os.path.isfile('./' + eNBlogFile)):
|
||||
return -1
|
||||
enb_log_file = open('./' + eNBlogFile, 'r')
|
||||
@@ -815,10 +816,12 @@ class RANManagement():
|
||||
removing_ue = 0
|
||||
#count"X2AP-PDU"
|
||||
x2ap_pdu = 0
|
||||
#NSA specific log markers
|
||||
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
||||
#gnb specific log markers
|
||||
gnb_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': [], 'Detected UL Failure on PUSCH':[]}
|
||||
nodeB_prefix_found = False
|
||||
RealTimeProcessingIssue = False
|
||||
DLRetxIssue = False
|
||||
ULRetxIssue = False
|
||||
|
||||
line_cnt=0 #log file line counter
|
||||
for line in enb_log_file.readlines():
|
||||
@@ -1008,11 +1011,11 @@ class RANManagement():
|
||||
result = re.search('X2AP-PDU', str(line))
|
||||
if result is not None:
|
||||
x2ap_pdu += 1
|
||||
#nsa markers logging
|
||||
for k in nsa_markers:
|
||||
#gnb markers logging
|
||||
for k in gnb_markers:
|
||||
result = re.search(k, line)
|
||||
if result is not None:
|
||||
nsa_markers[k].append(line_cnt)
|
||||
gnb_markers[k].append(line_cnt)
|
||||
|
||||
enb_log_file.close()
|
||||
|
||||
@@ -1096,46 +1099,94 @@ class RANManagement():
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
#nsa markers
|
||||
#gnb markers
|
||||
statMsg = 'logfile line count = ' + str(line_cnt)
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
if len(nsa_markers['SgNBReleaseRequestAcknowledge'])!=0:
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0])
|
||||
if len(gnb_markers['SgNBReleaseRequestAcknowledge'])!=0:
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(gnb_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(gnb_markers['SgNBReleaseRequestAcknowledge'][0])
|
||||
else:
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences'
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(gnb_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
statMsg = 'FAILURE = ' + str(len(nsa_markers['FAILURE'])) + ' occurences'
|
||||
statMsg = 'FAILURE = ' + str(len(gnb_markers['FAILURE'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
statMsg = 'Detected UL Failure on PUSCH = ' + str(len(gnb_markers['Detected UL Failure on PUSCH'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
|
||||
#ulsch and dlsch statistics
|
||||
#ulsch and dlsch statistics and checkers
|
||||
#print statistics into html
|
||||
if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty
|
||||
#for each dictionary key, generate the msg for html as information
|
||||
statMsg=''
|
||||
for key in dlsch_ulsch_stats: #for each dictionary key
|
||||
for key in dlsch_ulsch_stats:
|
||||
statMsg += dlsch_ulsch_stats[key] + '\n'
|
||||
logging.debug(dlsch_ulsch_stats[key])
|
||||
htmleNBFailureMsg += statMsg
|
||||
|
||||
#checker
|
||||
if (len(dlsch_ulsch_stats)!=0) and (len(checkers)!=0):
|
||||
if 'd_retx_th' in checkers:
|
||||
checkers['d_retx_th'] = [float(x) for x in checkers['d_retx_th'].split(',')]
|
||||
dlsch_checker_status = list(0 for i in checkers['d_retx_th'])#status 0 / -1
|
||||
d_perc_retx = list(0 for i in checkers['d_retx_th'])#results in %
|
||||
|
||||
if 'u_retx_th' in checkers:
|
||||
checkers['u_retx_th'] = [float(x) for x in checkers['u_retx_th'].split(',')]
|
||||
ulsch_checker_status = list(0 for i in checkers['u_retx_th'])
|
||||
u_perc_retx = list(0 for i in checkers['u_retx_th'])
|
||||
|
||||
#ul and dl retransmissions checkers
|
||||
#NOTICE: DL and UL regex are different
|
||||
|
||||
if ('dlsch_rounds' in dlsch_ulsch_stats) and ('d_retx_th' in checkers):
|
||||
tmp=re.match(r'^.*dlsch_rounds\s+(\d+)\/(\d+)\/(\d+)\/(\d+),\s+dlsch_errors\s+(\d+)',dlsch_ulsch_stats['dlsch_rounds'])
|
||||
if tmp is not None :
|
||||
#captures the different groups from the regex
|
||||
retx_data=[float(x) for x in tmp.groups()]
|
||||
for i in range(0,len(d_perc_retx)):
|
||||
#case where numerator > denumerator with denum ==0 is disregarded, cannot hapen in principle, will lead to 0%
|
||||
d_perc_retx[i] = 0 if (retx_data[i] == 0) else 100*retx_data[i+1]/retx_data[i]
|
||||
#treating % > 100 , % > requirement
|
||||
if (d_perc_retx[i] > 100) or (d_perc_retx[i] > checkers['d_retx_th'][i]): dlsch_checker_status[i] = -1
|
||||
if -1 in dlsch_checker_status:
|
||||
DLRetxIssue = True
|
||||
|
||||
if ('ulsch_rounds' in dlsch_ulsch_stats) and ('u_retx_th' in checkers):
|
||||
tmp=re.match(r'^.*ulsch_rounds\s+(\d+)\/(\d+)\/(\d+)\/(\d+),\s+.*,\s+ulsch_errors\s+(\d+)',dlsch_ulsch_stats['ulsch_rounds'])
|
||||
if tmp is not None :
|
||||
retx_data=[float(x) for x in tmp.groups()]
|
||||
for i in range(0,len(d_perc_retx)):
|
||||
u_perc_retx[i] = 0 if (retx_data[i] == 0) else 100*retx_data[i+1]/retx_data[i]
|
||||
if (u_perc_retx[i] > 100) or (u_perc_retx[i] > checkers['u_retx_th'][i]): ulsch_checker_status[i] = -1
|
||||
if -1 in ulsch_checker_status:
|
||||
ULRetxIssue = True
|
||||
|
||||
|
||||
|
||||
#real time statistics
|
||||
datalog_rt_stats['Data']={}
|
||||
if len(real_time_stats)!=0: #check if dictionary is not empty
|
||||
for k in real_time_stats:
|
||||
tmp=re.match(r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+\d+;\s+(?P<max>\d+\.\d+) us;',real_time_stats[k])
|
||||
tmp=re.match(r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+(?P<count>\d+);\s+(?P<max>\d+\.\d+) us;',real_time_stats[k])
|
||||
if tmp is not None:
|
||||
metric=tmp.group('metric')
|
||||
avg=float(tmp.group('avg'))
|
||||
max=float(tmp.group('max'))
|
||||
datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])]
|
||||
count=int(tmp.group('count'))
|
||||
datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:d}".format(count),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])]
|
||||
#once all metrics are collected, store the data as a class attribute to build a dedicated HTML table afterward
|
||||
self.datalog_rt_stats=datalog_rt_stats
|
||||
#check if there is a fail => will render the test as failed
|
||||
for k in datalog_rt_stats['Data']:
|
||||
if float(datalog_rt_stats['Data'][k][2])> datalog_rt_stats['Threshold'][k]: #condition for fail : avg/ref is greater than the fixed threshold
|
||||
if float(datalog_rt_stats['Data'][k][3])> datalog_rt_stats['Threshold'][k]: #condition for fail : avg/ref is greater than the fixed threshold
|
||||
logging.debug('\u001B[1;30;43m datalog_rt_stats metric ' + k + '=' + datalog_rt_stats['Data'][k][3] + ' > threshold ' + str(datalog_rt_stats['Threshold'][k]) + ' \u001B[0m')
|
||||
RealTimeProcessingIssue = True
|
||||
else:
|
||||
statMsg = 'No real time stats found in the log file\n'
|
||||
@@ -1158,18 +1209,34 @@ class RANManagement():
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
if len(nsa_markers['SgNBReleaseRequest'])!=0:
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0])
|
||||
if len(gnb_markers['SgNBReleaseRequest'])!=0:
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(gnb_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(gnb_markers['SgNBReleaseRequest'][0])
|
||||
else:
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences'
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(gnb_markers['SgNBReleaseRequest'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
statMsg = 'scgFailureInformationNR-r15 = ' + str(len(nsa_markers['scgFailureInformationNR-r15'])) + ' occurences'
|
||||
statMsg = 'scgFailureInformationNR-r15 = ' + str(len(gnb_markers['scgFailureInformationNR-r15'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
|
||||
if DLRetxIssue:
|
||||
retx_checker_status_str = ''
|
||||
for status in dlsch_checker_status : retx_checker_status_str+=str(status)+ ' '
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with too many retransmissions / errors issue in DL ! \u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Status : ' + retx_checker_status_str + ' \u001B[0m')
|
||||
htmleNBFailureMsg += 'Fail due to retransmissions / errors issue in DL, status : ' + retx_checker_status_str + '\n'
|
||||
global_status = CONST.ENB_RETX_ISSUE
|
||||
|
||||
if ULRetxIssue:
|
||||
retx_checker_status_str = ''
|
||||
for status in ulsch_checker_status : retx_checker_status_str+=str(status)+ ' '
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with too many retransmissions / errors issue in UL ! \u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Status : ' + retx_checker_status_str + ' \u001B[0m')
|
||||
htmleNBFailureMsg += 'Fail due to retransmissions / errors issue in UL, status : ' + retx_checker_status_str + '\n'
|
||||
global_status = CONST.ENB_RETX_ISSUE
|
||||
|
||||
if RealTimeProcessingIssue:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with real time processing issue! \u001B[0m')
|
||||
htmleNBFailureMsg += 'Fail due to real time processing issue\n'
|
||||
|
||||
@@ -756,7 +756,7 @@ function report_test {
|
||||
EPC_CONFIGS=("noS1")
|
||||
TRANS_MODES=("tdd")
|
||||
FR_MODE=("SA")
|
||||
BW_CASES=(106)
|
||||
BW_CASES=(106 24)
|
||||
for CN_CONFIG in ${EPC_CONFIGS[@]}
|
||||
do
|
||||
for TMODE in ${TRANS_MODES[@]}
|
||||
|
||||
@@ -1401,8 +1401,11 @@ function start_rf_sim_nr_ue {
|
||||
elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option
|
||||
then
|
||||
echo "echo \"./nr-uesoftmodem --rfsim --do-ra --log_config.global_log_options level,nocolor,time --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
else #SA test => use --sa option
|
||||
elif [ $LOC_RA_SA_TEST -eq 2 ] #SA test 106PRB => use --sa option
|
||||
then
|
||||
echo "echo \"./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --log_config.global_log_options level,nocolor,time\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
else # -eq 3 SA test 24PRB
|
||||
echo "echo \"./nr-uesoftmodem -r 24 -s 24 --numerology 1 --band 78 -C 3604320000 --rfsim --sa --log_config.global_log_options level,nocolor,time\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
fi
|
||||
fi
|
||||
echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1
|
||||
@@ -2270,7 +2273,7 @@ function run_test_on_vm {
|
||||
mkdir --parents $ARCHIVES_LOC
|
||||
|
||||
echo "############################################################"
|
||||
echo "SA TEST"
|
||||
echo "SA TEST 106PRB"
|
||||
echo "############################################################"
|
||||
#SA test, attention : has a different config file from the rest of the test
|
||||
CN_CONFIG="noS1"
|
||||
@@ -2305,7 +2308,7 @@ function run_test_on_vm {
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_sa_test.log
|
||||
#last argument = 2 is to enable --sa for SA test
|
||||
#last argument = 2 is to enable --sa for SA test for 106PRB
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 2
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
@@ -2340,9 +2343,11 @@ function run_test_on_vm {
|
||||
echo "SA test NOT OK"
|
||||
echo "try_cnt = " $try_cnt
|
||||
try_cnt=$((try_cnt+1))
|
||||
SA_106PRB_STATUS = -1
|
||||
else
|
||||
echo "SA test OK"
|
||||
try_cnt=$((try_cnt+10))
|
||||
SA_106PRB_STATUS = 0
|
||||
fi
|
||||
done
|
||||
########### end SA test
|
||||
@@ -2350,6 +2355,92 @@ function run_test_on_vm {
|
||||
sleep 30
|
||||
|
||||
|
||||
echo "############################################################"
|
||||
echo "SA TEST 24PRB"
|
||||
echo "############################################################"
|
||||
#SA test, attention : has a different config file from the rest of the test
|
||||
CN_CONFIG="noS1"
|
||||
CONF_FILE=gnb.sa.band78.fr1.24PRB.usrpb210.conf
|
||||
S1_NOS1_CFG=0
|
||||
PRB=24
|
||||
FREQUENCY=3600
|
||||
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir --parents $ARCHIVES_LOC
|
||||
fi
|
||||
|
||||
local try_cnt=0
|
||||
|
||||
######### start of SA TEST loop
|
||||
while [ $try_cnt -lt 5 ] #5 because it hardly succeed within CI
|
||||
do
|
||||
|
||||
SYNC_STATUS=0
|
||||
SA_STATUS=0
|
||||
rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}*sa_test.log
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the gNB"
|
||||
echo "############################################################"
|
||||
CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb_sa_test.log
|
||||
#last argument = 2 is to enable --sa for SA test
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG 2
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_sa_test.log
|
||||
#last argument = 3 is to enable --sa for SA test for 24PRB
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 3
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
echo "Problem w/ gNB and NR-UE not syncing"
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
SYNC_STATUS=-1
|
||||
try_cnt=$((try_cnt+1))
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Terminate gNB/NR-UE simulators"
|
||||
echo "############################################################"
|
||||
sleep 20
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
|
||||
#check SA markers in gNB and NR UE log files
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Checking SA on gNB / NR-UE"
|
||||
echo "############################################################"
|
||||
|
||||
# Proper check to be done when SA test is working!
|
||||
check_sa_result $ARCHIVES_LOC/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC/$CURRENT_NR_UE_LOG_FILE
|
||||
if [ $SA_STATUS -ne 0 ]
|
||||
then
|
||||
echo "SA test NOT OK"
|
||||
echo "try_cnt = " $try_cnt
|
||||
try_cnt=$((try_cnt+1))
|
||||
SA_24PRB_STATUS = -1
|
||||
else
|
||||
echo "SA test OK"
|
||||
try_cnt=$((try_cnt+10))
|
||||
SA_24PRB_STATUS = 0
|
||||
fi
|
||||
done
|
||||
########### end SA test
|
||||
|
||||
sleep 30
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "############################################################"
|
||||
echo "RA TEST FR2"
|
||||
@@ -2661,7 +2752,8 @@ function run_test_on_vm {
|
||||
echo "Checking run status"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $SA_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $SA_106PRB_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $SA_24PRB_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $RA_FR2_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $RA_FR1_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $SYNC_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
|
||||
@@ -20,8 +20,7 @@ gnb :
|
||||
feptx_prec:
|
||||
feptx_ofdm:
|
||||
feptx_total:
|
||||
L1 Tx processing thread 0:
|
||||
L1 Tx processing thread 1:
|
||||
L1 Tx processing:
|
||||
DLSCH encoding:
|
||||
L1 Rx processing:
|
||||
PUSCH inner-receiver:
|
||||
@@ -40,12 +39,11 @@ gnb :
|
||||
rt.feptx_ofdm:
|
||||
rt.feptx_total:
|
||||
page3:
|
||||
rt.L1 Tx processing thread 0:
|
||||
rt.L1 Tx processing thread 1:
|
||||
rt.L1 Tx processing:
|
||||
rt.DLSCH encoding:
|
||||
rt.L1 Rx processing:
|
||||
page4:
|
||||
rt.PUSCH inner-receiver:
|
||||
rt.PUSCH decoding:
|
||||
rt.DL & UL scheduling timing stats:
|
||||
rt.UL Indication:
|
||||
rt.UL Indication:
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
|
||||
<d_retx_th>5,0,0,0</d_retx_th>
|
||||
<u_retx_th>5,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -111,6 +111,8 @@
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<d_retx_th>5,0,0,0</d_retx_th>
|
||||
<u_retx_th>5,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
|
||||
<d_retx_th>5,0,0,0</d_retx_th>
|
||||
<u_retx_th>5,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
|
||||
<testCase id="072000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/140Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 140M -t 60</iperf_args>
|
||||
<desc>iperf (DL/200Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 200M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
000001
|
||||
071004
|
||||
000001
|
||||
071005
|
||||
000001
|
||||
011002
|
||||
081000
|
||||
</TestCaseRequestedList>
|
||||
@@ -148,7 +150,16 @@
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="071005">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/130Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 130M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="081000">
|
||||
|
||||
+25
-221
@@ -690,19 +690,13 @@ add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4
|
||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||
|
||||
#NOKIA config enhancement
|
||||
set (CONFIG_ROOTDIR
|
||||
${OPENAIR_DIR}/common/config
|
||||
)
|
||||
set (CONFIG_SOURCES
|
||||
set (CONFIG_ROOTDIR ${OPENAIR_DIR}/common/config)
|
||||
add_library(CONFIG_LIB
|
||||
${CONFIG_ROOTDIR}/config_load_configmodule.c
|
||||
${CONFIG_ROOTDIR}/config_userapi.c
|
||||
${CONFIG_ROOTDIR}/config_cmdline.c
|
||||
)
|
||||
set (CONFIG_LIBCONFIG_SOURCES
|
||||
${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
|
||||
)
|
||||
add_library(CONFIG_LIB ${CONFIG_SOURCES})
|
||||
add_library(params_libconfig MODULE ${CONFIG_LIBCONFIG_SOURCES} )
|
||||
)
|
||||
add_library(params_libconfig MODULE ${CONFIG_ROOTDIR}/libconfig/config_libconfig.c)
|
||||
target_link_libraries(params_libconfig config)
|
||||
# shared library loader
|
||||
set (SHLIB_LOADER_SOURCES
|
||||
@@ -1161,15 +1155,6 @@ set(FSPT_MSG_LIB FSPT_MSG)
|
||||
message("fspt c dir is : ${FSPT_C_DIR}")
|
||||
include_directories (${FSPT_C_DIR})
|
||||
|
||||
# add_library(ASYNC_IF
|
||||
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
|
||||
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
|
||||
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
|
||||
# ${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c
|
||||
# )
|
||||
# set(ASYNC_IF_LIB ASYNC_IF)
|
||||
# include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
|
||||
|
||||
set(PROTOBUF_LIB "protobuf-c")
|
||||
|
||||
#set(PROTOBUF_LIB "protobuf") #for Cpp
|
||||
@@ -1180,55 +1165,19 @@ add_library(HASHTABLE
|
||||
)
|
||||
include_directories(${OPENAIR_DIR}/common/utils/hashtable)
|
||||
|
||||
set(UTIL_SRC
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c
|
||||
# ${OPENAIR2_DIR}/UTIL/CLI/cli_server.c
|
||||
${OPENAIR2_DIR}/UTIL/FIFO/pad_list.c
|
||||
add_library(UTIL
|
||||
${OPENAIR2_DIR}/UTIL/LISTS/list.c
|
||||
${OPENAIR2_DIR}/UTIL/LISTS/list2.c
|
||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
|
||||
${OPENAIR2_DIR}/UTIL/MATH/oml.c
|
||||
# ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_generate_report.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_filename.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_save_XML.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/common.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/grid.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/job.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/mobility_parser.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/omg_hashtable.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwalk.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/rwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/static.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/steadystaterwp.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/trace_hashtable.c
|
||||
${OPENAIR2_DIR}/UTIL/OPT/probe.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_tx.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_kpi.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_models.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_form.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c
|
||||
)
|
||||
add_library(UTIL ${UTIL_SRC})
|
||||
add_dependencies(UTIL rrc_flag)
|
||||
|
||||
#set(OMG_SUMO_SRC
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/client_traci_OMG.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/id_manager.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/sumo.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/socket_traci_OMG.c
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/storage_traci_OMG.c
|
||||
# )
|
||||
#add_library(OMG_SUMO ${OMG_SUMO_SRC})
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/time_meas.c
|
||||
)
|
||||
|
||||
set(SECU_OSA_SRC
|
||||
${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c
|
||||
@@ -1491,7 +1440,6 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
|
||||
)
|
||||
|
||||
@@ -1628,7 +1576,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
|
||||
${PHY_POLARSRC}
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
@@ -1682,7 +1629,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c
|
||||
# ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
|
||||
@@ -1910,6 +1856,7 @@ set(NR_L2_SRC_UE
|
||||
${NR_SDAP_SRC}
|
||||
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
||||
${NR_UE_RRC_DIR}/main_ue.c
|
||||
${NR_RRC_DIR}/nr_rrc_config.c
|
||||
${NR_UE_RRC_DIR}/rrc_UE.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
)
|
||||
@@ -2601,7 +2548,7 @@ add_library(minimal_lib
|
||||
${OPENAIR_DIR}/common/utils/minimal_stub.c
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries(minimal_lib pthread dl ${T_LIB} ${CONFIG_LIB})
|
||||
target_link_libraries(minimal_lib pthread dl ${T_LIB} CONFIG_LIB)
|
||||
|
||||
add_executable(nfapi_test
|
||||
${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c
|
||||
@@ -2630,7 +2577,6 @@ add_executable(lte-softmodem
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/ru_control.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
@@ -2645,14 +2591,11 @@ add_executable(lte-softmodem
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
|
||||
@@ -2665,14 +2608,13 @@ target_link_libraries (lte-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${T_LIB})
|
||||
|
||||
|
||||
add_executable(ocp-enb
|
||||
${OPENAIR_DIR}/executables/main-ocp.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/executables/main-fs6.c
|
||||
${OPENAIR_DIR}/executables/transport_split.c
|
||||
@@ -2688,14 +2630,11 @@ add_executable(ocp-enb
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer coding params_libconfig rfsimulator)
|
||||
@@ -2707,7 +2646,7 @@ target_link_libraries (ocp-enb
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||
${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
|
||||
add_executable(oairu
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
@@ -2716,23 +2655,18 @@ add_executable(oairu
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/main_ru.c
|
||||
${T_SOURCE}
|
||||
${OPENAIR_DIR}/common/utils/LOG/log.c
|
||||
${CONFIG_SOURCES}
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries (oairu
|
||||
-Wl,--start-group
|
||||
SCHED_RU_LIB
|
||||
PHY_COMMON PHY_RU
|
||||
PHY_COMMON PHY_RU UTIL
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (oairu pthread m ${CONFIG_LIB} rt ${CMAKE_DL_LIBS} ${T_LIB})
|
||||
target_link_libraries (oairu pthread m CONFIG_LIB rt ${CMAKE_DL_LIBS} ${T_LIB})
|
||||
|
||||
|
||||
# lte-uesoftmodem is UE implementation
|
||||
@@ -2751,13 +2685,10 @@ add_executable(lte-uesoftmodem
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
@@ -2775,7 +2706,7 @@ target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -2788,7 +2719,6 @@ add_executable(nr-softmodem
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-gnb.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/nr-ru.c
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
@@ -2798,15 +2728,12 @@ add_executable(nr-softmodem
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
|
||||
)
|
||||
@@ -2820,52 +2747,12 @@ target_link_libraries (nr-softmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-softmodem ${T_LIB})
|
||||
|
||||
add_dependencies( nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
add_executable(ocp-gnb
|
||||
${rrc_h}
|
||||
${nr_rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/ocp-gnb.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${XFORMS_SOURCE_NR}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
)
|
||||
|
||||
target_link_libraries (ocp-gnb
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
|
||||
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} )
|
||||
target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (ocp-gnb ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (ocp-gnb ${T_LIB})
|
||||
add_dependencies(ocp-gnb ldpc_orig ldpc_optim ldpc_optim8seg ldpc params_libconfig rfsimulator oai_usrpdevif rfsimulator nrscope)
|
||||
|
||||
|
||||
# nr-uesoftmodem is UE implementation
|
||||
#######################################
|
||||
|
||||
@@ -2873,7 +2760,6 @@ add_executable(nr-uesoftmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
@@ -2885,13 +2771,9 @@ add_executable(nr-uesoftmodem
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${UTIL_SRC}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
@@ -2906,7 +2788,7 @@ target_link_libraries (nr-uesoftmodem
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||
|
||||
@@ -2914,7 +2796,6 @@ add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
if (CUDA_FOUND)
|
||||
add_dependencies( nr-uesoftmodem ldpc_cuda)
|
||||
add_dependencies( nr-softmodem ldpc_cuda)
|
||||
add_dependencies( ocp-gnb ldpc_cuda)
|
||||
endif (CUDA_FOUND)
|
||||
###################################"
|
||||
# Addexecutables for tests
|
||||
@@ -2928,30 +2809,25 @@ endif (CUDA_FOUND)
|
||||
add_executable(dlsim_tm4
|
||||
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries (dlsim_tm4
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ITTI -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
)
|
||||
|
||||
add_executable(rftest
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(rftest minimal_lib PHY_NR_COMMON pthread dl m forms ${T_LIB} )
|
||||
target_link_libraries(rftest minimal_lib CONFIG_LIB PHY_NR_COMMON UTIL pthread dl m forms ${T_LIB} )
|
||||
|
||||
add_executable(polartest
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -2962,9 +2838,7 @@ target_link_libraries(polartest
|
||||
|
||||
add_executable(smallblocktest
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/smallblocktest.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -2994,12 +2868,8 @@ target_link_libraries(ldpctest
|
||||
|
||||
add_executable(nr_dlschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3010,11 +2880,7 @@ target_link_libraries(nr_dlschsim
|
||||
|
||||
add_executable(nr_pbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3026,13 +2892,8 @@ target_link_libraries(nr_pbchsim
|
||||
#PUCCH ---> Prashanth
|
||||
add_executable(nr_pucchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3043,17 +2904,13 @@ target_link_libraries(nr_pucchsim
|
||||
|
||||
add_executable(nr_dlsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3065,17 +2922,13 @@ target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
|
||||
add_executable(nr_prachsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES})
|
||||
target_link_libraries(nr_prachsim
|
||||
@@ -3084,13 +2937,9 @@ target_link_libraries(nr_prachsim
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3101,9 +2950,6 @@ target_link_libraries(nr_ulschsim
|
||||
|
||||
add_executable(nr_ulsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
@@ -3111,7 +2957,6 @@ add_executable(nr_ulsim
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
@@ -3125,58 +2970,21 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
|
||||
add_executable(${myExe}
|
||||
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
|
||||
${XFORMS_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
)
|
||||
target_link_libraries (${myExe}
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ITTI LFDS7 -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
)
|
||||
|
||||
endforeach(myExe)
|
||||
|
||||
add_executable(test_epc_generate_scenario
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/generate_scenario.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/generate_scenario.h
|
||||
${OPENAIR2_DIR}/ENB_APP/enb_config.h
|
||||
${OPENAIR2_DIR}/COMMON/commonDef.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_def.h
|
||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||
)
|
||||
target_link_libraries (test_epc_generate_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB PHY LFDS ITTI L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
add_executable(test_epc_play_scenario
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_decode.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_display.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_fsm.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_parse.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_s1ap_eNB_defs.h
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario_sctp.c
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario.h
|
||||
${OPENAIR2_DIR}/COMMON/commonDef.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_def.h
|
||||
)
|
||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||
target_link_libraries (test_epc_play_scenario
|
||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ITTI -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
)
|
||||
|
||||
|
||||
#unitary tests for Core NEtwork pieces
|
||||
#################################
|
||||
foreach(myExe s1ap
|
||||
@@ -3193,7 +3001,7 @@ foreach(myExe s1ap
|
||||
${OPENAIR3_DIR}/TEST/test_${myExe}.c
|
||||
)
|
||||
target_link_libraries (test_${myExe}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} CONFIG_LIB
|
||||
)
|
||||
endforeach(myExe)
|
||||
|
||||
@@ -3312,16 +3120,12 @@ add_executable(nr-ittisim
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
@@ -3335,7 +3139,7 @@ target_link_libraries (nr-ittisim
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries (nr-ittisim pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-ittisim pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
|
||||
target_link_libraries (nr-ittisim ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (nr-ittisim ${T_LIB})
|
||||
|
||||
|
||||
@@ -1093,17 +1093,18 @@
|
||||
(Test8: 217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset),
|
||||
(Test9: 106 PRBs 50 PDSCH-PRBs MCS Index 27),
|
||||
(Test10: 106 PRBs 50 PDSCH-PRBs MCS Index 16),
|
||||
(Test11: HARQ test 25% TP (4 rounds),
|
||||
(Test12: HARQ test 33% TP (3 rounds),
|
||||
(Test13: HARQ test 50% TP (2 rounds),
|
||||
(Test14: 3 PTRS, 8 Interpolated Symbols),
|
||||
(Test15: 6 PTRS, 5 Interpolated Symbols),
|
||||
(Test16: 11 PTRS, 0 Interpolated Symbols),
|
||||
(Test17: Mapping type A, 2 DMRS Symbols),
|
||||
(Test18: Mapping type A, 3 DMRS Symbols),
|
||||
(Test19: Mapping type B, 4 DMRS Symbols),
|
||||
(Test20: 4x4 MIMO, 1 Layer),
|
||||
(Test21: 4x4 MIMO, 2 Layers)</desc>
|
||||
(Test11: 106 MCS-TABLE 256 QAM MCS Index 26),
|
||||
(Test12: HARQ test 25% TP (4 rounds),
|
||||
(Test13: HARQ test 33% TP (3 rounds),
|
||||
(Test14: HARQ test 50% TP (2 rounds),
|
||||
(Test15: 3 PTRS, 8 Interpolated Symbols),
|
||||
(Test16: 6 PTRS, 5 Interpolated Symbols),
|
||||
(Test17: 11 PTRS, 0 Interpolated Symbols),
|
||||
(Test18: Mapping type A, 2 DMRS Symbols),
|
||||
(Test19: Mapping type A, 3 DMRS Symbols),
|
||||
(Test20: Mapping type B, 4 DMRS Symbols),
|
||||
(Test21: 4x4 MIMO, 1 Layer),
|
||||
(Test22: 4x4 MIMO, 2 Layers)</desc>
|
||||
<pre_compile_prog></pre_compile_prog>
|
||||
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
|
||||
<compile_prog_args> --phy_simulators -c </compile_prog_args>
|
||||
@@ -1118,8 +1119,9 @@
|
||||
-n100 -R217 -b100 -s5
|
||||
-n100 -R217 -a80 -s5
|
||||
-n100 -R217 -a110 -s5 -b100
|
||||
-n100 -e27 -s30
|
||||
-n100 -e16 -s10
|
||||
-n100 -e27 -s30
|
||||
-n100 -e16 -s10
|
||||
-n100 -q1 -e27 -s30
|
||||
-n100 -s1 -t25
|
||||
-n100 -s1 -t33
|
||||
-n100 -s1 -t50
|
||||
@@ -1131,7 +1133,7 @@
|
||||
-n100 -s2 -U 2 1 3
|
||||
-n10 -s20 -U 3 0 0 2 -gR -x1 -y4 -z4
|
||||
-n10 -s20 -U 3 0 0 2 -gR -x2 -y4 -z4</main_exec_args>
|
||||
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 nr_dlsim.test21</tags>
|
||||
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 nr_dlsim.test21 nr_dlsim.test22</tags>
|
||||
<search_expr_true>PDSCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
|
||||
@@ -473,130 +473,6 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
|
||||
/* @}*/
|
||||
|
||||
static __inline__ uint64_t rdtsc(void) {
|
||||
uint32_t a, d;
|
||||
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
|
||||
return (((uint64_t)d)<<32) | ((uint64_t)a);
|
||||
}
|
||||
|
||||
#define DEBUG_REALTIME 1
|
||||
#if DEBUG_REALTIME
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
static inline uint64_t checkTCPU(int timeout,
|
||||
char *file,
|
||||
int line)
|
||||
{
|
||||
static uint64_t __thread lastCPUTime=0;
|
||||
static uint64_t __thread last=0;
|
||||
uint64_t cur=rdtsc();
|
||||
struct timespec CPUt;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &CPUt);
|
||||
uint64_t CPUTime=CPUt.tv_sec*1000*1000+CPUt.tv_nsec/1000;
|
||||
double microCycles=(double)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
|
||||
if ( last!=0 && duration > timeout ) {
|
||||
//struct timespec ts;
|
||||
//clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
printf("%s:%d lte-ue delay %d (exceed %d), CPU for this period: %lld\n", file, line,
|
||||
duration, timeout, (long long)CPUTime-lastCPUTime );
|
||||
}
|
||||
|
||||
last=cur;
|
||||
lastCPUTime=CPUTime;
|
||||
return cur;
|
||||
}
|
||||
|
||||
static inline unsigned long long checkT(int timeout,
|
||||
char *file,
|
||||
int line)
|
||||
{
|
||||
static unsigned long long __thread last=0;
|
||||
unsigned long long cur=rdtsc();
|
||||
int microCycles=(int)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
|
||||
if ( last!=0 && duration > timeout )
|
||||
printf("%s:%d lte-ue delay %d (exceed %d)\n", file, line,
|
||||
duration, timeout);
|
||||
|
||||
last=cur;
|
||||
return cur;
|
||||
}
|
||||
|
||||
typedef struct m {
|
||||
uint64_t iterations;
|
||||
uint64_t sum;
|
||||
uint64_t maxArray[11];
|
||||
} Meas;
|
||||
|
||||
static inline void printMeas(char *txt,
|
||||
Meas *M,
|
||||
int period)
|
||||
{
|
||||
if (M->iterations%period == 0 ) {
|
||||
char txt2[512];
|
||||
sprintf(txt2,"%s avg=%" PRIu64 " iterations=%" PRIu64 " max=%"
|
||||
PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 "\n",
|
||||
txt,
|
||||
M->sum/M->iterations,
|
||||
M->iterations,
|
||||
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
|
||||
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
|
||||
#if T_TRACER
|
||||
LOG_W(PHY,"%s",txt2);
|
||||
#else
|
||||
printf("%s",txt2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline int cmpint(const void *a,
|
||||
const void *b)
|
||||
{
|
||||
uint64_t *aa=(uint64_t *)a;
|
||||
uint64_t *bb=(uint64_t *)b;
|
||||
return (int)(*aa-*bb);
|
||||
}
|
||||
|
||||
static inline void updateTimes(uint64_t start,
|
||||
Meas *M,
|
||||
int period,
|
||||
char *txt)
|
||||
{
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
M->iterations++;
|
||||
qsort(M->maxArray, 11, sizeof(uint64_t), cmpint);
|
||||
printMeas(txt,M,period);
|
||||
}
|
||||
}
|
||||
|
||||
#define check(a) do { checkT(a,__FILE__,__LINE__); } while (0)
|
||||
#define checkcpu(a) do { checkTCPU(a,__FILE__,__LINE__); } while (0)
|
||||
#define initRefTimes(a) static __thread Meas a= {0}
|
||||
#define pickTime(a) uint64_t a=rdtsc()
|
||||
#define readTime(a) a
|
||||
#define initStaticTime(a) static __thread uint64_t a={0}
|
||||
#define pickStaticTime(a) do { a=rdtsc(); } while (0)
|
||||
|
||||
#else
|
||||
#define check(a) do {} while (0)
|
||||
#define checkcpu(a) do {} while (0)
|
||||
#define initRefTimes(a) do {} while (0)
|
||||
#define initStaticTime(a) do {} while (0)
|
||||
#define pickTime(a) do {} while (0)
|
||||
#define readTime(a) 0
|
||||
#define pickStaticTime(a) do {} while (0)
|
||||
#define updateTimes(a,b,c,d) do {} while (0)
|
||||
#define printMeas(a,b,c) do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,27 @@
|
||||
|
||||
const char *duplex_mode[]={"FDD","TDD"};
|
||||
|
||||
int tables_5_3_2[5][11] = {
|
||||
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1}, // 15 FR1
|
||||
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 273}, // 30 FR1
|
||||
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 135}, // 60 FR1
|
||||
{66, 132, 264, -1 , -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
|
||||
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1} // 120FR2
|
||||
};
|
||||
|
||||
int get_supported_band_index(int scs, int band, int n_rbs){
|
||||
|
||||
int scs_index = scs;
|
||||
if (band>256)
|
||||
scs_index++;
|
||||
for (int i=0; i<11; i++) {
|
||||
if(n_rbs == tables_5_3_2[scs][i])
|
||||
return i;
|
||||
}
|
||||
return (-1); // not found
|
||||
}
|
||||
|
||||
|
||||
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
|
||||
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
|
||||
// Notes:
|
||||
|
||||
@@ -80,6 +80,7 @@ void SLIV2SL(int SLIV,int *S,int *L);
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period);
|
||||
int get_supported_band_index(int scs, int band, int n_rbs);
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
static char *grouptypes[] = {"ltestats","cpustats"};
|
||||
static double cpufreq;
|
||||
extern notifiedFIFO_t measur_fifo;
|
||||
#define TELNET_NUM_MEASURTYPES (sizeof(grouptypes)/sizeof(char *))
|
||||
|
||||
#define HDR "---------------------------------"
|
||||
|
||||
@@ -43,9 +43,9 @@ int main(int argc, char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
uint64_t deb=rdtsc();
|
||||
uint64_t deb=rdtsc_oai();
|
||||
usleep(100000);
|
||||
cpuCyclesMicroSec=(rdtsc()-deb)/100000;
|
||||
cpuCyclesMicroSec=(rdtsc_oai()-deb)/100000;
|
||||
printf("Cycles per µs: %lu\n",cpuCyclesMicroSec);
|
||||
printf("Key" SEP "delay to process" SEP "processing time" SEP "delay to be read answer\n");
|
||||
notifiedFIFO_elt_t doneRequest;
|
||||
|
||||
@@ -72,11 +72,11 @@ void *one_thread(void *arg) {
|
||||
do {
|
||||
notifiedFIFO_elt_t *elt=pullNotifiedFifoRemember(&tp->incomingFifo, myThread);
|
||||
|
||||
if (tp->measurePerf) elt->startProcessingTime=rdtsc();
|
||||
if (tp->measurePerf) elt->startProcessingTime=rdtsc_oai();
|
||||
|
||||
elt->processingFunc(NotifiedFifoData(elt));
|
||||
|
||||
if (tp->measurePerf) elt->endProcessingTime=rdtsc();
|
||||
if (tp->measurePerf) elt->endProcessingTime=rdtsc_oai();
|
||||
|
||||
if (elt->reponseFifo) {
|
||||
// Check if the job is still alive, else it has been aborted
|
||||
@@ -97,7 +97,7 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
|
||||
char *measr=getenv("threadPoolMeasurements");
|
||||
pool->measurePerf=performanceMeas;
|
||||
// force measurement if the output is defined
|
||||
pool->measurePerf=measr!=NULL;
|
||||
pool->measurePerf |= measr!=NULL;
|
||||
|
||||
if (measr) {
|
||||
mkfifo(measr,0666);
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <assertions.h>
|
||||
#include <LOG/log.h>
|
||||
#include <common/utils/system.h>
|
||||
//#include <stdatomic.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/time_meas.h"
|
||||
#include "common/utils/system.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#define THREADINIT PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
|
||||
@@ -60,10 +60,10 @@ typedef struct notifiedFIFO_elt_s {
|
||||
struct notifiedFIFO_s *reponseFifo;
|
||||
void (*processingFunc)(void *);
|
||||
bool malloced;
|
||||
uint64_t creationTime;
|
||||
uint64_t startProcessingTime;
|
||||
uint64_t endProcessingTime;
|
||||
uint64_t returnTime;
|
||||
oai_cputime_t creationTime;
|
||||
oai_cputime_t startProcessingTime;
|
||||
oai_cputime_t endProcessingTime;
|
||||
oai_cputime_t returnTime;
|
||||
void *msgData;
|
||||
} notifiedFIFO_elt_t;
|
||||
|
||||
@@ -97,12 +97,11 @@ static inline void *NotifiedFifoData(notifiedFIFO_elt_t *elt) {
|
||||
|
||||
static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
|
||||
if (elt->malloced) {
|
||||
elt->malloced=false;
|
||||
elt->malloced = false;
|
||||
free(elt);
|
||||
} else
|
||||
printf("delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
|
||||
|
||||
//LOG_W(UTIL,"delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
|
||||
}
|
||||
/* it is allowed to call delNotifiedFIFO_elt when the memory is managed by
|
||||
* the caller */
|
||||
}
|
||||
|
||||
static inline void initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
|
||||
@@ -141,8 +140,7 @@ static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t
|
||||
|
||||
notifiedFIFO_elt_t *ret=nf->outF;
|
||||
|
||||
if (nf->outF==nf->outF->next)
|
||||
LOG_E(UTIL,"Circular list in thread pool: push several times the same buffer is forbidden\n");
|
||||
AssertFatal(nf->outF != nf->outF->next,"Circular list in thread pool: push several times the same buffer is forbidden\n");
|
||||
|
||||
nf->outF=nf->outF->next;
|
||||
|
||||
@@ -174,6 +172,20 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t* elt)
|
||||
{
|
||||
time_stats_t ts = {0};
|
||||
if (elt->startProcessingTime == 0 && elt->endProcessingTime == 0)
|
||||
return ts; /* no measurements done */
|
||||
ts.in = elt->startProcessingTime;
|
||||
ts.diff = elt->endProcessingTime - ts.in;
|
||||
ts.p_time = ts.diff;
|
||||
ts.diff_square = ts.diff * ts.diff;
|
||||
ts.max = ts.diff;
|
||||
ts.trials = 1;
|
||||
return ts;
|
||||
}
|
||||
|
||||
// This function aborts all messages matching the key
|
||||
// If the queue is used in thread pools, it doesn't cancels already running processing
|
||||
// because the message has already been picked
|
||||
@@ -224,18 +236,18 @@ typedef struct thread_pool {
|
||||
} tpool_t;
|
||||
|
||||
static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
|
||||
if (t->measurePerf) msg->creationTime=rdtsc();
|
||||
if (t->measurePerf) msg->creationTime=rdtsc_oai();
|
||||
|
||||
if ( t->activated)
|
||||
pushNotifiedFIFO(&t->incomingFifo, msg);
|
||||
else {
|
||||
if (t->measurePerf)
|
||||
msg->startProcessingTime=rdtsc();
|
||||
msg->startProcessingTime=rdtsc_oai();
|
||||
|
||||
msg->processingFunc(NotifiedFifoData(msg));
|
||||
|
||||
if (t->measurePerf)
|
||||
msg->endProcessingTime=rdtsc();
|
||||
msg->endProcessingTime=rdtsc_oai();
|
||||
|
||||
if (msg->reponseFifo)
|
||||
pushNotifiedFIFO(msg->reponseFifo, msg);
|
||||
@@ -246,7 +258,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
|
||||
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
|
||||
AssertFatal(t->traceFd, "Thread pool used while not initialized");
|
||||
if (t->measurePerf)
|
||||
msg->returnTime=rdtsc();
|
||||
msg->returnTime=rdtsc_oai();
|
||||
|
||||
if (t->traceFd > 0)
|
||||
if(write(t->traceFd, msg, sizeof(*msg)));
|
||||
@@ -261,7 +273,7 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo
|
||||
return NULL;
|
||||
|
||||
if (t->measurePerf)
|
||||
msg->returnTime=rdtsc();
|
||||
msg->returnTime=rdtsc_oai();
|
||||
|
||||
if (t->traceFd)
|
||||
if(write(t->traceFd, msg, sizeof(*msg)));
|
||||
|
||||
@@ -267,6 +267,15 @@ void init_meas(void) {
|
||||
AssertFatal(rt==0, "couldn't create cpu measurment thread: %s\n",strerror(errno));
|
||||
}
|
||||
|
||||
void send_meas(time_stats_t *ts, int msgid) {
|
||||
if (MEASURE_ENABLED(ts) ) {
|
||||
ts->tstatptr->timestat_id=ts->meas_index;
|
||||
ts->tstatptr->msgid = msgid ;
|
||||
ts->tstatptr->ts = rdtsc_oai();
|
||||
pushNotifiedFIFO(&measur_fifo, ts->tpoolmsg);
|
||||
}
|
||||
}
|
||||
|
||||
void end_meas(void) {
|
||||
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
|
||||
time_stats_msg_t *msg = (time_stats_msg_t *)NotifiedFifoData(nfe);
|
||||
@@ -31,15 +31,14 @@
|
||||
#include <pthread.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include "common/utils/threadPool/thread-pool.h"
|
||||
// global var to enable openair performance profiler
|
||||
extern int opp_enabled;
|
||||
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
||||
// structure to store data to compute cpu measurment
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#define OAI_CPUTIME_TYPE long long
|
||||
typedef long long oai_cputime_t;
|
||||
#elif defined(__arm__)
|
||||
#define OAI_CPUTIME_TYPE uint32_t
|
||||
typedef uint32_t oai_cputime_t;
|
||||
#else
|
||||
#error "building on unsupported CPU architecture"
|
||||
#endif
|
||||
@@ -54,23 +53,23 @@ typedef void(*meas_printfunc_t)(const char* format, ...);
|
||||
typedef struct {
|
||||
int msgid; /*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
|
||||
int timestat_id; /*!< \brief points to the time_stats_t entry in cpumeas table */
|
||||
OAI_CPUTIME_TYPE ts; /*!< \brief time stamp */
|
||||
oai_cputime_t ts; /*!< \brief time stamp */
|
||||
meas_printfunc_t displayFunc; /*!< \brief function to call when DISPLAY message is received*/
|
||||
} time_stats_msg_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
OAI_CPUTIME_TYPE in; /*!< \brief time at measure starting point */
|
||||
OAI_CPUTIME_TYPE diff; /*!< \brief average difference between time at starting point and time at endpoint*/
|
||||
OAI_CPUTIME_TYPE p_time; /*!< \brief absolute process duration */
|
||||
OAI_CPUTIME_TYPE diff_square; /*!< \brief process duration square */
|
||||
OAI_CPUTIME_TYPE max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
|
||||
struct notifiedFIFO_elt_s;
|
||||
typedef struct time_stats {
|
||||
oai_cputime_t in; /*!< \brief time at measure starting point */
|
||||
oai_cputime_t diff; /*!< \brief average difference between time at starting point and time at endpoint*/
|
||||
oai_cputime_t p_time; /*!< \brief absolute process duration */
|
||||
oai_cputime_t diff_square; /*!< \brief process duration square */
|
||||
oai_cputime_t max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
|
||||
int trials; /*!< \brief number of start point - end point iterations */
|
||||
int meas_flag; /*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
|
||||
char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/
|
||||
int meas_index; /*!< \brief index of this measure in the measure array (not used for PHY simulators)*/
|
||||
int meas_enabled; /*!< \brief per measure enablement flag. send_meas tests this flag, unused today in start_meas and stop_meas*/
|
||||
notifiedFIFO_elt_t *tpoolmsg; /*!< \brief message pushed to the cpu measurment queue to report a measure START or STOP */
|
||||
struct notifiedFIFO_elt_s *tpoolmsg; /*!< \brief message pushed to the cpu measurment queue to report a measure START or STOP */
|
||||
time_stats_msg_t *tstatptr; /*!< \brief pointer to the time_stats_msg_t data in the tpoolmsg, stored here for perf considerations*/
|
||||
} time_stats_t;
|
||||
#define MEASURE_ENABLED(X) (X->meas_enabled)
|
||||
@@ -179,7 +178,7 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline void merge_meas(time_stats_t *dst_ts, time_stats_t *src_ts)
|
||||
static inline void merge_meas(time_stats_t *dst_ts, const time_stats_t *src_ts)
|
||||
{
|
||||
if (!opp_enabled)
|
||||
return;
|
||||
@@ -189,25 +188,17 @@ static inline void merge_meas(time_stats_t *dst_ts, time_stats_t *src_ts)
|
||||
dst_ts->max = src_ts->max;
|
||||
}
|
||||
|
||||
extern notifiedFIFO_t measur_fifo;
|
||||
#define CPUMEASUR_SECTION "cpumeasur"
|
||||
|
||||
#define CPUMEASUR_PARAMS_DESC { \
|
||||
{"max_cpumeasur", "Max number of cpu measur entries", 0, uptr:&max_cpumeasur, defintval:100, TYPE_UINT, 0},\
|
||||
}
|
||||
|
||||
void init_meas(void);
|
||||
time_stats_t *register_meas(char *name);
|
||||
#define START_MEAS(X) send_meas(X, TIMESTAT_MSGID_START)
|
||||
#define STOP_MEAS(X) send_meas(X, TIMESTAT_MSGID_STOP)
|
||||
static inline void send_meas(time_stats_t *ts, int msgid) {
|
||||
if (MEASURE_ENABLED(ts) ) {
|
||||
ts->tstatptr->timestat_id=ts->meas_index;
|
||||
ts->tstatptr->msgid = msgid ;
|
||||
ts->tstatptr->ts = rdtsc_oai();
|
||||
pushNotifiedFIFO(&measur_fifo, ts->tpoolmsg);
|
||||
}
|
||||
}
|
||||
void end_meas(void);
|
||||
void init_meas(void);
|
||||
time_stats_t *register_meas(char *name);
|
||||
#define START_MEAS(X) send_meas(X, TIMESTAT_MSGID_START)
|
||||
#define STOP_MEAS(X) send_meas(X, TIMESTAT_MSGID_STOP)
|
||||
void send_meas(time_stats_t *ts, int msgid);
|
||||
void end_meas(void);
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,6 @@ This tuto for 5G gNB NAS design
|
||||
|
||||
# source files
|
||||
|
||||
executables/ocp-gnb.c: a main loop to create a debuggable gNB, see document SW_archi.md
|
||||
openair2/RRC/NR/nr_ngap_gNB.c: skeleton for interface with NGAP
|
||||
openair3/NAS/COMMON/milenage.h: a simple milenage implementation, depend only on crypto library
|
||||
openair3/NAS/COMMON/NR_NAS_defs.h: messages defined for NAS implemented in C: C struct, C enums and automatic conversion to labels for debug messages
|
||||
|
||||
@@ -85,10 +85,6 @@ end
|
||||
This tuto for 5G gNB design, with Open Cells main
|
||||
{: .text-center}
|
||||
|
||||
# Top file: executables/ocp-gnb.c
|
||||
|
||||
the function main() initializes the data from configuration file
|
||||
|
||||
# The main thread is in ru_thread()
|
||||
The infinite loop:
|
||||
## rx_rf()
|
||||
|
||||
+58
-5
@@ -55,6 +55,59 @@ int sum(uint8_t *b, int s) {
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
typedef struct m {
|
||||
uint64_t iterations;
|
||||
uint64_t sum;
|
||||
uint64_t maxArray[11];
|
||||
} Meas;
|
||||
|
||||
int cmpint(const void *a, const void *b)
|
||||
{
|
||||
uint64_t *aa=(uint64_t *)a;
|
||||
uint64_t *bb=(uint64_t *)b;
|
||||
return (int)(*aa-*bb);
|
||||
}
|
||||
|
||||
static inline void printMeas(char *txt,
|
||||
Meas *M,
|
||||
int period)
|
||||
{
|
||||
if (M->iterations%period == 0 ) {
|
||||
char txt2[512];
|
||||
sprintf(txt2,"%s avg=%" PRIu64 " iterations=%" PRIu64 " max=%"
|
||||
PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 "\n",
|
||||
txt,
|
||||
M->sum/M->iterations,
|
||||
M->iterations,
|
||||
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
|
||||
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
|
||||
#if T_TRACER
|
||||
LOG_W(PHY,"%s",txt2);
|
||||
#else
|
||||
printf("%s",txt2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void updateTimes(uint64_t start, Meas *M, int period, char *txt)
|
||||
{
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc_oai();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
M->iterations++;
|
||||
qsort(M->maxArray, 11, sizeof(uint64_t), cmpint);
|
||||
printMeas(txt,M,period);
|
||||
}
|
||||
}
|
||||
|
||||
#define initStaticTime(a) static __thread uint64_t a={0}
|
||||
#define pickStaticTime(a) do { a=rdtsc_oai(); } while (0)
|
||||
#define initRefTimes(a) static __thread Meas a= {0}
|
||||
static inline int cmpintRev(const void *a, const void *b) {
|
||||
uint64_t *aa=(uint64_t *)a;
|
||||
uint64_t *bb=(uint64_t *)b;
|
||||
@@ -82,7 +135,7 @@ static inline void printMeas2(char *txt, Meas *M, int period, bool MaxMin) {
|
||||
|
||||
static inline void updateTimesReset(uint64_t start, Meas *M, int period, bool MaxMin, char *txt) {
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
uint64_t end=rdtsc_oai();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
@@ -107,7 +160,7 @@ static inline void updateTimesReset(uint64_t start, Meas *M, int period, bool Ma
|
||||
|
||||
static inline void measTransportTime(uint64_t DuSend, uint64_t CuMicroSec, Meas *M, int period, bool MaxMin, char *txt) {
|
||||
if (DuSend!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
uint64_t end=rdtsc_oai();
|
||||
long long diff=(end-DuSend)/(cpuf*1000)-CuMicroSec;
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
@@ -894,7 +947,7 @@ void phy_procedures_eNB_TX_fromsplit(uint8_t *bufferZone, int nbBlocks, PHY_VARS
|
||||
memcpy(eNB->pbch_pdu,hDL(bufferZone)->pbch_pdu, 4);
|
||||
|
||||
// Remove all scheduled DL, we will populate from the CU sending
|
||||
for (int UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
for (int UE_id=0; UE_id<NUMBER_OF_DLSCH_MAX; UE_id++) {
|
||||
LTE_eNB_DLSCH_t *dlsch0 = eNB->dlsch[UE_id][0];
|
||||
|
||||
if ( dlsch0 && dlsch0->rnti>0 ) {
|
||||
@@ -1463,7 +1516,7 @@ void DL_cu_fs6(RU_t *ru, L1_rxtx_proc_t *proc, uint64_t DuClock, uint64_t start
|
||||
}
|
||||
|
||||
hDL(bufferZone)->DuClock=DuClock;
|
||||
hDL(bufferZone)->CuSpentMicroSec=(rdtsc()-startCycle)/(cpuf*1000);
|
||||
hDL(bufferZone)->CuSpentMicroSec=(rdtsc_oai()-startCycle)/(cpuf*1000);
|
||||
updateTimesReset(startCycle, &CUprocessing, 1000, true,"CU entire processing from recv to send");
|
||||
sendSubFrame(&sockFS6, bufferZone, sizeof(fs6_dl_t), CTsentCUv0 );
|
||||
return;
|
||||
@@ -1476,7 +1529,7 @@ void UL_cu_fs6(RU_t *ru, L1_rxtx_proc_t *proc, uint64_t *TS, uint64_t *DuClock,
|
||||
pickStaticTime(begingWait);
|
||||
int nb_blocks=receiveSubFrame(&sockFS6, bufferZone, sizeof(bufferZone), CTsentDUv0 );
|
||||
* DuClock=hUDP(bufferZone)->senderClock;
|
||||
* startProcessing=rdtsc();
|
||||
* startProcessing=rdtsc_oai();
|
||||
updateTimesReset(begingWait, &fullLoop, 1000, false, "CU wait DU");
|
||||
|
||||
if (nb_blocks ==0) {
|
||||
|
||||
@@ -87,10 +87,10 @@ AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
|
||||
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]= {0};
|
||||
void flexran_agent_slice_update(mid_t module_idP) {
|
||||
}
|
||||
int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) {
|
||||
int proto_agent_start(mid_t mod_id, const cudu_params_t *p) {
|
||||
return 0;
|
||||
}
|
||||
void proto_agent_stop(mod_id_t mod_id) {
|
||||
void proto_agent_stop(mid_t mod_id) {
|
||||
}
|
||||
|
||||
static void *ru_thread( void *param );
|
||||
|
||||
@@ -300,8 +300,7 @@ void rx_func(void *param) {
|
||||
}
|
||||
static void dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output) {
|
||||
int stroff = 0;
|
||||
stroff += print_meas_log(gNB->phy_proc_tx[0], "L1 Tx processing thread 0", NULL, NULL, output);
|
||||
//stroff += print_meas_log(gNB->phy_proc_tx[1], "L1 Tx processing thread 1", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL, output);
|
||||
stroff += print_meas_log(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL, output+stroff);
|
||||
stroff += print_meas_log(&gNB->ul_indication_stats, "UL Indication", NULL, NULL, output+stroff);
|
||||
@@ -337,8 +336,7 @@ void *nrL1_stats_thread(void *param) {
|
||||
fd=fopen("nrL1_stats.log","w");
|
||||
AssertFatal(fd!=NULL,"Cannot open nrL1_stats.log\n");
|
||||
|
||||
reset_meas(gNB->phy_proc_tx[0]);
|
||||
//reset_meas(gNB->phy_proc_tx[1]);
|
||||
reset_meas(&gNB->phy_proc_tx);
|
||||
reset_meas(&gNB->dlsch_encoding_stats);
|
||||
reset_meas(&gNB->phy_proc_rx);
|
||||
reset_meas(&gNB->ul_indication_stats);
|
||||
@@ -425,7 +423,7 @@ void init_gNB_Tpool(int inst) {
|
||||
s_offset += 3;
|
||||
}
|
||||
if (getenv("noThreads")) strcpy(pool, "n");
|
||||
initTpool(pool, gNB->threadPool, false);
|
||||
initTpool(pool, gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||
// ULSCH decoder result FIFO
|
||||
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||
initNotifiedFIFO(gNB->respDecode);
|
||||
@@ -450,8 +448,6 @@ void init_gNB_Tpool(int inst) {
|
||||
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
|
||||
init_DLSCH_struct(gNB, msgDataTx);
|
||||
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
|
||||
reset_meas(&msgDataTx->phy_proc_tx);
|
||||
gNB->phy_proc_tx[i] = &msgDataTx->phy_proc_tx;
|
||||
pushNotifiedFIFO(gNB->L1_tx_free,msgL1Tx); // to unblock the process in the beginning
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
|
||||
//#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
+2
-2
@@ -767,9 +767,9 @@ void processSlotRX(void *arg) {
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
||||
#else
|
||||
uint64_t a=rdtsc();
|
||||
uint64_t a=rdtsc_oai();
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &rxtxD->txFifo);
|
||||
LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
|
||||
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
#endif
|
||||
|
||||
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa){
|
||||
|
||||
@@ -61,7 +61,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "enb_config.h"
|
||||
//#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
#include "intertask_interface.h"
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -120,7 +120,6 @@ extern "C"
|
||||
#define TIMING_SOURCE softmodem_params.timing_source
|
||||
#define SEND_DMRSSYNC softmodem_params.send_dmrs_sync
|
||||
#define USIM_TEST softmodem_params.usim_test
|
||||
#define USE_256QAM_TABLE softmodem_params.use_256qam_table
|
||||
#define PRB_INTERPOLATION softmodem_params.prb_interpolation
|
||||
#define NFAPI softmodem_params.nfapi
|
||||
#define NSA softmodem_params.nsa
|
||||
@@ -158,14 +157,13 @@ extern int usrp_tx_thread;
|
||||
{"basicsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&basicsim, defintval:0, TYPE_INT, 0}, \
|
||||
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
|
||||
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
|
||||
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \
|
||||
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:0, TYPE_UINT16, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&PRB_INTERPOLATION, defintval:0, TYPE_INT, 0}, \
|
||||
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0} \
|
||||
}
|
||||
|
||||
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
||||
@@ -250,7 +248,6 @@ typedef struct {
|
||||
uint32_t timing_source;
|
||||
int hw_timing_advance;
|
||||
uint32_t send_dmrs_sync;
|
||||
int use_256qam_table;
|
||||
int prb_interpolation;
|
||||
uint8_t nfapi;
|
||||
int nsa;
|
||||
|
||||
@@ -156,7 +156,7 @@ int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t
|
||||
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType) {
|
||||
commonUDP_t *UDPheader=(commonUDP_t *)bufferZone ;
|
||||
UDPheader->contentType=contentType;
|
||||
UDPheader->senderClock=rdtsc();
|
||||
UDPheader->senderClock=rdtsc_oai();
|
||||
int nbBlocks=UDPheader->nbBlocks;
|
||||
int blockId=0;
|
||||
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH 0x03
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH 0x04
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_P_DLSCH 0x05
|
||||
#define FAPI_NR_DL_CONFIG_TYPES 0x05
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_CSI_RS 0x06
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_CSI_IM 0x07
|
||||
#define FAPI_NR_DL_CONFIG_TYPES 0x07
|
||||
|
||||
#define FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01
|
||||
#define FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED 0x02
|
||||
|
||||
@@ -474,11 +474,53 @@ typedef struct {
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t dlsch_config_rel15;
|
||||
} fapi_nr_dl_config_dlsch_pdu;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t bwp_size;//
|
||||
uint16_t bwp_start;//
|
||||
uint8_t subcarrier_spacing;//
|
||||
uint8_t cyclic_prefix;//
|
||||
uint16_t start_rb;
|
||||
uint16_t nr_of_rbs;
|
||||
uint8_t csi_type;//Value: 0:TRS 1:CSI-RS NZP 2:CSI-RS ZP
|
||||
uint8_t row;//Row entry into the CSI Resource location table. [TS38.211, sec 7.4.1.5.3 and table 7.4.1.5.3-1] Value: 1-18
|
||||
uint16_t freq_domain;//Value: Up to the 12 LSBs, actual size is determined by the Row parameter
|
||||
uint8_t symb_l0;//The time domain location l0 and firstOFDMSymbolInTimeDomain Value: 0->13
|
||||
uint8_t symb_l1;//
|
||||
uint8_t cdm_type;
|
||||
uint8_t freq_density;//The density field, p and comb offset (for dot5).0: dot5 (even RB), 1: dot5 (odd RB), 2: one, 3: three
|
||||
uint16_t scramb_id;//ScramblingID of the CSI-RS [TS38.214, sec 5.2.2.3.1] Value: 0->1023
|
||||
} fapi_nr_dl_config_csirs_pdu_rel15_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t bwp_size;
|
||||
uint16_t bwp_start;
|
||||
uint8_t subcarrier_spacing;
|
||||
uint16_t start_rb;
|
||||
uint16_t nr_of_rbs;
|
||||
uint8_t k_csiim[4];
|
||||
uint8_t l_csiim[4];
|
||||
} fapi_nr_dl_config_csiim_pdu_rel15_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_dl_config_csirs_pdu_rel15_t csirs_config_rel15;
|
||||
} fapi_nr_dl_config_csirs_pdu;
|
||||
|
||||
|
||||
typedef struct {
|
||||
fapi_nr_dl_config_csiim_pdu_rel15_t csiim_config_rel15;
|
||||
} fapi_nr_dl_config_csiim_pdu;
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t pdu_type;
|
||||
union {
|
||||
fapi_nr_dl_config_dci_pdu dci_config_pdu;
|
||||
fapi_nr_dl_config_dlsch_pdu dlsch_config_pdu;
|
||||
fapi_nr_dl_config_csirs_pdu csirs_config_pdu;
|
||||
fapi_nr_dl_config_csiim_pdu csiim_config_pdu;
|
||||
};
|
||||
} fapi_nr_dl_config_request_pdu_t;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef __NR_LDPC_TYPES__H__
|
||||
#define __NR_LDPC_TYPES__H__
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "nrLDPCdecoder_defs.h"
|
||||
// ==============================================================================
|
||||
// TYPES
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include "defs.h"
|
||||
#include "assertions.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
@@ -280,4 +279,4 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
|
||||
|
||||
int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc,int Kb,short block_length, short BG, encoder_implemparams_t *impp) {
|
||||
return ldpc_encoder_orig(test_input[0],channel_input[0],Zc,Kb,block_length,BG,impp->gen_code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <types.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "defs.h"
|
||||
|
||||
#include "ldpc384_byte.c"
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
|
||||
@@ -92,6 +92,5 @@ uint8_t get_l0(uint16_t dlDmrsSymbPos) {
|
||||
if ((mask&1) == 1) break;
|
||||
mask>>=1;
|
||||
}
|
||||
AssertFatal(l0 < 4,"impossible l0 %d\n",l0);
|
||||
return (l0);
|
||||
}
|
||||
|
||||
@@ -642,6 +642,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
unsigned short BWPStart,
|
||||
uint8_t config_type,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
unsigned short nb_rb_pdsch)
|
||||
{
|
||||
@@ -653,10 +654,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int16_t *fl=NULL,*fm=NULL,*fr=NULL,*fml=NULL,*fmr=NULL,*fmm=NULL,*fdcl=NULL,*fdcr=NULL,*fdclh=NULL,*fdcrh=NULL, *frl=NULL, *frr=NULL;
|
||||
int ch_offset,symbol_offset;
|
||||
|
||||
NR_UE_DLSCH_t **dlsch = ue->dlsch[proc->thread_id][gNB_id];
|
||||
const unsigned char harq_pid = dlsch[0]->current_harq_pid;
|
||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
|
||||
uint8_t nushift;
|
||||
int **dl_ch_estimates =ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates;
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF;
|
||||
@@ -678,7 +675,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
if (is_SI) {
|
||||
rb_offset -= BWPStart;
|
||||
}
|
||||
uint8_t config_type = dlsch0_harq->dmrsConfigType;
|
||||
int8_t delta = get_delta(p, config_type);
|
||||
|
||||
// checking if re-initialization of scrambling IDs is needed
|
||||
|
||||
@@ -72,6 +72,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
unsigned short BWPStart,
|
||||
uint8_t config_type,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
unsigned short nb_rb_pdsch);
|
||||
|
||||
|
||||
@@ -130,76 +130,75 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
|
||||
|
||||
*/
|
||||
int c = 0, r = 0;
|
||||
uint16_t bundle_j = 0, f_bundle_j = 0, f_reg = 0;
|
||||
uint16_t f_bundle_j = 0;
|
||||
uint32_t coreset_C = 0;
|
||||
uint16_t index_z, index_llr;
|
||||
int coreset_interleaved = 0;
|
||||
int N_regs = coreset_nbr_rb*coreset_time_dur;
|
||||
|
||||
if (reg_bundle_size_L != 0) { // interleaving will be done only if reg_bundle_size_L != 0
|
||||
coreset_interleaved = 1;
|
||||
coreset_C = (uint32_t) (coreset_nbr_rb / (coreset_interleaver_size_R * reg_bundle_size_L));
|
||||
coreset_C = (uint32_t) (N_regs / (coreset_interleaver_size_R * reg_bundle_size_L));
|
||||
} else {
|
||||
reg_bundle_size_L = 6;
|
||||
}
|
||||
|
||||
int B_rb = reg_bundle_size_L/coreset_time_dur; // nb of RBs occupied by each REG bundle
|
||||
int num_bundles_per_cce = 6/reg_bundle_size_L;
|
||||
int max_bundles = NR_MAX_PDCCH_AGG_LEVEL*num_bundles_per_cce;
|
||||
int f_bundle_j_list[max_bundles];
|
||||
|
||||
int f_bundle_j_list[(2*NR_MAX_PDCCH_AGG_LEVEL) - 1] = {};
|
||||
|
||||
for (int reg = 0; reg < coreset_nbr_rb; reg++) {
|
||||
if ((reg % reg_bundle_size_L) == 0) {
|
||||
// for each bundle
|
||||
for (int nb = 0; nb < max_bundles; nb++) {
|
||||
if (coreset_interleaved == 0) f_bundle_j = nb;
|
||||
else {
|
||||
if (r == coreset_interleaver_size_R) {
|
||||
r = 0;
|
||||
c++;
|
||||
}
|
||||
|
||||
bundle_j = (c * coreset_interleaver_size_R) + r;
|
||||
f_bundle_j = ((r * coreset_C) + c + n_shift) % (coreset_nbr_rb / reg_bundle_size_L);
|
||||
|
||||
if (coreset_interleaved == 0) f_bundle_j = bundle_j;
|
||||
|
||||
f_bundle_j_list[reg / 6] = f_bundle_j;
|
||||
|
||||
f_bundle_j = ((r * coreset_C) + c + n_shift) % (N_regs / reg_bundle_size_L);
|
||||
r++;
|
||||
}
|
||||
if ((reg % reg_bundle_size_L) == 0) r++;
|
||||
f_bundle_j_list[nb] = f_bundle_j;
|
||||
}
|
||||
|
||||
// Get cce_list indices by reg_idx in ascending order
|
||||
int f_bundle_j_list_id = 0;
|
||||
int f_bundle_j_list_ord[(2*NR_MAX_PDCCH_AGG_LEVEL)-1] = {};
|
||||
// Get cce_list indices by bundle index in ascending order
|
||||
int f_bundle_j_list_ord[number_of_candidates][max_bundles];
|
||||
for (int c_id = 0; c_id < number_of_candidates; c_id++ ) {
|
||||
f_bundle_j_list_id = CCE[c_id];
|
||||
for (int p = 0; p < NR_MAX_PDCCH_AGG_LEVEL; p++) {
|
||||
for (int p2 = CCE[c_id]; p2 < CCE[c_id] + L[c_id]; p2++) {
|
||||
AssertFatal(p2<2*NR_MAX_PDCCH_AGG_LEVEL,"number_of_candidates %d : p2 %d, CCE[%d] %d, L[%d] %d\n",number_of_candidates,p2,c_id,CCE[c_id],c_id,L[c_id]);
|
||||
if (f_bundle_j_list[p2] == p) {
|
||||
AssertFatal(f_bundle_j_list_id < 2*NR_MAX_PDCCH_AGG_LEVEL,"f_bundle_j_list_id %d\n",f_bundle_j_list_id);
|
||||
f_bundle_j_list_ord[f_bundle_j_list_id] = p;
|
||||
int start_bund_cand = CCE[c_id]*num_bundles_per_cce;
|
||||
int max_bund_per_cand = L[c_id]*num_bundles_per_cce;
|
||||
int f_bundle_j_list_id = 0;
|
||||
for(int nb = 0; nb < max_bundles; nb++) {
|
||||
for(int bund_cand = start_bund_cand; bund_cand < start_bund_cand+max_bund_per_cand; bund_cand++){
|
||||
if (f_bundle_j_list[bund_cand] == nb) {
|
||||
f_bundle_j_list_ord[c_id][f_bundle_j_list_id] = nb;
|
||||
f_bundle_j_list_id++;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int rb = 0;
|
||||
int rb_count = 0;
|
||||
int data_sc = 9; // 9 sub-carriers with data per PRB
|
||||
for (int c_id = 0; c_id < number_of_candidates; c_id++ ) {
|
||||
for (int symbol_idx = start_symbol; symbol_idx < start_symbol+coreset_time_dur; symbol_idx++) {
|
||||
for (int cce_count = CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur; cce_count < CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur+L[c_id]; cce_count += coreset_time_dur) {
|
||||
for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) {
|
||||
|
||||
f_reg = (f_bundle_j_list_ord[cce_count] * reg_bundle_size_L) + reg_in_cce_idx;
|
||||
index_z = 9 * rb;
|
||||
index_llr = (uint16_t) (f_reg + symbol_idx * coreset_nbr_rb) * 9;
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
z[index_z + i] = llr[index_llr + i];
|
||||
for (int cce_count = 0; cce_count < L[c_id]; cce_count ++) {
|
||||
for (int k=0; k<NR_NB_REG_PER_CCE/reg_bundle_size_L; k++) { // loop over REG bundles
|
||||
int f = f_bundle_j_list_ord[c_id][k+NR_NB_REG_PER_CCE*cce_count/reg_bundle_size_L];
|
||||
for(int rb=0; rb<B_rb; rb++) { // loop over the RBs of the bundle
|
||||
index_z = data_sc * rb_count;
|
||||
index_llr = (uint16_t) (f*B_rb + rb + symbol_idx * coreset_nbr_rb) * data_sc;
|
||||
for (int i = 0; i < data_sc; i++) {
|
||||
z[index_z + i] = llr[index_llr + i];
|
||||
#ifdef NR_PDCCH_DCI_DEBUG
|
||||
LOG_I(PHY,"[cce_count=%d,reg_in_cce_idx=%d,bundle_j=%d,symbol_idx=%d,candidate=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n",
|
||||
cce_count,reg_in_cce_idx,bundle_j,symbol_idx,c_id,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]),
|
||||
f_reg,f_bundle_j,(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i]));
|
||||
LOG_I(PHY,"[candidate=%d,symbol_idx=%d,cce=%d,REG bundle=%d,PRB=%d] z[%d]=(%d,%d) <-> \t llr[%d]=(%d,%d) \n",
|
||||
c_id,symbol_idx,cce_count,k,f*B_rb + rb,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]),
|
||||
(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i]));
|
||||
#endif
|
||||
}
|
||||
rb_count++;
|
||||
}
|
||||
rb++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -783,15 +782,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
rel15->number_of_candidates,
|
||||
rel15->CCE,
|
||||
rel15->L);
|
||||
/*
|
||||
nr_pdcch_unscrambling(rel15->rnti,
|
||||
frame_parms,
|
||||
slot,
|
||||
pdcch_vars->e_rx,
|
||||
rel15->coreset.duration*n_rb*9*2,
|
||||
// get_nCCE(n_pdcch_symbols, frame_parms, mi) * 72,
|
||||
rel15->coreset.pdcch_dmrs_scrambling_id);
|
||||
*/
|
||||
|
||||
LOG_D(PHY,"we end nr_pdcch_unscrambling()\n");
|
||||
LOG_D(PHY,"Ending nr_rx_pdcch() function\n");
|
||||
|
||||
@@ -870,6 +861,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
//int gNB_id = 0;
|
||||
int16_t tmp_e[16*108];
|
||||
rnti_t n_rnti;
|
||||
int e_rx_cand_idx = 0;
|
||||
|
||||
for (int j=0;j<rel15->number_of_candidates;j++) {
|
||||
int CCEind = rel15->CCE[j];
|
||||
@@ -892,13 +884,13 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
uint64_t dci_estimation[2]= {0};
|
||||
|
||||
LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d, length %d, format %s\n",
|
||||
j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L, dci_length,nr_dci_format_string[rel15->dci_format_options[k]]);
|
||||
j, rel15->number_of_candidates, CCEind, e_rx_cand_idx, L, dci_length,nr_dci_format_string[rel15->dci_format_options[k]]);
|
||||
|
||||
nr_pdcch_unscrambling(&pdcch_vars->e_rx[CCEind*108], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e);
|
||||
nr_pdcch_unscrambling(&pdcch_vars->e_rx[e_rx_cand_idx], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e);
|
||||
|
||||
#ifdef DEBUG_DCI_DECODING
|
||||
uint32_t * z = (uint32_t *) &pdcch_vars->e_rx[CCEind*108];
|
||||
for (int index_z = 0; index_z < 96; index_z++){
|
||||
uint32_t *z = (uint32_t *) &pdcch_vars->e_rx[e_rx_cand_idx];
|
||||
for (int index_z = 0; index_z < L*6; index_z++){
|
||||
for (int i=0; i<9; i++) {
|
||||
LOG_D(PHY,"z[%d]=(%d,%d) \n", (9*index_z + i), *(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]));
|
||||
}
|
||||
@@ -937,6 +929,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
LOG_D(PHY,"(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", proc->frame_rx, proc->nr_slot_rx, crc, n_rnti, rel15->dci_format_options[k]);
|
||||
}
|
||||
}
|
||||
e_rx_cand_idx += 9*L*6*2; //e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG and 2 uint16_t per RE)
|
||||
}
|
||||
pdcch_vars->nb_search_space = 0;
|
||||
return(dci_ind->number_of_dcis);
|
||||
|
||||
@@ -51,7 +51,7 @@ void reset_stats(FL_OBJECT *button, long arg) {
|
||||
int i,j,k;
|
||||
PHY_VARS_eNB *phy_vars_eNB = RC.eNB[0][0];
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
for (i=0; i<NUMBER_OF_DLSCH_MAX; i++) {
|
||||
for (k=0; k<8; k++) { //harq_processes
|
||||
for (j=0; j<phy_vars_eNB->dlsch[i][0]->Mlimit; j++) {
|
||||
phy_vars_eNB->UE_stats[i].dlsch_NAK[k][j]=0;
|
||||
|
||||
@@ -122,7 +122,7 @@ static inline void* malloc16_clear( size_t size )
|
||||
#include "PHY/impl_defs_top_NB_IoT.h"
|
||||
#include "PHY/impl_defs_lte_NB_IoT.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
//#include "PHY/CODING/defs.h"
|
||||
#include "PHY/CODING/defs_NB_IoT.h"
|
||||
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
@@ -452,9 +452,6 @@ typedef struct {
|
||||
int sub_frame_start;
|
||||
///
|
||||
int sub_frame_step;
|
||||
///
|
||||
unsigned long long gotIQs;
|
||||
|
||||
} UE_rxtx_proc_NB_IoT_t;
|
||||
|
||||
/// Context data structure for eNB subframe processing
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "openairinterface5g_limits.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "defs_common.h"
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "defs_common.h"
|
||||
#include "impl_defs_top.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
@@ -154,7 +154,6 @@ typedef struct {
|
||||
|
||||
int sub_frame_start;
|
||||
int sub_frame_step;
|
||||
unsigned long long gotIQs;
|
||||
} UE_rxtx_proc_t;
|
||||
|
||||
/// Context data structure for eNB subframe processing
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "assertions.h"
|
||||
|
||||
//#include <complex.h>
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "platform_types.h"
|
||||
#define MAX_NUM_RU_PER_eNB 64
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "defs_common.h"
|
||||
#include "defs_RU.h"
|
||||
#include "impl_defs_top.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
//#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
@@ -202,7 +202,7 @@ typedef struct {
|
||||
int repetition_number[4];
|
||||
} LTE_eNB_PRACH;
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
|
||||
|
||||
@@ -860,7 +860,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
/*
|
||||
time_stats_t phy_proc;
|
||||
*/
|
||||
time_stats_t *phy_proc_tx[2];
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx;
|
||||
time_stats_t rx_prach;
|
||||
/*
|
||||
@@ -977,7 +977,6 @@ typedef struct processingData_L1tx {
|
||||
uint16_t num_pdsch_slot;
|
||||
int num_dl_pdcch;
|
||||
int num_ul_pdcch;
|
||||
time_stats_t phy_proc_tx;
|
||||
} processingData_L1tx_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
#include "impl_defs_top.h"
|
||||
#include "impl_defs_nr.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
@@ -62,7 +62,6 @@ typedef struct {
|
||||
|
||||
int sub_frame_start;
|
||||
int sub_frame_step;
|
||||
unsigned long long gotIQs;
|
||||
uint8_t decoder_thread_available1;
|
||||
int dci_err_cnt;
|
||||
} UE_nr_rxtx_proc_t;
|
||||
|
||||
@@ -165,6 +165,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
notifiedFIFO_elt_t *res;
|
||||
res = pullTpool(gNB->L1_tx_free, gNB->threadPool);
|
||||
processingData_L1tx_t *msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||
const time_stats_t ts = exec_time_stats_NotifiedFIFO(res);
|
||||
merge_meas(&gNB->phy_proc_tx, &ts);
|
||||
|
||||
msgTx->num_pdsch_slot=0;
|
||||
msgTx->num_dl_pdcch=0;
|
||||
|
||||
@@ -134,8 +134,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1);
|
||||
|
||||
if (do_meas==1) start_meas(&msgTx->phy_proc_tx);
|
||||
|
||||
// clear the transmit data array and beam index for the current slot
|
||||
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
||||
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
|
||||
@@ -193,8 +191,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
||||
|
||||
if (do_meas==1) stop_meas(&msgTx->phy_proc_tx);
|
||||
}
|
||||
|
||||
void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
||||
|
||||
@@ -214,6 +214,59 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu,
|
||||
module_id_t module_id,
|
||||
int rnti) {
|
||||
|
||||
const uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr;
|
||||
dlsch0->current_harq_pid = current_harq_pid;
|
||||
dlsch0->active = 1;
|
||||
dlsch0->rnti = rnti;
|
||||
|
||||
LOG_D(PHY,"current_harq_pid = %d\n", current_harq_pid);
|
||||
|
||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch0->harq_processes[current_harq_pid];
|
||||
AssertFatal(dlsch0_harq, "no harq_process for HARQ PID %d\n", current_harq_pid);
|
||||
|
||||
dlsch0_harq->BWPStart = dlsch_config_pdu->BWPStart;
|
||||
dlsch0_harq->BWPSize = dlsch_config_pdu->BWPSize;
|
||||
dlsch0_harq->nb_rb = dlsch_config_pdu->number_rbs;
|
||||
dlsch0_harq->start_rb = dlsch_config_pdu->start_rb;
|
||||
dlsch0_harq->nb_symbols = dlsch_config_pdu->number_symbols;
|
||||
dlsch0_harq->start_symbol = dlsch_config_pdu->start_symbol;
|
||||
dlsch0_harq->dlDmrsSymbPos = dlsch_config_pdu->dlDmrsSymbPos;
|
||||
dlsch0_harq->dmrsConfigType = dlsch_config_pdu->dmrsConfigType;
|
||||
dlsch0_harq->n_dmrs_cdm_groups = dlsch_config_pdu->n_dmrs_cdm_groups;
|
||||
dlsch0_harq->dmrs_ports = dlsch_config_pdu->dmrs_ports;
|
||||
dlsch0_harq->mcs = dlsch_config_pdu->mcs;
|
||||
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
|
||||
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
|
||||
//get nrOfLayers from DCI info
|
||||
uint8_t Nl = 0;
|
||||
for (int i = 0; i < 12; i++) { // max 12 ports
|
||||
if ((dlsch_config_pdu->dmrs_ports>>i)&0x01) Nl += 1;
|
||||
}
|
||||
dlsch0_harq->Nl = Nl;
|
||||
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
|
||||
downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
||||
if (dlsch0_harq->status != ACTIVE) {
|
||||
// dlsch0_harq->status not ACTIVE due to false retransmission
|
||||
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
||||
dlsch0->active = 0;
|
||||
update_harq_status(module_id,dlsch0->current_harq_pid,dlsch0_harq->ack);
|
||||
}
|
||||
/* PTRS */
|
||||
dlsch0_harq->PTRSFreqDensity = dlsch_config_pdu->PTRSFreqDensity;
|
||||
dlsch0_harq->PTRSTimeDensity = dlsch_config_pdu->PTRSTimeDensity;
|
||||
dlsch0_harq->PTRSPortIndex = dlsch_config_pdu->PTRSPortIndex;
|
||||
dlsch0_harq->nEpreRatioOfPDSCHToPTRS = dlsch_config_pdu->nEpreRatioOfPDSCHToPTRS;
|
||||
dlsch0_harq->PTRSReOffset = dlsch_config_pdu->PTRSReOffset;
|
||||
dlsch0_harq->pduBitmap = dlsch_config_pdu->pduBitmap;
|
||||
LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\n", dlsch0->g_pucch, dlsch0_harq->mcs);
|
||||
}
|
||||
|
||||
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
bool found = false;
|
||||
@@ -221,7 +274,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
module_id_t module_id = scheduled_response->module_id;
|
||||
uint8_t cc_id = scheduled_response->CC_id, thread_id;
|
||||
uint32_t i;
|
||||
int slot = scheduled_response->slot;
|
||||
|
||||
// Note: we have to handle the thread IDs for this. To be revisited completely.
|
||||
@@ -233,89 +285,53 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
if(scheduled_response->dl_config != NULL){
|
||||
fapi_nr_dl_config_request_t *dl_config = scheduled_response->dl_config;
|
||||
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu;
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *pdcch_config;
|
||||
pdcch_vars->nb_search_space = 0;
|
||||
|
||||
for (i = 0; i < dl_config->number_pdus; ++i){
|
||||
for (int i = 0; i < dl_config->number_pdus; ++i){
|
||||
AssertFatal(dl_config->number_pdus < FAPI_NR_DL_CONFIG_LIST_NUM,"dl_config->number_pdus %d out of bounds\n",dl_config->number_pdus);
|
||||
AssertFatal(dl_config->dl_config_list[i].pdu_type<=FAPI_NR_DL_CONFIG_TYPES,"pdu_type %d > 2\n",dl_config->dl_config_list[i].pdu_type);
|
||||
LOG_D(PHY, "In %s: frame %d slot %d received 1 DL %s PDU of %d total DL PDUs:\n",
|
||||
__FUNCTION__, scheduled_response->frame, slot, dl_pdu_type[dl_config->dl_config_list[i].pdu_type - 1], dl_config->number_pdus);
|
||||
|
||||
if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_DCI) {
|
||||
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *pdcch_config = &dl_config->dl_config_list[i].dci_config_pdu.dci_config_rel15;
|
||||
memcpy((void*)&pdcch_vars->pdcch_config[pdcch_vars->nb_search_space],(void*)pdcch_config,sizeof(*pdcch_config));
|
||||
pdcch_vars->nb_search_space = pdcch_vars->nb_search_space + 1;
|
||||
pdcch_vars->sfn = scheduled_response->frame;
|
||||
pdcch_vars->slot = slot;
|
||||
LOG_D(PHY,"Number of DCI SearchSpaces %d\n",pdcch_vars->nb_search_space);
|
||||
|
||||
} else {
|
||||
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15;
|
||||
uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr;
|
||||
|
||||
if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_DLSCH){
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch[thread_id][0][0];
|
||||
}
|
||||
else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH){
|
||||
switch(dl_config->dl_config_list[i].pdu_type) {
|
||||
case FAPI_NR_DL_CONFIG_TYPE_DCI:
|
||||
pdcch_config = &dl_config->dl_config_list[i].dci_config_pdu.dci_config_rel15;
|
||||
memcpy(&pdcch_vars->pdcch_config[pdcch_vars->nb_search_space],pdcch_config,sizeof(*pdcch_config));
|
||||
pdcch_vars->nb_search_space = pdcch_vars->nb_search_space + 1;
|
||||
pdcch_vars->sfn = scheduled_response->frame;
|
||||
pdcch_vars->slot = slot;
|
||||
LOG_D(PHY,"Number of DCI SearchSpaces %d\n",pdcch_vars->nb_search_space);
|
||||
break;
|
||||
case FAPI_NR_DL_CONFIG_TYPE_CSI_IM:
|
||||
LOG_I(PHY,"Received CSI-IM PDU at FAPI\n");
|
||||
break;
|
||||
case FAPI_NR_DL_CONFIG_TYPE_CSI_RS:
|
||||
LOG_I(PHY,"Received CSI-RS PDU at FAPI\n");
|
||||
break;
|
||||
case FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH:
|
||||
dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15;
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_ra[0];
|
||||
dlsch0->rnti_type = _RA_RNTI_;
|
||||
dlsch0->harq_processes[current_harq_pid]->status = ACTIVE;
|
||||
}
|
||||
else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH){
|
||||
dlsch0->harq_processes[dlsch_config_pdu->harq_process_nbr]->status = ACTIVE;
|
||||
configure_dlsch(dlsch0, dlsch_config_pdu, module_id,
|
||||
dl_config->dl_config_list[i].dlsch_config_pdu.rnti);
|
||||
break;
|
||||
case FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH:
|
||||
dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15;
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_SI[0];
|
||||
dlsch0->rnti_type = _SI_RNTI_;
|
||||
dlsch0->harq_processes[current_harq_pid]->status = ACTIVE;
|
||||
}
|
||||
|
||||
dlsch0->current_harq_pid = current_harq_pid;
|
||||
dlsch0->active = 1;
|
||||
dlsch0->rnti = dl_config->dl_config_list[i].dlsch_config_pdu.rnti;
|
||||
|
||||
LOG_D(PHY,"slot %d current_harq_pid = %d\n",slot, current_harq_pid);
|
||||
|
||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch0->harq_processes[current_harq_pid];
|
||||
if (dlsch0_harq){
|
||||
|
||||
dlsch0_harq->BWPStart = dlsch_config_pdu->BWPStart;
|
||||
dlsch0_harq->BWPSize = dlsch_config_pdu->BWPSize;
|
||||
dlsch0_harq->nb_rb = dlsch_config_pdu->number_rbs;
|
||||
dlsch0_harq->start_rb = dlsch_config_pdu->start_rb;
|
||||
dlsch0_harq->nb_symbols = dlsch_config_pdu->number_symbols;
|
||||
dlsch0_harq->start_symbol = dlsch_config_pdu->start_symbol;
|
||||
dlsch0_harq->dlDmrsSymbPos = dlsch_config_pdu->dlDmrsSymbPos;
|
||||
dlsch0_harq->dmrsConfigType = dlsch_config_pdu->dmrsConfigType;
|
||||
dlsch0_harq->n_dmrs_cdm_groups = dlsch_config_pdu->n_dmrs_cdm_groups;
|
||||
dlsch0_harq->dmrs_ports = dlsch_config_pdu->dmrs_ports;
|
||||
dlsch0_harq->mcs = dlsch_config_pdu->mcs;
|
||||
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
|
||||
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
|
||||
//get nrOfLayers from DCI info
|
||||
uint8_t Nl = 0;
|
||||
for (i = 0; i < 12; i++) { // max 12 ports
|
||||
if ((dlsch_config_pdu->dmrs_ports>>i)&0x01) Nl += 1;
|
||||
}
|
||||
dlsch0_harq->Nl = Nl;
|
||||
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
|
||||
downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
||||
if (dlsch0_harq->status != ACTIVE) {
|
||||
// dlsch0_harq->status not ACTIVE due to false retransmission
|
||||
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
||||
dlsch0->active = 0;
|
||||
update_harq_status(module_id,dlsch0->current_harq_pid,dlsch0_harq->ack);
|
||||
}
|
||||
/* PTRS */
|
||||
dlsch0_harq->PTRSFreqDensity = dlsch_config_pdu->PTRSFreqDensity;
|
||||
dlsch0_harq->PTRSTimeDensity = dlsch_config_pdu->PTRSTimeDensity;
|
||||
dlsch0_harq->PTRSPortIndex = dlsch_config_pdu->PTRSPortIndex;
|
||||
dlsch0_harq->nEpreRatioOfPDSCHToPTRS = dlsch_config_pdu->nEpreRatioOfPDSCHToPTRS;
|
||||
dlsch0_harq->PTRSReOffset = dlsch_config_pdu->PTRSReOffset;
|
||||
dlsch0_harq->pduBitmap = dlsch_config_pdu->pduBitmap;
|
||||
LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\n",
|
||||
dlsch0->g_pucch, dlsch0_harq->mcs);
|
||||
}
|
||||
dlsch0->harq_processes[dlsch_config_pdu->harq_process_nbr]->status = ACTIVE;
|
||||
configure_dlsch(dlsch0, dlsch_config_pdu, module_id,
|
||||
dl_config->dl_config_list[i].dlsch_config_pdu.rnti);
|
||||
break;
|
||||
case FAPI_NR_DL_CONFIG_TYPE_DLSCH:
|
||||
dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15;
|
||||
dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch[thread_id][0][0];
|
||||
configure_dlsch(dlsch0, dlsch_config_pdu, module_id,
|
||||
dl_config->dl_config_list[i].dlsch_config_pdu.rnti);
|
||||
break;
|
||||
}
|
||||
}
|
||||
dl_config->number_pdus = 0;
|
||||
@@ -326,9 +342,9 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config;
|
||||
int pdu_done = 0;
|
||||
pthread_mutex_lock(&ul_config->mutex_ul_config);
|
||||
LOG_D(PHY, "%d.%d ul S ul_config %p pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_done, ul_config->number_pdus);
|
||||
|
||||
for (i = 0; i < ul_config->number_pdus; ++i){
|
||||
LOG_D(PHY, "%d.%d ul S ul_config %p pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_done, ul_config->number_pdus);
|
||||
for (int i = 0; i < ul_config->number_pdus; ++i){
|
||||
|
||||
AssertFatal(ul_config->ul_config_list[i].pdu_type <= FAPI_NR_UL_CONFIG_TYPES,"pdu_type %d out of bounds\n",ul_config->ul_config_list[i].pdu_type);
|
||||
LOG_D(PHY, "In %s i %d: processing %s PDU of %d total UL PDUs (ul_config %p) \n", __FUNCTION__, i, ul_pdu_type[ul_config->ul_config_list[i].pdu_type - 1], ul_config->number_pdus, ul_config);
|
||||
|
||||
@@ -579,6 +579,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
get_dmrs_port(aatx,dlsch0_harq->dmrs_ports),
|
||||
m,
|
||||
BWPStart,
|
||||
dlsch0_harq->dmrsConfigType,
|
||||
ue->frame_parms.first_carrier_offset+(BWPStart + pdsch_start_rb)*12,
|
||||
pdsch_nb_rb);
|
||||
#if 0
|
||||
@@ -613,7 +614,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
dual_stream_UE = 0;
|
||||
gNB_id_i = gNB_id+1;
|
||||
i_mod = 0;
|
||||
if (( m==first_symbol_with_data ) && (m<4))
|
||||
if (m==first_symbol_with_data)
|
||||
first_symbol_flag = 1;
|
||||
else
|
||||
first_symbol_flag = 0;
|
||||
|
||||
@@ -129,7 +129,6 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
|
||||
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
|
||||
if (frame_parms->Ncp == 1)
|
||||
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
|
||||
&txdata[aa][slot_offset], // output
|
||||
|
||||
@@ -112,7 +112,6 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
|
||||
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
|
||||
|
||||
if (frame_parms->Ncp == 1)
|
||||
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
|
||||
|
||||
@@ -333,7 +333,6 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
|
||||
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
|
||||
|
||||
if (frame_parms->Ncp == 1)
|
||||
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
|
||||
|
||||
@@ -121,7 +121,6 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
|
||||
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
|
||||
if (frame_parms->Ncp == 1)
|
||||
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
|
||||
&txdata[aa][slot_offset], // output
|
||||
|
||||
@@ -441,7 +441,7 @@ int main(int argc, char **argv)
|
||||
|
||||
FILE *scg_fd=NULL;
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:m:w:T:U:qX:")) != -1) {
|
||||
while ((c = getopt (argc, argv, "f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:q:m:w:T:U:X:")) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
scg_fd = fopen(optarg,"r");
|
||||
@@ -607,16 +607,17 @@ int main(int argc, char **argv)
|
||||
case 'b':
|
||||
g_rbSize = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
dlsch_threads = atoi(optarg);
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
g_mcsIndex = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
g_mcsTableIdx = 1;
|
||||
get_softmodem_params()->use_256qam_table = 1;
|
||||
g_mcsTableIdx = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@@ -680,7 +681,7 @@ int main(int argc, char **argv)
|
||||
printf("-c Start symbol for PDSCH (fixed for now)\n");
|
||||
printf("-j Number of symbols for PDSCH (fixed for now)\n");
|
||||
printf("-e MSC index\n");
|
||||
printf("-q Use 2nd MCS table (256 QAM table) for PDSCH\n");
|
||||
printf("-q MCS Table index\n");
|
||||
printf("-t Acceptable effective throughput (in percentage)\n");
|
||||
printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n");
|
||||
printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1 \n");
|
||||
@@ -781,10 +782,14 @@ int main(int argc, char **argv)
|
||||
fill_scc_sim(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
|
||||
ssb_bitmap = 1;// Enable only first SSB with index ssb_indx=0
|
||||
fix_scc(scc,ssb_bitmap);
|
||||
|
||||
prepare_scd(scd);
|
||||
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, n_rx, 6, 0, 0, 0);
|
||||
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
||||
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||
N_RB_DL,g_mcsTableIdx);
|
||||
|
||||
// TODO do a UECAP for phy-sim
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, n_tx, n_rx, 6, 0, 0, 0);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
fix_scd(scd);
|
||||
@@ -1013,8 +1018,6 @@ int main(int argc, char **argv)
|
||||
msgDataTx->slot = slot;
|
||||
msgDataTx->frame = frame;
|
||||
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
|
||||
reset_meas(&msgDataTx->phy_proc_tx);
|
||||
gNB->phy_proc_tx[0] = &msgDataTx->phy_proc_tx;
|
||||
|
||||
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
||||
|
||||
@@ -1328,7 +1331,7 @@ int main(int argc, char **argv)
|
||||
printf("\ngNB TX function statistics (per %d us slot, NPRB %d, mcs %d, block %d)\n",
|
||||
1000>>*scc->ssbSubcarrierSpacing, g_rbSize, g_mcsIndex,
|
||||
msgDataTx->dlsch[0][0]->harq_process.pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3);
|
||||
printDistribution(gNB->phy_proc_tx[0],table_tx,"PHY proc tx");
|
||||
printDistribution(&gNB->phy_proc_tx,table_tx,"PHY proc tx");
|
||||
printStatIndent2(&gNB->dlsch_encoding_stats,"DLSCH encoding time");
|
||||
printStatIndent3(&gNB->dlsch_segmentation_stats,"DLSCH segmentation time");
|
||||
printStatIndent3(&gNB->tinput,"DLSCH LDPC input processing time");
|
||||
|
||||
@@ -685,7 +685,6 @@ int main(int argc, char **argv)
|
||||
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t),0,gNB->L1_tx_free,NULL);
|
||||
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
|
||||
msgDataTx->slot = -1;
|
||||
gNB->phy_proc_tx[0] = &msgDataTx->phy_proc_tx;
|
||||
//gNB_config = &gNB->gNB_config;
|
||||
|
||||
//memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO));
|
||||
@@ -727,7 +726,8 @@ int main(int argc, char **argv)
|
||||
|
||||
prepare_scd(scd);
|
||||
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, n_rx, 0, 0, 0, 0);
|
||||
// TODO do a UECAP for phy-sim
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, n_tx, n_rx, 0, 0, 0, 0);
|
||||
|
||||
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
#include "UTIL/FIFO/types.h"
|
||||
|
||||
#define RF
|
||||
|
||||
|
||||
@@ -353,9 +353,18 @@ typedef struct pdusession_tobeswitched_s {
|
||||
uint32_t gtp_teid;
|
||||
} pdusession_tobeswitched_t;
|
||||
|
||||
typedef struct qos_flow_tobe_modified_s {
|
||||
uint8_t qfi; // 0~63
|
||||
} qos_flow_tobe_modified_t;
|
||||
|
||||
typedef struct pdusession_modify_s {
|
||||
/* Unique pdusession_id for the UE. */
|
||||
uint8_t pdusession_id;
|
||||
|
||||
uint8_t nb_of_qos_flow;
|
||||
|
||||
// qos_flow_add_or_modify
|
||||
qos_flow_tobe_modified_t qos[QOSFLOW_MAX_VALUE];
|
||||
} pdusession_modify_t;
|
||||
|
||||
typedef enum ngap_Cause_e {
|
||||
@@ -821,7 +830,7 @@ typedef struct ngap_pdusession_modify_req_s {
|
||||
/* Number of pdusession to be modify in the list */
|
||||
uint8_t nb_pdusessions_tomodify;
|
||||
|
||||
/* E RAB modify request */
|
||||
/* pdu session modify request */
|
||||
pdusession_t pdusession_modify_params[NGAP_MAX_PDUSESSION];
|
||||
} ngap_pdusession_modify_req_t;
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
|
||||
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t
|
||||
#include "PHY/LTE_TRANSPORT/transport_common.h"
|
||||
|
||||
@@ -316,21 +316,21 @@ void get_info_from_tda_tables(int default_abc,
|
||||
int tda,
|
||||
int dmrs_TypeA_Position,
|
||||
int normal_CP,
|
||||
bool *is_mapping_typeA,
|
||||
int *startSymbolIndex,
|
||||
int *nrOfSymbols) {
|
||||
int k0 = 0;
|
||||
int is_mapping_typeA = 1;
|
||||
switch(default_abc){
|
||||
case 1:
|
||||
if (normal_CP){
|
||||
if (dmrs_TypeA_Position){
|
||||
is_mapping_typeA = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[tda][0];
|
||||
k0 = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[tda][3];
|
||||
}
|
||||
else{
|
||||
is_mapping_typeA = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[tda][0];
|
||||
k0 = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[tda][3];
|
||||
@@ -338,13 +338,13 @@ void get_info_from_tda_tables(int default_abc,
|
||||
}
|
||||
else{
|
||||
if (dmrs_TypeA_Position){
|
||||
is_mapping_typeA = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[tda][0];
|
||||
k0 = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[tda][3];
|
||||
}
|
||||
else{
|
||||
is_mapping_typeA = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[tda][0];
|
||||
k0 = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[tda][3];
|
||||
@@ -353,13 +353,13 @@ void get_info_from_tda_tables(int default_abc,
|
||||
break;
|
||||
case 2:
|
||||
if (dmrs_TypeA_Position){
|
||||
is_mapping_typeA = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[tda][0];
|
||||
k0 = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[tda][3];
|
||||
}
|
||||
else{
|
||||
is_mapping_typeA = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[tda][0];
|
||||
k0 = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[tda][3];
|
||||
@@ -367,13 +367,13 @@ void get_info_from_tda_tables(int default_abc,
|
||||
break;
|
||||
case 3:
|
||||
if (dmrs_TypeA_Position){
|
||||
is_mapping_typeA = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[tda][0];
|
||||
k0 = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[tda][3];
|
||||
}
|
||||
else{
|
||||
is_mapping_typeA = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[tda][0];
|
||||
*is_mapping_typeA = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[tda][0];
|
||||
k0 = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[tda][1];
|
||||
*startSymbolIndex = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[tda][2];
|
||||
*nrOfSymbols = table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[tda][3];
|
||||
@@ -383,7 +383,6 @@ void get_info_from_tda_tables(int default_abc,
|
||||
AssertFatal(1==0,"Invalid default time domaing allocation type\n");
|
||||
}
|
||||
AssertFatal(k0==0,"Only k0 = 0 is supported\n");
|
||||
AssertFatal(is_mapping_typeA==1,"Only mapping type A is currently supported\n");
|
||||
}
|
||||
|
||||
const char *prachfmt[]={"0","1","2","3", "A1","A2","A3","B1","B4","C0","C2","A1/B1","A2/B2","A3/B3"};
|
||||
@@ -2745,6 +2744,7 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
|
||||
LOG_D(NR_MAC,"DAI1 nbits %d\n",dci_pdu->dai[0].nbits);
|
||||
// 2nd DAI
|
||||
if (cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup &&
|
||||
cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup->codeBlockGroupTransmission != NULL) { //TODO not sure about that
|
||||
dci_pdu->dai[1].nbits = 2;
|
||||
size += dci_pdu->dai[1].nbits;
|
||||
@@ -3018,7 +3018,8 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
|
||||
dci_pdu->srs_request.nbits = 3;
|
||||
size += dci_pdu->srs_request.nbits;
|
||||
// CBGTI
|
||||
if (cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig&&
|
||||
if (cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup &&
|
||||
cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup->codeBlockGroupTransmission != NULL) {
|
||||
uint8_t maxCBGperTB = (cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup->codeBlockGroupTransmission->choice.setup->maxCodeBlockGroupsPerTransportBlock + 1) * 2;
|
||||
long *maxCWperDCI_rrc = pdsch_Config->maxNrofCodeWordsScheduledByDCI;
|
||||
@@ -3363,65 +3364,65 @@ uint16_t get_ssb_start_symbol(const long band, NR_SubcarrierSpacing_t scs, int i
|
||||
|
||||
|
||||
void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
|
||||
NR_NZP_CSI_RS_Resource_t *nzpcsi,
|
||||
struct NR_CSI_ResourcePeriodicityAndOffset *periodicityAndOffset,
|
||||
int *period, int *offset) {
|
||||
|
||||
if(nzpcsi != NULL) {
|
||||
if(periodicityAndOffset != NULL) {
|
||||
|
||||
NR_CSI_ResourcePeriodicityAndOffset_PR p_and_o = nzpcsi->periodicityAndOffset->present;
|
||||
NR_CSI_ResourcePeriodicityAndOffset_PR p_and_o = periodicityAndOffset->present;
|
||||
|
||||
switch(p_and_o){
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots4:
|
||||
*period = 4;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots4;
|
||||
*offset = periodicityAndOffset->choice.slots4;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots5:
|
||||
*period = 5;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots5;
|
||||
*offset = periodicityAndOffset->choice.slots5;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots8:
|
||||
*period = 8;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots8;
|
||||
*offset = periodicityAndOffset->choice.slots8;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots10:
|
||||
*period = 10;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots10;
|
||||
*offset = periodicityAndOffset->choice.slots10;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots16:
|
||||
*period = 16;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots16;
|
||||
*offset = periodicityAndOffset->choice.slots16;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots20:
|
||||
*period = 20;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots20;
|
||||
*offset = periodicityAndOffset->choice.slots20;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots32:
|
||||
*period = 32;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots32;
|
||||
*offset = periodicityAndOffset->choice.slots32;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots40:
|
||||
*period = 40;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots40;
|
||||
*offset = periodicityAndOffset->choice.slots40;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots64:
|
||||
*period = 64;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots64;
|
||||
*offset = periodicityAndOffset->choice.slots64;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots80:
|
||||
*period = 80;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots80;
|
||||
*offset = periodicityAndOffset->choice.slots80;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots160:
|
||||
*period = 160;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots160;
|
||||
*offset = periodicityAndOffset->choice.slots160;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots320:
|
||||
*period = 320;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots320;
|
||||
*offset = periodicityAndOffset->choice.slots320;
|
||||
break;
|
||||
case NR_CSI_ResourcePeriodicityAndOffset_PR_slots640:
|
||||
*period = 640;
|
||||
*offset = nzpcsi->periodicityAndOffset->choice.slots640;
|
||||
*offset = periodicityAndOffset->choice.slots640;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"No periodicity and offset found in CSI resource");
|
||||
|
||||
@@ -140,6 +140,7 @@ void get_info_from_tda_tables(int default_abc,
|
||||
int tda,
|
||||
int dmrs_TypeA_Position,
|
||||
int normal_CP,
|
||||
bool *is_mapping_typeA,
|
||||
int *startSymbolIndex,
|
||||
int *nrOfSymbols);
|
||||
|
||||
@@ -164,7 +165,7 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH);
|
||||
void find_period_offest_SR (NR_SchedulingRequestResourceConfig_t *SchedulingReqRec, int *period, int *offset);
|
||||
|
||||
void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
|
||||
NR_NZP_CSI_RS_Resource_t *nzpcsi,
|
||||
struct NR_CSI_ResourcePeriodicityAndOffset *periodicityAndOffset,
|
||||
int *period, int *offset);
|
||||
|
||||
void reverse_n_bits(uint8_t *value, uint16_t bitlen);
|
||||
|
||||
@@ -214,6 +214,7 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
uint8_t nr_get_csi_payload(NR_UE_MAC_INST_t *mac,
|
||||
PUCCH_sched_t *pucch,
|
||||
int csi_report_id,
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig);
|
||||
|
||||
uint8_t get_rsrp_index(int rsrp);
|
||||
@@ -271,6 +272,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList,
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu,
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu,
|
||||
int *mappingtype,
|
||||
uint8_t time_domain_ind,
|
||||
int default_abc,
|
||||
bool use_default);
|
||||
@@ -350,6 +352,8 @@ and fills the PRACH PDU per each FD occasion.
|
||||
*/
|
||||
void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, int thread_id);
|
||||
void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, int thread_id);
|
||||
void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot);
|
||||
void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot);
|
||||
|
||||
/* \brief This function schedules the Msg3 transmission
|
||||
@param
|
||||
|
||||
@@ -470,6 +470,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList,
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu,
|
||||
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu,
|
||||
int *mapping_type,
|
||||
uint8_t time_domain_ind,
|
||||
int default_abc,
|
||||
bool use_default){
|
||||
@@ -547,13 +548,15 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac,
|
||||
}
|
||||
else {// Default configuration from tables
|
||||
|
||||
bool is_typeA;
|
||||
get_info_from_tda_tables(default_abc,
|
||||
time_domain_ind,
|
||||
dmrs_typeA_pos,
|
||||
1, // normal CP
|
||||
&is_typeA,
|
||||
&sliv_S,
|
||||
&sliv_L);
|
||||
|
||||
*mapping_type = is_typeA? typeA : typeB;
|
||||
dlsch_config_pdu->number_symbols = sliv_L;
|
||||
dlsch_config_pdu->start_symbol = sliv_S;
|
||||
}
|
||||
@@ -859,12 +862,17 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
else if (mac->scc_SIB && mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup)
|
||||
pdsch_TimeDomainAllocationList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
|
||||
|
||||
int mappingtype;
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,pdsch_TimeDomainAllocationList,NULL,dlsch_config_pdu_1_0,dci->time_domain_assignment.val,default_abc,rnti==SI_RNTI) < 0) {
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,pdsch_TimeDomainAllocationList,
|
||||
NULL,dlsch_config_pdu_1_0,&mappingtype,
|
||||
dci->time_domain_assignment.val,
|
||||
default_abc,rnti==SI_RNTI) < 0) {
|
||||
LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
int mappingtype = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType : ((dlsch_config_pdu_1_0->start_symbol <= 3)? typeA: typeB);
|
||||
if(pdsch_TimeDomainAllocationList && rnti!=SI_RNTI)
|
||||
mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType;
|
||||
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
@@ -1056,13 +1064,16 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
return -1;
|
||||
}
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
int mappingtype;
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = choose_dl_tda_list(pdsch_Config,bwpc->pdsch_ConfigCommon->choice.setup);
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,pdsch_TimeDomainAllocationList,NULL,dlsch_config_pdu_1_1,dci->time_domain_assignment.val,0,false) < 0) {
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,pdsch_TimeDomainAllocationList,
|
||||
NULL,dlsch_config_pdu_1_1,&mappingtype,
|
||||
dci->time_domain_assignment.val,0,false) < 0) {
|
||||
LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mappingtype = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType : ((dlsch_config_pdu_1_1->start_symbol <= 3)? typeA: typeB);
|
||||
if(pdsch_TimeDomainAllocationList)
|
||||
mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType;
|
||||
|
||||
dlsch_config_pdu_1_1->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2;
|
||||
|
||||
@@ -2392,7 +2403,7 @@ uint8_t nr_get_csi_measurements(NR_UE_MAC_INST_t *mac,
|
||||
"CSI resource not found among PUCCH resources\n");
|
||||
|
||||
pucch->resource_indicator = found;
|
||||
csi_bits = nr_get_csi_payload(mac, pucch, csi_measconfig);
|
||||
csi_bits += nr_get_csi_payload(mac, pucch, csi_report_id, csi_measconfig);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2406,31 +2417,30 @@ uint8_t nr_get_csi_measurements(NR_UE_MAC_INST_t *mac,
|
||||
|
||||
uint8_t nr_get_csi_payload(NR_UE_MAC_INST_t *mac,
|
||||
PUCCH_sched_t *pucch,
|
||||
int csi_report_id,
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig) {
|
||||
|
||||
int n_csi_bits = 0;
|
||||
|
||||
AssertFatal(csi_MeasConfig->csi_ReportConfigToAddModList->list.count>0,"No CSI Report configuration available\n");
|
||||
|
||||
for (int csi_report_id=0; csi_report_id < csi_MeasConfig->csi_ReportConfigToAddModList->list.count; csi_report_id++){
|
||||
struct NR_CSI_ReportConfig *csi_reportconfig = csi_MeasConfig->csi_ReportConfigToAddModList->list.array[csi_report_id];
|
||||
NR_CSI_ResourceConfigId_t csi_ResourceConfigId = csi_reportconfig->resourcesForChannelMeasurement;
|
||||
switch(csi_reportconfig->reportQuantity.present) {
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_none:
|
||||
break;
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP:
|
||||
n_csi_bits += get_ssb_rsrp_payload(mac,pucch,csi_reportconfig,csi_ResourceConfigId,csi_MeasConfig);
|
||||
break;
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_LI_PMI_CQI:
|
||||
AssertFatal(1==0,"Measurement report based on CSI-RS not availalble\n");
|
||||
default:
|
||||
AssertFatal(1==0,"Invalid CSI report quantity type %d\n",csi_reportconfig->reportQuantity.present);
|
||||
}
|
||||
struct NR_CSI_ReportConfig *csi_reportconfig = csi_MeasConfig->csi_ReportConfigToAddModList->list.array[csi_report_id];
|
||||
NR_CSI_ResourceConfigId_t csi_ResourceConfigId = csi_reportconfig->resourcesForChannelMeasurement;
|
||||
switch(csi_reportconfig->reportQuantity.present) {
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_none:
|
||||
break;
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP:
|
||||
n_csi_bits = get_ssb_rsrp_payload(mac,pucch,csi_reportconfig,csi_ResourceConfigId,csi_MeasConfig);
|
||||
break;
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI:
|
||||
case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_LI_PMI_CQI:
|
||||
AssertFatal(1==0,"Measurement report based on CSI-RS not availalble\n");
|
||||
default:
|
||||
AssertFatal(1==0,"Invalid CSI report quantity type %d\n",csi_reportconfig->reportQuantity.present);
|
||||
}
|
||||
return (n_csi_bits);
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
return -1;
|
||||
}
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac, pusch_TimeDomainAllocationList, NULL, pusch_config_pdu, NULL, dci->time_domain_assignment.val,0,false) < 0) {
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac, pusch_TimeDomainAllocationList, NULL, pusch_config_pdu, NULL, NULL, dci->time_domain_assignment.val,0,false) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1051,6 +1051,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
nr_dcireq_t dcireq;
|
||||
|
||||
if(mac->cg != NULL){ // we have a cg
|
||||
|
||||
nr_schedule_csirs_reception(mac, rx_frame, rx_slot);
|
||||
nr_schedule_csi_for_im(mac, rx_frame, rx_slot);
|
||||
|
||||
dcireq.module_id = mod_id;
|
||||
dcireq.gNB_index = gNB_index;
|
||||
dcireq.cc_id = cc_id;
|
||||
@@ -2314,7 +2318,6 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
|
||||
return;
|
||||
|
||||
if (N_UCI > 0) {
|
||||
|
||||
LOG_D(NR_MAC,"%d.%d configure pucch, O_SR %d, O_ACK %d, O_CSI %d\n",frameP,slotP,O_SR,O_ACK,O_CSI);
|
||||
pucch->resource_set_id = find_pucch_resource_set(mac, O_ACK + O_CSI);
|
||||
select_pucch_resource(mac, pucch);
|
||||
@@ -2338,9 +2341,206 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
|
||||
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL)
|
||||
mac->if_module->scheduled_response(&scheduled_response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot) {
|
||||
|
||||
if (mac->ra.ra_state != RA_SUCCEEDED && get_softmodem_params()->phy_test == 0)
|
||||
return;
|
||||
|
||||
NR_CellGroupConfig_t *CellGroup = mac->cg;
|
||||
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig)
|
||||
return;
|
||||
|
||||
NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
|
||||
if (csi_measconfig->csi_IM_ResourceToAddModList == NULL)
|
||||
return;
|
||||
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
NR_CSI_IM_Resource_t *imcsi;
|
||||
int period, offset;
|
||||
NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id;
|
||||
int mu = mac->DLbwp[dl_bwp_id-1] ?
|
||||
mac->DLbwp[dl_bwp_id-1]->bwp_Common->genericParameters.subcarrierSpacing :
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.subcarrierSpacing;
|
||||
|
||||
for (int id = 0; id < csi_measconfig->csi_IM_ResourceToAddModList->list.count; id++){
|
||||
imcsi = csi_measconfig->csi_IM_ResourceToAddModList->list.array[id];
|
||||
csi_period_offset(NULL,imcsi->periodicityAndOffset,&period,&offset);
|
||||
if((frame*nr_slots_per_frame[mu]+slot-offset)%period != 0)
|
||||
continue;
|
||||
fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].csiim_config_pdu.csiim_config_rel15;
|
||||
const NR_BWP_Downlink_t *dlbwp = mac->DLbwp[dl_bwp_id-1];
|
||||
const int locationAndBandwidth = dlbwp != NULL ? dlbwp->bwp_Common->genericParameters.locationAndBandwidth:
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth;
|
||||
csiim_config_pdu->bwp_size = NRRIV2BW(locationAndBandwidth, MAX_BWP_SIZE);
|
||||
csiim_config_pdu->bwp_start = NRRIV2PRBOFFSET(locationAndBandwidth, MAX_BWP_SIZE);
|
||||
csiim_config_pdu->subcarrier_spacing = mu;
|
||||
csiim_config_pdu->start_rb = imcsi->freqBand->startingRB;
|
||||
csiim_config_pdu->nr_of_rbs = imcsi->freqBand->nrofRBs;
|
||||
// As specified in 5.2.2.4 of 38.214
|
||||
switch (imcsi->csi_IM_ResourceElementPattern->present) {
|
||||
case NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern0:
|
||||
for (int i = 0; i<4; i++) {
|
||||
csiim_config_pdu->k_csiim[i] = (imcsi->csi_IM_ResourceElementPattern->choice.pattern0->subcarrierLocation_p0<<1) + (i>>1);
|
||||
csiim_config_pdu->l_csiim[i] = imcsi->csi_IM_ResourceElementPattern->choice.pattern0->symbolLocation_p0 + (i%2);
|
||||
}
|
||||
break;
|
||||
case NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern1:
|
||||
for (int i = 0; i<4; i++) {
|
||||
csiim_config_pdu->k_csiim[i] = (imcsi->csi_IM_ResourceElementPattern->choice.pattern1->subcarrierLocation_p1<<2) + i;
|
||||
csiim_config_pdu->l_csiim[i] = imcsi->csi_IM_ResourceElementPattern->choice.pattern1->symbolLocation_p1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0, "Invalid CSI-IM pattern\n");
|
||||
}
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_CSI_IM;
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
}
|
||||
}
|
||||
|
||||
void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
|
||||
|
||||
if (mac->ra.ra_state != RA_SUCCEEDED && get_softmodem_params()->phy_test == 0)
|
||||
return;
|
||||
|
||||
NR_CellGroupConfig_t *CellGroup = mac->cg;
|
||||
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig)
|
||||
return;
|
||||
|
||||
NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
|
||||
if (csi_measconfig->nzp_CSI_RS_ResourceToAddModList == NULL)
|
||||
return;
|
||||
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
NR_NZP_CSI_RS_Resource_t *nzpcsi;
|
||||
int period, offset;
|
||||
NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id;
|
||||
int mu = mac->DLbwp[dl_bwp_id-1] ?
|
||||
mac->DLbwp[dl_bwp_id-1]->bwp_Common->genericParameters.subcarrierSpacing :
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.subcarrierSpacing;
|
||||
|
||||
for (int id = 0; id < csi_measconfig->nzp_CSI_RS_ResourceToAddModList->list.count; id++){
|
||||
nzpcsi = csi_measconfig->nzp_CSI_RS_ResourceToAddModList->list.array[id];
|
||||
csi_period_offset(NULL,nzpcsi->periodicityAndOffset,&period,&offset);
|
||||
if((frame*nr_slots_per_frame[mu]+slot-offset)%period != 0)
|
||||
continue;
|
||||
LOG_D(MAC,"Scheduling reception of CSI-RS in frame %d slot %d\n",frame,slot);
|
||||
fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].csirs_config_pdu.csirs_config_rel15;
|
||||
|
||||
NR_CSI_RS_ResourceMapping_t resourceMapping = nzpcsi->resourceMapping;
|
||||
|
||||
const NR_BWP_Downlink_t *dlbwp = mac->DLbwp[dl_bwp_id-1];
|
||||
const int locationAndBandwidth = dlbwp != NULL ? dlbwp->bwp_Common->genericParameters.locationAndBandwidth:
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth;
|
||||
csirs_config_pdu->bwp_size = NRRIV2BW(locationAndBandwidth, MAX_BWP_SIZE);
|
||||
csirs_config_pdu->bwp_start = NRRIV2PRBOFFSET(locationAndBandwidth, MAX_BWP_SIZE);
|
||||
csirs_config_pdu->subcarrier_spacing = mu;
|
||||
csirs_config_pdu->start_rb = resourceMapping.freqBand.startingRB;
|
||||
csirs_config_pdu->nr_of_rbs = resourceMapping.freqBand.nrofRBs;
|
||||
csirs_config_pdu->csi_type = 1; // NZP-CSI-RS
|
||||
csirs_config_pdu->symb_l0 = resourceMapping.firstOFDMSymbolInTimeDomain;
|
||||
if (resourceMapping.firstOFDMSymbolInTimeDomain2)
|
||||
csirs_config_pdu->symb_l1 = *resourceMapping.firstOFDMSymbolInTimeDomain2;
|
||||
csirs_config_pdu->cdm_type = resourceMapping.cdm_Type;
|
||||
csirs_config_pdu->freq_density = resourceMapping.density.present;
|
||||
if ((resourceMapping.density.present == NR_CSI_RS_ResourceMapping__density_PR_dot5)
|
||||
&& (resourceMapping.density.choice.dot5 == NR_CSI_RS_ResourceMapping__density__dot5_evenPRBs))
|
||||
csirs_config_pdu->freq_density--;
|
||||
csirs_config_pdu->scramb_id = nzpcsi->scramblingID;
|
||||
switch(resourceMapping.frequencyDomainAllocation.present){
|
||||
case NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1:
|
||||
csirs_config_pdu->row = 1;
|
||||
csirs_config_pdu->freq_domain = ((resourceMapping.frequencyDomainAllocation.choice.row1.buf[0])>>4)&0x0f;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row2:
|
||||
csirs_config_pdu->row = 2;
|
||||
csirs_config_pdu->freq_domain = (((resourceMapping.frequencyDomainAllocation.choice.row2.buf[1]>>4)&0x0f) |
|
||||
((resourceMapping.frequencyDomainAllocation.choice.row2.buf[0]<<4)&0xff0));
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row4:
|
||||
csirs_config_pdu->row = 4;
|
||||
csirs_config_pdu->freq_domain = ((resourceMapping.frequencyDomainAllocation.choice.row4.buf[0])>>5)&0x07;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other:
|
||||
csirs_config_pdu->freq_domain = ((resourceMapping.frequencyDomainAllocation.choice.other.buf[0])>>2)&0x3f;
|
||||
// determining the row of table 7.4.1.5.3-1 in 38.211
|
||||
switch(resourceMapping.nrofPorts){
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p1:
|
||||
AssertFatal(1==0,"Resource with 1 CSI port shouldn't be within other rows\n");
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p2:
|
||||
csirs_config_pdu->row = 3;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p4:
|
||||
csirs_config_pdu->row = 5;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p8:
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2)
|
||||
csirs_config_pdu->row = 8;
|
||||
else{
|
||||
int num_k = 0;
|
||||
for (int k=0; k<6; k++)
|
||||
num_k+=(((csirs_config_pdu->freq_domain)>>k)&0x01);
|
||||
if(num_k==4)
|
||||
csirs_config_pdu->row = 6;
|
||||
else
|
||||
csirs_config_pdu->row = 7;
|
||||
}
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p12:
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2)
|
||||
csirs_config_pdu->row = 10;
|
||||
else
|
||||
csirs_config_pdu->row = 9;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p16:
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2)
|
||||
csirs_config_pdu->row = 12;
|
||||
else
|
||||
csirs_config_pdu->row = 11;
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p24:
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2)
|
||||
csirs_config_pdu->row = 14;
|
||||
else{
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm8_FD2_TD4)
|
||||
csirs_config_pdu->row = 15;
|
||||
else
|
||||
csirs_config_pdu->row = 13;
|
||||
}
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p32:
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2)
|
||||
csirs_config_pdu->row = 17;
|
||||
else{
|
||||
if (resourceMapping.cdm_Type == NR_CSI_RS_ResourceMapping__cdm_Type_cdm8_FD2_TD4)
|
||||
csirs_config_pdu->row = 18;
|
||||
else
|
||||
csirs_config_pdu->row = 16;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Invalid number of ports in CSI-RS resource\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Invalid freqency domain allocation in CSI-RS resource\n");
|
||||
}
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_CSI_RS;
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211, tables 6.3.3.2.x
|
||||
// PRACH formats 9, 10, 11 are corresponding to dual PRACH format configurations A1/B1, A2/B2, A3/B3.
|
||||
// - todo:
|
||||
|
||||
@@ -627,6 +627,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
|
||||
const NR_ServingCellConfig_t *servingCellConfig = CellGroup ? CellGroup->spCellConfig->spCellConfigDedicated : NULL;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
sched_ctrl->update_pdsch_ps = true;
|
||||
sched_ctrl->update_pusch_ps = true;
|
||||
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
|
||||
if (get_softmodem_params()->sa) {
|
||||
// add all available DL HARQ processes for this UE in SA
|
||||
|
||||
@@ -1029,6 +1029,7 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
int start_symbol_index,nr_of_symbols;
|
||||
|
||||
SLIV2SL(startSymbolAndLength, &start_symbol_index, &nr_of_symbols);
|
||||
int mcsindex = -1; // init value
|
||||
|
||||
pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
|
||||
pusch_pdu->rnti = rnti;
|
||||
@@ -1037,10 +1038,7 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
pusch_pdu->bwp_size = bwp_size;
|
||||
pusch_pdu->subcarrier_spacing = scs;
|
||||
pusch_pdu->cyclic_prefix = 0;
|
||||
pusch_pdu->mcs_index = 1;
|
||||
pusch_pdu->mcs_table = 0;
|
||||
pusch_pdu->target_code_rate = nr_get_code_rate_ul(pusch_pdu->mcs_index,pusch_pdu->mcs_table);
|
||||
pusch_pdu->qam_mod_order = nr_get_Qm_ul(pusch_pdu->mcs_index,pusch_pdu->mcs_table);
|
||||
if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL)
|
||||
pusch_pdu->transformPrecoder = 1;
|
||||
else
|
||||
@@ -1077,15 +1075,23 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
for(int i = start_symbol_index; i < start_symbol_index+nr_of_symbols; i++)
|
||||
num_dmrs_symb += (pusch_pdu->ul_dmrs_symb_pos >> i) & 1;
|
||||
|
||||
pusch_pdu->pusch_data.tb_size = nr_compute_tbs(pusch_pdu->qam_mod_order,
|
||||
pusch_pdu->target_code_rate,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->nr_of_symbols,
|
||||
num_dmrs_symb*12, // nb dmrs set for no data in dmrs symbol
|
||||
0, //nb_rb_oh
|
||||
0, // to verify tb scaling
|
||||
pusch_pdu->nrOfLayers)>>3;
|
||||
int TBS = 0;
|
||||
while(TBS<7) { // TBS for msg3 is 7 bytes (except for RRCResumeRequest1 currently not implemented)
|
||||
mcsindex++;
|
||||
pusch_pdu->target_code_rate = nr_get_code_rate_ul(mcsindex,pusch_pdu->mcs_table);
|
||||
pusch_pdu->qam_mod_order = nr_get_Qm_ul(mcsindex,pusch_pdu->mcs_table);
|
||||
TBS = nr_compute_tbs(pusch_pdu->qam_mod_order,
|
||||
pusch_pdu->target_code_rate,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->nr_of_symbols,
|
||||
num_dmrs_symb*12, // nb dmrs set for no data in dmrs symbol
|
||||
0, //nb_rb_oh
|
||||
0, // to verify tb scaling
|
||||
pusch_pdu->nrOfLayers)>>3;
|
||||
|
||||
pusch_pdu->mcs_index = mcsindex;
|
||||
pusch_pdu->pusch_data.tb_size = TBS;
|
||||
}
|
||||
}
|
||||
|
||||
void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra, uint8_t *RAR_pdu)
|
||||
@@ -1179,7 +1185,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
time_domain_assignment = 1;
|
||||
else
|
||||
time_domain_assignment = 0;
|
||||
uint8_t mcsIndex = 0;
|
||||
int mcsIndex = -1; // initialization value
|
||||
int rbStart = 0;
|
||||
int rbSize = 8;
|
||||
|
||||
@@ -1336,9 +1342,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
pdsch_pdu_rel15->SubcarrierSpacing = genericParameters->subcarrierSpacing;
|
||||
pdsch_pdu_rel15->CyclicPrefix = 0;
|
||||
pdsch_pdu_rel15->NrOfCodewords = 1;
|
||||
pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIdx);
|
||||
pdsch_pdu_rel15->qamModOrder[0] = 2;
|
||||
pdsch_pdu_rel15->mcsIndex[0] = mcsIndex;
|
||||
pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx;
|
||||
pdsch_pdu_rel15->rvIndex[0] = 0;
|
||||
pdsch_pdu_rel15->dataScramblingId = *scc->physCellId;
|
||||
@@ -1362,9 +1365,38 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
startSymbolIndex,
|
||||
mappingtype, 1);
|
||||
|
||||
int x_Overhead = 0;
|
||||
uint8_t tb_scaling = 0;
|
||||
nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling);
|
||||
int R, Qm;
|
||||
uint8_t N_PRB_DMRS;
|
||||
uint32_t TBS=0;
|
||||
if (dmrsConfigType == NFAPI_NR_DMRS_TYPE1) {
|
||||
// if no data in dmrs cdm group is 1 only even REs have no data
|
||||
// if no data in dmrs cdm group is 2 both odd and even REs have no data
|
||||
N_PRB_DMRS = pdsch_pdu_rel15->numDmrsCdmGrpsNoData*6;
|
||||
}
|
||||
else {
|
||||
N_PRB_DMRS = pdsch_pdu_rel15->numDmrsCdmGrpsNoData*4;
|
||||
}
|
||||
uint16_t dmrs_length = get_num_dmrs(pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
|
||||
while(TBS<9) { // min TBS for RAR is 9 bytes
|
||||
mcsIndex++;
|
||||
R = nr_get_code_rate_dl(mcsIndex, mcsTableIdx);
|
||||
Qm = nr_get_Qm_dl(mcsIndex, mcsTableIdx);
|
||||
TBS = nr_compute_tbs(Qm,
|
||||
R,
|
||||
rbSize,
|
||||
nrOfSymbols,
|
||||
N_PRB_DMRS*dmrs_length,
|
||||
0, // overhead
|
||||
tb_scaling, // tb scaling
|
||||
1)>>3; // layers
|
||||
|
||||
pdsch_pdu_rel15->targetCodeRate[0] = R;
|
||||
pdsch_pdu_rel15->qamModOrder[0] = Qm;
|
||||
pdsch_pdu_rel15->mcsIndex[0] = mcsIndex;
|
||||
pdsch_pdu_rel15->TBSize[0] = TBS;
|
||||
}
|
||||
|
||||
// Fill PDCCH DL DCI PDU
|
||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
||||
@@ -1651,12 +1683,15 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
uint8_t tb_scaling = 0;
|
||||
uint16_t *vrb_map = cc[CC_id].vrb_map;
|
||||
do {
|
||||
rbSize++;
|
||||
if(rbSize < BWPSize)
|
||||
rbSize++;
|
||||
else
|
||||
mcsIndex++;
|
||||
LOG_D(NR_MAC,"Calling nr_compute_tbs with N_PRB_DMRS %d, N_DMRS_SLOT %d\n",N_PRB_DMRS,N_DMRS_SLOT);
|
||||
harq->tb_size = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx),
|
||||
nr_get_code_rate_dl(mcsIndex, mcsTableIdx),
|
||||
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
|
||||
} while (rbSize < BWPSize && harq->tb_size < ra->mac_pdu_length);
|
||||
nr_get_code_rate_dl(mcsIndex, mcsTableIdx),
|
||||
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
|
||||
} while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28);
|
||||
|
||||
int i = 0;
|
||||
while ((i < rbSize) && (rbStart + rbSize <= BWPSize)) {
|
||||
|
||||
@@ -612,14 +612,15 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
|
||||
int startSymbolIndex = 0;
|
||||
int nrOfSymbols = 0;
|
||||
bool is_typeA;
|
||||
|
||||
get_info_from_tda_tables(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern,
|
||||
time_domain_allocation,
|
||||
gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
||||
1, &startSymbolIndex, &nrOfSymbols);
|
||||
1, &is_typeA,
|
||||
&startSymbolIndex, &nrOfSymbols);
|
||||
|
||||
// TODO: There are exceptions to this in table 5.1.2.1.1-4,5 (Default time domain allocation tables B, C)
|
||||
int mappingtype = (startSymbolIndex <= 3)? typeA: typeB;
|
||||
int mappingtype = is_typeA? typeA: typeB;
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype, 1);
|
||||
|
||||
// Configure sched_ctrlCommon for SIB1
|
||||
|
||||
@@ -393,12 +393,17 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
|
||||
|
||||
#define BLER_UPDATE_FRAME 10
|
||||
#define BLER_FILTER 0.9f
|
||||
int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t slot, int UE_id)
|
||||
int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t slot, int UE_id, int mcs_table)
|
||||
{
|
||||
gNB_MAC_INST *nrmac = RC.nrmac[mod_id];
|
||||
const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
const int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
|
||||
int max_allowed_mcs = (mcs_table == 1) ? 27 : 28;
|
||||
int max_mcs = nrmac->dl_max_mcs;
|
||||
if (nrmac->dl_max_mcs>max_allowed_mcs)
|
||||
max_mcs = max_allowed_mcs;
|
||||
|
||||
NR_DL_bler_stats_t *bler_stats = &nrmac->UE_info.UE_sched_ctrl[UE_id].dl_bler_stats;
|
||||
/* first call: everything is zero. Initialize to sensible default */
|
||||
if (bler_stats->last_frame_slot == 0 && bler_stats->mcs == 0) {
|
||||
@@ -444,7 +449,7 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
|
||||
if (bler_stats->rd2_bler > nrmac->dl_rd2_bler_threshold && old_mcs > 6) {
|
||||
new_mcs -= 2;
|
||||
} else if (bler_stats->rd2_bler < nrmac->dl_rd2_bler_threshold) {*/
|
||||
if (bler_stats->bler < nrmac->dl_bler_target_lower && old_mcs < nrmac->dl_max_mcs && dtx > 9)
|
||||
if (bler_stats->bler < nrmac->dl_bler_target_lower && old_mcs < max_mcs && dtx > 9)
|
||||
new_mcs += 1;
|
||||
else if (bler_stats->bler > nrmac->dl_bler_target_upper && old_mcs > 6)
|
||||
new_mcs -= 1;
|
||||
@@ -586,8 +591,10 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
}
|
||||
/* check whether we need to switch the TDA allocation since the last
|
||||
* (re-)transmission */
|
||||
if (ps->time_domain_allocation != tda)
|
||||
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, ps->nrOfLayers, sched_ctrl, ps);
|
||||
if (ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
|
||||
nr_set_pdsch_semi_static(scc, cg, sched_ctrl->active_bwp, bwpd, tda, ps->nrOfLayers, sched_ctrl, ps);
|
||||
sched_ctrl->update_pdsch_ps = false;
|
||||
}
|
||||
} else {
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
* that we have enough resources */
|
||||
@@ -744,7 +751,7 @@ void pf_dl(module_id_t module_id,
|
||||
|
||||
/* Calculate coeff */
|
||||
set_dl_mcs(sched_pdsch,sched_ctrl,&mac->dl_max_mcs,ps->mcsTableIdx);
|
||||
sched_pdsch->mcs = get_mcs_from_bler(module_id, /* CC_id = */ 0, frame, slot, UE_id);
|
||||
sched_pdsch->mcs = get_mcs_from_bler(module_id, /* CC_id = */ 0, frame, slot, UE_id, ps->mcsTableIdx);
|
||||
layers[UE_id] = set_dl_nrOfLayers(sched_ctrl);
|
||||
const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
||||
const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
||||
@@ -863,8 +870,11 @@ void pf_dl(module_id_t module_id,
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
if (ps->nrOfLayers != layers[UE_id] ||
|
||||
ps->time_domain_allocation != tda)
|
||||
ps->time_domain_allocation != tda ||
|
||||
sched_ctrl->update_pdsch_ps) {
|
||||
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, layers[UE_id], sched_ctrl, ps);
|
||||
sched_ctrl->update_pdsch_ps = false;
|
||||
}
|
||||
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
// Freq-demain allocation
|
||||
|
||||
@@ -532,6 +532,7 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
||||
ps->mcsTableIdx = 2;
|
||||
}
|
||||
else ps->mcsTableIdx = 0;
|
||||
LOG_D(NR_MAC,"MCS Table Index: %d\n",ps->mcsTableIdx);
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config;
|
||||
if (bwp &&
|
||||
@@ -1960,7 +1961,6 @@ void create_nr_list(NR_list_t *list, int len)
|
||||
{
|
||||
list->head = -1;
|
||||
list->next = malloc(len * sizeof(*list->next));
|
||||
LOG_W(NR_MAC, "NR list->next %p\n", list->next);
|
||||
AssertFatal(list->next, "cannot malloc() memory for NR_list_t->next\n");
|
||||
for (int i = 0; i < len; ++i)
|
||||
list->next[i] = -1;
|
||||
@@ -2295,8 +2295,16 @@ void create_dl_harq_list(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
add_tail_nr_list(&sched_ctrl->available_dl_harq, harq);
|
||||
create_nr_list(&sched_ctrl->feedback_dl_harq, nrofHARQ);
|
||||
create_nr_list(&sched_ctrl->retrans_dl_harq, nrofHARQ);
|
||||
} else if (sched_ctrl->available_dl_harq.len == nrofHARQ) {
|
||||
LOG_D(NR_MAC, "nrofHARQ %d already configured\n", nrofHARQ);
|
||||
} else {
|
||||
const int old_nrofHARQ = sched_ctrl->available_dl_harq.len;
|
||||
AssertFatal(nrofHARQ > old_nrofHARQ,
|
||||
"cannot resize HARQ list to be smaller (nrofHARQ %d, old_nrofHARQ %d)\n",
|
||||
nrofHARQ, old_nrofHARQ);
|
||||
resize_nr_list(&sched_ctrl->available_dl_harq, nrofHARQ);
|
||||
for (int harq = old_nrofHARQ; harq < nrofHARQ; harq++)
|
||||
add_tail_nr_list(&sched_ctrl->available_dl_harq, harq);
|
||||
resize_nr_list(&sched_ctrl->feedback_dl_harq, nrofHARQ);
|
||||
resize_nr_list(&sched_ctrl->retrans_dl_harq, nrofHARQ);
|
||||
}
|
||||
@@ -2508,11 +2516,11 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
for (int id = 0; id < csi_measconfig->nzp_CSI_RS_ResourceToAddModList->list.count; id++){
|
||||
nzpcsi = csi_measconfig->nzp_CSI_RS_ResourceToAddModList->list.array[id];
|
||||
NR_CSI_RS_ResourceMapping_t resourceMapping = nzpcsi->resourceMapping;
|
||||
csi_period_offset(NULL,nzpcsi,&period,&offset);
|
||||
csi_period_offset(NULL,nzpcsi->periodicityAndOffset,&period,&offset);
|
||||
|
||||
if((frame*n_slots_frame+slot-offset)%period == 0) {
|
||||
|
||||
LOG_I(MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot);
|
||||
LOG_D(MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot);
|
||||
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_csirs_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
|
||||
memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
|
||||
@@ -2556,7 +2564,7 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
case NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row2:
|
||||
csirs_pdu_rel15->row = 2;
|
||||
csirs_pdu_rel15->freq_domain = (((resourceMapping.frequencyDomainAllocation.choice.row2.buf[1]>>4)&0x0f) |
|
||||
((resourceMapping.frequencyDomainAllocation.choice.row2.buf[0]<<8)&0xff0));
|
||||
((resourceMapping.frequencyDomainAllocation.choice.row2.buf[0]<<4)&0xff0));
|
||||
for (int rb = csirs_pdu_rel15->start_rb; rb < (csirs_pdu_rel15->start_rb + csirs_pdu_rel15->nr_of_rbs); rb++)
|
||||
vrb_map[rb+csirs_pdu_rel15->bwp_start] |= SL_to_bitmap(csirs_pdu_rel15->symb_l0, 1);
|
||||
break;
|
||||
@@ -2571,6 +2579,7 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
// determining the row of table 7.4.1.5.3-1 in 38.211
|
||||
switch(resourceMapping.nrofPorts){
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p1:
|
||||
AssertFatal(1==0,"Resource with 1 CSI port shouldn't be within other rows\n");
|
||||
break;
|
||||
case NR_CSI_RS_ResourceMapping__nrofPorts_p2:
|
||||
csirs_pdu_rel15->row = 3;
|
||||
|
||||
@@ -993,8 +993,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->nrOfLayers != nrOfLayers
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, nrOfLayers,ps);
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, nrOfLayers, ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
LOG_D(NR_MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size);
|
||||
} else {
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
@@ -1233,8 +1236,11 @@ void pf_ul(module_id_t module_id,
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->nrOfLayers != nrOfLayers
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data,nrOfLayers, ps);
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, nrOfLayers, ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
|
||||
sched_pusch->mcs = 9;
|
||||
update_ul_ue_R_Qm(sched_pusch, ps);
|
||||
@@ -1352,8 +1358,11 @@ void pf_ul(module_id_t module_id,
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->nrOfLayers != nrOfLayers
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, nrOfLayers,ps);
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, ubwpd, dci_format, tda, num_dmrs_cdm_grps_no_data, nrOfLayers, ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
update_ul_ue_R_Qm(sched_pusch, ps);
|
||||
|
||||
/* Calculate the current scheduling bytes and the necessary RBs */
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/* PHY */
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "time_meas.h"
|
||||
|
||||
/* Interface */
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
@@ -621,6 +621,8 @@ typedef struct {
|
||||
int ul_failure;
|
||||
struct CSI_Report CSI_report;
|
||||
bool SR;
|
||||
bool update_pdsch_ps;
|
||||
bool update_pusch_ps;
|
||||
bool set_mcs;
|
||||
/// information about every HARQ process
|
||||
NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
|
||||
|
||||
@@ -1451,6 +1451,30 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
|
||||
ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig_drb);
|
||||
}
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
NR_UE_NR_Capability_t *uecap) {
|
||||
|
||||
NR_SpCellConfig_t *SpCellConfig = cellGroupConfig->spCellConfig;
|
||||
if (SpCellConfig == NULL) return;
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = carrier->servingcellconfigcommon;
|
||||
|
||||
NR_BWP_DownlinkDedicated_t *bwp_Dedicated = SpCellConfig->spCellConfigDedicated->initialDownlinkBWP;
|
||||
set_dl_mcs_table(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,
|
||||
uecap, bwp_Dedicated, scc);
|
||||
|
||||
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *DL_BWP_list = SpCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
|
||||
if (DL_BWP_list) {
|
||||
for (int i=0; i<DL_BWP_list->list.count; i++){
|
||||
NR_BWP_Downlink_t *bwp = DL_BWP_list->list.array[i];
|
||||
int scs = bwp->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
set_dl_mcs_table(scs, uecap, bwp->bwp_Dedicated, carrier->servingcellconfigcommon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void fill_initial_cellGroupConfig(int uid,
|
||||
NR_CellGroupConfig_t *cellGroupConfig,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
@@ -1870,6 +1894,8 @@ int16_t do_RRCReconfiguration(
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig)
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -1906,16 +1932,6 @@ int16_t do_RRCReconfiguration(
|
||||
ie->radioBearerConfig->srb3_ToRelease = NULL;
|
||||
ie->radioBearerConfig->drb_ToReleaseList = DRB_releaseList;
|
||||
}
|
||||
/******************** Secondary Cell Group ********************/
|
||||
// rrc_gNB_carrier_data_t *carrier = &(gnb_rrc_inst->carrier);
|
||||
// fill_default_secondaryCellGroup( carrier->servingcellconfigcommon,
|
||||
// ue_context_pP->ue_context.secondaryCellGroup,
|
||||
// 1,
|
||||
// 1,
|
||||
// carrier->pdsch_AntennaPorts,
|
||||
// carrier->pusch_AntennaPorts,
|
||||
// carrier->initial_csi_index[ue_context_p->local_uid + 1],
|
||||
// ue_context_pP->local_uid);
|
||||
|
||||
/******************** Meas Config ********************/
|
||||
// measConfig
|
||||
@@ -1931,6 +1947,9 @@ int16_t do_RRCReconfiguration(
|
||||
}
|
||||
|
||||
if(cellGroupConfig!=NULL){
|
||||
update_cellGroupConfig(cellGroupConfig,
|
||||
carrier,
|
||||
ue_context_pP->ue_context.UE_Capability_nr);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
(void *)cellGroupConfig,
|
||||
|
||||
@@ -110,6 +110,10 @@ void fill_initial_cellGroupConfig(int uid,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
rrc_gNB_carrier_data_t *carrier);
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
NR_UE_NR_Capability_t *uecap);
|
||||
|
||||
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup);
|
||||
|
||||
uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
@@ -145,6 +149,8 @@ int16_t do_RRCReconfiguration(
|
||||
NR_SDAP_Config_t *sdap_config,
|
||||
NR_MeasConfig_t *meas_config,
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
NR_CellGroupConfig_t *cellGroupConfig);
|
||||
|
||||
|
||||
@@ -31,17 +31,64 @@
|
||||
#include "nr_rrc_config.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
int numerology,
|
||||
int rbsize,
|
||||
int mcs_table) {
|
||||
|
||||
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||
NR_BandNR_t *nr_bandnr = CALLOC(1,sizeof(NR_BandNR_t));
|
||||
nr_bandnr->bandNR = band;
|
||||
ASN_SEQUENCE_ADD(&cap->rf_Parameters.supportedBandListNR.list,
|
||||
nr_bandnr);
|
||||
if (mcs_table == 1) {
|
||||
int bw = get_supported_band_index(numerology, band, rbsize);
|
||||
if (band>256) {
|
||||
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[0];
|
||||
bandNRinfo->pdsch_256QAM_FR2 = CALLOC(1,sizeof(*bandNRinfo->pdsch_256QAM_FR2));
|
||||
*bandNRinfo->pdsch_256QAM_FR2 = NR_BandNR__pdsch_256QAM_FR2_supported;
|
||||
}
|
||||
else{
|
||||
cap->phy_Parameters.phy_ParametersFR1 = CALLOC(1,sizeof(*cap->phy_Parameters.phy_ParametersFR1));
|
||||
NR_Phy_ParametersFR1_t *phy_fr1 = cap->phy_Parameters.phy_ParametersFR1;
|
||||
phy_fr1->pdsch_256QAM_FR1 = CALLOC(1,sizeof(*phy_fr1->pdsch_256QAM_FR1));
|
||||
*phy_fr1->pdsch_256QAM_FR1 = NR_Phy_ParametersFR1__pdsch_256QAM_FR1_supported;
|
||||
}
|
||||
cap->featureSets = CALLOC(1,sizeof(*cap->featureSets));
|
||||
NR_FeatureSets_t *fs=cap->featureSets;
|
||||
fs->featureSetsDownlinkPerCC = CALLOC(1,sizeof(*fs->featureSetsDownlinkPerCC));
|
||||
NR_FeatureSetDownlinkPerCC_t *fs_cc = CALLOC(1,sizeof(NR_FeatureSetDownlinkPerCC_t));
|
||||
fs_cc->supportedSubcarrierSpacingDL = numerology;
|
||||
if(band>256) {
|
||||
fs_cc->supportedBandwidthDL.present = NR_SupportedBandwidth_PR_fr2;
|
||||
fs_cc->supportedBandwidthDL.choice.fr2 = bw;
|
||||
}
|
||||
else{
|
||||
fs_cc->supportedBandwidthDL.present = NR_SupportedBandwidth_PR_fr1;
|
||||
fs_cc->supportedBandwidthDL.choice.fr1 = bw;
|
||||
}
|
||||
fs_cc->supportedModulationOrderDL = CALLOC(1,sizeof(*fs_cc->supportedModulationOrderDL));
|
||||
*fs_cc->supportedModulationOrderDL = NR_ModulationOrder_qam256;
|
||||
ASN_SEQUENCE_ADD(&fs->featureSetsDownlinkPerCC->list,
|
||||
fs_cc);
|
||||
}
|
||||
}
|
||||
|
||||
void nr_rrc_config_dl_tda(NR_ServingCellConfigCommon_t *scc){
|
||||
|
||||
lte_frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
|
||||
|
||||
int curr_bwp = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth;
|
||||
// coreset duration setting to be improved in the framework of RRC harmonization, potentially using a common function
|
||||
int len_coreset = 1;
|
||||
if (curr_bwp < 48)
|
||||
len_coreset = 2;
|
||||
// setting default TDA for DL with
|
||||
struct NR_PDSCH_TimeDomainResourceAllocation *timedomainresourceallocation = CALLOC(1,sizeof(NR_PDSCH_TimeDomainResourceAllocation_t));
|
||||
timedomainresourceallocation->mappingType = NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
|
||||
timedomainresourceallocation->startSymbolAndLength = get_SLIV(1,13); // basic slot configuration starting in symbol 1 til the end of the slot
|
||||
timedomainresourceallocation->startSymbolAndLength = get_SLIV(len_coreset,14-len_coreset); // basic slot configuration starting in symbol 1 til the end of the slot
|
||||
ASN_SEQUENCE_ADD(&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list,
|
||||
timedomainresourceallocation);
|
||||
|
||||
if(frame_type==TDD) {
|
||||
// TDD
|
||||
if(scc->tdd_UL_DL_ConfigurationCommon) {
|
||||
@@ -49,7 +96,7 @@ void nr_rrc_config_dl_tda(NR_ServingCellConfigCommon_t *scc){
|
||||
if(dl_symb > 1) {
|
||||
timedomainresourceallocation = CALLOC(1,sizeof(NR_PDSCH_TimeDomainResourceAllocation_t));
|
||||
timedomainresourceallocation->mappingType = NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA;
|
||||
timedomainresourceallocation->startSymbolAndLength = get_SLIV(1,dl_symb-1); // mixed slot configuration starting in symbol 1 til the end of the dl allocation
|
||||
timedomainresourceallocation->startSymbolAndLength = get_SLIV(len_coreset,dl_symb-len_coreset); // mixed slot configuration starting in symbol 1 til the end of the dl allocation
|
||||
ASN_SEQUENCE_ADD(&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list,
|
||||
timedomainresourceallocation);
|
||||
}
|
||||
@@ -102,6 +149,52 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay){
|
||||
ASN_SEQUENCE_ADD(&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list,pusch_timedomainresourceallocation_msg3);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void set_dl_mcs_table(int scs, NR_UE_NR_Capability_t *cap,
|
||||
NR_BWP_DownlinkDedicated_t *bwp_Dedicated,
|
||||
NR_ServingCellConfigCommon_t *scc) {
|
||||
|
||||
if (cap == NULL){
|
||||
bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||
struct NR_FrequencyInfoDL__scs_SpecificCarrierList scs_list = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList;
|
||||
int bw_rb = -1;
|
||||
for(int i=0; i<scs_list.list.count; i++){
|
||||
if(scs == scs_list.list.array[i]->subcarrierSpacing){
|
||||
bw_rb = scs_list.list.array[i]->carrierBandwidth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AssertFatal(bw_rb>0,"Could not find scs-SpecificCarrierList element for scs %d",scs);
|
||||
int bw = get_supported_band_index(scs, band, bw_rb);
|
||||
AssertFatal(bw>0,"Supported band corresponding to %d RBs not found\n", bw_rb);
|
||||
|
||||
bool supported = false;
|
||||
if (band>256) {
|
||||
for (int i=0;i<cap->rf_Parameters.supportedBandListNR.list.count;i++) {
|
||||
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[i];
|
||||
if(bandNRinfo->bandNR == band && bandNRinfo->pdsch_256QAM_FR2) {
|
||||
supported = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cap->phy_Parameters.phy_ParametersFR1 && cap->phy_Parameters.phy_ParametersFR1->pdsch_256QAM_FR1)
|
||||
supported = true;
|
||||
|
||||
if (supported) {
|
||||
if(bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL)
|
||||
bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = calloc(1, sizeof(*bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table));
|
||||
*bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NR_PDSCH_Config__mcs_Table_qam256;
|
||||
}
|
||||
else
|
||||
bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -113,6 +113,14 @@ typedef struct physicalcellgroup_s{
|
||||
|
||||
void nr_rrc_config_dl_tda(NR_ServingCellConfigCommon_t *scc);
|
||||
void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay);
|
||||
void set_dl_mcs_table(int scs, NR_UE_NR_Capability_t *cap,
|
||||
NR_BWP_DownlinkDedicated_t *bwp_Dedicated,
|
||||
NR_ServingCellConfigCommon_t *scc);
|
||||
void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
int numerology,
|
||||
int rbsize,
|
||||
int mcs_table);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -345,14 +345,18 @@ typedef struct gNB_RRC_UE_s {
|
||||
uint8_t setup_e_rabs;
|
||||
/* Number of e_rab to be setup in the list */
|
||||
uint8_t nb_of_e_rabs;
|
||||
/* Total number of pdu session already setup in the list */
|
||||
uint8_t setup_pdu_sessions;
|
||||
/* Number of pdu session to be setup in the list */
|
||||
uint8_t nb_of_pdusessions;
|
||||
/* Number of e_rab to be modified in the list */
|
||||
uint8_t nb_of_modify_e_rabs;
|
||||
uint8_t nb_of_failed_e_rabs;
|
||||
e_rab_param_t modify_e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
|
||||
/* Total number of pdu session already setup in the list */
|
||||
uint8_t setup_pdu_sessions;
|
||||
/* Number of pdu session to be setup in the list */
|
||||
uint8_t nb_of_pdusessions;
|
||||
/* Number of e_rab to be modified in the list */
|
||||
uint8_t nb_of_modify_pdusessions;
|
||||
uint8_t nb_of_failed_pdusessions;
|
||||
pdu_session_param_t modify_pdusession[NR_NB_RB_MAX];
|
||||
/* list of e_rab to be setup by RRC layers */
|
||||
/* list of pdu session to be setup by RRC layers */
|
||||
e_rab_param_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
|
||||
|
||||
@@ -76,6 +76,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti);
|
||||
void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
int scg_id,
|
||||
int servCellIndex,
|
||||
int dl_antenna_ports,
|
||||
@@ -95,6 +96,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
||||
NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
NR_RRCReconfiguration_IEs_t *reconfig,
|
||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
int dl_antenna_ports,
|
||||
int ul_antenna_ports,
|
||||
int minRXTXTIMEpdsch,
|
||||
|
||||
+202
-50
@@ -709,6 +709,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
dedicatedNAS_MessageList = NULL;
|
||||
}
|
||||
|
||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
|
||||
gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
size = do_RRCReconfiguration(ctxt_pP, buffer, sizeof(buffer),
|
||||
xid,
|
||||
@@ -719,8 +721,10 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
NULL,
|
||||
NULL,
|
||||
dedicatedNAS_MessageList,
|
||||
ue_context_pP,
|
||||
&rrc->carrier,
|
||||
NULL,
|
||||
NULL);
|
||||
ue_p->masterCellGroup);
|
||||
|
||||
free(ue_context_pP->ue_context.nas_pdu.buffer);
|
||||
|
||||
@@ -980,6 +984,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
NULL,
|
||||
NULL,
|
||||
dedicatedNAS_MessageList,
|
||||
ue_context_pP,
|
||||
&rrc->carrier,
|
||||
NULL,
|
||||
cellGroupConfig);
|
||||
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n");
|
||||
@@ -1022,6 +1028,178 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rrc_gNB_modify_dedicatedRRCReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *ue_context_pP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
NR_DRB_ToAddMod_t *DRB_config = NULL;
|
||||
NR_DRB_ToAddModList_t **DRB_configList = NULL;
|
||||
NR_DRB_ToAddModList_t *DRB_configList2 = NULL;
|
||||
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
|
||||
*dedicatedNAS_MessageList = NULL;
|
||||
NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NULL;
|
||||
uint8_t buffer[RRC_BUF_SIZE];
|
||||
uint16_t size;
|
||||
int qos_flow_index = 0;
|
||||
int i, j;
|
||||
|
||||
uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id);
|
||||
DRB_configList = &ue_context_pP->ue_context.DRB_configList;
|
||||
|
||||
DRB_configList2 = CALLOC(1, sizeof(NR_DRB_ToAddModList_t));
|
||||
memset(DRB_configList2, 0, sizeof(NR_DRB_ToAddModList_t));
|
||||
|
||||
dedicatedNAS_MessageList = CALLOC(1, sizeof(struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList));
|
||||
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
|
||||
// bypass the new and already configured pdu sessions
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].status >= PDU_SESSION_STATUS_DONE) {
|
||||
ue_context_pP->ue_context.modify_pdusession[i].xid = xid;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].cause != NGAP_CAUSE_NOTHING) {
|
||||
// set xid of failure pdu session
|
||||
ue_context_pP->ue_context.modify_pdusession[i].xid = xid;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED;
|
||||
continue;
|
||||
}
|
||||
|
||||
// search exist DRB_config
|
||||
for (j = 0; j < (*DRB_configList)->list.count; j++) {
|
||||
if ((*DRB_configList)->list.array[j]->cnAssociation->choice.sdap_Config->pdu_Session ==
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id) {
|
||||
DRB_config = (*DRB_configList)->list.array[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (DRB_config == NULL) {
|
||||
ue_context_pP->ue_context.modify_pdusession[i].xid = xid;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unspecified;
|
||||
ue_context_pP->ue_context.nb_of_failed_pdusessions++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Reference TS23501 Table 5.7.4-1: Standardized 5QI to QoS characteristics mapping
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) {
|
||||
switch (ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI) {
|
||||
case 1: //100ms
|
||||
case 2: //150ms
|
||||
case 3: //50ms
|
||||
case 4: //300ms
|
||||
case 5: //100ms
|
||||
case 6: //300ms
|
||||
case 7: //100ms
|
||||
case 8: //300ms
|
||||
case 9: //300ms Video (Buffered Streaming)TCP-based (e.g., www, e-mail, chat, ftp, p2p file sharing, progressive video, etc.)
|
||||
// TODO
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI);
|
||||
ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].xid = xid;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_not_supported_5QI_value;
|
||||
ue_context_pP->ue_context.nb_of_failed_pdusessions++;
|
||||
continue;
|
||||
}
|
||||
|
||||
LOG_I(NR_RRC, "PDU SESSION ID %ld, DRB ID %ld (index %d), QOS flow %d, 5QI %ld \n",
|
||||
DRB_config->cnAssociation->choice.sdap_Config->pdu_Session,
|
||||
DRB_config->drb_Identity, i,
|
||||
qos_flow_index,
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI
|
||||
);
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&DRB_configList2->list, DRB_config);
|
||||
|
||||
ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.modify_pdusession[i].xid = xid;
|
||||
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t));
|
||||
memset(dedicatedNAS_Message, 0, sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(dedicatedNAS_Message,
|
||||
(char *)ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.length);
|
||||
ASN_SEQUENCE_ADD(&dedicatedNAS_MessageList->list, dedicatedNAS_Message);
|
||||
|
||||
LOG_I(NR_RRC,"add NAS info with size %d (pdusession id %d)\n",ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length,
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id);
|
||||
} else {
|
||||
// TODO
|
||||
LOG_E(NR_RRC,"no NAS info (pdusession id %d)\n", ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id);
|
||||
}
|
||||
}
|
||||
|
||||
/* If list is empty free the list and reset the address */
|
||||
if (dedicatedNAS_MessageList->list.count == 0) {
|
||||
free(dedicatedNAS_MessageList);
|
||||
dedicatedNAS_MessageList = NULL;
|
||||
}
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
size = do_RRCReconfiguration(ctxt_pP, buffer, sizeof(buffer),
|
||||
xid,
|
||||
NULL,
|
||||
DRB_configList2,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
dedicatedNAS_MessageList,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
|
||||
|
||||
/* Free all NAS PDUs */
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
/* Free the NAS PDU buffer and invalidate it */
|
||||
free(ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_I(NR_RRC,
|
||||
"[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCReconfiguration (bytes %d, UE RNTI %x)\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
|
||||
LOG_D(NR_RRC,
|
||||
"[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
|
||||
ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH);
|
||||
|
||||
#ifdef ITTI_SIM
|
||||
MessageDef *message_p;
|
||||
uint8_t *message_buffer;
|
||||
message_buffer = itti_malloc (TASK_RRC_GNB_SIM, TASK_RRC_UE_SIM, size);
|
||||
memcpy (message_buffer, buffer, size);
|
||||
message_p = itti_alloc_new_message (TASK_RRC_GNB_SIM, 0, GNB_RRC_DCCH_DATA_IND);
|
||||
GNB_RRC_DCCH_DATA_IND (message_p).rbid = DCCH;
|
||||
GNB_RRC_DCCH_DATA_IND (message_p).sdu = message_buffer;
|
||||
GNB_RRC_DCCH_DATA_IND (message_p).size = size;
|
||||
itti_send_msg_to_task (TASK_RRC_UE_SIM, ctxt_pP->instance, message_p);
|
||||
#else
|
||||
nr_rrc_data_req(
|
||||
ctxt_pP,
|
||||
DCCH,
|
||||
rrc_gNB_mui++,
|
||||
SDU_CONFIRM_NO,
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
@@ -1079,6 +1257,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
NULL,
|
||||
dedicatedNAS_MessageList,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
|
||||
@@ -1628,6 +1808,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
NULL, // MeasObj_list,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Reconfiguration\n");
|
||||
@@ -2189,10 +2371,23 @@ rrc_gNB_decode_dcch(
|
||||
//NGAP_PDUSESSION_RELEASE_RESPONSE
|
||||
rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid);
|
||||
} else if (ue_context_p->ue_context.established_pdu_sessions_flag != 1) {
|
||||
if (ue_context_p->ue_context.setup_pdu_sessions > 0) {
|
||||
if (ue_context_p->ue_context.nb_of_pdusessions > 0) {
|
||||
rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier);
|
||||
ue_context_p->ue_context.nb_of_pdusessions = 0;
|
||||
}
|
||||
}
|
||||
if (ue_context_p->ue_context.nb_of_modify_pdusessions > 0) {
|
||||
rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier);
|
||||
ue_context_p->ue_context.nb_of_modify_pdusessions = 0;
|
||||
ue_context_p->ue_context.nb_of_failed_pdusessions = 0;
|
||||
memset(ue_context_p->ue_context.modify_pdusession, 0, sizeof(ue_context_p->ue_context.modify_pdusession));
|
||||
|
||||
for(int i = 0; i < NR_NB_RB_MAX; i++) {
|
||||
ue_context_p->ue_context.modify_pdusession[i].xid = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3157,51 +3352,6 @@ unsigned int get_ul_bw_mask(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
int is_dl_256QAM_supported(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) {
|
||||
int common_band = *rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||
int common_scs = rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
|
||||
if (common_band>256) {
|
||||
for (int i=0;i<cap->rf_Parameters.supportedBandListNR.list.count;i++) {
|
||||
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[i];
|
||||
if (bandNRinfo->bandNR == common_band && !bandNRinfo->pdsch_256QAM_FR2) return (0);
|
||||
}
|
||||
}
|
||||
else if (cap->phy_Parameters.phy_ParametersFR1 && !cap->phy_Parameters.phy_ParametersFR1->pdsch_256QAM_FR1) return(0);
|
||||
|
||||
// check featureSet
|
||||
NR_FeatureSets_t *fs=cap->featureSets;
|
||||
if (fs) {
|
||||
// go through DL feature sets and look for one with current SCS
|
||||
for (int i=0;i<fs->featureSetsDownlinkPerCC->list.count;i++) {
|
||||
if (fs->featureSetsDownlinkPerCC->list.array[i]->supportedSubcarrierSpacingDL == common_scs &&
|
||||
fs->featureSetsDownlinkPerCC->list.array[i]->supportedModulationOrderDL &&
|
||||
*fs->featureSetsDownlinkPerCC->list.array[i]->supportedModulationOrderDL == NR_ModulationOrder_qam256) return(1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int is_ul_256QAM_supported(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) {
|
||||
int common_band = *rrc->carrier.servingcellconfigcommon->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[0];
|
||||
int common_scs = rrc->carrier.servingcellconfigcommon->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
|
||||
for (int i=0;i<cap->rf_Parameters.supportedBandListNR.list.count;i++) {
|
||||
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[i];
|
||||
if (bandNRinfo->bandNR == common_band && !bandNRinfo->pusch_256QAM) return (0);
|
||||
}
|
||||
|
||||
// check featureSet
|
||||
NR_FeatureSets_t *fs=cap->featureSets;
|
||||
if (fs) {
|
||||
// go through UL feature sets and look for one with current SCS
|
||||
for (int i=0;i<fs->featureSetsUplinkPerCC->list.count;i++) {
|
||||
if (fs->featureSetsUplinkPerCC->list.array[i]->supportedSubcarrierSpacingUL == common_scs &&
|
||||
fs->featureSetsUplinkPerCC->list.array[i]->supportedModulationOrderUL &&
|
||||
*fs->featureSetsUplinkPerCC->list.array[i]->supportedModulationOrderUL == NR_ModulationOrder_qam256) return(1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int get_ul_mimo_layersCB(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) {
|
||||
int common_scs = rrc->carrier.servingcellconfigcommon->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
|
||||
|
||||
@@ -3271,11 +3421,9 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
}
|
||||
|
||||
if (ue_context_p->ue_context.UE_Capability_nr) {
|
||||
fprintf(fd,"NR RRC UE cap: BW DL %x. BW UL %x, 256 QAM DL %s, 256 QAM UL %s, DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d\n",
|
||||
fprintf(fd,"NR RRC UE cap: BW DL %x. BW UL %x, DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d\n",
|
||||
get_dl_bw_mask(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
|
||||
get_ul_bw_mask(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
|
||||
is_dl_256QAM_supported(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr) == 1 ? "yes" : "no",
|
||||
is_ul_256QAM_supported(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr) == 1 ? "yes" : "no",
|
||||
get_dl_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
|
||||
get_ul_mimo_layersCB(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
|
||||
get_ul_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr));
|
||||
@@ -3470,6 +3618,10 @@ void *rrc_gnb_task(void *args_p) {
|
||||
rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case NGAP_PDUSESSION_MODIFY_REQ:
|
||||
rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
case NGAP_PDUSESSION_RELEASE_COMMAND:
|
||||
rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||
break;
|
||||
|
||||
@@ -1058,6 +1058,264 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
|
||||
MessageDef *msg_p,
|
||||
const char *msg_name,
|
||||
instance_t instance
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
uint16_t ue_initial_id;
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
uint8_t nb_pdusessions_tomodify;
|
||||
rrc_gNB_ue_context_t *ue_context_p = NULL;
|
||||
uint8_t i;
|
||||
uint8_t qos_flow_index;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
ue_initial_id = NGAP_PDUSESSION_MODIFY_REQ(msg_p).ue_initial_id;
|
||||
gNB_ue_ngap_id = NGAP_PDUSESSION_MODIFY_REQ(msg_p).gNB_ue_ngap_id;
|
||||
nb_pdusessions_tomodify = NGAP_PDUSESSION_MODIFY_REQ(msg_p).nb_pdusessions_tomodify;
|
||||
|
||||
ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id);
|
||||
if (ue_context_p == NULL) {
|
||||
LOG_W(NR_RRC, "[gNB %ld] In NGAP_PDUSESSION_MODIFY_REQ: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id);
|
||||
// TODO
|
||||
return (-1);
|
||||
} else {
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
|
||||
ctxt.eNB_index = 0;
|
||||
|
||||
ue_context_p->ue_context.gNB_ue_ngap_id = gNB_ue_ngap_id;
|
||||
{
|
||||
int j;
|
||||
boolean_t is_treated[NGAP_MAX_PDUSESSION] = {FALSE};
|
||||
uint8_t nb_of_failed_pdusessions = 0;
|
||||
|
||||
for (i = 0; i < nb_pdusessions_tomodify; i++) {
|
||||
if (is_treated[i] == TRUE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//Check if same PDU session ID to handle multiple pdu sessions
|
||||
for (j = i+1; j < nb_pdusessions_tomodify; j++) {
|
||||
if (is_treated[j] == FALSE &&
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id ==
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) {
|
||||
// handle multiple pdu session id
|
||||
LOG_D(NR_RRC, "handle multiple pdu session id \n");
|
||||
ue_context_p->ue_context.modify_pdusession[j].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.modify_pdusession[j].param.pdusession_id =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id;
|
||||
ue_context_p->ue_context.modify_pdusession[j].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
ue_context_p->ue_context.modify_pdusession[j].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances;
|
||||
nb_of_failed_pdusessions++;
|
||||
is_treated[i] = TRUE;
|
||||
is_treated[j] = TRUE;
|
||||
}
|
||||
}
|
||||
// handle multiple pdu session id case
|
||||
if (is_treated[i] == TRUE) {
|
||||
LOG_D(NR_RRC, "handle multiple pdu session id \n");
|
||||
ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id;
|
||||
ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
ue_context_p->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances;
|
||||
nb_of_failed_pdusessions++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check pdu session ID is established
|
||||
for (j = 0; j < NR_NB_RB_MAX -3; j++) {
|
||||
if (ue_context_p->ue_context.pduSession[j].param.pdusession_id ==
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) {
|
||||
if (ue_context_p->ue_context.pduSession[j].status == PDU_SESSION_STATUS_TORELEASE ||
|
||||
ue_context_p->ue_context.pduSession[j].status == PDU_SESSION_STATUS_DONE) {
|
||||
break;
|
||||
}
|
||||
// Found established pdu session, prepare to send RRC message
|
||||
ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id;
|
||||
ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_NOTHING;
|
||||
if (NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.buffer != NULL) {
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.nas_pdu.buffer =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.buffer;
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.nas_pdu.length =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.length;
|
||||
}
|
||||
// Save new pdu session parameters, qos, upf addr, teid
|
||||
for (qos_flow_index = 0; qos_flow_index < NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nb_qos; qos_flow_index++) {
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.qos[qos_flow_index] =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].qos[qos_flow_index];
|
||||
}
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.nb_qos =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nb_qos;
|
||||
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.upf_addr =
|
||||
ue_context_p->ue_context.pduSession[j].param.upf_addr;
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.gtp_teid =
|
||||
ue_context_p->ue_context.pduSession[j].param.gtp_teid;
|
||||
|
||||
is_treated[i] = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// handle Unknown pdu session ID
|
||||
if (is_treated[i] == FALSE) {
|
||||
LOG_D(NR_RRC, "handle Unknown pdu session ID \n");
|
||||
ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id =
|
||||
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id;
|
||||
ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
ue_context_p->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID;
|
||||
nb_of_failed_pdusessions++;
|
||||
is_treated[i] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
ue_context_p->ue_context.nb_of_modify_pdusessions = nb_pdusessions_tomodify;
|
||||
ue_context_p->ue_context.nb_of_failed_pdusessions = nb_of_failed_pdusessions;
|
||||
}
|
||||
|
||||
if (ue_context_p->ue_context.nb_of_failed_pdusessions < ue_context_p->ue_context.nb_of_modify_pdusessions) {
|
||||
LOG_D(NR_RRC, "generate RRCReconfiguration \n");
|
||||
rrc_gNB_modify_dedicatedRRCReconfiguration(&ctxt, ue_context_p);
|
||||
} else { // all pdu modification failed
|
||||
LOG_I(NR_RRC, "pdu session modify failed, fill NGAP_PDUSESSION_MODIFY_RESP with the pdu session information that failed to modify \n");
|
||||
uint8_t nb_of_pdu_sessions_failed = 0;
|
||||
MessageDef *msg_fail_p = NULL;
|
||||
msg_fail_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP);
|
||||
if (msg_fail_p == NULL) {
|
||||
LOG_E(NR_RRC, "itti_alloc_new_message failed, msg_fail_p is NULL \n");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).gNB_ue_ngap_id = gNB_ue_ngap_id;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).nb_of_pdusessions = 0;
|
||||
|
||||
for (nb_of_pdu_sessions_failed = 0; nb_of_pdu_sessions_failed < ue_context_p->ue_context.nb_of_failed_pdusessions; nb_of_pdu_sessions_failed++) {
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].pdusession_id =
|
||||
ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].param.pdusession_id;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].cause =
|
||||
ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].cause;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].cause_value =
|
||||
ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].cause_value;
|
||||
}
|
||||
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).nb_of_pdusessions_failed =
|
||||
ue_context_p->ue_context.nb_of_failed_pdusessions;
|
||||
itti_send_msg_to_task(TASK_NGAP, instance, msg_fail_p);
|
||||
ue_context_p->ue_context.nb_of_modify_pdusessions = 0;
|
||||
ue_context_p->ue_context.nb_of_failed_pdusessions = 0;
|
||||
memset(ue_context_p->ue_context.modify_pdusession, 0, sizeof(ue_context_p->ue_context.modify_pdusession));
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t xid
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
MessageDef *msg_p = NULL;
|
||||
int i, j;
|
||||
uint8_t qos_flow_index;
|
||||
uint8_t pdu_sessions_failed = 0;
|
||||
uint8_t pdu_sessions_done = 0;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP);
|
||||
if (msg_p == NULL) {
|
||||
LOG_E(NR_RRC, "itti_alloc_new_message failed, msg_p is NULL \n");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
LOG_I(NR_RRC, "send message NGAP_PDUSESSION_MODIFY_RESP \n");
|
||||
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id;
|
||||
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
|
||||
if (xid == ue_context_pP->ue_context.modify_pdusession[i].xid) {
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_DONE) {
|
||||
for (j = 0; j < ue_context_pP->ue_context.setup_pdu_sessions; j++) {
|
||||
if (ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id ==
|
||||
ue_context_pP->ue_context.pduSession[j].param.pdusession_id) {
|
||||
LOG_I(NR_RRC, "update pdu session %d \n", ue_context_pP->ue_context.pduSession[j].param.pdusession_id);
|
||||
// Update ue_context_pP->ue_context.pduSession
|
||||
ue_context_pP->ue_context.pduSession[j].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
ue_context_pP->ue_context.pduSession[j].cause = NGAP_CAUSE_NOTHING;
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) {
|
||||
ue_context_pP->ue_context.pduSession[j].param.qos[qos_flow_index] =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j < ue_context_pP->ue_context.setup_pdu_sessions) {
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].pdusession_id =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id;
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) {
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].qos[qos_flow_index].qfi =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].qfi;
|
||||
}
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].nb_of_qos_flow =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos;
|
||||
LOG_I(NR_RRC, "Modify Resp (msg index %d, pdu session index %d, status %d, xid %d): nb_of_modify_pdusessions %d, pdusession_id %d \n ",
|
||||
pdu_sessions_done, i, ue_context_pP->ue_context.modify_pdusession[i].status, xid,
|
||||
ue_context_pP->ue_context.nb_of_modify_pdusessions,
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].pdusession_id);
|
||||
pdu_sessions_done++;
|
||||
} else {
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause = NGAP_CAUSE_RADIO_NETWORK;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID;
|
||||
pdu_sessions_failed++;
|
||||
}
|
||||
} else if ((ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_NEW) ||
|
||||
(ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_ESTABLISHED)) {
|
||||
LOG_D (NR_RRC, "PDU SESSION is NEW or already ESTABLISHED\n");
|
||||
} else if (ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_FAILED) {
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause_value =
|
||||
ue_context_pP->ue_context.modify_pdusession[i].cause_value;
|
||||
pdu_sessions_failed++;
|
||||
}
|
||||
} else {
|
||||
LOG_D(NR_RRC,"xid does not correspond (context pdu session index %d, status %d, xid %d/%d) \n ",
|
||||
i, ue_context_pP->ue_context.modify_pdusession[i].status, xid, ue_context_pP->ue_context.modify_pdusession[i].xid);
|
||||
}
|
||||
}
|
||||
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).nb_of_pdusessions = pdu_sessions_done;
|
||||
NGAP_PDUSESSION_MODIFY_RESP(msg_p).nb_of_pdusessions_failed = pdu_sessions_failed;
|
||||
|
||||
if (pdu_sessions_done > 0 || pdu_sessions_failed > 0) {
|
||||
LOG_D(NR_RRC,"NGAP_PDUSESSION_MODIFY_RESP: sending the message: nb_of_pdusessions %d, total pdu session %d, index %d\n",
|
||||
ue_context_pP->ue_context.nb_of_modify_pdusessions, ue_context_pP->ue_context.setup_pdu_sessions, i);
|
||||
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
|
||||
} else {
|
||||
itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(
|
||||
const module_id_t gnb_mod_idP,
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "NR_RRCSetupComplete-IEs.h"
|
||||
#include "NR_RegisteredAMF.h"
|
||||
#include "NR_UL-DCCH-Message.h"
|
||||
#include "NGAP_CauseRadioNetwork.h"
|
||||
|
||||
typedef struct rrc_ue_ngap_ids_s {
|
||||
/* Tree related data */
|
||||
@@ -107,6 +108,27 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
|
||||
instance_t instance
|
||||
);
|
||||
|
||||
int
|
||||
rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
|
||||
MessageDef *msg_p,
|
||||
const char *msg_name,
|
||||
instance_t instance
|
||||
);
|
||||
|
||||
int
|
||||
rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *const ue_context_pP,
|
||||
uint8_t xid
|
||||
);
|
||||
|
||||
void
|
||||
rrc_gNB_modify_dedicatedRRCReconfiguration(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_gNB_ue_context_t *ue_context_pP
|
||||
);
|
||||
|
||||
|
||||
void
|
||||
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(
|
||||
const module_id_t gnb_mod_idP,
|
||||
|
||||
@@ -245,6 +245,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
ue_context_p->ue_context.spCellConfig->spCellConfigDedicated,
|
||||
reconfig_ies,
|
||||
ue_context_p->ue_context.secondaryCellGroup,
|
||||
ue_context_p->ue_context.UE_Capability_nr,
|
||||
carrier->pdsch_AntennaPorts,
|
||||
carrier->pusch_AntennaPorts,
|
||||
carrier->minRXTXTIME,
|
||||
@@ -256,6 +257,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
||||
NULL,
|
||||
reconfig_ies,
|
||||
ue_context_p->ue_context.secondaryCellGroup,
|
||||
ue_context_p->ue_context.UE_Capability_nr,
|
||||
carrier->pdsch_AntennaPorts,
|
||||
carrier->pusch_AntennaPorts,
|
||||
carrier->minRXTXTIME,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "nr_rrc_config.h"
|
||||
|
||||
#define false 0
|
||||
#define true 1
|
||||
@@ -52,6 +53,7 @@
|
||||
void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
int scg_id,
|
||||
int servCellIndex,
|
||||
int dl_antenna_ports,
|
||||
@@ -64,6 +66,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
||||
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
|
||||
|
||||
if(uecap == NULL)
|
||||
LOG_E(RRC,"No UE Capabilities available when programming default CellGroup in NSA\n");
|
||||
|
||||
// This assert will never happen in the current implementation because NUMBER_OF_UE_MAX = 4.
|
||||
// However, if in the future NUMBER_OF_UE_MAX is increased, it will be necessary to improve the allocation of SRS resources,
|
||||
// where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations.
|
||||
@@ -337,12 +342,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
|
||||
if (!get_softmodem_params()->use_256qam_table) {
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table=NULL;
|
||||
} else {
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table = calloc(1, sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table));
|
||||
*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table = NR_PDSCH_Config__mcs_Table_qam256;
|
||||
}
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table=NULL;
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
|
||||
*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
|
||||
secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
|
||||
@@ -606,43 +606,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
|
||||
if (!get_softmodem_params()->use_256qam_table) {
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table=NULL;
|
||||
} else {
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = calloc(1, sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table));
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NR_PDSCH_Config__mcs_Table_qam256;
|
||||
}
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.choice.staticBundling = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.choice.staticBundling));
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.choice.staticBundling->bundleSize =
|
||||
calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.choice.staticBundling->bundleSize));
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.choice.staticBundling->bundleSize = NR_PDSCH_Config__prb_BundlingType__staticBundling__bundleSize_wideband;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->zp_CSI_RS_ResourceToAddModList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->zp_CSI_RS_ResourceToReleaseList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->aperiodic_ZP_CSI_RS_ResourceSetsToAddModList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->aperiodic_ZP_CSI_RS_ResourceSetsToReleaseList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->sp_ZP_CSI_RS_ResourceSetsToAddModList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->sp_ZP_CSI_RS_ResourceSetsToReleaseList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->p_ZP_CSI_RS_ResourceSet=NULL;
|
||||
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->tci_StatesToReleaseList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->vrb_ToPRB_Interleaver=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->resourceAllocation=NR_PDSCH_Config__resourceAllocation_resourceAllocationType1;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_AggregationFactor=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternToAddModList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternToReleaseList=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
|
||||
if (!get_softmodem_params()->use_256qam_table) {
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table=NULL;
|
||||
} else {
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = calloc(1, sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table));
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NR_PDSCH_Config__mcs_Table_qam256;
|
||||
}
|
||||
set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing, uecap, bwp->bwp_Dedicated, servingcellconfigcommon);
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
|
||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
|
||||
@@ -745,8 +709,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
pusch_Config->pusch_TimeDomainAllocationList = NULL;
|
||||
pusch_Config->pusch_AggregationFactor=NULL;
|
||||
pusch_Config->mcs_Table=NULL;
|
||||
pusch_Config->mcs_TableTransformPrecoder=NULL;
|
||||
pusch_Config->transformPrecoder= NULL;
|
||||
pusch_Config->mcs_TableTransformPrecoder=NULL;
|
||||
/* if msg3_transformprecoding is set in conf file - pusch config should not disable it */
|
||||
if (servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL) {
|
||||
pusch_Config->transformPrecoder=calloc(1,sizeof(*pusch_Config->transformPrecoder));
|
||||
@@ -1336,17 +1300,17 @@ void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf = calloc(2, sizeof(uint8_t));
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.size = 2;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.bits_unused = 4;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf[0]=0;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf[1]=16;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf[0] = 0;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf[1] = 16;
|
||||
resourceMapping.nrofPorts = NR_CSI_RS_ResourceMapping__nrofPorts_p1;
|
||||
resourceMapping.cdm_Type = NR_CSI_RS_ResourceMapping__cdm_Type_noCDM;
|
||||
break;
|
||||
case 2:
|
||||
resourceMapping.frequencyDomainAllocation.present = NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf = calloc(2, sizeof(uint8_t));
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.size = 1;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.bits_unused = 2;
|
||||
resourceMapping.frequencyDomainAllocation.choice.row2.buf[0]=4;
|
||||
resourceMapping.frequencyDomainAllocation.choice.other.buf = calloc(2, sizeof(uint8_t));
|
||||
resourceMapping.frequencyDomainAllocation.choice.other.size = 1;
|
||||
resourceMapping.frequencyDomainAllocation.choice.other.bits_unused = 2;
|
||||
resourceMapping.frequencyDomainAllocation.choice.other.buf[0] = 4;
|
||||
resourceMapping.nrofPorts = NR_CSI_RS_ResourceMapping__nrofPorts_p2;
|
||||
resourceMapping.cdm_Type = NR_CSI_RS_ResourceMapping__cdm_Type_fd_CDM2;
|
||||
break;
|
||||
@@ -1379,6 +1343,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
||||
NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
NR_RRCReconfiguration_IEs_t *reconfig,
|
||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
int dl_antenna_ports,
|
||||
int ul_antenna_ports,
|
||||
int minRXTXTIME,
|
||||
@@ -1394,6 +1359,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
||||
fill_default_secondaryCellGroup(servingcellconfigcommon,
|
||||
servingcellconfigdedicated,
|
||||
secondaryCellGroup,
|
||||
uecap,
|
||||
1,
|
||||
1,
|
||||
dl_antenna_ports,
|
||||
|
||||
@@ -2210,7 +2210,7 @@ nr_rrc_ue_establish_srb2(
|
||||
// nr_rrc_ue_process_measConfig(ctxt_pP, gNB_index, ie->measConfig);
|
||||
}
|
||||
|
||||
if(ie->nonCriticalExtension->masterCellGroup!=NULL) {
|
||||
if((ie->nonCriticalExtension) && (ie->nonCriticalExtension->masterCellGroup!=NULL)) {
|
||||
nr_rrc_ue_process_masterCellGroup(
|
||||
ctxt_pP,
|
||||
gNB_index,
|
||||
@@ -2223,7 +2223,7 @@ nr_rrc_ue_establish_srb2(
|
||||
}
|
||||
|
||||
/* Check if there is dedicated NAS information to forward to NAS */
|
||||
if (ie->nonCriticalExtension->dedicatedNAS_MessageList != NULL) {
|
||||
if ((ie->nonCriticalExtension) && (ie->nonCriticalExtension->dedicatedNAS_MessageList != NULL)) {
|
||||
int list_count;
|
||||
uint32_t pdu_length;
|
||||
uint8_t *pdu_buffer;
|
||||
|
||||
@@ -1,607 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file pad_list.c
|
||||
* \brief list management primimtives
|
||||
* \author Mohamed Said MOSLI BOUKSIAA, Lionel GAUTHIER, Navid Nikaein
|
||||
* \date 2012 - 2014
|
||||
* \version 0.5
|
||||
* @ingroup util
|
||||
*/
|
||||
//#define LIST_C
|
||||
//#define NULL 0
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "pad_list.h"
|
||||
//#include <mpi.h>
|
||||
|
||||
|
||||
void job_list_init (Job_List_t *listP) {
|
||||
listP->tail = NULL;
|
||||
listP->head = NULL;
|
||||
listP->nb_elements = 0;
|
||||
}
|
||||
|
||||
void event_list_init (Event_List_t *listP) {
|
||||
listP->tail = NULL;
|
||||
listP->head = NULL;
|
||||
listP->nb_elements = 0;
|
||||
}
|
||||
|
||||
void pkt_list_init (Packet_OTG_List_t *listP) {
|
||||
listP->tail = NULL;
|
||||
listP->head = NULL;
|
||||
listP->nb_elements = 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void job_list_free (Job_List_t *listP) {
|
||||
Job_elt_t *le;
|
||||
|
||||
while ((le = job_list_remove_head (listP))) {
|
||||
free(le);
|
||||
}
|
||||
}
|
||||
|
||||
void event_list_free (Event_List_t *listP) {
|
||||
Event_elt_t *le;
|
||||
|
||||
while ((le = event_list_remove_head (listP))) {
|
||||
free(le);
|
||||
}
|
||||
}
|
||||
|
||||
void pkt_list_free (Packet_OTG_List_t *listP) {
|
||||
Packet_otg_elt_t *le;
|
||||
|
||||
while ((le = pkt_list_remove_head (listP))) {
|
||||
free(le);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Job_elt_t *job_list_get_head (Job_List_t *listP) {
|
||||
return listP->head;
|
||||
}
|
||||
|
||||
Event_elt_t *event_list_get_head (Event_List_t *listP) {
|
||||
return listP->head;
|
||||
}
|
||||
|
||||
Packet_otg_elt_t *pkt_list_get_head (Packet_OTG_List_t *listP) {
|
||||
return listP->head;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* remove an element from head of a list
|
||||
* @param pointer on targeted list
|
||||
* @return pointer on removed Job_elt_t
|
||||
*/
|
||||
Job_elt_t *job_list_remove_head (Job_List_t *listP) {
|
||||
// access optimisation
|
||||
Job_elt_t *head;
|
||||
head = listP->head;
|
||||
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
} else {
|
||||
//msg("[MEM_MGT][WARNING] remove_head_from_list(%s) no elements\n",listP->name);
|
||||
}
|
||||
|
||||
return head;
|
||||
}
|
||||
|
||||
Event_elt_t *event_list_remove_head (Event_List_t *listP) {
|
||||
// access optimisation
|
||||
Event_elt_t *head;
|
||||
head = listP->head;
|
||||
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
} else {
|
||||
//msg("[MEM_MGT][WARNING] remove_head_from_list(%s) no elements\n",listP->name);
|
||||
}
|
||||
|
||||
return head;
|
||||
}
|
||||
|
||||
Packet_otg_elt_t *pkt_list_remove_head (Packet_OTG_List_t *listP) {
|
||||
// access optimisation
|
||||
Packet_otg_elt_t *head;
|
||||
head = listP->head;
|
||||
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
} else {
|
||||
//msg("[MEM_MGT][WARNING] remove_head_from_list(%s) no elements\n",listP->name);
|
||||
}
|
||||
|
||||
return head;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Job_elt_t *job_list_remove_element (Job_elt_t *elementP, Job_List_t *listP) {
|
||||
// access optimisation;
|
||||
Job_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// test head
|
||||
head = listP->head;
|
||||
|
||||
if (listP->head == elementP) {
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (head) {
|
||||
if (head->next == elementP) {
|
||||
head->next = elementP->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
if (listP->tail == elementP) {
|
||||
listP->tail = head;
|
||||
}
|
||||
|
||||
return elementP;
|
||||
} else {
|
||||
head = head->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return elementP;
|
||||
}
|
||||
|
||||
Event_elt_t *event_list_remove_element (Event_elt_t *elementP, Event_List_t *listP) {
|
||||
// access optimisation;
|
||||
Event_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// test head
|
||||
head = listP->head;
|
||||
|
||||
if (listP->head == elementP) {
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (head) {
|
||||
if (head->next == elementP) {
|
||||
head->next = elementP->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
if (listP->tail == elementP) {
|
||||
listP->tail = head;
|
||||
}
|
||||
|
||||
return elementP;
|
||||
} else {
|
||||
head = head->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return elementP;
|
||||
}
|
||||
|
||||
Packet_otg_elt_t *pkt_list_remove_element (Packet_otg_elt_t *elementP, Packet_OTG_List_t *listP) {
|
||||
// access optimisation;
|
||||
Packet_otg_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// test head
|
||||
head = listP->head;
|
||||
|
||||
if (listP->head == elementP) {
|
||||
// almost one element
|
||||
if (head != NULL) {
|
||||
listP->head = head->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
// if only one element, update tail
|
||||
if (listP->head == NULL) {
|
||||
listP->tail = NULL;
|
||||
} else {
|
||||
head->next = NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (head) {
|
||||
if (head->next == elementP) {
|
||||
head->next = elementP->next;
|
||||
listP->nb_elements = listP->nb_elements - 1;
|
||||
|
||||
if (listP->tail == elementP) {
|
||||
listP->tail = head;
|
||||
}
|
||||
|
||||
return elementP;
|
||||
} else {
|
||||
head = head->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return elementP;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* add an element to the beginning of a list
|
||||
* @param pointer on targeted list
|
||||
* @return pointer on removed Job_elt_t
|
||||
*/
|
||||
|
||||
void job_list_add_head (Job_elt_t *elementP, Job_List_t *listP) {
|
||||
// access optimisation;
|
||||
Job_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
head = listP->head;
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
|
||||
// almost one element
|
||||
if (head == NULL) {
|
||||
listP->head = elementP;
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
elementP->next = head;
|
||||
listP->head = elementP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void event_list_add_head (Event_elt_t *elementP, Event_List_t *listP) {
|
||||
// access optimisation;
|
||||
Event_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
head = listP->head;
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
|
||||
// almost one element
|
||||
if (head == NULL) {
|
||||
listP->head = elementP;
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
elementP->next = head;
|
||||
listP->head = elementP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pkt_list_add_head (Packet_otg_elt_t *elementP, Packet_OTG_List_t *listP) {
|
||||
// access optimisation;
|
||||
Packet_otg_elt_t *head;
|
||||
|
||||
if (elementP != NULL) {
|
||||
head = listP->head;
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
|
||||
// almost one element
|
||||
if (head == NULL) {
|
||||
listP->head = elementP;
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
elementP->next = head;
|
||||
listP->head = elementP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void event_list_add_element (Event_elt_t *elementP, Event_elt_t *previous, Event_List_t *listP) {
|
||||
// access optimisation;
|
||||
Event_elt_t *next;
|
||||
|
||||
if (elementP != NULL && previous != NULL) {
|
||||
elementP->next = NULL;
|
||||
next = previous->next;
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
|
||||
// almost one element
|
||||
if (next == NULL) {
|
||||
previous->next = elementP;
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
elementP->next = previous->next;
|
||||
previous->next = elementP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* add an element to the end of a list
|
||||
* @param pointer on targeted list
|
||||
* @return pointer on removed Job_elt_t
|
||||
*/
|
||||
void job_list_add_tail_eurecom (Job_elt_t *elementP, Job_List_t *listP) {
|
||||
Job_elt_t *tail;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// access optimisation
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
elementP->next = NULL;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = elementP;
|
||||
} else {
|
||||
tail->next = elementP;
|
||||
}
|
||||
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
//msg("[CNT_LIST][ERROR] add_cnt_tail() element NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
void event_list_add_tail_eurecom (Event_elt_t *elementP, Event_List_t *listP) {
|
||||
Event_elt_t *tail;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// access optimisation
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
elementP->next = NULL;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = elementP;
|
||||
} else {
|
||||
tail->next = elementP;
|
||||
}
|
||||
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
//msg("[CNT_LIST][ERROR] add_cnt_tail() element NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
void pkt_list_add_tail_eurecom (Packet_otg_elt_t *elementP, Packet_OTG_List_t *listP) {
|
||||
Packet_otg_elt_t *tail;
|
||||
|
||||
if (elementP != NULL) {
|
||||
// access optimisation
|
||||
listP->nb_elements = listP->nb_elements + 1;
|
||||
elementP->next = NULL;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = elementP;
|
||||
} else {
|
||||
tail->next = elementP;
|
||||
}
|
||||
|
||||
listP->tail = elementP;
|
||||
} else {
|
||||
//msg("[CNT_LIST][ERROR] add_cnt_tail() element NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void job_list_add_list (Job_List_t *sublistP, Job_List_t *listP) {
|
||||
if (sublistP) {
|
||||
if (sublistP->head) {
|
||||
// access optimisation
|
||||
Job_elt_t *tail;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = sublistP->head;
|
||||
} else {
|
||||
tail->next = sublistP->head;
|
||||
}
|
||||
|
||||
listP->tail = sublistP->tail;
|
||||
// clear sublist
|
||||
sublistP->head = NULL;
|
||||
sublistP->tail = NULL;
|
||||
listP->nb_elements = listP->nb_elements + sublistP->nb_elements;
|
||||
sublistP->nb_elements = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void event_list_add_list (Event_List_t *sublistP, Event_List_t *listP) {
|
||||
if (sublistP) {
|
||||
if (sublistP->head) {
|
||||
// access optimisation
|
||||
Event_elt_t *tail;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = sublistP->head;
|
||||
} else {
|
||||
tail->next = sublistP->head;
|
||||
}
|
||||
|
||||
listP->tail = sublistP->tail;
|
||||
// clear sublist
|
||||
sublistP->head = NULL;
|
||||
sublistP->tail = NULL;
|
||||
listP->nb_elements = listP->nb_elements + sublistP->nb_elements;
|
||||
sublistP->nb_elements = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pkt_list_add_list (Packet_OTG_List_t *sublistP, Packet_OTG_List_t *listP) {
|
||||
if (sublistP) {
|
||||
if (sublistP->head) {
|
||||
// access optimisation
|
||||
Packet_otg_elt_t *tail;
|
||||
tail = listP->tail;
|
||||
|
||||
// almost one element
|
||||
if (tail == NULL) {
|
||||
listP->head = sublistP->head;
|
||||
} else {
|
||||
tail->next = sublistP->head;
|
||||
}
|
||||
|
||||
listP->tail = sublistP->tail;
|
||||
// clear sublist
|
||||
sublistP->head = NULL;
|
||||
sublistP->tail = NULL;
|
||||
listP->nb_elements = listP->nb_elements + sublistP->nb_elements;
|
||||
sublistP->nb_elements = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void job_list_display (Job_List_t *listP) {
|
||||
//Correct the output once the content of struct Job is fixed
|
||||
/*Job_elt_t *cursor;
|
||||
unsigned short nb_elements = 0;
|
||||
|
||||
if (listP) {
|
||||
cursor = listP->head;
|
||||
if (cursor) {
|
||||
while (cursor != NULL) {
|
||||
if (cursor->job.type == eNB_DL)
|
||||
printf ("DL eNB From (%d,%d)\n", (cursor->job).nid, (cursor->job).mid);
|
||||
else if (cursor->job.type == UE_DL)
|
||||
printf ("DL UE From (%d,%d)\n", (cursor->job).nid, (cursor->job).mid);
|
||||
else if (cursor->job.type == UE_UL)
|
||||
printf ("UL UE From (%d,%d)\n", (cursor->job).nid, (cursor->job).mid);
|
||||
else if (cursor->job.type == eNB_UL)
|
||||
printf ("UL eNB From (%d,%d)\n", (cursor->job).nid, (cursor->job).mid);
|
||||
//msg ("From (%d,%d) To (%d,%d)\n", (cursor->job).node1, (cursor->job).master1, (cursor->job).node2, (cursor->job).master2);
|
||||
cursor = cursor->next;
|
||||
nb_elements++;
|
||||
}
|
||||
printf ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
//msg ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
}
|
||||
} else {
|
||||
printf ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
//msg ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
}*/
|
||||
}
|
||||
|
||||
void event_list_display (Event_List_t *listP) {
|
||||
Event_elt_t *cursor;
|
||||
unsigned short nb_elements = 0;
|
||||
|
||||
if (listP) {
|
||||
cursor = listP->head;
|
||||
|
||||
if (cursor) {
|
||||
while (cursor != NULL) {
|
||||
printf ("Ev (%d,%d)\n", (cursor->event).type, (cursor->event).frame);
|
||||
//msg ("From (%d,%d) To (%d,%d)\n", (cursor->job).node1, (cursor->job).master1, (cursor->job).node2, (cursor->job).master2);
|
||||
cursor = cursor->next;
|
||||
nb_elements++;
|
||||
}
|
||||
|
||||
printf ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
//msg ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
}
|
||||
} else {
|
||||
printf ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
//msg ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
void pkt_list_display (Packet_OTG_List_t *listP) {
|
||||
Packet_otg_elt_t *cursor;
|
||||
unsigned short nb_elements = 0;
|
||||
|
||||
if (listP) {
|
||||
cursor = listP->head;
|
||||
|
||||
if (cursor) {
|
||||
while (cursor != NULL) {
|
||||
printf ("Pkt (DST %d, RB %ld)\n", (cursor->otg_pkt).dst_id, (cursor->otg_pkt).rb_id);
|
||||
//msg ("From (%d,%d) To (%d,%d)\n", (cursor->job).node1, (cursor->job).master1, (cursor->job).node2, (cursor->job).master2);
|
||||
cursor = cursor->next;
|
||||
nb_elements++;
|
||||
}
|
||||
|
||||
printf ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
//msg ("Found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
}
|
||||
} else {
|
||||
printf ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
//msg ("[SDU_MNGT][WARNING] display_cnt_dbl_lk_list_up() : list is NULL\n");
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user