Merge remote-tracking branch 'origin/develop' into NR_handling_PMI_report
@@ -59,7 +59,7 @@ if [ $# -eq 0 ]
|
||||
then
|
||||
echo " ---- Checking the whole repository ----"
|
||||
echo ""
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted || true`
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive --exclude=ci-scripts --exclude=cmake_targets *.c *.h | grep -c Formatted || true`
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
||||
|
||||
@@ -136,7 +136,7 @@ fi
|
||||
# Merge request scenario
|
||||
|
||||
MERGE_COMMMIT=`git log -n1 --pretty=format:%H`
|
||||
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
||||
TARGET_INIT_COMMIT=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH`
|
||||
|
||||
echo " ---- Checking the modified files by the merge request ----"
|
||||
echo ""
|
||||
|
||||
@@ -55,7 +55,7 @@ amarisoft_ue_1:
|
||||
Duration : 60
|
||||
Ping : /tmp/test_ue1.log
|
||||
UELog : /tmp/ue1.log
|
||||
HostIPAddress : 192.168.18.89
|
||||
HostIPAddress : 172.21.16.144
|
||||
HostUsername : root
|
||||
HostPassword : toor
|
||||
HostSourceCodePath : /tmp
|
||||
|
||||
@@ -294,6 +294,9 @@ class Containerize():
|
||||
if image != 'ran-build':
|
||||
mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + imageTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
|
||||
# Flatten Image
|
||||
if image != 'ran-build':
|
||||
mySSH.command('python3 ./ci-scripts/flatten_image.py --tag ' + image + ':' + imageTag, '\$', 300)
|
||||
# split the log
|
||||
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
|
||||
mySSH.command('python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/' + image + '.log', '\$', 5)
|
||||
|
||||
@@ -37,6 +37,7 @@ import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import time
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
@@ -237,3 +238,205 @@ class StaticCodeAnalysis():
|
||||
|
||||
return 0
|
||||
|
||||
def LicenceAndFormattingCheck(self, HTML):
|
||||
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
lIpAddr = self.eNBIPAddress
|
||||
lUserName = self.eNBUserName
|
||||
lPassWord = self.eNBPassword
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
|
||||
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('Building on server: ' + lIpAddr)
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
|
||||
self.testCase_id = HTML.testCase_id
|
||||
|
||||
# on RedHat/CentOS .git extension is mandatory
|
||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||
if result is not None:
|
||||
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||
else:
|
||||
full_ran_repo_name = self.ranRepository + '.git'
|
||||
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||
# if the commit ID is provided use it to point to it
|
||||
if self.ranCommitID != '':
|
||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||
# if the branch is not develop, then it is a merge request and we need to do
|
||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||
argToPass = ''
|
||||
if (self.ranAllowMerge):
|
||||
argToPass = '--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH=' + self.ranBranch
|
||||
if self.ranTargetBranch == '':
|
||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||
argToPass += ' --build-arg TARGET_BRANCH=develop '
|
||||
else:
|
||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||
argToPass += ' --build-arg TARGET_BRANCH=' + self.ranTargetBranch + ' '
|
||||
|
||||
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
|
||||
mySSH.command('docker build --target oai-formatting-check --tag oai-formatting-check:latest ' + argToPass + '--file ci-scripts/docker/Dockerfile.formatting.bionic . > cmake_targets/log/oai-formatting-check.txt 2>&1', '\$', 600)
|
||||
|
||||
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
|
||||
mySSH.command('docker image prune --force', '\$', 60)
|
||||
mySSH.command('docker volume prune --force', '\$', 60)
|
||||
|
||||
# Analyzing the logs
|
||||
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.')
|
||||
|
||||
finalStatus = 0
|
||||
if (os.path.isfile('./oai-formatting-check.txt')):
|
||||
analyzed = False
|
||||
nbFilesNotFormatted = 0
|
||||
listFiles = False
|
||||
listFilesNotFormatted = []
|
||||
circularHeaderDependency = False
|
||||
circularHeaderDependencyFiles = []
|
||||
gnuGplLicence = False
|
||||
gnuGplLicenceFiles = []
|
||||
suspectLicence = False
|
||||
suspectLicenceFiles = []
|
||||
with open('./oai-formatting-check.txt', 'r') as logfile:
|
||||
for line in logfile:
|
||||
ret = re.search('./ci-scripts/checkCodingFormattingRules.sh', str(line))
|
||||
if ret is not None:
|
||||
analyzed = True
|
||||
if analyzed:
|
||||
ret = re.search('Nb Files that do NOT follow OAI rules: (?P<nb_errors>[0-9\.]+)', str(line))
|
||||
if ret is not None:
|
||||
nbFilesNotFormatted = int(ret.group('nb_errors'))
|
||||
|
||||
if re.search('=== Files not properly formatted ===', str(line)) is not None:
|
||||
listFiles = True
|
||||
if listFiles:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
listFiles = False
|
||||
elif re.search('Running in|Files not properly formatted', str(line)) is not None:
|
||||
pass
|
||||
else:
|
||||
listFilesNotFormatted.append(str(line).strip())
|
||||
|
||||
if re.search('=== Files with incorrect define protection ===', str(line)) is not None:
|
||||
circularHeaderDependency = True
|
||||
if circularHeaderDependency:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
circularHeaderDependency = False
|
||||
elif re.search('Running in|Files with incorrect define protection', str(line)) is not None:
|
||||
pass
|
||||
else:
|
||||
circularHeaderDependencyFiles.append(str(line).strip())
|
||||
|
||||
if re.search('=== Files with a GNU GPL licence Banner ===', str(line)) is not None:
|
||||
gnuGplLicence = True
|
||||
if gnuGplLicence:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
gnuGplLicence = False
|
||||
elif re.search('Running in|Files with a GNU GPL licence Banner', str(line)) is not None:
|
||||
pass
|
||||
else:
|
||||
gnuGplLicenceFiles.append(str(line).strip())
|
||||
|
||||
if re.search('=== Files with a suspect Banner ===', str(line)) is not None:
|
||||
suspectLicence = True
|
||||
if suspectLicence:
|
||||
if re.search('Removing intermediate container', str(line)) is not None:
|
||||
suspectLicence = False
|
||||
elif re.search('Running in|Files with a suspect Banner', str(line)) is not None:
|
||||
pass
|
||||
else:
|
||||
suspectLicenceFiles.append(str(line).strip())
|
||||
|
||||
logfile.close()
|
||||
if analyzed:
|
||||
logging.debug('files not formatted properly: ' + str(nbFilesNotFormatted))
|
||||
if nbFilesNotFormatted == 0:
|
||||
HTML.CreateHtmlTestRow('File(s) Format', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not following OAI Rules: ' + str(nbFilesNotFormatted) + '\n'
|
||||
for nFile in listFilesNotFormatted:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('File(s) Format', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
|
||||
logging.debug('header files not respecting the circular dependency protection: ' + str(len(circularHeaderDependencyFiles)))
|
||||
if len(circularHeaderDependencyFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Header Circular Dependency', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(circularHeaderDependencyFiles)) + '\n'
|
||||
for nFile in circularHeaderDependencyFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Header Circular Dependency', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
logging.debug('files with a GNU GPL license: ' + str(len(gnuGplLicenceFiles)))
|
||||
if len(gnuGplLicenceFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Files w/ GNU GPL License', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(gnuGplLicenceFiles)) + '\n'
|
||||
for nFile in gnuGplLicenceFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Files w/ GNU GPL License', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
logging.debug('files with a suspect license: ' + str(len(suspectLicenceFiles)))
|
||||
if len(suspectLicenceFiles) == 0:
|
||||
HTML.CreateHtmlTestRow('Files with suspect license', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
html_queue = SimpleQueue()
|
||||
html_cell = '<pre style="background-color:white">\n'
|
||||
html_cell += 'Number of files not respecting: ' + str(len(suspectLicenceFiles)) + '\n'
|
||||
for nFile in suspectLicenceFiles:
|
||||
html_cell += str(nFile).strip() + '\n'
|
||||
html_cell += '</pre>'
|
||||
html_queue.put(html_cell)
|
||||
HTML.CreateHtmlTestRowQueue('Files with suspect license', 'KO', 1, html_queue)
|
||||
del(html_cell)
|
||||
del(html_queue)
|
||||
finalStatus = -1
|
||||
|
||||
else:
|
||||
finalStatus = -1
|
||||
HTML.htmleNBFailureMsg = 'Could not fully analyze oai-formatting-check.txt file'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
else:
|
||||
finalStatus = -1
|
||||
HTML.htmleNBFailureMsg = 'Could not access oai-formatting-check.txt file'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
|
||||
return finalStatus
|
||||
|
||||
@@ -225,6 +225,7 @@ RUs = (
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
sl_ahead = 12;
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 97;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x010203; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x112233; // 0 false, else true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
# tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pusch_AntennaPorts = 2;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||
#absoluteFrequencySSB = 620640;
|
||||
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
|
||||
absoluteFrequencySSB = 621312;
|
||||
# this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2
|
||||
#absoluteFrequencySSB = 634080;
|
||||
# this is 3600.48 MHz
|
||||
#absoluteFrequencySSB = 640032;
|
||||
#dl_frequencyBand = 78;
|
||||
# this is 3301.68 MHz
|
||||
#dl_absoluteFrequencyPointA = 620112;
|
||||
# this is 3300.60 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
# this is 3502.56 MHz
|
||||
#dl_absoluteFrequencyPointA = 633552;
|
||||
# this is 3600.48 MHz
|
||||
#dl_absoluteFrequencyPointA = 640032;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -104;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
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 = 5;
|
||||
nrofDownlinkSlots = 2;
|
||||
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 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
# pusch_TargetSNRx10 = 200;
|
||||
# pucch_TargetSNRx10 = 150;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||
## beamforming 2x2 matrix:
|
||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||
## beamforming 4x4 matrix:
|
||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||
sf_extension = 0
|
||||
sdr_addrs = "mgmt_addr=172.21.19.14,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||
sl_ahead = 5;
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
@@ -63,8 +63,8 @@ gNBs =
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 13475; # 6366 12925 12956 28875 12952
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
@@ -85,7 +85,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 13475;
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
FROM ubuntu:bionic AS oai-formatting-check
|
||||
|
||||
ARG MERGE_REQUEST
|
||||
ARG SRC_BRANCH
|
||||
ARG TARGET_BRANCH
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
astyle \
|
||||
gawk \
|
||||
git
|
||||
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
RUN /bin/bash -c "if [[ -v MERGE_REQUEST ]]; then echo 'Source Branch = $SRC_BRANCH'; echo 'Target Branch = $TARGET_BRANCH'; else echo 'Push to develop'; fi"
|
||||
RUN /bin/bash -c "if [[ -v MERGE_REQUEST ]]; then ./ci-scripts/checkCodingFormattingRules.sh --src-branch $SRC_BRANCH --target-branch $TARGET_BRANCH; else ./ci-scripts/checkCodingFormattingRules.sh; fi"
|
||||
|
||||
RUN echo "=== Files not properly formatted ===" && \
|
||||
/bin/bash -c "if [[ -f oai_rules_result_list.txt ]]; then cat oai_rules_result_list.txt; fi"
|
||||
|
||||
RUN echo "=== Files with incorrect define protection ===" && \
|
||||
/bin/bash -c "if [[ -f header-files-w-incorrect-define.txt ]]; then cat header-files-w-incorrect-define.txt; fi"
|
||||
|
||||
RUN echo "=== Files with a GNU GPL licence Banner ===" && \
|
||||
/bin/bash -c "if [[ -f files-w-gnu-gpl-license-banner.txt ]]; then cat files-w-gnu-gpl-license-banner.txt; fi"
|
||||
|
||||
RUN echo "=== Files with a suspect Banner ===" && \
|
||||
/bin/bash -c "if [[ -f files-w-suspect-banner.txt ]]; then cat files-w-suspect-banner.txt; fi"
|
||||
@@ -255,16 +255,19 @@ class EPCManagement():
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker-compose -p 5gcn ps -a', '\$', 60)
|
||||
if re.search('start-mini-as-ue', self.cfgDeploy):
|
||||
dFile = 'docker-compose-mini-nrf-asue.yaml'
|
||||
else:
|
||||
dFile = 'docker-compose-mini-nrf.yaml'
|
||||
mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' ps -a', '\$', 60)
|
||||
if mySSH.getBefore().count('Up (healthy)') != 6:
|
||||
logging.error('Not all container healthy')
|
||||
else:
|
||||
logging.debug('OK')
|
||||
mySSH.command('docker-compose config | grep --colour=never image', '\$', 10)
|
||||
logging.debug('OK --> all containers are healthy')
|
||||
mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' config | grep --colour=never image', '\$', 10)
|
||||
listOfImages = mySSH.getBefore()
|
||||
for imageLine in listOfImages.split('\\r\\n'):
|
||||
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-/]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
|
||||
res2 = re.search('mysql', str(imageLine))
|
||||
if res1 is not None and res2 is None:
|
||||
html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
|
||||
@@ -536,7 +539,7 @@ class EPCManagement():
|
||||
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
|
||||
mySSH.command('docker volume prune --force || true', '\$', 60)
|
||||
time.sleep(2)
|
||||
mySSH.command('tshark -r /tmp/oai-cn5g.pcap | egrep --colour=never "Tracking area update" ','\$', 30)
|
||||
mySSH.command('tshark -r /tmp/oai-cn5g-v1.3.pcap | egrep --colour=never "Tracking area update" ','\$', 30)
|
||||
result = re.search('Tracking area update request', mySSH.getBefore())
|
||||
if result is not None:
|
||||
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
|
||||
@@ -830,8 +833,8 @@ class EPCManagement():
|
||||
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
|
||||
elif re.match('OAICN5G', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
|
||||
mySSH.command('cp -f /tmp/oai-cn5g.pcap .','\$', 30)
|
||||
mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g.pcap','\$', 30)
|
||||
mySSH.command('cp -f /tmp/oai-cn5g-v1.3.pcap .','\$', 30)
|
||||
mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30)
|
||||
mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def main() -> None:
|
||||
args = _parse_args()
|
||||
status = perform_flattening(args.tag)
|
||||
sys.exit(status)
|
||||
|
||||
def _parse_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser(description='Flattening Image')
|
||||
|
||||
parser.add_argument(
|
||||
'--tag', '-t',
|
||||
action='store',
|
||||
required=True,
|
||||
help='Image Tag in image-name:image tag format',
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
def perform_flattening(tag):
|
||||
# First detect which docker/podman command to use
|
||||
cli = ''
|
||||
image_prefix = ''
|
||||
cmd = 'which podman || true'
|
||||
podman_check = subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
if re.search('podman', podman_check.strip()):
|
||||
cli = 'sudo podman'
|
||||
image_prefix = 'localhost/'
|
||||
if cli == '':
|
||||
cmd = 'which docker || true'
|
||||
docker_check = subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
if re.search('docker', docker_check.strip()):
|
||||
cli = 'docker'
|
||||
image_prefix = ''
|
||||
if cli == '':
|
||||
print ('No docker / podman installed: quitting')
|
||||
return -1
|
||||
print (f'Flattening {tag}')
|
||||
|
||||
# Creating a container
|
||||
cmd = cli + ' run --name test-flatten --entrypoint /bin/true -d ' + tag
|
||||
print (cmd)
|
||||
subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
|
||||
# Export / Import trick
|
||||
cmd = cli + ' export test-flatten | ' + cli + ' import '
|
||||
# Bizarro syntax issue with podman
|
||||
if cli == 'docker':
|
||||
cmd += ' --change "ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" '
|
||||
else:
|
||||
cmd += ' --change "ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" '
|
||||
if re.search('oai-enb', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-enb" '
|
||||
cmd += ' --change "EXPOSE 2152/udp" '
|
||||
cmd += ' --change "EXPOSE 36412/udp" '
|
||||
cmd += ' --change "EXPOSE 36422/udp" '
|
||||
cmd += ' --change "CMD [\\"/opt/oai-enb/bin/lte-softmodem.Rel15\\", \\"-O\\", \\"/opt/oai-enb/etc/enb.conf\\"]" '
|
||||
cmd += ' --change "ENTRYPOINT [\\"/opt/oai-enb/bin/entrypoint.sh\\"]" '
|
||||
if re.search('oai-gnb', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-gnb" '
|
||||
cmd += ' --change "EXPOSE 2152/udp" '
|
||||
cmd += ' --change "EXPOSE 36422/udp" '
|
||||
cmd += ' --change "CMD [\\"/opt/oai-gnb/bin/nr-softmodem.Rel15\\", \\"-O\\", \\"/opt/oai-gnb/etc/gnb.conf\\"]" '
|
||||
cmd += ' --change "ENTRYPOINT [\\"/opt/oai-gnb/bin/entrypoint.sh\\"]" '
|
||||
if re.search('oai-lte-ue', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-lte-ue" '
|
||||
cmd += ' --change "CMD [\\"/opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15\\"]" '
|
||||
cmd += ' --change "ENTRYPOINT [\\"/opt/oai-lte-ue/bin/entrypoint.sh\\"]" '
|
||||
if re.search('oai-nr-ue', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-nr-ue" '
|
||||
cmd += ' --change "CMD [\\"/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15\\", \\"-O\\", \\"/opt/oai-nr-ue/etc/nr-ue.conf\\"]" '
|
||||
cmd += ' --change "ENTRYPOINT [\\"/opt/oai-nr-ue/bin/entrypoint.sh\\"]" '
|
||||
if re.search('oai-lte-ru', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-lte-ru" '
|
||||
cmd += ' --change "CMD [\\"/opt/oai-lte-ru/bin/oairu.Rel15\\", \\"-O\\", \\"/opt/oai-lte-ru/etc/rru.conf\\"]" '
|
||||
cmd += ' --change "ENTRYPOINT [\\"/opt/oai-lte-ru/bin/entrypoint.sh\\"]" '
|
||||
if re.search('oai-physim', tag):
|
||||
cmd += ' --change "WORKDIR /opt/oai-physim" '
|
||||
cmd += ' - ' + image_prefix + tag
|
||||
print (cmd)
|
||||
subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
|
||||
# Remove container
|
||||
cmd = cli + ' rm -f test-flatten'
|
||||
print (cmd)
|
||||
subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
|
||||
# At this point the original image is a dangling image.
|
||||
# CI pipeline will clean up (`image prune --force`)
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -799,7 +799,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
HTML.startTime=int(round(time.time() * 1000))
|
||||
while CiTestObj.FailReportCnt < CiTestObj.repeatCounts[0] and RAN.prematureExit:
|
||||
RAN.prematureExit=False
|
||||
# At every iteratin of the retry loop, a separator will be added
|
||||
# At every iteration of the retry loop, a separator will be added
|
||||
# pass CiTestObj.FailReportCnt as parameter of HTML.CreateHtmlRetrySeparator
|
||||
HTML.CreateHtmlRetrySeparator(CiTestObj.FailReportCnt)
|
||||
for test_case_id in todo_tests:
|
||||
@@ -923,6 +923,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
CONTAINERS.UndeployObject(HTML, RAN)
|
||||
elif action == 'Cppcheck_Analysis':
|
||||
SCA.CppCheckAnalysis(HTML)
|
||||
elif action == 'LicenceAndFormattingCheck':
|
||||
ret = SCA.LicenceAndFormattingCheck(HTML)
|
||||
if ret != 0:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Deploy_Run_PhySim':
|
||||
PHYSIM.Deploy_PhySim(HTML, RAN)
|
||||
elif action == 'DeployGenObject':
|
||||
|
||||
@@ -372,36 +372,28 @@ class RANManagement():
|
||||
else:
|
||||
pcapfile_prefix="gnb_"
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5)
|
||||
result = re.search('interfaceToUse=(?P<eth_interface>[a-zA-Z0-9\-\_]+)done', mySSH.getBefore())
|
||||
if result is not None:
|
||||
eth_interface = result.group('eth_interface')
|
||||
fltr = 'port 38412 or port 36412 or port 36422' # NGAP, S1AP, X2AP
|
||||
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
|
||||
pcapfile = pcapfile_prefix + self.testCase_id + '_log.pcap'
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + pcapfile + ' > /dev/null 2>&1 &','\$', 5)
|
||||
eth_interface = 'any'
|
||||
fltr = 'sctp'
|
||||
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
|
||||
pcapfile = pcapfile_prefix + self.testCase_id + '_log.pcap'
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + pcapfile + ' > /dev/null 2>&1 &','\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
|
||||
|
||||
# If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
|
||||
result = re.search('T_stdout', str(self.Initialize_eNB_args))
|
||||
if (result is not None):
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5)
|
||||
result = re.search('interfaceToUse=(?P<eth_interface>[a-zA-Z0-9\-\_]+)done', mySSH.getBefore())
|
||||
if result is not None:
|
||||
eth_interface = result.group('eth_interface')
|
||||
fltr = 'port 38412 or port 36412 or port 36422' # NGAP, S1AP, X2AP
|
||||
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
|
||||
self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
|
||||
mySSH.close()
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
eth_interface = 'any'
|
||||
fltr = 'sctp'
|
||||
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
|
||||
self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
|
||||
mySSH.close()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||
# Initialize_eNB_args usually start with -O and followed by the location in repository
|
||||
@@ -519,23 +511,19 @@ class RANManagement():
|
||||
logging.error('\u001B[1;37;41m eNB/gNB/ocp-eNB logging system did not show got sync! \u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
# In case of T tracer recording, we need to kill tshark on EPC side
|
||||
result = re.search('T_stdout', str(self.Initialize_eNB_args))
|
||||
if (result is not None):
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||
if self.epcPcapFile != '':
|
||||
time.sleep(0.5)
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.close()
|
||||
time.sleep(1)
|
||||
if self.epcPcapFile != '':
|
||||
copyin_res = mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
if (copyin_res == 0):
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
localEpcIpAddr = EPC.IPAddress
|
||||
localEpcUserName = EPC.UserName
|
||||
localEpcPassword = EPC.Password
|
||||
mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
|
||||
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
|
||||
if self.epcPcapFile != '':
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.close()
|
||||
if self.epcPcapFile != '':
|
||||
copyin_res = mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
if (copyin_res == 0):
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
self.prematureExit = True
|
||||
return
|
||||
else:
|
||||
|
||||
@@ -47,3 +47,4 @@
|
||||
- PingFromContainer
|
||||
- IperfFromContainer
|
||||
- StatsFromGenObject
|
||||
- LicenceAndFormattingCheck
|
||||
|
||||
@@ -33,12 +33,10 @@
|
||||
000013
|
||||
020011
|
||||
020012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<!-- Not done yet because of code instability
|
||||
030011
|
||||
030012
|
||||
-->
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000010">
|
||||
@@ -104,7 +102,7 @@
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 1M</client_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 3M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
|
||||
@@ -142,8 +142,8 @@
|
||||
<iperf_args>-u -b 125M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>formatting-tab</htmlTabRef>
|
||||
<htmlTabName>License and Formatting Checks</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000002
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>LicenceAndFormattingCheck</class>
|
||||
<desc>License and Formatting Checks</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -34,8 +34,8 @@
|
||||
050000
|
||||
050001
|
||||
000001
|
||||
070003
|
||||
070002
|
||||
070000
|
||||
070001
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
@@ -52,14 +52,12 @@
|
||||
<UE_Trace>yes</UE_Trace>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="030000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB</desc>
|
||||
@@ -70,7 +68,6 @@
|
||||
<eNB_Trace>yes</eNB_Trace>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
@@ -92,7 +89,6 @@
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
@@ -112,39 +108,17 @@
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/30Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/90Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 90M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 125M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070003">
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 8M -t 60</iperf_args>
|
||||
@@ -155,7 +129,6 @@
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab1</htmlTabRef>
|
||||
<htmlTabName>SA Ping DL UL with QUECTEL</htmlTabName>
|
||||
<htmlTabName>SA Ping DL UL with Quectel, 2.5ms TDD</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
@@ -63,7 +63,7 @@
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.ddsuu.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
@@ -92,7 +92,7 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 40</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>20</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>10</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
@@ -101,7 +101,7 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>20</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>10</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
|
||||
@@ -381,7 +381,7 @@ check_install_usrp_uhd_driver(){
|
||||
$SUDO apt-get remove libuhd3.14.1 -y || true
|
||||
$SUDO apt-get remove libuhd3.15.0 -y || true
|
||||
local distribution=$(get_distribution_release)
|
||||
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||
if [[ "$distribution" == "ubuntu18.04" || "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then
|
||||
$SUDO apt-get remove libuhd4.0.0 -y || true
|
||||
$SUDO apt-get remove libuhd4.1.0 -y || true
|
||||
fi
|
||||
@@ -410,13 +410,15 @@ check_install_usrp_uhd_driver(){
|
||||
x=$((x + 1))
|
||||
done
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
|
||||
if [[ "$distribution" == "ubuntu16.04" ]]; then
|
||||
$SUDO apt-get -y install python-tk libboost-all-dev libusb-1.0-0-dev
|
||||
case "$(get_distribution_release)" in
|
||||
"ubuntu16.04")
|
||||
$SUDO apt-get -y install libuhd-dev libuhd3.15.0 uhd-host
|
||||
fi
|
||||
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||
$SUDO apt-get -y install libuhd-dev libuhd4.1.0 uhd-host
|
||||
fi
|
||||
;;
|
||||
"ubuntu18.04" | "ubuntu20.04" | "ubuntu22.04")
|
||||
$SUDO apt-get -y install libuhd-dev libuhd4.2.0 uhd-host
|
||||
;;
|
||||
esac
|
||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
if [ $IS_CONTAINER -eq 0 ]
|
||||
then
|
||||
|
||||
@@ -193,6 +193,7 @@ Using the help option of the build script you can get the list of available opti
|
||||
| --UE | maintained and tested in CI | build `lte-uesoftmodem` the LTE UE |
|
||||
| --gNB | maintained and tested in CI | build `nr-softmodem` the 5G gNodeB |
|
||||
| --nrUE | maintained and tested in CI | build `nr-uesoftmodem` the 5G UE |
|
||||
| --arch-native | maintained | build with native architecture optimization |
|
||||
| --usrp-recplay | deprecated | use the USRP configuration parameters to use the record player. |
|
||||
| --build-lib | maintained | build optional shared library(ies), which can then be loaded at run time via command line option. Use the --help option to get the list of supported optional libraries. `all` can be used to build all available optional libraries. |
|
||||
| --UE-conf-nvram | maintained | Specifies the path to the input file used by the conf2uedata utility. defaults to [openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf](../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf) |
|
||||
|
||||
@@ -165,7 +165,7 @@ From the `cmake_targets/ran_build/build` folder:
|
||||
|
||||
gNB on machine 1:
|
||||
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --sa`
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --sa`
|
||||
|
||||
UE on machine 2:
|
||||
|
||||
@@ -173,7 +173,7 @@ UE on machine 2:
|
||||
|
||||
With the RF simulator (on the same machine):
|
||||
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa`
|
||||
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa`
|
||||
|
||||
`sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 -s 516 --rfsim --sa`
|
||||
|
||||
|
||||
@@ -1,45 +1,164 @@
|
||||
## Table of Contents ##
|
||||
|
||||
1. [Legacy 1 Bench](#legacy-1-bench)
|
||||
2. [Legacy 2 Bench](#legacy-2-bench)
|
||||
3. [Next Bench for DEV](#next-bench-for-dev)
|
||||
4. [Next Bench for CI](#next-bench-for-ci)
|
||||
5. [Indoor Live Network Bench](#indoor-live-network-bench)
|
||||
6. [Outdoor Live Network Bench](#outdoor-live-network-bench)
|
||||
1. [Machines](#machines)
|
||||
2. [Networked devices](#networked-devices)
|
||||
3. [Testbenches](#testbenches)
|
||||
4. [Pipelines](#pipelines)
|
||||
|
||||
## Machines
|
||||
|
||||
| Machine | IP address | Lockable Resource | Function | Connected devices |
|
||||
| ------------- | --------------- | --------------------- | ------------------ | ----------------------------------------------------- |
|
||||
| asterix | 172.21.16.127 | CI-Asterix-Usage | gNB | 173.21.19.14 |
|
||||
| obelix | 172.21.16.128 | CI-Obelix-Usage | eNB, UE (5G) | 172.21.19.13, X300 (192.168.60.2), B200mini (30C51EB) |
|
||||
| porcepix | 172.21.16.136 | CI-NSA-MiniBench | Executor, EPC, 5GC | -- |
|
||||
| nrmodule2 | 172.21.16.139 | CI-NSA-MiniBench | Quectel | Quectel module |
|
||||
| nepes | 172.21.16.137 | CI-NSA-MiniBench | gNB | B200mini (30C51D4) |
|
||||
| caracal | 172.21.16.132 | CI-Caracal | gNB/phytest | N300 (192.168.10.2) |
|
||||
| idefix | 172.21.16.135 | CI-NSA-MiniBench | Quectel | Quectel module |
|
||||
| amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | TBD | Amarisoft UE simulator |
|
||||
| bellatrix | 192.168.117.115 | CI-RAN-VM-Deployment | Executor | -- |
|
||||
| nano | 192.168.12.62 | CI-Bench-1-Phones | EPC, adb | 2x COTS (adb) |
|
||||
| hutch | 192.168.12.19 | CI-Bench-1-Phones | eNB (B7) | B200mini (30C5239) |
|
||||
| starsky | 192.168.12.18 | CI-Bench-1-Phones | eNB (B40) | b200mini (30A3E3C) |
|
||||
| carabe | 192.168.12.211 | CI-Bench-2-OAI-Phone | UE 4G (B) | B200mini (30AE8C9) |
|
||||
|
||||
Note: The available resources, and their current usage, is indicated here:
|
||||
- [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
|
||||
"New" Jenkins, i.e., with RAN-Container-Parent
|
||||
- [Lockable resources of open5glab jenkins](https://open5glab.eurecom.fr:8083/jenkins/lockable-resources/):
|
||||
"Old" Jenkins, i.e., with RAN-CI-Develop
|
||||
|
||||
## Networked devices
|
||||
|
||||
| Type | IP address (mgmt) |
|
||||
| ------------- | ----------------- |
|
||||
| USRP N310 | 172.21.19.14 |
|
||||
| USRP N310 | 172.21.19.13 |
|
||||
|
||||
## Testbenches
|
||||
|
||||
### OTA Testbench
|
||||
|
||||
[Proper image to be followed up. TBD: add antennas/circulators]
|
||||
|
||||
Note: obelix and porcepix are both used in the OTA testbench and the 5G
|
||||
NSA/Faraday Cage testbench!
|
||||
|
||||

|
||||
|
||||
[PDF version](testbenches_doc_resources/5g-ota-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-ota-bench.tex) if you want to modify to reflect your setup
|
||||
|
||||
### 5G NSA/Faraday Cage Testbench
|
||||
|
||||
**Purpose**: Faraday cage 5G tests
|
||||
|
||||
Note: obelix and porcepix are both used in the OTA testbench and the 5G
|
||||
NSA/Faraday Cage testbench!
|
||||
|
||||

|
||||
|
||||
[PDF version](testbenches_doc_resources/5g-nsa-faraday-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-nsa-faraday-bench.tex) if you want to modify to reflect your setup
|
||||
|
||||
### 4G Testbench(es)
|
||||
|
||||
**Purpose**: 4G/LTE testbenches
|
||||
|
||||
|
||||
## Legacy 1 Bench
|
||||

|
||||
|
||||
**Purpose** : FDD Band 7 and Band 13, LTE-M
|
||||
**Note** : Legacy1 and Legacy2 are duplicated so that they can run in parallel, thus avoiding a CI bottleneck
|
||||
**Note** : Faraday Cages 1 and 2 are physically the same cage
|
||||
[PDF version](testbenches_doc_resources/4g-faraday-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/4g-faraday-bench.tex) if you want to modify to reflect your setup
|
||||
|
||||

|
||||
## Pipelines
|
||||
|
||||
## Legacy 2 Bench
|
||||
### [RAN-Container-Parent](https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/)
|
||||
|
||||
**Purpose** : TDD Band 40, TM2 2xTX 2xRX
|
||||
**Note** : CN can run in a container, could also run on Massive
|
||||
**Purpose**: automatically triggered tests on MR creation or push, from Gitlab
|
||||
Webhook
|
||||
|
||||

|
||||
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/1664/)
|
||||
- obelix
|
||||
- performs static code analysis, currently not actively enforced
|
||||
- [RAN-gNB-nrUE-MONO-TDD-Band78-N300](https://jenkins-oai.eurecom.fr/job/RAN-gNB-nrUE-MONO-TDD-Band78-N300/)
|
||||
- caracal + N310
|
||||
- pure performance test through phy-test scheduler, see command line for more
|
||||
details
|
||||
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-5G/)
|
||||
- obelix (gNB, 1x UE, OAI 5GC)
|
||||
- L2simulator: skips physical layer and uses proxy between gNB and UE,
|
||||
currently only ping
|
||||
- [RAN-NSA-B200-Module-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-NSA-B200-Module-LTEBOX-Container/)
|
||||
- obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ ltebox
|
||||
- basic NSA test, known to be instable
|
||||
- [RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/)
|
||||
- asterix (`Asterix-OC-oaicicd-session` resource), tests in OpenShift Cluster
|
||||
- unitary simulators (`nr_dlsim`, etc.)
|
||||
- [RAN-RF-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/)
|
||||
- obelix (eNB, 1x UE, OAI EPC)
|
||||
- uses RFsimulator, for FDD 5, 10, 20MHz with core, 5MHz noS1
|
||||
- [RAN-RF-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-5G/)
|
||||
- obelix (gNB, 2x UE, OAI 5GC)
|
||||
- uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split
|
||||
- [RAN-RHEL8-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Image-Builder/)
|
||||
- asterix: RHEL 8 image build using podman
|
||||
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
|
||||
- obelix: Ubuntu 18 image build using docker
|
||||
|
||||
## Next Bench for DEV
|
||||
### [RAN-CI-NSA-Trigger](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-CI-NSA-Trigger/)
|
||||
|
||||
**Note** : Benetel CI can also run on this bench at night
|
||||
**Purpose**: longer-running over-the-air LTE, NSA, and SA tests, triggered
|
||||
through cron job at midnight
|
||||
|
||||

|
||||
- [RAN-LTE-2x2-Module-OAIEPC](https://jenkins-oai.eurecom.fr/job/RAN-LTE-2x2-Module-OAIEPC/)
|
||||
- obelix + N310, nrmodule2 + Quectel, porcepix w/ Magma EPC
|
||||
- LTE 2x2 test with TM1 and TM2
|
||||
- [RAN-NSA-B200-Module-LTEBOX](https://jenkins-oai.eurecom.fr/job/RAN-NSA-B200-Module-LTEBOX/)
|
||||
- obelix + B200 (eNB), nepes + B200 (gNB), idefix + Quectel, porcepix w/ ltebox
|
||||
- Note: like [RAN-NSA-B200-Module-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-NSA-B200-Module-LTEBOX-Container/) above, but compiled/run from source
|
||||
- [RAN-NSA-2x2-Module-OAIEPC](https://jenkins-oai.eurecom.fr/job/RAN-NSA-2x2-Module-OAIEPC/)
|
||||
- obelix + N310 (eNB), asterix + N310 (gNB), nrmodule2 + Quectel, porcepix w/ Magma EPC
|
||||
- LTE 2x2 and NR 2x2 (non-standalone)
|
||||
- [RAN-SA-Module-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-Module-CN5G/)
|
||||
- asterix + N310 (gNB), nrmodule2 + Quectel, porcepix w/ OAI 5GC
|
||||
- NR 2x2 (standalone)
|
||||
- [RAN-SA-OAIUE-N310-X300-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-OAIUE-N310-X300-CN5G/)
|
||||
- asterix + N310 (gNB), obelix + N310 or X300 (5G UE), porcepix w/ OAI 5GC
|
||||
- OTA test with OAIUE using both N310 and X300
|
||||
- [RAN-SA-AmariS-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-AmariS-CN5G/)
|
||||
- asterix + N310, amariue (1x UE), porcepix w/ OAI 5GC
|
||||
- Amarisoft UE simulator: expected to be increased to more UEs
|
||||
|
||||
### [RAN-CI-develop](https://open5glab.eurecom.fr:8083/jenkins/job/RAN-CI-develop/)
|
||||
|
||||
## Next Bench for CI
|
||||
**Purpose**: automatically triggered tests, mostly 4G, to be phased out and
|
||||
integrated into RAN-Container-Parent
|
||||
|
||||
**Note** : The current test running on Caracal could run on this bench with a N300/N300 setup
|
||||
runs tests:
|
||||
- bellatrix: runs 4G/5G simulators directly (eNB + 1x UE + (opt.) OAI EPC, gNB + 1x UE in "noS1")
|
||||
|
||||

|
||||
|
||||
## Indoor Live Network Bench
|
||||
|
||||

|
||||
|
||||
## Outdoor Live Network Bench
|
||||
|
||||

|
||||
triggers pipelines:
|
||||
- [eNB-CI-F1-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-F1-FDD-Band7-B210/)
|
||||
- hutch + B210, nano w/ ltebox + 2x UE
|
||||
- tests 4G FDD with F1 split, 5MHz, 10MHz, 20MHz. 5MHz stable, rest known to
|
||||
be unstable
|
||||
- [eNB-CI-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-FDD-Band7-B210/)
|
||||
- hutch + B210, nano w/ ltebox + 2x UE
|
||||
- tests T tracer, information through FlexRAN, RRC inactivity timers,
|
||||
inactivity timers + FlexRAN, different bandwidths
|
||||
- [eNB-CI-IF4p5-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-IF4p5-FDD-Band7-B210/)
|
||||
- hutch + B210, nano w/ ltebox + 2x UE
|
||||
- tests IF4.5 split over bandwidths 5, 10, 20 MHz in Band 7
|
||||
- [eNB-CI-IF4p5-TDD-Band40-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-IF4p5-TDD-Band40-B210/)
|
||||
- starsky + B210, nano w/ ltebox + 2x UE
|
||||
- tests IF4.5 split over bandwidths 5, 10, 20 MHz in Band 40
|
||||
- [eNB-CI-TDD-Band40-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-TDD-Band40-B210/)
|
||||
- starsky + B210, nano w/ ltebox + 2x UE
|
||||
- T tracer, TM1 over bandwidths 5, 10, 20 MHz in Band 40, default scheduler
|
||||
for 20 MHz
|
||||
- [eNB-UE-CI-MONO-FDD-Band7-B200](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-UE-CI-MONO-FDD-Band7-B200/)
|
||||
- hutch + B210 (eNB), carabe + B210 (4G UE), nano w/ ltebox
|
||||
- tests OAI 4G for 5 MHz/TM1 with both CN and in noS1 model, MBMS; known to
|
||||
be unstable
|
||||
- [UE-CI-FDD-Band20-B200](https://open5glab.eurecom.fr:8083/jenkins/job/UE-CI-FDD-Band20-B200/)
|
||||
- starsky + B210 (sniffer)
|
||||
- Sniff MIB + SIB1 of Orange, SFR
|
||||
|
||||
@@ -50,7 +50,7 @@ At the moment of writing this document interoperability with the following COTS
|
||||
## 1.1 gNB build and configuration
|
||||
To get the code and build the gNB executable:
|
||||
|
||||
### Ubuntu 18.04
|
||||
### Build gNB
|
||||
```bash
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||
git checkout develop
|
||||
@@ -61,42 +61,6 @@ To get the code and build the gNB executable:
|
||||
./build_oai --gNB -w USRP
|
||||
```
|
||||
|
||||
### Ubuntu 20.04
|
||||
```bash
|
||||
# Build UHD from source
|
||||
# https://files.ettus.com/manual/page_build_guide.html
|
||||
sudo apt-get install libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools cmake build-essential
|
||||
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd/host
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make -j 4
|
||||
make test # This step is optional
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
sudo uhd_images_downloader
|
||||
|
||||
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||
git checkout develop
|
||||
|
||||
# Install dependencies in Ubuntu 20.04
|
||||
cd
|
||||
cd openairinterface5g/
|
||||
source oaienv
|
||||
cd cmake_targets/
|
||||
./install_external_packages.ubuntu20
|
||||
|
||||
# Build OAI gNB
|
||||
cd
|
||||
cd openairinterface5g/
|
||||
source oaienv
|
||||
cd cmake_targets/
|
||||
./build_oai --gNB -w USRP
|
||||
```
|
||||
|
||||
A reference configuration file for the **monolithic** gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf).
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,59 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{backgrounds, positioning, shapes.symbols}
|
||||
\usepackage{helvet}
|
||||
\renewcommand*{\rmdefault}{\sfdefault}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
[
|
||||
font=\footnotesize,
|
||||
faraday/.style={minimum size=3cm, draw, dashed},
|
||||
duplexer/.style={draw,fill=white},
|
||||
]
|
||||
|
||||
\node[faraday, label={[anchor=south west]above left:Faraday cage}] (faraday) {};
|
||||
|
||||
\node[above left=0cm and 2.8cm of faraday, label=above:hutch] (hutch)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\node[right=0.3cm of hutch, label=above:B210] (b210h)
|
||||
{\includegraphics[width=1.2cm]{b210}} edge (hutch);
|
||||
\node[below left=0.35cm of faraday.north east] (anto)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210h) -| node [pos=0.25, duplexer] {B7} (anto);
|
||||
|
||||
\node[below left=0cm and 2.8cm of faraday, label=above:starsky] (starsky)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\node[right=0.3cm of starsky, label=above:B210] (b210s)
|
||||
{\includegraphics[width=1.2cm]{b210}} edge (starsky);
|
||||
\draw (hutch) -- (b210h);
|
||||
\node[above left=0.35cm of faraday.south east] (antn)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210s) -| node [pos=0.35, duplexer] {B40} (antn);
|
||||
\node[below right=-0.2cm and 0.8cm of b210s] (antn2)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210s) -| (antn2);
|
||||
|
||||
\node[left=5cm of faraday, label=above:nano] (nano)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\draw (hutch) -- (nano);
|
||||
\draw (starsky) -- (nano);
|
||||
\node[above right=0.0cm and 0.35cm of faraday.west] (phone1)
|
||||
{\includegraphics[height=0.5cm]{phone}};
|
||||
\node[below right=0.0cm and 0.35cm of faraday.west] (phone2)
|
||||
{\includegraphics[height=0.5cm]{phone}};
|
||||
\draw (nano) -- node[above] {USB/adb} +(5cm,0) |- (phone1);
|
||||
\draw (nano) -- +(5cm,0) |- (phone2);
|
||||
|
||||
\node[right=1.5cm of faraday, label=above:B210] (b210c)
|
||||
{\includegraphics[width=1.2cm]{b210}};
|
||||
\node[left=.5cm of faraday.east] (antc)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210c) -- node [pos=0.35, duplexer] {B7UE} (antc);
|
||||
\node[right=0.7cm of b210c, label=above:carabe] (carabe)
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (b210c);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
|
After Width: | Height: | Size: 87 KiB |
@@ -0,0 +1,55 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{backgrounds, positioning, shapes.symbols}
|
||||
\usepackage{helvet}
|
||||
\renewcommand*{\rmdefault}{\sfdefault}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
[
|
||||
font=\footnotesize,
|
||||
faraday/.style={minimum size=3cm, draw, dashed},
|
||||
duplexer/.style={draw,fill=white},
|
||||
]
|
||||
|
||||
\node[faraday, label={[anchor=south east]above right:Faraday cage}] (faraday) {};
|
||||
|
||||
\node[above left=0cm and 2.8cm of faraday, label=above:obelix] (obelix)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\node[right=0.3cm of obelix, label=above:B200-mini] (b210o)
|
||||
{\includegraphics[width=1.2cm]{b200-mini}} edge (obelix);
|
||||
\node[below right=0.35cm of faraday.north west] (anto)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210o) -| node [pos=0.2, duplexer] {B7} (anto);
|
||||
|
||||
\node[below left=0cm and 2.8cm of faraday, label=above:nepes] (nepes)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\node[right=0.3cm of nepes, label=above:B200-mini] (b210n)
|
||||
{\includegraphics[width=1.2cm]{b200-mini}} edge (nepes);
|
||||
\draw (obelix) -- (b210o);
|
||||
\node[above right=0.35cm of faraday.south west] (antn)
|
||||
{\includegraphics[width=0.3cm]{antenna}};
|
||||
\draw (b210n) -| node [pos=0.2, duplexer] {B78} (antn);
|
||||
|
||||
\node[left=5cm of faraday, label=above:porcepix] (porcepix)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
\draw (obelix) -- (porcepix);
|
||||
\draw (nepes) -- (porcepix);
|
||||
|
||||
\node[right=1.5cm of faraday, label=above:RM500Q-GL] (quectel)
|
||||
{\includegraphics[height=1.2cm]{quectel}};
|
||||
\node[above left=-0.1cm and 0.2cm of faraday.east] (aq2)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[above=-0.2cm of aq2] (aq1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[below=-0.2cm of aq2] (aq3)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[below=-0.2cm of aq3]
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[right=1cm of quectel, label=above:idefix] (idefix)
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (quectel);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
|
After Width: | Height: | Size: 88 KiB |
@@ -0,0 +1,63 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{backgrounds, positioning, shapes.symbols}
|
||||
\usepackage{helvet}
|
||||
\renewcommand*{\rmdefault}{\sfdefault}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
[
|
||||
font=\footnotesize,
|
||||
faraday/.style={minimum size=3cm, draw, dashed},
|
||||
duplexer/.style={draw,fill=white},
|
||||
]
|
||||
|
||||
\node[label=above:porcepix] (porcepix)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
|
||||
\node[above right=1cm and 2cm of porcepix, label=above:asterix] (asterix)
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (porcepix);
|
||||
\node[right=0.3cm of asterix, label=above:N310] (n310a)
|
||||
{\includegraphics[width=1.5cm]{n310}} edge (asterix);
|
||||
\node[right=.2cm of n310a, duplexer] (b78o) {B78} edge (n310a);
|
||||
\node[below right=-0.1cm and 0.35cm of b78o.east] (anto1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
\node[above right=-0.1cm and 0.35cm of b78o.east] (anto2)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
|
||||
\node[right=2cm of porcepix, label=above:obelix] (obelix)
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (porcepix);
|
||||
\node[above right=-0.5cm and 0.3cm of obelix, label=above:N310] (n310o)
|
||||
{\includegraphics[width=1.5cm]{n310}} edge (obelix);
|
||||
\node[right=.2cm of n310o, duplexer] (b78o) {B40} edge (n310o);
|
||||
\node[below right=-0.1cm and 0.35cm of b78o.east] (anto1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
\node[above right=-0.1cm and 0.35cm of b78o.east] (anto2)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
\node[below right=-0.5cm and 0.3cm of obelix, label=above:X310] (x310o)
|
||||
{\includegraphics[width=1.5cm]{x310}} edge (obelix);
|
||||
\node[right=.2cm of x310o, duplexer] (b78o) {B78} edge (x310o);
|
||||
\node[below right=-0.1cm and 0.35cm of b78o.east] (anto1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
\node[above right=-0.1cm and 0.35cm of b78o.east] (anto2)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
|
||||
|
||||
\node[right=5.0cm of n310o, label=above:RM500Q-GL] (quectel)
|
||||
{\includegraphics[height=1.2cm]{quectel}};
|
||||
\node[above left=-0.1cm and 0.8cm of quectel.west] (aq2)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[above=-0.2cm of aq2] (aq1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[below=-0.2cm of aq2] (aq3)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[below=-0.2cm of aq3]
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (quectel);
|
||||
\node[right=1cm of quectel, label=above:nrmodule2] (nrmodule2)
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (quectel);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -128,7 +128,6 @@ void rx_func(void *param) {
|
||||
int slot_rx = info->slot_rx;
|
||||
int frame_tx = info->frame_tx;
|
||||
int slot_tx = info->slot_tx;
|
||||
sl_ahead = sf_ahead*gNB->frame_parms.slots_per_subframe;
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||
|
||||
start_meas(&softmodem_stats_rxtx_sf);
|
||||
|
||||
@@ -99,9 +99,6 @@ int attach_rru(RU_t *ru);
|
||||
int connect_rau(RU_t *ru);
|
||||
static void NRRCconfig_RU(void);
|
||||
|
||||
uint16_t sf_ahead;
|
||||
uint16_t slot_ahead;
|
||||
uint16_t sl_ahead;
|
||||
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
@@ -372,8 +369,8 @@ void fh_if4p5_south_in(RU_t *ru,
|
||||
proc->frame_rx = f;
|
||||
proc->timestamp_rx = (proc->frame_rx * fp->samples_per_subframe * 10) + fp->get_samples_slot_timestamp(proc->tti_rx, fp, 0);
|
||||
// proc->timestamp_tx = proc->timestamp_rx + (4*fp->samples_per_subframe);
|
||||
proc->tti_tx = (sl+(fp->slots_per_subframe*sf_ahead))%fp->slots_per_frame;
|
||||
proc->frame_tx = (sl>(fp->slots_per_frame-1-(fp->slots_per_subframe*sf_ahead))) ? (f+1)&1023 : f;
|
||||
proc->tti_tx = (sl+ru->sl_ahead)%fp->slots_per_frame;
|
||||
proc->frame_tx = (sl>(fp->slots_per_frame-1-(ru->sl_ahead))) ? (f+1)&1023 : f;
|
||||
|
||||
if (proc->first_rx == 0) {
|
||||
if (proc->tti_rx != *slot) {
|
||||
@@ -1300,8 +1297,7 @@ void *ru_thread( void *param ) {
|
||||
}
|
||||
}
|
||||
|
||||
sf_ahead = (uint16_t) ceil((float)6/(0x01<<fp->numerology_index));
|
||||
LOG_I(PHY, "Signaling main thread that RU %d is ready, sf_ahead %d\n",ru->idx,sf_ahead);
|
||||
LOG_I(PHY, "Signaling main thread that RU %d is ready, sl_ahead %d\n",ru->idx,ru->sl_ahead);
|
||||
pthread_mutex_lock(&RC.ru_mutex);
|
||||
RC.ru_mask &= ~(1<<ru->idx);
|
||||
pthread_cond_signal(&RC.ru_cond);
|
||||
@@ -1319,6 +1315,7 @@ void *ru_thread( void *param ) {
|
||||
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
|
||||
} else LOG_I(PHY,"RU %d no rf device\n",ru->idx);
|
||||
|
||||
LOG_I(PHY,"RU %d RF started\n",ru->idx);
|
||||
// start trx write thread
|
||||
if(usrp_tx_thread == 1) {
|
||||
if (ru->start_write_thread) {
|
||||
@@ -1386,9 +1383,12 @@ void *ru_thread( void *param ) {
|
||||
opp_enabled = opp_enabled0;
|
||||
}
|
||||
if (initial_wait == 0 && ru->rx_fhaul.trials > 1000) reset_meas(&ru->rx_fhaul);
|
||||
proc->timestamp_tx = proc->timestamp_rx + (sf_ahead*fp->samples_per_subframe);
|
||||
proc->frame_tx = (proc->tti_rx > (fp->slots_per_frame-1-(fp->slots_per_subframe*sf_ahead))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
proc->tti_tx = (proc->tti_rx + (fp->slots_per_subframe*sf_ahead))%fp->slots_per_frame;
|
||||
proc->timestamp_tx = proc->timestamp_rx;
|
||||
int sl=proc->tti_tx;
|
||||
for (int slidx=0;slidx<ru->sl_ahead;slidx++)
|
||||
proc->timestamp_tx += fp->get_samples_per_slot((sl+slidx)%fp->slots_per_frame,fp);
|
||||
proc->frame_tx = (proc->tti_rx > (fp->slots_per_frame-1-(ru->sl_ahead))) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
|
||||
proc->tti_tx = (proc->tti_rx + ru->sl_ahead)%fp->slots_per_frame;
|
||||
LOG_D(PHY,"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0]:[RX:%d%d TX(SFN):%d]\n",
|
||||
frame,slot,
|
||||
proc->frame_rx,proc->tti_rx,
|
||||
@@ -1419,7 +1419,6 @@ void *ru_thread( void *param ) {
|
||||
// Do PRACH RU processing
|
||||
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
|
||||
uint8_t prachStartSymbol,N_dur;
|
||||
|
||||
if (prach_id>=0) {
|
||||
T(T_GNB_PHY_PRACH_INPUT_SIGNAL, T_INT(proc->frame_rx), T_INT(proc->tti_rx), T_INT(0),
|
||||
T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx-1,fp,0)]/*-ru->N_TA_offset*/, fp->get_samples_per_slot(proc->tti_rx,fp)*4*2));
|
||||
@@ -2091,9 +2090,7 @@ static void NRRCconfig_RU(void) {
|
||||
|
||||
RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
|
||||
RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
|
||||
RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
|
||||
RC.ru[j]->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr);
|
||||
for (i=0; i<RC.ru[j]->num_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
|
||||
} //strcmp(local_rf, "yes") == 0
|
||||
else {
|
||||
printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr));
|
||||
@@ -2113,8 +2110,6 @@ static void NRRCconfig_RU(void) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF5_ECPRI_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_ecpri_if5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
@@ -2137,7 +2132,13 @@ static void NRRCconfig_RU(void) {
|
||||
RC.ru[j]->if_frequency = *(RUParamList.paramarray[j][RU_IF_FREQUENCY].u64ptr);
|
||||
RC.ru[j]->if_freq_offset = *(RUParamList.paramarray[j][RU_IF_FREQ_OFFSET].iptr);
|
||||
RC.ru[j]->do_precoding = *(RUParamList.paramarray[j][RU_DO_PRECODING].iptr);
|
||||
|
||||
RC.ru[j]->sl_ahead = *(RUParamList.paramarray[j][RU_SL_AHEAD].iptr);
|
||||
RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
|
||||
for (i=0; i<RC.ru[j]->num_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
|
||||
RC.ru[j]->openair0_cfg.nr_flag = *(RUParamList.paramarray[j][RU_NR_FLAG].iptr);
|
||||
RC.ru[j]->openair0_cfg.nr_band = RC.ru[j]->band[0];
|
||||
RC.ru[j]->openair0_cfg.nr_scs_for_raster = *(RUParamList.paramarray[j][RU_NR_SCS_FOR_RASTER].iptr);
|
||||
printf("[RU %d] Setting nr_flag %d, nr_band %d, nr_scs_for_raster %d\n",j,RC.ru[j]->openair0_cfg.nr_flag,RC.ru[j]->openair0_cfg.nr_band,RC.ru[j]->openair0_cfg.nr_scs_for_raster);
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) {
|
||||
RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt;
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@ int main( int argc, char **argv ) {
|
||||
printf("wait_gNBs()\n");
|
||||
wait_gNBs();
|
||||
printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU);
|
||||
|
||||
int sl_ahead=6;
|
||||
if (RC.nb_RU >0) {
|
||||
printf("Initializing RU threads\n");
|
||||
init_NR_RU(get_softmodem_params()->rf_config_file);
|
||||
@@ -740,7 +740,10 @@ int main( int argc, char **argv ) {
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
RC.ru[ru_id]->rf_map.card=0;
|
||||
RC.ru[ru_id]->rf_map.chain=CC_id+chain_offset;
|
||||
if (ru_id==0) sl_ahead = RC.ru[ru_id]->sl_ahead;
|
||||
else AssertFatal(RC.ru[ru_id]->sl_ahead != RC.ru[0]->sl_ahead,"RU %d has different sl_ahead %d than RU 0 %d\n",ru_id,RC.ru[ru_id]->sl_ahead,RC.ru[0]->sl_ahead);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
config_sync_var=0;
|
||||
@@ -757,6 +760,7 @@ int main( int argc, char **argv ) {
|
||||
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
|
||||
printf("ALL RUs ready - init gNBs\n");
|
||||
|
||||
for (int idx=0;idx<RC.nb_nr_L1_inst;idx++) RC.gNB[idx]->if_inst->sl_ahead = sl_ahead;
|
||||
if(IS_SOFTMODEM_DOSCOPE) {
|
||||
sleep(1);
|
||||
scopeParms_t p;
|
||||
|
||||
@@ -200,7 +200,6 @@ void install_nr_schedule_handlers(NR_IF_Module_t *if_inst);
|
||||
void install_schedule_handlers(IF_Module_t *if_inst);
|
||||
extern int single_thread_flag;
|
||||
extern uint16_t sf_ahead;
|
||||
extern uint16_t slot_ahead;
|
||||
|
||||
void oai_create_enb(void) {
|
||||
int bodge_counter=0;
|
||||
@@ -459,6 +458,7 @@ int wake_gNB_rxtx(PHY_VARS_gNB *gNB, uint16_t sfn, uint16_t slot) {
|
||||
//wait.tv_nsec = 0;
|
||||
// wake up TX for subframe n+sf_ahead
|
||||
// lock the TX mutex and make sure the thread is ready
|
||||
AssertFatal(gNB->if_inst->sl_ahead==6,"gNB->if_inst->sl_ahead %d : This is hard-coded to 6 in nfapi P7!!!\n",gNB->if_inst->sl_ahead);
|
||||
if (pthread_mutex_timedlock(&L1_proc->mutex,&wait) != 0) {
|
||||
LOG_E( PHY, "[gNB] ERROR pthread_mutex_lock for gNB RXTX thread %d (IC %d)\n", L1_proc->slot_rx&1,L1_proc->instance_cnt );
|
||||
exit_fun( "error locking mutex_rxtx" );
|
||||
@@ -485,11 +485,11 @@ int wake_gNB_rxtx(PHY_VARS_gNB *gNB, uint16_t sfn, uint16_t slot) {
|
||||
// The last (TS_rx mod samples_per_frame) was n*samples_per_tti,
|
||||
// we want to generate subframe (n+N), so TS_tx = TX_rx+N*samples_per_tti,
|
||||
// and proc->subframe_tx = proc->subframe_rx+sf_ahead
|
||||
L1_proc->timestamp_tx = proc->timestamp_rx + (slot_ahead *fp->samples_per_subframe);
|
||||
L1_proc->timestamp_tx = proc->timestamp_rx + (gNB->if_inst->sl_ahead *fp->samples_per_subframe);
|
||||
L1_proc->frame_rx = proc->frame_rx;
|
||||
L1_proc->slot_rx = proc->slot_rx;
|
||||
L1_proc->frame_tx = (L1_proc->slot_rx > (19-slot_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
|
||||
L1_proc->slot_tx = (L1_proc->slot_rx + slot_ahead)%20;
|
||||
L1_proc->frame_tx = (L1_proc->slot_rx > (19-gNB->if_inst->sl_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
|
||||
L1_proc->slot_tx = (L1_proc->slot_rx + gNB->if_inst->sl_ahead)%20;
|
||||
|
||||
//LOG_D(PHY, "sfn/sf:%d%d proc[rx:%d%d] rx:%d%d] About to wake rxtx thread\n\n", sfn, slot, proc->frame_rx, proc->slot_rx, L1_proc->frame_rx, L1_proc->slot_rx);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "\nEntering wake_gNB_rxtx sfn %d slot %d\n",L1_proc->frame_rx,L1_proc->slot_rx);
|
||||
|
||||
@@ -464,6 +464,7 @@ typedef struct {
|
||||
uint8_t nEpreRatioOfPDSCHToPTRS;
|
||||
/// MCS table for this DLSCH
|
||||
uint8_t mcs_table;
|
||||
uint32_t tbslbrm;
|
||||
uint8_t nscid;
|
||||
uint16_t dlDmrsScramblingId;
|
||||
uint16_t pduBitmap;
|
||||
|
||||
@@ -776,6 +776,10 @@ typedef struct {
|
||||
nfapi_nr_dl_dci_pdu_t dci_pdu[MAX_DCI_CORESET];
|
||||
} nfapi_nr_dl_tti_pdcch_pdu_rel15_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t tbSizeLbrmBytes;
|
||||
}nfapi_v3_pdsch_maintenance_parameters_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t pduBitmap;
|
||||
uint16_t rnti;
|
||||
@@ -854,6 +858,7 @@ typedef struct {
|
||||
uint8_t nEpreRatioOfPDSCHToPTRS;
|
||||
// Beamforming
|
||||
nfapi_nr_tx_precoding_and_beamforming_t precodingAndBeamforming;
|
||||
nfapi_v3_pdsch_maintenance_parameters_t maintenance_parms_v3;
|
||||
}nfapi_nr_dl_tti_pdsch_pdu_rel15_t;
|
||||
|
||||
|
||||
@@ -1195,6 +1200,10 @@ typedef struct
|
||||
#define PUSCH_PDU_BITMAP_PUSCH_PTRS 0x4
|
||||
#define PUSCH_PDU_BITMAP_DFTS_OFDM 0x8
|
||||
|
||||
typedef struct {
|
||||
uint32_t tbSizeLbrmBytes;
|
||||
}nfapi_v3_pusch_maintenance_parameters_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t pdu_bit_map;//Bitmap indicating presence of optional PDUs (see above)
|
||||
@@ -1240,7 +1249,7 @@ typedef struct
|
||||
nfapi_nr_dfts_ofdm_t dfts_ofdm;
|
||||
//beamforming
|
||||
nfapi_nr_ul_beamforming_t beamforming;
|
||||
|
||||
nfapi_v3_pdsch_maintenance_parameters_t maintenance_parms_v3;
|
||||
} nfapi_nr_pusch_pdu_t;
|
||||
|
||||
//for pucch_pdu:
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#define FAPI2_IP_DSCP 0
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
extern uint16_t slot_ahead;
|
||||
|
||||
//uint16_t sf_ahead=4;
|
||||
|
||||
@@ -933,7 +932,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
|
||||
|
||||
// save the curren time, sfn and slot
|
||||
pnf_p7->slot_start_time_hr = pnf_get_current_time_hr();
|
||||
slot_ahead = 6;
|
||||
int slot_ahead = 6;
|
||||
uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead);
|
||||
uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx);
|
||||
uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx);
|
||||
|
||||
@@ -481,16 +481,11 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
uint8_t tb_scaling,
|
||||
uint8_t Nl);
|
||||
|
||||
uint32_t nr_compute_tbslbrm(uint16_t table,
|
||||
uint16_t nb_rb,
|
||||
uint8_t Nl);
|
||||
|
||||
void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f);
|
||||
|
||||
void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f);
|
||||
|
||||
int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
uint32_t Tbslbrm,
|
||||
int nr_rate_matching_ldpc(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
uint8_t *w,
|
||||
@@ -501,8 +496,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
uint8_t rvidx,
|
||||
uint32_t E);
|
||||
|
||||
int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
uint32_t Tbslbrm,
|
||||
int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
int16_t *w,
|
||||
|
||||
@@ -387,8 +387,7 @@ void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f)
|
||||
}
|
||||
|
||||
|
||||
int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
uint32_t Tbslbrm,
|
||||
int nr_rate_matching_ldpc(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
uint8_t *w,
|
||||
@@ -409,7 +408,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
//Bit selection
|
||||
N = (BG==1)?(66*Z):(50*Z);
|
||||
|
||||
if (Ilbrm == 0)
|
||||
if (Tbslbrm == 0)
|
||||
Ncb = N;
|
||||
else {
|
||||
Nref = 3*Tbslbrm/(2*C); //R_LBRM = 2/3
|
||||
@@ -419,11 +418,11 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", E, F, Foffset,ind, Ncb, rvidx, Ilbrm);
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n", E, F, Foffset,ind, Ncb, rvidx, Tbslbrm);
|
||||
#endif
|
||||
|
||||
if (Foffset > E) {
|
||||
LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d)\n",Foffset,E);
|
||||
LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d) F %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n",Foffset,E,F, ind, Ncb, rvidx, Tbslbrm);
|
||||
return -1;
|
||||
}
|
||||
if (Foffset > Ncb) {
|
||||
@@ -471,8 +470,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
uint32_t Tbslbrm,
|
||||
int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
int16_t *w,
|
||||
@@ -498,7 +496,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
//Bit selection
|
||||
N = (BG==1)?(66*Z):(50*Z);
|
||||
|
||||
if (Ilbrm == 0)
|
||||
if (Tbslbrm == 0)
|
||||
Ncb = N;
|
||||
else {
|
||||
Nref = (3*Tbslbrm/(2*C)); //R_LBRM = 2/3
|
||||
@@ -516,7 +514,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
}
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", clear, E, ind, Ncb, rvidx, Ilbrm);
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n", clear, E, ind, Ncb, rvidx, Tbslbrm);
|
||||
#endif
|
||||
|
||||
if (clear==1) memset(w,0,Ncb*sizeof(int16_t));
|
||||
|
||||
@@ -366,8 +366,10 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
|
||||
|
||||
uint8_t sco = 0;
|
||||
if (((fp->freq_range == nr_FR1) && (config->ssb_table.ssb_subcarrier_offset<24)) ||
|
||||
((fp->freq_range == nr_FR2) && (config->ssb_table.ssb_subcarrier_offset<12)) )
|
||||
sco = config->ssb_table.ssb_subcarrier_offset;
|
||||
((fp->freq_range == nr_FR2) && (config->ssb_table.ssb_subcarrier_offset<12)) ) {
|
||||
if (fp->freq_range == nr_FR1)
|
||||
sco = config->ssb_table.ssb_subcarrier_offset>>config->ssb_config.scs_common;
|
||||
}
|
||||
|
||||
fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco);
|
||||
set_Lmax(fp);
|
||||
|
||||
@@ -1052,7 +1052,7 @@ static inline int64_t clock_difftime_ns(struct timespec start, struct timespec e
|
||||
void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int tti, uint8_t *seqno, uint16_t packet_type) {
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
|
||||
int32_t *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
|
||||
int32_t *txp[ru->nb_tx], *rxp[ru->nb_rx];
|
||||
int32_t *tx_buffer=NULL;
|
||||
uint16_t packet_id=0, i=0;
|
||||
|
||||
@@ -1106,9 +1106,9 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int tti, uint8_t *seq
|
||||
|
||||
NR_DL_FRAME_PARMS *nrfp = ru->nr_frame_parms;
|
||||
|
||||
int offset,siglen;
|
||||
int offset,siglen,factor=1;
|
||||
if (nrfp) {
|
||||
offset = nrfp->get_samples_slot_timestamp(tti,nrfp,0);
|
||||
offset = nrfp->get_samples_slot_timestamp(tti,nrfp,0);
|
||||
siglen = nrfp->get_samples_per_slot(tti,nrfp);
|
||||
}
|
||||
else {
|
||||
@@ -1116,6 +1116,13 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int tti, uint8_t *seq
|
||||
siglen = spsf;
|
||||
}
|
||||
|
||||
if (ru->openair0_cfg.nr_flag==1) {
|
||||
if (nrfp->N_RB_DL <= 162 && nrfp->N_RB_DL >= 106) factor = 2;
|
||||
else if (nrfp->N_RB_DL < 106) factor=4;
|
||||
}
|
||||
else {
|
||||
factor = 30720/spsf;
|
||||
}
|
||||
for (i=0; i < ru->nb_tx; i++)
|
||||
txp[i] = (int32_t*)&ru->common.txdata[i][offset];
|
||||
|
||||
@@ -1124,8 +1131,9 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int tti, uint8_t *seq
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF5_PKT_ID, packet_id );
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0, 1 );
|
||||
clock_gettime( CLOCK_MONOTONIC, &start_comp);
|
||||
|
||||
ru->ifdevice.trx_write_func2(&ru->ifdevice,
|
||||
(proc_timestamp + packet_id*spp_eth-500)*(30720/spsf),
|
||||
(proc_timestamp + packet_id*spp_eth-600)*factor,
|
||||
(void*)txp[aid],
|
||||
spp_eth,
|
||||
aid,
|
||||
@@ -1326,6 +1334,8 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int tti, uint16_t pa
|
||||
NR_DL_FRAME_PARMS *nrfp = ru->nr_frame_parms;
|
||||
|
||||
int offset,siglen;
|
||||
int factor=1;
|
||||
int ts_offset;
|
||||
if (nrfp) {
|
||||
offset = nrfp->get_samples_slot_timestamp(tti,nrfp,0);
|
||||
siglen = nrfp->get_samples_per_slot(tti,nrfp);
|
||||
@@ -1334,6 +1344,15 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int tti, uint16_t pa
|
||||
offset = tti*fp->samples_per_subframe;
|
||||
siglen = spsf;
|
||||
}
|
||||
if (ru->openair0_cfg.nr_flag==1) { // This check if RRU knows about NR numerologies
|
||||
if (nrfp->N_RB_DL <= 162 && nrfp->N_RB_DL >= 106) factor = 2;
|
||||
else if (nrfp->N_RB_DL < 106) factor=4;
|
||||
ts_offset = 64;
|
||||
}
|
||||
else {
|
||||
factor = 30720/spsf;
|
||||
ts_offset = 256;
|
||||
}
|
||||
for (i=0; i < ru->nb_rx; i++)
|
||||
rxp[i] = &ru->common.rxdata[i][offset];
|
||||
int aid;
|
||||
@@ -1352,12 +1371,12 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int tti, uint16_t pa
|
||||
&aid);
|
||||
clock_gettime( CLOCK_MONOTONIC, &if_time);
|
||||
timeout[packet_id] = if_time.tv_nsec;
|
||||
timestamp[packet_id] /= (30720/spsf);
|
||||
LOG_D(PHY,"TTI %d: Received packet %d: aid %d, TS %llu, oldTS %llu, diff %lld, \n",tti,packet_id,aid,(unsigned long long)timestamp[packet_id],(unsigned long long)oldTS,(unsigned long long)(timestamp[packet_id]-timestamp[0]));
|
||||
timestamp[packet_id] /= factor; // for LTE this is the sample rate reduction w.r.t 30.72, for NR 122.88
|
||||
LOG_D(PHY,"TTI %d: factor = %d Received packet %d: aid %d, TS %llu, oldTS %llu, diff %lld, \n",tti,factor,packet_id,aid,(unsigned long long)timestamp[packet_id],(unsigned long long)oldTS,(unsigned long long)(timestamp[packet_id]-timestamp[0]));
|
||||
|
||||
if (aid==0) {
|
||||
if (firstTS==1) firstTS=0;
|
||||
else if (oldTS + 256 != timestamp[packet_id]) {
|
||||
else if (oldTS + ts_offset != timestamp[packet_id]) {
|
||||
LOG_I(PHY,"oldTS %llu, newTS %llu, diff %llu, timein %lu, timeout %lu\n",(long long unsigned int)oldTS,(long long unsigned int)timestamp[packet_id],(long long unsigned int)timestamp[packet_id]-oldTS,timein[packet_id],timeout[packet_id]);
|
||||
for (int i=0;i<=packet_id;i++) LOG_I(PHY,"packet %d TS %llu, timein %lu, timeout %lu\n",i,(long long unsigned int)timestamp[i],timein[i],timeout[i]);
|
||||
AssertFatal(1==0,"fronthaul problem\n");
|
||||
@@ -1369,7 +1388,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int tti, uint16_t pa
|
||||
|
||||
// HYPOTHESIS: first packet per subframe has lowest timestamp of subframe
|
||||
// should detect out of order and act accordingly ....
|
||||
AssertFatal(aid==0 || aid==1,"aid %d != 0 or 1\n",aid);
|
||||
AssertFatal(aid==0 || aid==1 || aid==2 || aid==3,"aid %d != 0,1,2 or 3\n",aid);
|
||||
LOG_D(PHY,"rxp[%d] %p, dest %p, offset %d (%llu,%llu)\n",aid,rxp[aid],rxp[aid]+(timestamp[packet_id]-timestamp[0]),(int)(timestamp[packet_id]-timestamp[0]),(long long unsigned int)timestamp[packet_id],(long long unsigned int)timestamp[0]);
|
||||
memcpy((void*)(rxp[aid]+(timestamp[packet_id]-timestamp[0])),
|
||||
(void*)temp_rx,
|
||||
|
||||
@@ -113,8 +113,12 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
|
||||
|
||||
for (int s=first_symb;s<(first_symb+num_symb);s++) {
|
||||
for (rb=0; rb<frame_parms->N_RB_UL; rb++) {
|
||||
int offset0 = (slot&3)*(frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size) +
|
||||
(frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
|
||||
if (s==first_symb /*&& ((gNB->rb_mask_ul[s][rb>>5]&(1<<(rb&31))) == 0)*/) {
|
||||
nb_symb[rb]=0;
|
||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx;aarx++)
|
||||
measurements->n0_subband_power[aarx][rb]=0;
|
||||
}
|
||||
int offset0 = (slot&3)*(frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size) + (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
|
||||
if ((gNB->rb_mask_ul[s][rb>>5]&(1<<(rb&31))) == 0) { // check that rb was not used in this subframe
|
||||
nb_symb[rb]++;
|
||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
|
||||
@@ -106,8 +106,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
cset_start_symb = pdcch_pdu_rel15->StartSymbolIndex;
|
||||
cset_nsymb = pdcch_pdu_rel15->DurationSymbols;
|
||||
dci_idx = 0;
|
||||
LOG_D(PHY, "Coreset rb_offset %d, nb_rb %d BWP Start %d\n",rb_offset,n_rb,pdcch_pdu_rel15->BWPStart);
|
||||
LOG_D(PHY, "Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb);
|
||||
LOG_D(PHY, "pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d\n",rb_offset,n_rb,pdcch_pdu_rel15->BWPStart);
|
||||
LOG_D(PHY, "pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb);
|
||||
// DMRS length is per OFDM symbol
|
||||
uint32_t dmrs_length = n_rb*6; //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t encoded_length = dci_pdu->AggregationLevel*108; //2(QPSK)*9(per RB)*6(REG per CCE)
|
||||
|
||||
@@ -84,6 +84,8 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
uint8_t dmrs_Type = rel15->dmrsConfigType;
|
||||
int nb_re_dmrs;
|
||||
uint16_t n_dmrs;
|
||||
LOG_D(PHY,"pdsch: BWPStart %d, BWPSize %d, rbStart %d, rbsize %d\n",
|
||||
rel15->BWPStart,rel15->BWPSize,rel15->rbStart,rel15->rbSize);
|
||||
if (rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1) {
|
||||
nb_re_dmrs = 6*rel15->numDmrsCdmGrpsNoData;
|
||||
}
|
||||
|
||||
@@ -232,27 +232,20 @@ void ldpc8blocks( void *p) {
|
||||
#endif
|
||||
uint32_t E = nr_get_E(G, impp->n_segments, mod_order, rel15->nrOfLayers, rr);
|
||||
//#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(NR_PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
||||
LOG_D(NR_PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d,nrOfLayer %d)...\n",
|
||||
rr,
|
||||
impp->n_segments,
|
||||
G,
|
||||
E,
|
||||
impp->F,
|
||||
Kr-impp->F-2*(*impp->Zc),
|
||||
mod_order,nb_rb);
|
||||
// for tbslbrm calculation according to 5.4.2.1 of 38.212
|
||||
uint8_t Nl = 4;
|
||||
mod_order,nb_rb,rel15->nrOfLayers);
|
||||
|
||||
if (rel15->nrOfLayers < Nl)
|
||||
Nl = rel15->nrOfLayers;
|
||||
|
||||
uint32_t Tbslbrm = nr_compute_tbslbrm(rel15->mcsTable[0],nb_rb,Nl);
|
||||
uint8_t Ilbrm = 1;
|
||||
uint32_t Tbslbrm = rel15->maintenance_parms_v3.tbSizeLbrmBytes;
|
||||
|
||||
uint8_t e[E];
|
||||
bzero (e, E);
|
||||
nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
nr_rate_matching_ldpc(Tbslbrm,
|
||||
impp->BG,
|
||||
*impp->Zc,
|
||||
impp->d[rr],
|
||||
@@ -262,6 +255,20 @@ void ldpc8blocks( void *p) {
|
||||
Kr-impp->F-2*(*impp->Zc),
|
||||
rel15->rvIndex[0],
|
||||
E);
|
||||
if (Kr-impp->F-2*(*impp->Zc)> E) {
|
||||
LOG_E(PHY,"dlsch coding A %d Kr %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n",
|
||||
A,impp->K,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,(int)mod_order);
|
||||
|
||||
LOG_E(NR_PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Kr %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
||||
rr,
|
||||
impp->n_segments,
|
||||
G,
|
||||
E,
|
||||
Kr,
|
||||
impp->F,
|
||||
Kr-impp->F-2*(*impp->Zc),
|
||||
mod_order,nb_rb);
|
||||
}
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
for (int i =0; i<16; i++)
|
||||
|
||||
@@ -68,7 +68,7 @@ int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
|
||||
}
|
||||
else if ((type == SEARCH_EXIST) &&
|
||||
(gNB->prach_vars.list[i].frame == frame) &&
|
||||
(gNB->prach_vars.list[i].slot == slot)) {
|
||||
(gNB->prach_vars.list[i].slot == slot)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -107,15 +107,15 @@ int16_t find_nr_prach_ru(RU_t *ru,int frame,int slot, find_type_t type) {
|
||||
for (uint16_t i=0; i<NUMBER_OF_NR_RU_PRACH_MAX; i++) {
|
||||
LOG_D(PHY,"searching for PRACH in %d.%d : prach_index %d=> %d.%d\n", frame,slot,i,
|
||||
ru->prach_list[i].frame,ru->prach_list[i].slot);
|
||||
if((type == SEARCH_EXIST_OR_FREE) &&
|
||||
(ru->prach_list[i].frame == -1) &&
|
||||
(ru->prach_list[i].slot == -1)) {
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
return i;
|
||||
}
|
||||
if((type == SEARCH_EXIST_OR_FREE) &&
|
||||
(ru->prach_list[i].frame == -1) &&
|
||||
(ru->prach_list[i].slot == -1)) {
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
return i;
|
||||
}
|
||||
else if ((type == SEARCH_EXIST) &&
|
||||
(ru->prach_list[i].frame == frame) &&
|
||||
(ru->prach_list[i].slot == slot)) {
|
||||
(ru->prach_list[i].frame == frame) &&
|
||||
(ru->prach_list[i].slot == slot)) {
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
return i;
|
||||
}
|
||||
@@ -185,7 +185,8 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
|
||||
rxsigF = ru->prach_rxsigF[prachOccasion];
|
||||
|
||||
AssertFatal(ru->if_south == LOCAL_RF,"we shouldn't call this if if_south != LOCAL_RF\n");
|
||||
AssertFatal(ru->if_south == LOCAL_RF || ru->if_south == REMOTE_IF5,
|
||||
"we shouldn't call this if if_south != LOCAL_RF or REMOTE_IF5\n");
|
||||
|
||||
for (int aa=0; aa<ru->nb_rx; aa++){
|
||||
if (prach_sequence_length == 0) slot2=(slot/fp->slots_per_subframe)*fp->slots_per_subframe;
|
||||
|
||||
@@ -234,7 +234,6 @@ void nr_processULSegment(void* arg) {
|
||||
int rv_index = rdata->rv_index;
|
||||
int r_offset = rdata->r_offset;
|
||||
uint8_t kc = rdata->Kc;
|
||||
uint32_t Tbslbrm = rdata->Tbslbrm;
|
||||
short* ulsch_llr = rdata->ulsch_llr;
|
||||
int max_ldpc_iterations = p_decoderParms->numMaxIter;
|
||||
int8_t llrProcBuf[OAI_UL_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
|
||||
@@ -244,8 +243,6 @@ void nr_processULSegment(void* arg) {
|
||||
|
||||
__m128i *pv = (__m128i*)&z;
|
||||
__m128i *pl = (__m128i*)&l;
|
||||
|
||||
uint8_t Ilbrm = 0;
|
||||
|
||||
Kr = ulsch_harq->K;
|
||||
Kr_bytes = Kr>>3;
|
||||
@@ -293,8 +290,7 @@ void nr_processULSegment(void* arg) {
|
||||
|
||||
//start_meas(&phy_vars_gNB->ulsch_rate_unmatching_stats);
|
||||
|
||||
if (nr_rate_matching_ldpc_rx(Ilbrm,
|
||||
Tbslbrm,
|
||||
if (nr_rate_matching_ldpc_rx(rdata->tbslbrm,
|
||||
p_decoderParms->BG,
|
||||
p_decoderParms->Z,
|
||||
ulsch_harq->d[r],
|
||||
@@ -394,7 +390,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
uint32_t r_offset;
|
||||
uint32_t offset;
|
||||
int kc;
|
||||
int Tbslbrm;
|
||||
int E;
|
||||
|
||||
#ifdef PRINT_CRC_CHECK
|
||||
@@ -449,7 +444,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
if (harq_process->ndi != pusch_pdu->pusch_data.new_data_indicator) {
|
||||
harq_process->new_rx = true;
|
||||
harq_process->ndi = pusch_pdu->pusch_data.new_data_indicator;
|
||||
LOG_E(PHY,"Missed ULSCH detection. NDI toggled but rv %d does not correspond to first reception\n",pusch_pdu->pusch_data.rv_index);
|
||||
LOG_D(PHY,"Missed ULSCH detection. NDI toggled but rv %d does not correspond to first reception\n",pusch_pdu->pusch_data.rv_index);
|
||||
}
|
||||
|
||||
A = (harq_process->TBS)<<3;
|
||||
@@ -539,7 +534,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
if (!frame%100)
|
||||
printf("K %d C %d Z %d \n", harq_process->K, harq_process->C, harq_process->Z);
|
||||
#endif
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,n_layers);
|
||||
|
||||
p_decParams->Z = harq_process->Z;
|
||||
|
||||
@@ -590,10 +584,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
rdata->r_offset = r_offset;
|
||||
rdata->Kr_bytes = Kr_bytes;
|
||||
rdata->rv_index = pusch_pdu->pusch_data.rv_index;
|
||||
rdata->Tbslbrm = Tbslbrm;
|
||||
rdata->offset = offset;
|
||||
rdata->ulsch = ulsch;
|
||||
rdata->ulsch_id = ULSCH_id;
|
||||
rdata->tbslbrm = pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes;
|
||||
pushTpool(phy_vars_gNB->threadPool,req);
|
||||
phy_vars_gNB->nbDecode++;
|
||||
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",phy_vars_gNB->nbDecode);
|
||||
|
||||
@@ -1222,6 +1222,10 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start + rel15_ul->rb_start + rb] /
|
||||
rel15_ul->rb_size;
|
||||
}
|
||||
LOG_D(PHY,"aa %d, bwp_start%d, rb_start %d, rb_size %d: ulsch_power %d, ulsch_noise_power %d\n",aarx,
|
||||
rel15_ul->bwp_start,rel15_ul->rb_start,rel15_ul->rb_size,
|
||||
gNB->pusch_vars[ulsch_id]->ulsch_power[aarx],
|
||||
gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,8 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
||||
pucch->frame = frame;
|
||||
pucch->slot = slot;
|
||||
pucch->active = 1;
|
||||
if (pucch->pucch_pdu.format_type > 0) LOG_D(PHY,"Programming PUCCH[%d] for %d.%d, format %d, nb_harq %d, nb_sr %d, nb_csi %d\n",id,
|
||||
pucch->frame,pucch->slot,pucch->pucch_pdu.format_type,pucch->pucch_pdu.bit_len_harq,pucch->pucch_pdu.sr_flag,pucch->pucch_pdu.bit_len_csi_part1);
|
||||
memcpy((void*)&pucch->pucch_pdu, (void*)pucch_pdu, sizeof(nfapi_nr_pucch_pdu_t));
|
||||
}
|
||||
|
||||
@@ -395,7 +397,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
uci_stats->pucch0_thres = gNB->pucch0_thres; /* + (10*max_n0);*/
|
||||
bool no_conf=false;
|
||||
if (nr_sequences>1) {
|
||||
if (xrtmag_dBtimes10 < (50+xrtmag_next_dBtimes10) || SNRtimes10 < gNB->pucch0_thres) {
|
||||
if (/*xrtmag_dBtimes10 < (30+xrtmag_next_dBtimes10) ||*/ SNRtimes10 < uci_stats->pucch0_thres) {
|
||||
no_conf=true;
|
||||
LOG_D(PHY,"%d.%d PUCCH bad confidence: %d threshold, %d, %d, %d\n",
|
||||
frame, slot,
|
||||
@@ -432,7 +434,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
uci_pdu->harq->num_harq = 1;
|
||||
uci_pdu->harq->harq_confidence_level = no_conf;
|
||||
uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(sizeof *uci_pdu->harq->harq_list);
|
||||
|
||||
uci_pdu->harq->harq_list[0].harq_value = !(index&0x01);
|
||||
LOG_D(PHY, "[DLSCH/PDSCH/PUCCH] %d.%d HARQ %s with confidence level %s xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d\n",
|
||||
frame,slot,uci_pdu->harq->harq_list[0].harq_value==0?"ACK":"NACK",
|
||||
@@ -1188,9 +1189,9 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("Decoding pucch2 for %d symbols, %d PRB\n",pucch_pdu->nr_of_symbols,pucch_pdu->prb_size);
|
||||
#endif
|
||||
LOG_D(PHY,"Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d\n",
|
||||
pucch_pdu->nr_of_symbols,pucch_pdu->prb_size,
|
||||
pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,pucch_pdu->bit_len_csi_part1,pucch_pdu->bit_len_csi_part2);
|
||||
|
||||
int nc_group_size=1; // 2 PRB
|
||||
int ngroup = prb_size_ext/nc_group_size/2;
|
||||
@@ -1544,7 +1545,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("cw_ML %d, metric %d dB\n",cw_ML,corr_dB);
|
||||
#endif
|
||||
LOG_D(PHY,"cw_ML %d, metric %d dB\n",cw_ML,corr_dB);
|
||||
LOG_D(PHY,"slot %d PUCCH2 cw_ML %d, metric %d dB\n",slot,cw_ML,corr_dB);
|
||||
|
||||
decodedPayload[0]=(uint64_t)cw_ML;
|
||||
}
|
||||
else { // polar coded case
|
||||
|
||||
@@ -289,8 +289,6 @@ void nr_processDLSegment(void* arg) {
|
||||
__m128i *pv = (__m128i*)&z;
|
||||
__m128i *pl = (__m128i*)&l;
|
||||
|
||||
uint8_t Ilbrm = 1;
|
||||
|
||||
Kr = harq_process->K; // [hna] overwrites this line "Kr = p_decParams->Z*kb"
|
||||
Kr_bytes = Kr>>3;
|
||||
K_bits_F = Kr-harq_process->F;
|
||||
@@ -323,8 +321,7 @@ void nr_processDLSegment(void* arg) {
|
||||
harq_process->round); */
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING, VCD_FUNCTION_IN);
|
||||
|
||||
if (nr_rate_matching_ldpc_rx(Ilbrm,
|
||||
Tbslbrm,
|
||||
if (nr_rate_matching_ldpc_rx(Tbslbrm,
|
||||
p_decoderParms->BG,
|
||||
p_decoderParms->Z,
|
||||
harq_process->d[r],
|
||||
@@ -451,7 +448,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
phy_vars_ue->dl_stats[harq_process->DLround]++;
|
||||
LOG_D(PHY,"Round %d RV idx %d\n",harq_process->DLround,harq_process->rvidx);
|
||||
uint8_t kc;
|
||||
uint32_t Tbslbrm;// = 950984;
|
||||
uint16_t nb_rb;// = 30;
|
||||
double Coderate;// = 0.0;
|
||||
uint8_t dmrs_Type = harq_process->dmrsConfigType;
|
||||
@@ -567,10 +563,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD) && (!frame%100))
|
||||
LOG_I(PHY,"K %d C %d Z %d nl %d \n", harq_process->K, harq_process->C, p_decParams->Z, harq_process->Nl);
|
||||
}
|
||||
if ((harq_process->Nl)<4)
|
||||
Tbslbrm = nr_compute_tbslbrm(harq_process->mcs_table,nb_rb,harq_process->Nl);
|
||||
else
|
||||
Tbslbrm = nr_compute_tbslbrm(harq_process->mcs_table,nb_rb,4);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION, VCD_FUNCTION_OUT);
|
||||
p_decParams->Z = harq_process->Z;
|
||||
@@ -621,7 +613,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
rdata->r_offset = r_offset;
|
||||
rdata->Kr_bytes = Kr_bytes;
|
||||
rdata->rv_index = harq_process->rvidx;
|
||||
rdata->Tbslbrm = Tbslbrm;
|
||||
rdata->Tbslbrm = harq_process->tbslbrm;
|
||||
rdata->offset = offset;
|
||||
rdata->dlsch = dlsch;
|
||||
rdata->dlsch_id = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ extern const char *prachfmt[];
|
||||
// - idft for short sequence assumes we are transmitting starting in symbol 0 of a PRACH slot
|
||||
// - Assumes that PRACH SCS is same as PUSCH SCS @ 30 kHz, take values for formats 0-2 and adjust for others below
|
||||
// - Preamble index different from 0 is not detected by gNB
|
||||
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
|
||||
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t slot){
|
||||
|
||||
NR_DL_FRAME_PARMS *fp=&ue->frame_parms;
|
||||
fapi_nr_config_request_t *nrUE_config = &ue->nrUE_config;
|
||||
@@ -190,8 +190,9 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
|
||||
// now generate PRACH signal
|
||||
#ifdef NR_PRACH_DEBUG
|
||||
if (NCS>0)
|
||||
LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n",
|
||||
LOG_I(PHY, "PRACH [UE %d] generate PRACH in frame.slot %d.%d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n",
|
||||
Mod_id,
|
||||
frame,
|
||||
slot,
|
||||
rootSequenceIndex,
|
||||
preamble_index,
|
||||
@@ -221,7 +222,9 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
|
||||
k += kbar;
|
||||
k *= 2;
|
||||
|
||||
LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id,
|
||||
LOG_I(PHY, "PRACH [UE %d] in frame.slot %d.%d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n",
|
||||
Mod_id,
|
||||
frame,
|
||||
slot,
|
||||
k,
|
||||
n_ra_prb,
|
||||
|
||||
@@ -1672,7 +1672,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
unsigned char i_mod,
|
||||
unsigned char harq_pid);
|
||||
|
||||
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t subframe);
|
||||
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t slot);
|
||||
|
||||
void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid);
|
||||
/**@}*/
|
||||
|
||||
@@ -260,6 +260,7 @@ typedef struct {
|
||||
uint16_t ptrs_symbols;
|
||||
// PTRS symbol index, to be updated every PTRS symbol within a slot.
|
||||
uint8_t ptrs_symbol_index;
|
||||
uint32_t tbslbrm;
|
||||
uint8_t nscid;
|
||||
uint16_t dlDmrsScramblingId;
|
||||
/// PDU BITMAP
|
||||
|
||||
@@ -171,8 +171,8 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid,
|
||||
unsigned int G)
|
||||
{
|
||||
unsigned int G) {
|
||||
|
||||
start_meas(&ue->ulsch_encoding_stats);
|
||||
|
||||
/////////////////////////parameters and variables initialization/////////////////////////
|
||||
@@ -188,9 +188,8 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
||||
uint16_t Kr=0;
|
||||
uint32_t r_offset=0;
|
||||
uint32_t F=0;
|
||||
uint8_t Ilbrm = 0;
|
||||
uint32_t Tbslbrm = 950984; //max tbs
|
||||
float Coderate = 0.0;
|
||||
|
||||
///////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -376,12 +375,9 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
||||
|
||||
uint32_t E = nr_get_E(G, harq_process->C, mod_order, harq_process->pusch_pdu.nrOfLayers, r);
|
||||
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->pusch_pdu.nrOfLayers);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
|
||||
start_meas(&ue->ulsch_rate_matching_stats);
|
||||
if (nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
if (nr_rate_matching_ldpc(0,
|
||||
harq_process->BG,
|
||||
*pz,
|
||||
harq_process->d[r],
|
||||
|
||||
@@ -503,6 +503,10 @@ typedef struct RU_t_s {
|
||||
int att_tx;
|
||||
/// flag to indicate precoding operation in RU
|
||||
int do_precoding;
|
||||
/// TX processing advance in subframes (for LTE)
|
||||
int sf_ahead;
|
||||
/// TX processing advance in slots (for NR)
|
||||
int sl_ahead;
|
||||
/// FAPI confiuration
|
||||
nfapi_nr_config_request_scf_t config;
|
||||
/// Frame parameters
|
||||
|
||||
@@ -935,8 +935,8 @@ typedef struct LDPCDecode_s {
|
||||
int segment_r;
|
||||
int r_offset;
|
||||
int offset;
|
||||
int Tbslbrm;
|
||||
int decodeIterations;
|
||||
uint32_t tbslbrm;
|
||||
} ldpcDecode_t;
|
||||
|
||||
struct ldpcReqId {
|
||||
|
||||
@@ -227,7 +227,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
nfapi_nr_prach_pdu_t *prach_pdu = &UL_tti_req->pdus_list[i].prach_pdu;
|
||||
nr_fill_prach(gNB, UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
if (gNB->RU_list[0]->if_south == LOCAL_RF) nr_fill_prach_ru(gNB->RU_list[0], UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
if (gNB->RU_list[0]->if_south == LOCAL_RF ||
|
||||
gNB->RU_list[0]->if_south == REMOTE_IF5) nr_fill_prach_ru(gNB->RU_list[0], UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
break;
|
||||
case NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE:
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
|
||||
@@ -54,8 +54,10 @@ void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME
|
||||
|
||||
uint8_t sco = 0;
|
||||
if (((fp->freq_range == nr_FR1) && (cfg->ssb_table.ssb_subcarrier_offset.value<24)) ||
|
||||
((fp->freq_range == nr_FR2) && (cfg->ssb_table.ssb_subcarrier_offset.value<12)) )
|
||||
sco = cfg->ssb_table.ssb_subcarrier_offset.value;
|
||||
((fp->freq_range == nr_FR2) && (cfg->ssb_table.ssb_subcarrier_offset.value<12)) ) {
|
||||
if (fp->freq_range == nr_FR1)
|
||||
sco = cfg->ssb_table.ssb_subcarrier_offset.value>>cfg->ssb_config.scs_common.value;
|
||||
}
|
||||
|
||||
fp->ssb_start_subcarrier = (12 * cfg->ssb_table.ssb_offset_point_a.value + sco);
|
||||
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier,cfg->ssb_table.ssb_offset_point_a.value,sco);
|
||||
@@ -258,15 +260,17 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
||||
|
||||
LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id);
|
||||
nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 1,0);
|
||||
// dumpsig=1;
|
||||
}
|
||||
/*
|
||||
if (ulsch_harq->ulsch_pdu.mcs_index == 9 && dumpsig==1) {
|
||||
if (ulsch_harq->ulsch_pdu.mcs_index == 0 && dumpsig==1) {
|
||||
#ifdef __AVX2__
|
||||
int off = ((ulsch_harq->ulsch_pdu.rb_size&1) == 1)? 4:0;
|
||||
#else
|
||||
int off = 0;
|
||||
#endif
|
||||
|
||||
LOG_M("rxsigF0.m","rxsF0",&gNB->common_vars.rxdataF[0][(ulsch_harq->slot&3)*gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot],gNB->frame_parms.ofdm_symbol_size*gNB->frame_parms.symbols_per_slot,1,1);
|
||||
LOG_M("rxsigF0_ext.m","rxsF0_ext",
|
||||
&gNB->pusch_vars[0]->rxdataF_ext[0][ulsch_harq->ulsch_pdu.start_symbol_index*NR_NB_SC_PER_RB * ulsch_harq->ulsch_pdu.rb_size],ulsch_harq->ulsch_pdu.nr_of_symbols*(off+(NR_NB_SC_PER_RB * ulsch_harq->ulsch_pdu.rb_size)),1,1);
|
||||
LOG_M("chestF0.m","chF0",
|
||||
@@ -292,7 +296,8 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
||||
}
|
||||
exit(-1);
|
||||
|
||||
} */
|
||||
}
|
||||
*/
|
||||
ulsch->last_iteration_cnt = rdata->decodeIterations;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
|
||||
}
|
||||
@@ -421,7 +426,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
||||
int SNRtimes10 = dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot) -
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot);
|
||||
|
||||
LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f)\n", SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0);
|
||||
LOG_D(PHY, "%d.%d: Estimated SNR for PUSCH is = %f dB (ulsch_power %f, noise %f) delay %d\n", frame, slot_rx, SNRtimes10/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot)/10.0,dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot)/10.0,sync_pos);
|
||||
|
||||
int cqi;
|
||||
if (SNRtimes10 < -640) cqi=0;
|
||||
@@ -691,6 +696,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_2_3_4_t);
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu_format2 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_2_3_4;
|
||||
|
||||
LOG_D(PHY,"%d.%d Calling nr_decode_pucch2\n",frame_rx,slot_rx);
|
||||
nr_decode_pucch2(gNB,
|
||||
slot_rx,
|
||||
uci_pdu_format2,
|
||||
@@ -783,8 +789,15 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
gNB->pusch_vars[ULSCH_id]->DTX=1;
|
||||
if (stats) stats->DTX++;
|
||||
return 1;
|
||||
} else gNB->pusch_vars[ULSCH_id]->DTX=0;
|
||||
} else {
|
||||
LOG_D(PHY, "PUSCH detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx,
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot),
|
||||
dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot),gNB->pusch_thres);
|
||||
|
||||
|
||||
|
||||
gNB->pusch_vars[ULSCH_id]->DTX=0;
|
||||
}
|
||||
stop_meas(&gNB->rx_pusch_stats);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
|
||||
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
|
||||
|
||||
@@ -315,6 +315,7 @@ void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
dlsch0_harq->mcs = dlsch_config_pdu->mcs;
|
||||
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
|
||||
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
|
||||
dlsch0_harq->tbslbrm = dlsch_config_pdu->tbslbrm;
|
||||
dlsch0_harq->nscid = dlsch_config_pdu->nscid;
|
||||
dlsch0_harq->dlDmrsScramblingId = dlsch_config_pdu->dlDmrsScramblingId;
|
||||
//get nrOfLayers from DCI info
|
||||
@@ -341,6 +342,7 @@ void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
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;
|
||||
|
||||
@@ -1823,7 +1823,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN);
|
||||
|
||||
prach_power = generate_nr_prach(ue, gNB_id, nr_slot_tx);
|
||||
prach_power = generate_nr_prach(ue, gNB_id, frame_tx, nr_slot_tx);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_OUT);
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ int main(int argc, char **argv)
|
||||
double DS_TDL = .03;
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
char gNBthreads[128]="n";
|
||||
int Tbslbrm = 950984;
|
||||
|
||||
if (load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[NR_DLSCHSIM] Error, configuration module init failed\n");
|
||||
@@ -457,6 +458,7 @@ int main(int argc, char **argv)
|
||||
rel15->dlDmrsSymbPos = 4;
|
||||
rel15->mcsIndex[0] = Imcs;
|
||||
rel15->numDmrsCdmGrpsNoData = 1;
|
||||
rel15->maintenance_parms_v3.tbSizeLbrmBytes = Tbslbrm;
|
||||
double modulated_input[16 * 68 * 384]; // [hna] 16 segments, 68*Zc
|
||||
short channel_output_fixed[16 * 68 * 384];
|
||||
//unsigned char *estimated_output;
|
||||
@@ -476,6 +478,7 @@ int main(int argc, char **argv)
|
||||
harq_process->dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
|
||||
harq_process->dlDmrsSymbPos = 4;
|
||||
harq_process->n_dmrs_cdm_groups = 1;
|
||||
harq_process->tbslbrm = Tbslbrm;
|
||||
printf("harq process ue mcs = %d Qm = %d, symb %d\n", harq_process->mcs, harq_process->Qm, nb_symb_sch);
|
||||
|
||||
unsigned char *test_input=dlsch->harq_process.pdu;
|
||||
|
||||
@@ -105,6 +105,10 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// dummy functions
|
||||
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
|
||||
|
||||
|
||||
@@ -97,6 +97,10 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
rrc_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
@@ -100,6 +100,11 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
|
||||
transport_layer_addr_t remoteAddr, int port, gtpCallback callBack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
|
||||
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
|
||||
@@ -99,6 +99,15 @@ typedef enum {
|
||||
#define CONFIG_STRING_RU_IF_FREQUENCY "if_freq"
|
||||
#define CONFIG_STRING_RU_IF_FREQ_OFFSET "if_offset"
|
||||
#define CONFIG_STRING_RU_DO_PRECODING "do_precoding"
|
||||
#define CONFIG_STRING_RU_SF_AHEAD "sf_ahead"
|
||||
#define CONFIG_STRING_RU_SL_AHEAD "sl_ahead"
|
||||
#define CONFIG_STRING_RU_NR_FLAG "nr_flag"
|
||||
#define CONFIG_STRING_RU_NR_SCS_FOR_RASTER "nr_scs_for_raster"
|
||||
|
||||
#define HLP_RU_SF_AHEAD "LTE TX processing advance"
|
||||
#define HLP_RU_SL_AHEAD "NR TX processing advance"
|
||||
#define HLP_RU_NR_FLAG "Use NR numerology (for AW2SORI)"
|
||||
#define HLP_RU_NR_SCS_FOR_RASTER "NR SCS for raster (for AW2SORI)"
|
||||
|
||||
#define RU_LOCAL_IF_NAME_IDX 0
|
||||
#define RU_LOCAL_ADDRESS_IDX 1
|
||||
@@ -129,6 +138,10 @@ typedef enum {
|
||||
#define RU_IF_FREQUENCY 26
|
||||
#define RU_IF_FREQ_OFFSET 27
|
||||
#define RU_DO_PRECODING 28
|
||||
#define RU_SF_AHEAD 29
|
||||
#define RU_SL_AHEAD 30
|
||||
#define RU_NR_FLAG 31
|
||||
#define RU_NR_SCS_FOR_RASTER 32
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* RU configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -163,6 +176,10 @@ typedef enum {
|
||||
{CONFIG_STRING_RU_IF_FREQUENCY, NULL, 0, u64ptr:NULL, defuintval:0, TYPE_UINT64, 0}, \
|
||||
{CONFIG_STRING_RU_IF_FREQ_OFFSET, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_DO_PRECODING, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_SF_AHEAD, HLP_RU_SF_AHEAD, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_SL_AHEAD, HLP_RU_SL_AHEAD, 0, iptr:NULL, defintval:6, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_NR_FLAG, HLP_RU_NR_FLAG, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_NR_SCS_FOR_RASTER, HLP_RU_NR_SCS_FOR_RASTER, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER "dl_bler_target_lower"
|
||||
#define CONFIG_STRING_MACRLC_DL_RD2_BLER_THRESHOLD "dl_rd2_bler_threshold"
|
||||
#define CONFIG_STRING_MACRLC_DL_MAX_MCS "dl_max_mcs"
|
||||
|
||||
#define CONFIG_STRING_MACRLC_HARQ_ROUND_MAX "harq_round_max"
|
||||
#define CONFIG_STRING_MACRLC_MIN_GRANT_PRB "min_grant_prb"
|
||||
#define CONFIG_STRING_MACRLC_MIN_GRANT_MCS "min_grant_mcs"
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* MacRLC configuration parameters */
|
||||
@@ -97,6 +99,9 @@
|
||||
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase DL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_RD2_BLER_THRESHOLD, "Threshold of RD2/RETX2 BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.01, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_MAX_MCS, "Maximum DL MCS that should be used", 0, u8ptr:NULL, defintval:28, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_HARQ_ROUND_MAX, "Maximum number of HARQ rounds", 0, u8ptr:NULL, defintval:4, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_MIN_GRANT_PRB, "Minimal Periodic ULSCH Grant PRBs", 0, u8ptr:NULL, defintval:5, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_MIN_GRANT_MCS, "Minimal Periodic ULSCH Grant MCS", 0, u8ptr:NULL, defintval:9, TYPE_UINT8, 0} \
|
||||
}
|
||||
#define MACRLC_CC_IDX 0
|
||||
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
@@ -124,6 +129,8 @@
|
||||
#define MACRLC_DL_BLER_TARGET_LOWER_IDX 23
|
||||
#define MACRLC_DL_RD2_BLER_THRESHOLD_IDX 24
|
||||
#define MACRLC_DL_MAX_MCS_IDX 25
|
||||
|
||||
#define MACRLC_HARQ_ROUND_MAX_IDX 26
|
||||
#define MACRLC_MIN_GRANT_PRB_IDX 27
|
||||
#define MACRLC_MIN_GRANT_MCS_IDX 28
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
@@ -458,7 +458,7 @@ void fix_scd(NR_ServingCellConfig_t *scd) {
|
||||
for (int i = scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.count-1; i >= 0; i--) {
|
||||
if ((*scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[i] < 1)
|
||||
|| (*scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[i] > 276)) {
|
||||
LOG_I(RRC, "DL PTRS frequencyDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
LOG_I(NR_RRC, "DL PTRS frequencyDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
free(scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS);
|
||||
scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS = NULL;
|
||||
break;
|
||||
@@ -642,7 +642,6 @@ void RCconfig_NR_L1(void) {
|
||||
num_prbbl++;
|
||||
}
|
||||
|
||||
|
||||
paramdef_t L1_Params[] = L1PARAMS_DESC;
|
||||
paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0};
|
||||
|
||||
@@ -757,10 +756,8 @@ void RCconfig_nr_macrlc() {
|
||||
pt = strtok_r(NULL, ",", &save);
|
||||
num_prbbl++;
|
||||
}
|
||||
|
||||
paramdef_t MacRLC_Params[] = MACRLCPARAMS_DESC;
|
||||
paramlist_def_t MacRLC_ParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0};
|
||||
|
||||
config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL);
|
||||
|
||||
if ( MacRLC_ParamList.numelt > 0) {
|
||||
@@ -831,10 +828,11 @@ void RCconfig_nr_macrlc() {
|
||||
RC.nrmac[j]->dl_bler_target_lower = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_BLER_TARGET_LOWER_IDX].dblptr);
|
||||
RC.nrmac[j]->dl_rd2_bler_threshold = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_RD2_BLER_THRESHOLD_IDX].dblptr);
|
||||
RC.nrmac[j]->dl_max_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_MAX_MCS_IDX].u8ptr);
|
||||
RC.nrmac[j]->harq_round_max = *(MacRLC_ParamList.paramarray[j][MACRLC_HARQ_ROUND_MAX_IDX].u8ptr);
|
||||
RC.nrmac[j]->min_grant_prb = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_PRB_IDX].u8ptr);
|
||||
RC.nrmac[j]->min_grant_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_MCS_IDX].u8ptr);
|
||||
RC.nrmac[j]->num_ulprbbl = num_prbbl;
|
||||
LOG_I(NR_MAC,"Blacklisted PRBS %d\n",num_prbbl);
|
||||
memcpy(RC.nrmac[j]->ulprbbl,prbbl,275*sizeof(prbbl[0]));
|
||||
|
||||
}// for (j=0;j<RC.nb_nr_macrlc_inst;j++)
|
||||
}else {// MacRLC_ParamList.numelt > 0
|
||||
LOG_E(PHY,"No %s configuration found\n", CONFIG_STRING_MACRLC_LIST);
|
||||
@@ -1110,6 +1108,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
rrc->nr_cellid = (uint64_t)*(GNBParamList.paramarray[i][GNB_NRCELLID_IDX].u64ptr);
|
||||
|
||||
rrc->um_on_default_drb = *(GNBParamList.paramarray[i][GNB_UMONDEFAULTDRB_IDX].uptr);
|
||||
if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) {
|
||||
|
||||
} else if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) {
|
||||
@@ -1170,7 +1169,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
(NRRRC_CONFIGURATION_REQ (msg_p).mnc_digit_length[l] == 3),"BAD MNC DIGIT LENGTH %d",
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).mnc_digit_length[l]);
|
||||
}
|
||||
LOG_I(RRC,"SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr);
|
||||
LOG_I(GNB_APP,"SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr;
|
||||
LOG_I(RRC,"pdsch_AntennaPorts N1 %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts.N1 = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr;
|
||||
@@ -1180,11 +1179,11 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts.XP = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr;
|
||||
LOG_I(RRC,"pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr;
|
||||
LOG_I(RRC,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
|
||||
LOG_I(GNB_APP,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME = *GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr;
|
||||
LOG_I(RRC,"SIB1 TDA %d\n",*GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).sib1_tda = *GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr;
|
||||
LOG_I(RRC,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
|
||||
LOG_I(GNB_APP,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).do_CSIRS = *GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr;
|
||||
LOG_I(RRC, "Do SRS %d\n",*GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).do_SRS = *GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr;
|
||||
@@ -2066,8 +2065,7 @@ void configure_gnb_du_mac(int inst) {
|
||||
NULL,
|
||||
0,
|
||||
0, // rnti
|
||||
(NR_CellGroupConfig_t *)NULL
|
||||
);
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -124,10 +124,10 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_NRCELLID "nr_cellid"
|
||||
#define GNB_CONFIG_STRING_MINRXTXTIME "min_rxtxtime"
|
||||
#define GNB_CONFIG_STRING_ULPRBBLACKLIST "ul_prbblacklist"
|
||||
#define GNB_CONFIG_STRING_UMONDEFAULTDRB "um_on_default_drb"
|
||||
#define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off"
|
||||
#define GNB_CONFIG_STRING_ENABLE_SDAP "enable_sdap"
|
||||
#define GNB_CONFIG_HLP_STRING_ENABLE_SDAP "enable the SDAP layer\n"
|
||||
|
||||
#define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -160,8 +160,9 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
|
||||
{GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, iptr:NULL, defintval:2, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_UMONDEFAULTDRB, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0} \
|
||||
}
|
||||
|
||||
#define GNB_GNB_ID_IDX 0
|
||||
@@ -189,8 +190,9 @@ typedef enum {
|
||||
#define GNB_NRCELLID_IDX 22
|
||||
#define GNB_MINRXTXTIME_IDX 23
|
||||
#define GNB_ULPRBBLACKLIST_IDX 24
|
||||
#define GNB_FORCE256QAMOFF_IDX 25
|
||||
#define GNB_ENABLE_SDAP_IDX 26
|
||||
#define GNB_UMONDEFAULTDRB_IDX 25
|
||||
#define GNB_FORCE256QAMOFF_IDX 26
|
||||
#define GNB_ENABLE_SDAP_IDX 27
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define GNBPARAMS_CHECK { \
|
||||
|
||||
@@ -92,12 +92,10 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
|
||||
}
|
||||
|
||||
|
||||
//tbslbrm calculation according to 5.4.2.1 of 38.212
|
||||
uint32_t nr_compute_tbslbrm(uint16_t table,
|
||||
uint16_t nb_rb,
|
||||
uint8_t Nl)
|
||||
{
|
||||
uint8_t Nl) {
|
||||
|
||||
uint16_t R, nb_re;
|
||||
uint16_t nb_rb_lbrm=0;
|
||||
@@ -122,34 +120,31 @@ uint32_t nr_compute_tbslbrm(uint16_t table,
|
||||
Ninfo = (nb_re * R * Qm * Nl)>>10;
|
||||
|
||||
if (Ninfo <=3824) {
|
||||
n = max(3, floor(log2(Ninfo)) - 6);
|
||||
Np_info = max(24, (Ninfo>>n)<<n);
|
||||
for (int i=0; i<INDEX_MAX_TBS_TABLE; i++) {
|
||||
if (Tbstable_nr[i] >= Np_info){
|
||||
nr_tbs = Tbstable_nr[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
n = max(3, floor(log2(Ninfo)) - 6);
|
||||
Np_info = max(24, (Ninfo>>n)<<n);
|
||||
for (int i=0; i<INDEX_MAX_TBS_TABLE; i++) {
|
||||
if (Tbstable_nr[i] >= Np_info){
|
||||
nr_tbs = Tbstable_nr[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
n = log2(Ninfo-24)-5;
|
||||
Np_info = max(3840, (ROUNDIDIV((Ninfo-24),(1<<n)))<<n);
|
||||
|
||||
if (R <= 256) {
|
||||
C = CEILIDIV((Np_info+24),3816);
|
||||
nr_tbs = (C<<3)*CEILIDIV((Np_info+24),(C<<3)) - 24;
|
||||
}
|
||||
else {
|
||||
if (Np_info > 8424){
|
||||
C = CEILIDIV((Np_info+24),8424);
|
||||
nr_tbs = (C<<3)*CEILIDIV((Np_info+24),(C<<3)) - 24;
|
||||
}
|
||||
else {
|
||||
nr_tbs = ((CEILIDIV((Np_info+24),8))<<3) - 24;
|
||||
}
|
||||
|
||||
}
|
||||
n = log2(Ninfo-24)-5;
|
||||
Np_info = max(3840, (ROUNDIDIV((Ninfo-24),(1<<n)))<<n);
|
||||
|
||||
if (R <= 256) {
|
||||
C = CEILIDIV((Np_info+24),3816);
|
||||
nr_tbs = (C<<3)*CEILIDIV((Np_info+24),(C<<3)) - 24;
|
||||
}
|
||||
else {
|
||||
if (Np_info > 8424){
|
||||
C = CEILIDIV((Np_info+24),8424);
|
||||
nr_tbs = (C<<3)*CEILIDIV((Np_info+24),(C<<3)) - 24;
|
||||
}
|
||||
else
|
||||
nr_tbs = ((CEILIDIV((Np_info+24),8))<<3) - 24;
|
||||
}
|
||||
}
|
||||
return nr_tbs;
|
||||
}
|
||||
|
||||
@@ -4070,8 +4070,6 @@ uint16_t compute_pucch_prb_size(uint8_t format,
|
||||
if ((O_tot+O_csi)>(nr_prbs*n_re_ctrl*n_symb*Qm*r))
|
||||
AssertFatal(1==0,"MaxCodeRate %.2f can't support %d UCI bits and %d CRC bits with %d PRBs",
|
||||
r,O_tot,O_crc,nr_prbs);
|
||||
else
|
||||
return nr_prbs;
|
||||
}
|
||||
|
||||
if (format==2){
|
||||
@@ -4089,6 +4087,25 @@ uint16_t compute_pucch_prb_size(uint8_t format,
|
||||
}
|
||||
}
|
||||
|
||||
int get_bw_tbslbrm(NR_BWP_t *genericParameters,
|
||||
NR_CellGroupConfig_t *cg) {
|
||||
|
||||
int bw = 0;
|
||||
if (cg && cg->spCellConfig && cg->spCellConfig->spCellConfigDedicated &&
|
||||
cg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) {
|
||||
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *BWP_list = cg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
|
||||
for (int i=0; i<BWP_list->list.count; i++) {
|
||||
genericParameters = &BWP_list->list.array[i]->bwp_Common->genericParameters;
|
||||
int curr_bw = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
if (curr_bw > bw)
|
||||
bw = curr_bw;
|
||||
}
|
||||
}
|
||||
else
|
||||
bw = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
return bw;
|
||||
}
|
||||
|
||||
/* extract UL PTRS values from RRC and validate it based upon 38.214 6.2.3 */
|
||||
bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
|
||||
uint16_t rbSize,uint8_t mcsIndex, uint8_t mcsTable,
|
||||
|
||||
@@ -122,6 +122,13 @@ uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB);
|
||||
|
||||
uint16_t get_nr_srs_offset(NR_SRS_PeriodicityAndOffset_t periodicityAndOffset);
|
||||
|
||||
int get_bw_tbslbrm(NR_BWP_t *genericParameters,
|
||||
NR_CellGroupConfig_t *cg);
|
||||
|
||||
uint32_t nr_compute_tbslbrm(uint16_t table,
|
||||
uint16_t nb_rb,
|
||||
uint8_t Nl);
|
||||
|
||||
void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
frame_t frameP,
|
||||
NR_MIB_t *mib,
|
||||
|
||||
@@ -354,13 +354,18 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
|
||||
scs_ssb = get_softmodem_params()->numerology;
|
||||
band = mac->nr_band;
|
||||
ssb_start_symbol = get_ssb_start_symbol(band,scs_ssb,ssb_index);
|
||||
int ssb_sc_offset_norm;
|
||||
if (ssb_subcarrier_offset<24 && mac->frequency_range == FR1)
|
||||
ssb_sc_offset_norm = ssb_subcarrier_offset>>scs_ssb;
|
||||
else
|
||||
ssb_sc_offset_norm = ssb_subcarrier_offset;
|
||||
|
||||
if (mac->common_configuration_complete == 0)
|
||||
nr_ue_sib1_scheduler(module_id,
|
||||
cc_id,
|
||||
ssb_start_symbol,
|
||||
frame,
|
||||
ssb_subcarrier_offset,
|
||||
ssb_sc_offset_norm,
|
||||
ssb_index,
|
||||
ssb_start_subcarrier,
|
||||
mac->frequency_range,
|
||||
@@ -913,6 +918,19 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
LOG_W(MAC, "[%d.%d] MCS value %d out of bounds! Possibly due to false DCI. Ignoring DCI!\n", frame, slot, dlsch_config_pdu_1_0->mcs);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int bw_tbslbrm;
|
||||
if (mac->scc || mac->scc_SIB || mac->cg) {
|
||||
NR_BWP_t genericParameters = mac->scc ? mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters :
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters;
|
||||
bw_tbslbrm = get_bw_tbslbrm(&genericParameters, mac->cg);
|
||||
}
|
||||
else
|
||||
bw_tbslbrm = dlsch_config_pdu_1_0->BWPSize;
|
||||
dlsch_config_pdu_1_0->tbslbrm = nr_compute_tbslbrm(dlsch_config_pdu_1_0->mcs_table,
|
||||
bw_tbslbrm,
|
||||
1);
|
||||
|
||||
/* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
|
||||
dlsch_config_pdu_1_0->ndi = dci->ndi;
|
||||
/* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
|
||||
@@ -1318,6 +1336,17 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
/* TODO same calculation for MCS table as done in UL */
|
||||
dlsch_config_pdu_1_1->mcs_table = (pdsch_Config->mcs_Table) ? (*pdsch_Config->mcs_Table + 1) : 0;
|
||||
|
||||
// TBS_LBRM according to section 5.4.2.1 of 38.212
|
||||
long *maxMIMO_Layers = mac->cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup->ext1->maxMIMO_Layers;
|
||||
AssertFatal (maxMIMO_Layers != NULL,"Option with max MIMO layers not configured is not supported\n");
|
||||
int nl_tbslbrm = *maxMIMO_Layers < 4 ? *maxMIMO_Layers : 4;
|
||||
NR_BWP_t genericParameters = mac->scc ? mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters :
|
||||
mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters;
|
||||
int bw_tbslbrm = get_bw_tbslbrm(&genericParameters, mac->cg);
|
||||
dlsch_config_pdu_1_1->tbslbrm = nr_compute_tbslbrm(dlsch_config_pdu_1_1->mcs_table,
|
||||
bw_tbslbrm,
|
||||
nl_tbslbrm);
|
||||
/*PTRS configuration */
|
||||
dlsch_config_pdu_1_1->pduBitmap = 0;
|
||||
if(pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS != NULL) {
|
||||
|
||||
@@ -343,22 +343,24 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, int pdsch_AntennaPorts
|
||||
uint32_t absolute_diff = (*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
uint16_t sco = absolute_diff%(12*scs_scaling);
|
||||
// values of subcarrier offset larger than the limit only indicates CORESET for Type0-PDCCH CSS set is not present
|
||||
uint8_t ssb_SubcarrierOffset_limit = 0;
|
||||
int ssb_SubcarrierOffset_limit = 0;
|
||||
int offset_scaling = 0; //15kHz
|
||||
if(frequency_range == FR1) {
|
||||
ssb_SubcarrierOffset_limit = 24;
|
||||
} else {
|
||||
if (ssb_SubcarrierOffset<ssb_SubcarrierOffset_limit)
|
||||
offset_scaling = cfg->ssb_config.scs_common.value;
|
||||
} else
|
||||
ssb_SubcarrierOffset_limit = 12;
|
||||
}
|
||||
if (ssb_SubcarrierOffset<ssb_SubcarrierOffset_limit)
|
||||
AssertFatal(sco==(scs_scaling * ssb_SubcarrierOffset),"absoluteFrequencySSB has a subcarrier offset of %d while it should be %d\n",sco/scs_scaling,ssb_SubcarrierOffset);
|
||||
|
||||
AssertFatal(sco==(scs_scaling * ssb_SubcarrierOffset),
|
||||
"absoluteFrequencySSB has a subcarrier offset of %d while it should be %d\n",sco/scs_scaling,ssb_SubcarrierOffset);
|
||||
cfg->ssb_table.ssb_offset_point_a.value = absolute_diff/(12*scs_scaling) - 10; //absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
|
||||
cfg->ssb_table.ssb_offset_point_a.tl.tag = NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->ssb_table.ssb_period.value = *scc->ssb_periodicityServingCell;
|
||||
cfg->ssb_table.ssb_period.tl.tag = NFAPI_NR_CONFIG_SSB_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value = ssb_SubcarrierOffset;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.value = ssb_SubcarrierOffset<<offset_scaling;
|
||||
cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
@@ -448,6 +450,26 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, int pdsch_AntennaPorts
|
||||
|
||||
}
|
||||
|
||||
int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_SubcarrierSpacing_t subcarrierSpacing, uint32_t rrc_reconfiguration_delay) {
|
||||
|
||||
if (rrc_reconfiguration_delay == 0) {
|
||||
return -1;
|
||||
}
|
||||
const int UE_id = find_nr_UE_id(Mod_idP,rnti);
|
||||
if (UE_id < 0) {
|
||||
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
|
||||
return -1;
|
||||
}
|
||||
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
const uint16_t sf_ahead = 6/(0x01<<subcarrierSpacing) + ((6%(0x01<<subcarrierSpacing))>0);
|
||||
const uint16_t sl_ahead = sf_ahead * (0x01<<subcarrierSpacing);
|
||||
sched_ctrl->rrc_processing_timer = (rrc_reconfiguration_delay<<subcarrierSpacing) + sl_ahead;
|
||||
LOG_I(NR_MAC, "Activating RRC processing timer for UE %d\n", UE_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int ssb_SubcarrierOffset,
|
||||
@@ -471,14 +493,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
AssertFatal(RC.nrmac[Mod_idP]->UL_tti_req_ahead[0],
|
||||
"could not allocate memory for RC.nrmac[]->UL_tti_req_ahead[]\n");
|
||||
/* fill in slot/frame numbers: slot is fixed, frame will be updated by scheduler
|
||||
extern sf_ahead is initialized in ru_thread but that function is not executed yet here*/
|
||||
const uint16_t sf_ahead = (uint16_t) ceil((float)6/(0x01<<(*scc->ssbSubcarrierSpacing)));
|
||||
const uint16_t sl_ahead = sf_ahead * (0x01<<(*scc->ssbSubcarrierSpacing));
|
||||
/* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
||||
* already "in the past" and thus we put frame 1 instead of 0!*/
|
||||
* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
||||
* already "in the past" and thus we put frame 1 instead of 0! */
|
||||
for (int i = 0; i < n; ++i) {
|
||||
nfapi_nr_ul_tti_request_t *req = &RC.nrmac[Mod_idP]->UL_tti_req_ahead[0][i];
|
||||
req->SFN = i < (sl_ahead-1);
|
||||
req->SFN = i < (RC.nrmac[Mod_idP]->if_inst->sl_ahead-1);
|
||||
req->Slot = i;
|
||||
}
|
||||
RC.nrmac[Mod_idP]->common_channels[0].vrb_map_UL =
|
||||
@@ -532,12 +551,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
AssertFatal(RC.nrmac[Mod_idP]->common_channels[0].frame_type == FDD,"Dynamic TDD not handled yet\n");
|
||||
|
||||
for (int slot = 0; slot < n; ++slot) {
|
||||
/* FIXME: it seems there is a problem with slot 0/10/slots right after UL:
|
||||
* we just get retransmissions. Thus, do not schedule such slots in DL in TDD */
|
||||
if (RC.nrmac[Mod_idP]->common_channels[0].frame_type == FDD ||
|
||||
(slot % nr_slots_period != 0)){
|
||||
(slot != 0))
|
||||
RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64);
|
||||
}
|
||||
RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64);
|
||||
|
||||
LOG_I(NR_MAC, "In %s: slot %d DL %d UL %d\n",
|
||||
@@ -658,8 +674,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti);
|
||||
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
|
||||
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
|
||||
@@ -690,11 +704,15 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
genericParameters,
|
||||
RC.nrmac[Mod_idP]->type0_PDCCH_CSS_config);
|
||||
sched_ctrl->maxL = 2;
|
||||
if (CellGroup->spCellConfig &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup
|
||||
)
|
||||
compute_csi_bitlen (CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_info, UE_id, Mod_idP);
|
||||
}
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
|
||||
|
||||
return(0);
|
||||
|
||||
return 0;
|
||||
}// END rrc_mac_config_req_gNB
|
||||
|
||||
@@ -346,6 +346,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
LOG_I(NR_MAC,"Frame.Slot %d.%d\n%s\n",frame,slot,stats_output);
|
||||
}
|
||||
|
||||
nr_mac_update_timers(module_idP, frame, slot);
|
||||
|
||||
// This schedules MIB
|
||||
schedule_nr_mib(module_idP, frame, slot);
|
||||
|
||||
@@ -368,8 +370,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_nr_prach(module_idP, f, s);
|
||||
}
|
||||
|
||||
// This schedule SR
|
||||
nr_sr_reporting(module_idP, frame, slot);
|
||||
|
||||
// Schedule CSI-RS transmission
|
||||
nr_csirs_scheduling(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing]);
|
||||
@@ -398,6 +398,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
nr_schedule_pucch(module_idP, frame, slot);
|
||||
|
||||
// This schedule SR after PUCCH for multiplexing
|
||||
nr_sr_reporting(module_idP, frame, slot);
|
||||
|
||||
stop_meas(&RC.nrmac[module_idP]->eNB_scheduler);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
|
||||
|
||||
@@ -228,7 +228,7 @@ void find_SSB_and_RO_available(module_id_t module_idP) {
|
||||
cc->total_prach_occasions = total_RA_occasions - unused_RA_occasion;
|
||||
cc->num_active_ssb = num_active_ssb;
|
||||
|
||||
LOG_I(NR_MAC,
|
||||
LOG_D(NR_MAC,
|
||||
"Total available RO %d, num of active SSB %d: unused RO = %d association_period %u N_RA_sfn %u total_prach_occasions_per_config_period %u\n",
|
||||
cc->total_prach_occasions,
|
||||
cc->num_active_ssb,
|
||||
@@ -391,7 +391,7 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
|
||||
const int16_t N_RA_RB = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch);
|
||||
uint16_t *vrb_map_UL = &cc->vrb_map_UL[slotP * MAX_BWP_SIZE];
|
||||
for (int i = 0; i < N_RA_RB * fdm; ++i)
|
||||
vrb_map_UL[bwp_start + rach_ConfigGeneric->msg1_FrequencyStart + i] = SL_to_bitmap(start_symbol, N_t_slot*N_dur);
|
||||
vrb_map_UL[bwp_start + rach_ConfigGeneric->msg1_FrequencyStart + i] |= SL_to_bitmap(start_symbol, N_t_slot*N_dur);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -403,7 +403,7 @@ void nr_schedule_msg2(uint16_t rach_frame, uint16_t rach_slot,
|
||||
uint16_t monitoring_slot_period,
|
||||
uint16_t monitoring_offset,uint8_t beam_index,
|
||||
uint8_t num_active_ssb,
|
||||
int16_t *tdd_beam_association){
|
||||
int16_t *tdd_beam_association, int sl_ahead){
|
||||
|
||||
// preferentially we schedule the msg2 in the mixed slot or in the last dl slot
|
||||
// if they are allowed by search space configuration
|
||||
@@ -468,12 +468,12 @@ void nr_schedule_msg2(uint16_t rach_frame, uint16_t rach_slot,
|
||||
uint8_t start_next_period = (rach_slot-(rach_slot%tdd_period_slot)+tdd_period_slot)%nr_slots_per_frame[mu];
|
||||
*msg2_slot = start_next_period + last_dl_slot_period; // initializing scheduling of slot to next mixed (or last dl) slot
|
||||
*msg2_frame = ((*msg2_slot>(rach_slot))? rach_frame : (rach_frame+1))%1024;
|
||||
|
||||
// we can't schedule msg2 before sl_ahead since prach
|
||||
int eff_slot = *msg2_slot+(*msg2_frame-rach_frame)*nr_slots_per_frame[mu];
|
||||
if ((eff_slot-rach_slot)<=sl_ahead) {
|
||||
while ((eff_slot-rach_slot)<=sl_ahead) {
|
||||
*msg2_slot = (*msg2_slot+tdd_period_slot)%nr_slots_per_frame[mu];
|
||||
*msg2_frame = ((*msg2_slot>(rach_slot))? rach_frame : (rach_frame+1))%1024;
|
||||
eff_slot = *msg2_slot+(*msg2_frame-rach_frame)*nr_slots_per_frame[mu];
|
||||
}
|
||||
if (FR==nr_FR2) {
|
||||
int num_tdd_period = *msg2_slot/tdd_period_slot;
|
||||
@@ -652,7 +652,8 @@ void nr_initiate_ra_proc(module_id_t module_idP,
|
||||
monitoring_offset,
|
||||
beam_index,
|
||||
cc->num_active_ssb,
|
||||
nr_mac->tdd_beam_association);
|
||||
nr_mac->tdd_beam_association,
|
||||
nr_mac->if_inst->sl_ahead);
|
||||
|
||||
ra->Msg2_frame = msg2_frame;
|
||||
ra->Msg2_slot = msg2_slot;
|
||||
@@ -958,11 +959,17 @@ void nr_get_Msg3alloc(module_id_t module_id,
|
||||
startSymbolAndLength = pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &StartSymbolIndex, &NrOfSymbols);
|
||||
k2 = *pusch_TimeDomainAllocationList->list.array[i]->k2;
|
||||
// we want to transmit in the uplink symbols of mixed slot
|
||||
int start_symbol_index,nr_of_symbols;
|
||||
SLIV2SL(pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength, &start_symbol_index, &nr_of_symbols);
|
||||
LOG_D(NR_MAC,"Checking Msg3 TDA %d : k2 %d, sliv %d,S %d L %d\n",i,(int)k2,(int)pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength,start_symbol_index,nr_of_symbols);
|
||||
// we want to transmit in the uplink symbols of mixed slot AND assuming Msg2 was in the mixed slot
|
||||
if ((k2 + DELTA[mu])%nb_slots_per_period == 0) {
|
||||
temp_slot = current_slot + k2 + DELTA[mu]; // msg3 slot according to 8.3 in 38.213
|
||||
ra->Msg3_slot = temp_slot%nr_slots_per_frame[mu];
|
||||
if (is_xlsch_in_slot(RC.nrmac[module_id]->ulsch_slot_bitmap[ra->Msg3_slot / 64], ra->Msg3_slot)) {
|
||||
|
||||
if (is_xlsch_in_slot(RC.nrmac[module_id]->ulsch_slot_bitmap[ra->Msg3_slot / 64], ra->Msg3_slot) &&
|
||||
nr_of_symbols<=scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols&&
|
||||
start_symbol_index>=(14-scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols)) {
|
||||
ra->Msg3_tda_id = i;
|
||||
ra->msg3_startsymb = StartSymbolIndex;
|
||||
ra->msg3_nrsymb = NrOfSymbols;
|
||||
@@ -970,6 +977,7 @@ void nr_get_Msg3alloc(module_id_t module_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(ra->Msg3_tda_id < 16, "Couldn't find an appropriate TD allocation for Msg3\n");
|
||||
}
|
||||
else {
|
||||
ra->Msg3_tda_id = 0;
|
||||
@@ -1320,7 +1328,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
dl_req->nPDUs+=1;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15;
|
||||
|
||||
LOG_A(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d, CoreSetType %d\n",
|
||||
LOG_D(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d, CoreSetType %d\n",
|
||||
module_idP, CC_id, frameP, slotP, ra->RA_rnti, ra->state,pdcch_pdu_rel15->CoreSetType);
|
||||
|
||||
// SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control
|
||||
@@ -1416,6 +1424,11 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
pdsch_pdu_rel15->TBSize[0] = TBS;
|
||||
}
|
||||
|
||||
int bw_tbslbrm = get_bw_tbslbrm(genericParameters, ra->CellGroup);
|
||||
pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(mcsTableIdx,
|
||||
bw_tbslbrm,
|
||||
1);
|
||||
|
||||
// Fill PDCCH DL DCI PDU
|
||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
||||
pdcch_pdu_rel15->numDlDci++;
|
||||
@@ -1482,8 +1495,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
nr_add_msg3(module_idP, CC_id, frameP, slotP, ra, (uint8_t *) &tx_req->TLVs[0].value.direct[0]);
|
||||
|
||||
if(ra->cfra) {
|
||||
LOG_I(NR_MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot);
|
||||
LOG_D(NR_MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception (CFRA) for SFN.Slot %d.%d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot);
|
||||
}
|
||||
else LOG_D(NR_MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception (CBRA) for SFN.Slot %d.%d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot);
|
||||
|
||||
T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(ra->RA_rnti), T_INT(frameP),
|
||||
T_INT(slotP), T_INT(0), T_BUFFER(&tx_req->TLVs[0].value.direct[0], tx_req->TLVs[0].length));
|
||||
@@ -1695,6 +1709,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
int rbSize = 0;
|
||||
uint8_t tb_scaling = 0;
|
||||
uint16_t *vrb_map = cc[CC_id].vrb_map;
|
||||
// increase PRBs until we get to BWPSize or TBS is bigger than MAC PDU size
|
||||
do {
|
||||
if(rbSize < BWPSize)
|
||||
rbSize++;
|
||||
@@ -1752,7 +1767,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
dl_req->nPDUs+=1;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15;
|
||||
|
||||
LOG_A(NR_MAC, "[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state);
|
||||
LOG_D(NR_MAC, "[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state);
|
||||
|
||||
// SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control
|
||||
// information to data and is reset every slot.
|
||||
@@ -1791,6 +1806,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
int x_Overhead = 0;
|
||||
nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling);
|
||||
|
||||
int bw_tbslbrm = get_bw_tbslbrm(genericParameters, ra->CellGroup);
|
||||
pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(mcsTableIdx,
|
||||
bw_tbslbrm,
|
||||
1);
|
||||
|
||||
pdsch_pdu_rel15->precodingAndBeamforming.num_prgs=1;
|
||||
pdsch_pdu_rel15->precodingAndBeamforming.prg_size=275;
|
||||
pdsch_pdu_rel15->precodingAndBeamforming.dig_bf_interfaces=1;
|
||||
@@ -1943,9 +1963,16 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
|
||||
if (harq->is_waiting == 0) {
|
||||
if (harq->round == 0) {
|
||||
if (stats->dlsch_errors == 0) {
|
||||
LOG_A(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
||||
UE_info->active[UE_id] = true;
|
||||
UE_info->Msg4_ACKed[UE_id] = true;
|
||||
|
||||
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
NR_BWP_t *genericParameters = get_dl_bwp_genericParameters(sched_ctrl->active_bwp,
|
||||
RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon,
|
||||
sib1);
|
||||
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
||||
sched_ctrl->rrc_processing_timer = (NR_RRC_SETUP_DELAY_MS << genericParameters->subcarrierSpacing); // RRCSetup 10 ms
|
||||
}
|
||||
else {
|
||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) RA Procedure failed at Msg4!\n", UE_id, ra->rnti);
|
||||
@@ -1957,7 +1984,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Nack of RA-Msg4. Preparing retransmission!\n", UE_id, ra->rnti);
|
||||
LOG_D(NR_MAC, "(ue %i, rnti 0x%04x) Received Nack of RA-Msg4. Preparing retransmission!\n", UE_id, ra->rnti);
|
||||
ra->Msg4_frame = (frame + 1) % 1024;
|
||||
ra->Msg4_slot = 1;
|
||||
ra->state = Msg4;
|
||||
@@ -2014,7 +2041,7 @@ void nr_fill_rar(uint8_t Mod_idP,
|
||||
uint8_t * dlsch_buffer,
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu){
|
||||
|
||||
LOG_I(NR_MAC, "[gNB] Generate RAR MAC PDU frame %d slot %d preamble index %u TA command %d \n", ra->Msg2_frame, ra-> Msg2_slot, ra->preamble_index, ra->timing_offset);
|
||||
LOG_D(NR_MAC, "[gNB] Generate RAR MAC PDU frame %d slot %d preamble index %u TA command %d \n", ra->Msg2_frame, ra-> Msg2_slot, ra->preamble_index, ra->timing_offset);
|
||||
NR_RA_HEADER_BI *rarbi = (NR_RA_HEADER_BI *) dlsch_buffer;
|
||||
NR_RA_HEADER_RAPID *rarh = (NR_RA_HEADER_RAPID *) (dlsch_buffer + 1);
|
||||
NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 2);
|
||||
|
||||
@@ -411,14 +411,14 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize = rbSize;
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.rbStart = 0;
|
||||
|
||||
LOG_D(MAC,"mcs = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.mcs);
|
||||
LOG_D(MAC,"startSymbolIndex = %i\n", startSymbolIndex);
|
||||
LOG_D(MAC,"nrOfSymbols = %i\n", nrOfSymbols);
|
||||
LOG_D(MAC, "rbSize = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize);
|
||||
LOG_D(MAC,"TBS = %i\n", TBS);
|
||||
LOG_D(MAC,"dmrs_length %d\n",dmrs_length);
|
||||
LOG_D(MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS);
|
||||
LOG_D(MAC,"mappingtype = %d\n", mappingtype);
|
||||
LOG_D(NR_MAC,"mcs = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.mcs);
|
||||
LOG_D(NR_MAC,"startSymbolIndex = %i\n", startSymbolIndex);
|
||||
LOG_D(NR_MAC,"nrOfSymbols = %i\n", nrOfSymbols);
|
||||
LOG_D(NR_MAC, "rbSize = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize);
|
||||
LOG_D(NR_MAC,"TBS = %i\n", TBS);
|
||||
LOG_D(NR_MAC,"dmrs_length %d\n",dmrs_length);
|
||||
LOG_D(NR_MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS);
|
||||
LOG_D(NR_MAC,"mappingtype = %d\n", mappingtype);
|
||||
// Mark the corresponding RBs as used
|
||||
fill_pdcch_vrb_map(gNB_mac,
|
||||
CC_id,
|
||||
@@ -426,7 +426,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
gNB_mac->sched_ctrlCommon->cce_index,
|
||||
gNB_mac->sched_ctrlCommon->aggregation_level);
|
||||
for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize; rb++) {
|
||||
vrb_map[rb + rbStart] = SL_to_bitmap(startSymbolIndex, nrOfSymbols);
|
||||
vrb_map[rb + rbStart] |= SL_to_bitmap(startSymbolIndex, nrOfSymbols);
|
||||
}
|
||||
return TBS;
|
||||
}
|
||||
@@ -500,7 +500,13 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = dlDmrsSymbPos;
|
||||
LOG_D(MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
LOG_D(NR_MAC,"sib1:bwpStart %d, bwpSize %d\n",pdsch_pdu_rel15->BWPStart,pdsch_pdu_rel15->BWPSize);
|
||||
LOG_D(NR_MAC,"sib1:rbStart %d, rbSize %d\n",pdsch_pdu_rel15->rbStart,pdsch_pdu_rel15->rbSize);
|
||||
LOG_D(NR_MAC,"sib1:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
|
||||
pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(0,
|
||||
pdsch_pdu_rel15->BWPSize,
|
||||
1);
|
||||
|
||||
/* Fill PDCCH DL DCI PDU */
|
||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
||||
|
||||
@@ -488,17 +488,22 @@ void nr_store_dlsch_buffer(module_id_t module_id,
|
||||
const int lcid = sched_ctrl->dl_lc_ids[i];
|
||||
const uint16_t rnti = UE_info->rnti[UE_id];
|
||||
LOG_D(NR_MAC, "In %s: UE %d/%x: LCID %d\n", __FUNCTION__, UE_id, rnti, lcid);
|
||||
|
||||
if (lcid == DL_SCH_LCID_DTCH && sched_ctrl->rrc_processing_timer > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
start_meas(&RC.nrmac[module_id]->rlc_status_ind);
|
||||
sched_ctrl->rlc_status[lcid] = mac_rlc_status_ind(module_id,
|
||||
rnti,
|
||||
module_id,
|
||||
frame,
|
||||
slot,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0,
|
||||
0);
|
||||
rnti,
|
||||
module_id,
|
||||
frame,
|
||||
slot,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0,
|
||||
0);
|
||||
stop_meas(&RC.nrmac[module_id]->rlc_status_ind);
|
||||
|
||||
if (sched_ctrl->rlc_status[lcid].bytes_in_buffer == 0)
|
||||
@@ -571,8 +576,8 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
rbStart += rbSize; /* last iteration rbSize was not enough, skip it */
|
||||
rbSize = 0;
|
||||
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
const int slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
|
||||
if (rbStart >= bwpSize) {
|
||||
@@ -581,14 +586,14 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
}
|
||||
|
||||
while (rbStart + rbSize < bwpSize &&
|
||||
(rballoc_mask[rbStart + rbSize]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)) &&
|
||||
(rballoc_mask[rbStart + rbSize] & slbitmap) == slbitmap &&
|
||||
rbSize < retInfo->rbSize)
|
||||
rbSize++;
|
||||
}
|
||||
|
||||
/* check whether we need to switch the TDA allocation since the last
|
||||
* (re-)transmission */
|
||||
if (ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
|
||||
if (ps->time_domain_allocation != tda) {
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
cg,
|
||||
@@ -598,7 +603,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
sched_ctrl->update_pdsch_ps = false;
|
||||
}
|
||||
} else {
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
@@ -607,19 +611,19 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
UE_info->CellGroup[UE_id],
|
||||
cg,
|
||||
sched_ctrl->active_bwp,
|
||||
bwpd,
|
||||
tda,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
&temp_ps);
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
|
||||
|
||||
const uint16_t slbitmap = SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
|
||||
while (rbStart + rbSize < bwpSize &&
|
||||
(rballoc_mask[rbStart + rbSize]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
|
||||
while (rbStart + rbSize < bwpSize && (rballoc_mask[rbStart + rbSize] & slbitmap) == slbitmap)
|
||||
rbSize++;
|
||||
|
||||
uint32_t new_tbs;
|
||||
@@ -913,7 +917,7 @@ void pf_dl(module_id_t module_id,
|
||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
if (ps->nrOfLayers != layers[UE_id] || ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) {
|
||||
if (ps->nrOfLayers != layers[UE_id] || ps->time_domain_allocation != tda) {
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
UE_info->CellGroup[UE_id],
|
||||
@@ -923,20 +927,17 @@ void pf_dl(module_id_t module_id,
|
||||
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
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&slbitmap))
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
|
||||
uint16_t max_rbSize = 1;
|
||||
|
||||
while (rbStart + max_rbSize < bwpSize &&
|
||||
(rballoc_mask[rbStart + max_rbSize]&slbitmap))
|
||||
while (rbStart + max_rbSize < bwpSize && (rballoc_mask[rbStart + max_rbSize] & slbitmap) == slbitmap)
|
||||
max_rbSize++;
|
||||
|
||||
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
||||
@@ -1056,14 +1057,13 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) {
|
||||
const uint8_t Qm = nr_get_Qm_dl(mcs, mcsTableIdx);
|
||||
const uint16_t R = nr_get_code_rate_dl(mcs, mcsTableIdx);
|
||||
pf_tbs[mcsTableIdx][mcs] = nr_compute_tbs(Qm,
|
||||
R,
|
||||
1, /* rbSize */
|
||||
10, /* hypothetical number of slots */
|
||||
0, /* N_PRB_DMRS * N_DMRS_SLOT */
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
1 /* nrOfLayers */)
|
||||
>> 3;
|
||||
R,
|
||||
1, /* rbSize */
|
||||
10, /* hypothetical number of slots */
|
||||
0, /* N_PRB_DMRS * N_DMRS_SLOT */
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
1 /* nrOfLayers */) >> 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1078,6 +1078,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
if (!is_xlsch_in_slot(gNB_mac->dlsch_slot_bitmap[slot / 64], slot))
|
||||
return;
|
||||
|
||||
//if (slot==7 || slot == 17) return;
|
||||
|
||||
/* PREPROCESSOR */
|
||||
gNB_mac->pre_processor_dl(module_id, frame, slot);
|
||||
const int CC_id = 0;
|
||||
@@ -1269,6 +1271,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
gNB_mac->xp_pdsch_antenna_ports,
|
||||
csi_report->codebook_mode);
|
||||
}
|
||||
// TBS_LBRM according to section 5.4.2.1 of 38.212
|
||||
long *maxMIMO_Layers = cg->spCellConfig->spCellConfigDedicated->pdsch_ServingCellConfig->choice.setup->ext1->maxMIMO_Layers;
|
||||
AssertFatal (maxMIMO_Layers != NULL,"Option with max MIMO layers not configured is not supported\n");
|
||||
int nl_tbslbrm = *maxMIMO_Layers < 4 ? *maxMIMO_Layers : 4;
|
||||
// Maximum number of PRBs across all configured DL BWPs
|
||||
int bw_tbslbrm = get_bw_tbslbrm(genericParameters, cg);
|
||||
pdsch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(ps->mcsTableIdx,
|
||||
bw_tbslbrm,
|
||||
nl_tbslbrm);
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config=NULL;
|
||||
|
||||
@@ -1284,15 +1295,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
|
||||
if (phaseTrackingRS) {
|
||||
bool valid_ptrs_setup = set_dl_ptrs_values(phaseTrackingRS->choice.setup,
|
||||
pdsch_pdu->rbSize,
|
||||
pdsch_pdu->mcsIndex[0],
|
||||
pdsch_pdu->mcsTable[0],
|
||||
&pdsch_pdu->PTRSFreqDensity,
|
||||
&pdsch_pdu->PTRSTimeDensity,
|
||||
&pdsch_pdu->PTRSPortIndex,
|
||||
&pdsch_pdu->nEpreRatioOfPDSCHToPTRS,
|
||||
&pdsch_pdu->PTRSReOffset,
|
||||
pdsch_pdu->NrOfSymbols);
|
||||
pdsch_pdu->rbSize,
|
||||
pdsch_pdu->mcsIndex[0],
|
||||
pdsch_pdu->mcsTable[0],
|
||||
&pdsch_pdu->PTRSFreqDensity,
|
||||
&pdsch_pdu->PTRSTimeDensity,
|
||||
&pdsch_pdu->PTRSPortIndex,
|
||||
&pdsch_pdu->nEpreRatioOfPDSCHToPTRS,
|
||||
&pdsch_pdu->PTRSReOffset,
|
||||
pdsch_pdu->NrOfSymbols);
|
||||
|
||||
if (valid_ptrs_setup)
|
||||
pdsch_pdu->pduBitmap |= 0x1; // Bit 0: pdschPtrs - Indicates PTRS included (FR2)
|
||||
@@ -1323,7 +1334,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
dci_pdu_rel15_t dci_payload;
|
||||
memset(&dci_payload, 0, sizeof(dci_pdu_rel15_t));
|
||||
// bwp indicator
|
||||
const int n_dl_bwp = bwp ? UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count : 0;
|
||||
const int n_dl_bwp = bwp ? cg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count : 0;
|
||||
AssertFatal(n_dl_bwp <= 1, "downlinkBWP_ToAddModList has %d BWP!\n", n_dl_bwp);
|
||||
// as per table 7.3.1.1.2-1 in 38.212
|
||||
dci_payload.bwp_indicator.val = bwp ? (n_dl_bwp < 4 ? bwp->bwp_Id : bwp->bwp_Id - 1) : 0;
|
||||
@@ -1372,7 +1383,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
|
||||
const int rnti_type = NR_RNTI_C;
|
||||
fill_dci_pdu_rel15(scc,
|
||||
UE_info->CellGroup[UE_id],
|
||||
cg,
|
||||
dci_pdu,
|
||||
&dci_payload,
|
||||
dci_format,
|
||||
@@ -1491,6 +1502,10 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
header->L = htons(bufEnd-buf);
|
||||
dlsch_total_bytes += bufEnd-buf;
|
||||
|
||||
for (; buf < bufEnd - 3; buf += 4) {
|
||||
uint32_t *buf32 = (uint32_t *)buf;
|
||||
*buf32 = lrand48();
|
||||
}
|
||||
for (; buf < bufEnd; buf++)
|
||||
*buf = lrand48() & 0xff;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,6 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
ps->nrOfLayers = target_dl_Nl;
|
||||
|
||||
if (ps->time_domain_allocation != tda || ps->nrOfLayers != target_dl_Nl)
|
||||
nr_set_pdsch_semi_static(NULL, scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, NULL, tda, target_dl_Nl, sched_ctrl, ps);
|
||||
|
||||
|
||||
@@ -181,7 +181,8 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
|
||||
uint16_t target_coderate,target_qm;
|
||||
if (cqi_idx>0) {
|
||||
int cqi_table = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.cqi_table;
|
||||
AssertFatal(cqi_table == mcs_table_idx, "Indices of MCS tables don't correspond\n");
|
||||
if (cqi_table != mcs_table_idx)
|
||||
LOG_W(NR_MAC,"Indices of MCS tables don't correspond yet, cri_ri_li_pmi_cqi_report.cqi_table %d, mcs_table_index %d\n",cqi_table,mcs_table_idx);
|
||||
switch (cqi_table) {
|
||||
case 0:
|
||||
target_qm = cqi_table1[cqi_idx][0];
|
||||
@@ -604,27 +605,29 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1,
|
||||
bwpd = (NR_BWP_DownlinkDedicated_t*)bwpd0;
|
||||
}
|
||||
|
||||
if (bwpd &&
|
||||
bwpd->pdsch_Config &&
|
||||
bwpd->pdsch_Config->choice.setup &&
|
||||
bwpd->pdsch_Config->choice.setup->mcs_Table) {
|
||||
if (*bwpd->pdsch_Config->choice.setup->mcs_Table == 0)
|
||||
ps->mcsTableIdx = 1;
|
||||
else
|
||||
ps->mcsTableIdx = 2;
|
||||
// Prevent gNB to enable 256QAM table while the RRCProcessing timer is running.
|
||||
// For example, after the RRC created RRC Reconfiguration message we need to prevent gNB to apply another MCS table
|
||||
// before the RRC Reconfiguration being received by the UE, otherwise UE will not be able to decode PDSCH
|
||||
// and the connection will drop.
|
||||
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||
if (bwpd &&
|
||||
bwpd->pdsch_Config &&
|
||||
bwpd->pdsch_Config->choice.setup &&
|
||||
bwpd->pdsch_Config->choice.setup->mcs_Table) {
|
||||
if (*bwpd->pdsch_Config->choice.setup->mcs_Table == 0) {
|
||||
ps->mcsTableIdx = 1;
|
||||
} else {
|
||||
ps->mcsTableIdx = 2;
|
||||
}
|
||||
} else {
|
||||
ps->mcsTableIdx = 0;
|
||||
}
|
||||
}
|
||||
else ps->mcsTableIdx = 0;
|
||||
LOG_D(NR_MAC,"MCS Table Index: %d\n",ps->mcsTableIdx);
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config;
|
||||
if (bwp &&
|
||||
bwp->bwp_Dedicated &&
|
||||
bwp->bwp_Dedicated->pdsch_Config &&
|
||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup)
|
||||
pdsch_Config = bwp->bwp_Dedicated->pdsch_Config->choice.setup;
|
||||
else
|
||||
pdsch_Config = NULL;
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config=NULL;
|
||||
if (bwpd) pdsch_Config = bwpd->pdsch_Config->choice.setup;
|
||||
LOG_D(NR_MAC,"tda %d, ps->time_domain_allocation %d,layers %d, ps->nrOfLayers %d, pdsch_config %p\n",tda,ps->time_domain_allocation,layers,ps->nrOfLayers,pdsch_Config);
|
||||
if (ps->time_domain_allocation != tda) {
|
||||
reset_dmrs = true;
|
||||
ps->time_domain_allocation = tda;
|
||||
@@ -767,7 +770,7 @@ void nr_set_pusch_semi_static(const NR_SIB1_t *sib1,
|
||||
void nr_configure_css_dci_initial(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
|
||||
nr_scs_e scs_common,
|
||||
nr_scs_e pdcch_scs,
|
||||
nr_frequency_range_e freq_range,
|
||||
frequency_range_t freq_range,
|
||||
uint8_t rmsi_pdcch_config,
|
||||
uint8_t ssb_idx,
|
||||
uint8_t k_ssb,
|
||||
@@ -1350,6 +1353,7 @@ void nr_configure_pucch(const NR_SIB1_t *sib1,
|
||||
}
|
||||
}
|
||||
AssertFatal(res_found==1,"No PUCCH resource found corresponding to id %ld\n",*resource_id);
|
||||
LOG_D(NR_MAC,"Configure pucch: pucch_pdu->format_type %d pucch_pdu->bit_len_harq %d, pucch->pdu->bit_len_csi %d\n",pucch_pdu->format_type,pucch_pdu->bit_len_harq,pucch_pdu->bit_len_csi_part1);
|
||||
}
|
||||
else { // this is the default PUCCH configuration, PUCCH format 0 or 1
|
||||
LOG_D(NR_MAC,"pucch_acknak: Filling default PUCCH configuration from Tables (r_pucch %d, bwp %p)\n",r_pucch,bwp);
|
||||
@@ -2167,7 +2171,16 @@ void remove_nr_list(NR_list_t *listP, int id)
|
||||
prev = cur;
|
||||
cur = &listP->next[*cur];
|
||||
}
|
||||
AssertFatal(*cur != -1, "ID %d not found in UE_list\n", id);
|
||||
if (*cur == -1) {
|
||||
cur = &listP->head;
|
||||
prev=&listP->head;
|
||||
while (*cur != -1 && *cur != id) {
|
||||
LOG_I(NR_MAC,"remove_nr_list : id %d, *cur %d\n",id,*cur);
|
||||
prev = cur;
|
||||
cur = &listP->next[*cur];
|
||||
}
|
||||
AssertFatal(1==0, "ID %d not found in UE_list\n", id);
|
||||
}
|
||||
int *next = &listP->next[*cur];
|
||||
*cur = listP->next[*cur];
|
||||
*next = -1;
|
||||
@@ -2325,7 +2338,12 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
|
||||
UE_info->CellGroup[UE_id] = CellGroup;
|
||||
add_nr_list(&UE_info->list, UE_id);
|
||||
memset(&UE_info->mac_stats[UE_id], 0, sizeof(NR_mac_stats_t));
|
||||
if (CellGroup && CellGroup->spCellConfig && CellGroup->spCellConfig->spCellConfigDedicated)
|
||||
if (CellGroup &&
|
||||
CellGroup->spCellConfig &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup
|
||||
)
|
||||
compute_csi_bitlen (CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_info, UE_id, mod_idP);
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
memset(sched_ctrl, 0, sizeof(*sched_ctrl));
|
||||
@@ -2630,6 +2648,11 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
|
||||
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
|
||||
if (sched_ctrl->rrc_processing_timer > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
|
||||
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
@@ -2643,8 +2666,9 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
int period, offset;
|
||||
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
|
||||
NR_BWP_Downlink_t *bwp=CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[sched_ctrl->active_bwp->bwp_Id-1];
|
||||
|
||||
NR_BWP_t *genericParameters = sched_ctrl->active_bwp ?
|
||||
&sched_ctrl->active_bwp->bwp_Common->genericParameters:
|
||||
&gNB_mac->common_channels[0].ServingCellConfigCommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters;
|
||||
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;
|
||||
@@ -2652,7 +2676,7 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
|
||||
if((frame*n_slots_frame+slot-offset)%period == 0) {
|
||||
|
||||
LOG_D(MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot);
|
||||
LOG_D(NR_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));
|
||||
@@ -2661,11 +2685,11 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csirs_pdu_rel15 = &dl_tti_csirs_pdu->csi_rs_pdu.csi_rs_pdu_rel15;
|
||||
|
||||
csirs_pdu_rel15->bwp_size = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
csirs_pdu_rel15->bwp_start = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
|
||||
csirs_pdu_rel15->subcarrier_spacing = bwp->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
if (bwp->bwp_Common->genericParameters.cyclicPrefix)
|
||||
csirs_pdu_rel15->cyclic_prefix = *bwp->bwp_Common->genericParameters.cyclicPrefix;
|
||||
csirs_pdu_rel15->bwp_size = NRRIV2BW(genericParameters->locationAndBandwidth,275);
|
||||
csirs_pdu_rel15->bwp_start = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth,275);
|
||||
csirs_pdu_rel15->subcarrier_spacing = genericParameters->subcarrierSpacing;
|
||||
if (genericParameters->cyclicPrefix)
|
||||
csirs_pdu_rel15->cyclic_prefix = *genericParameters->cyclicPrefix;
|
||||
else
|
||||
csirs_pdu_rel15->cyclic_prefix = 0;
|
||||
|
||||
@@ -2817,6 +2841,70 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
void nr_mac_update_timers(module_id_t module_id,
|
||||
frame_t frame,
|
||||
sub_frame_t slot) {
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
|
||||
const NR_list_t *UE_list = &UE_info->list;
|
||||
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
if (sched_ctrl->rrc_processing_timer > 0) {
|
||||
sched_ctrl->rrc_processing_timer--;
|
||||
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %d\n", frame, slot, UE_id);
|
||||
|
||||
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon;
|
||||
NR_CellGroupConfig_t *cg = UE_info->CellGroup[UE_id];
|
||||
|
||||
NR_BWP_Downlink_t *bwp = sched_ctrl->active_bwp;
|
||||
NR_BWP_DownlinkDedicated_t *bwpd = cg &&
|
||||
cg->spCellConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated ?
|
||||
cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP : NULL;
|
||||
int **preferred_dl_tda = RC.nrmac[module_id]->preferred_dl_tda;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
const uint8_t layers = set_dl_nrOfLayers(sched_ctrl);
|
||||
const int tda = bwp && preferred_dl_tda[bwp->bwp_Id][slot] >= 0 ?
|
||||
preferred_dl_tda[bwp->bwp_Id][slot] : (ps->time_domain_allocation >= 0 ? ps->time_domain_allocation : 0);
|
||||
|
||||
nr_set_pdsch_semi_static(sib1,
|
||||
scc,
|
||||
cg,
|
||||
bwp,
|
||||
bwpd,
|
||||
tda,
|
||||
layers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
|
||||
NR_BWP_Uplink_t *ubwp = sched_ctrl->active_ubwp;
|
||||
NR_BWP_UplinkDedicated_t *ubwpd = cg &&
|
||||
cg->spCellConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated &&
|
||||
cg->spCellConfig->spCellConfigDedicated->uplinkConfig ?
|
||||
cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP : NULL;
|
||||
int **preferred_ul_tda = RC.nrmac[module_id]->preferred_ul_tda;
|
||||
NR_pusch_semi_static_t *ups = &sched_ctrl->pusch_semi_static;
|
||||
|
||||
int dci_format = get_dci_format(sched_ctrl);
|
||||
const uint8_t num_dmrs_cdm_grps_no_data = (ubwp || ubwpd) ? 1 : 2;
|
||||
const int utda = ubwp && preferred_ul_tda[ubwp->bwp_Id][slot] >= 0 ?
|
||||
preferred_ul_tda[ubwp->bwp_Id][slot] : (ups->time_domain_allocation >= 0 ? ups->time_domain_allocation : 0);
|
||||
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
ubwp,
|
||||
ubwpd,
|
||||
dci_format,
|
||||
utda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ups);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*void fill_nfapi_coresets_and_searchspaces(NR_CellGroupConfig_t *cg,
|
||||
nfapi_nr_coreset_t *coreset,
|
||||
|
||||
@@ -125,7 +125,7 @@ void nr_schedule_srs(int module_id, frame_t frame) {
|
||||
sched_ctrl->sched_srs.slot = -1;
|
||||
sched_ctrl->sched_srs.srs_scheduled = false;
|
||||
|
||||
if(!UE_info->Msg4_ACKed[UE_id]) {
|
||||
if(!UE_info->Msg4_ACKed[UE_id] || sched_ctrl->rrc_processing_timer > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
|
||||
&RC.nrmac[mod_id]->UL_tti_req_ahead[0][pucch->ul_slot];
|
||||
AssertFatal(future_ul_tti_req->SFN == pucch->frame
|
||||
&& future_ul_tti_req->Slot == pucch->ul_slot,
|
||||
"future UL_tti_req's frame.slot %4d.%2d does not match PUCCH %4d.%2d\n",
|
||||
"Current %d.%d : future UL_tti_req's frame.slot %4d.%2d does not match PUCCH %4d.%2d\n",
|
||||
frame,slot,
|
||||
future_ul_tti_req->SFN,
|
||||
future_ul_tti_req->Slot,
|
||||
pucch->frame,
|
||||
@@ -161,7 +162,8 @@ void nr_schedule_pucch(int Mod_idP,
|
||||
|| frameP != curr_pucch->frame
|
||||
|| slotP != curr_pucch->ul_slot)
|
||||
continue;
|
||||
LOG_D(NR_MAC,"Scheduling PUCCH[%d] RX for UE %d in %4d.%2d O_ack %d\n",i,UE_id,curr_pucch->frame,curr_pucch->ul_slot,O_ack);
|
||||
if (O_csi > 0) LOG_D(NR_MAC,"Scheduling PUCCH[%d] RX for UE %d in %4d.%2d O_ack %d, O_sr %d, O_csi %d\n",
|
||||
i,UE_id,curr_pucch->frame,curr_pucch->ul_slot,O_ack,O_sr,O_csi);
|
||||
nr_fill_nfapi_pucch(Mod_idP, frameP, slotP, curr_pucch, UE_id);
|
||||
memset(curr_pucch, 0, sizeof(*curr_pucch));
|
||||
}
|
||||
@@ -569,6 +571,7 @@ void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_info_t *UE_in
|
||||
struct NR_CSI_ResourceConfig *csi_resourceconfig;
|
||||
|
||||
// for each CSI measurement report configuration (list of CSI-ReportConfig)
|
||||
LOG_D(NR_MAC,"Searching %d csi_reports\n",csi_MeasConfig->csi_ReportConfigToAddModList->list.count);
|
||||
for (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];
|
||||
// MAC structure for CSI measurement reports (per UE and per report)
|
||||
@@ -623,7 +626,7 @@ void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_info_t *UE_in
|
||||
}
|
||||
else AssertFatal(1==0,"Only periodic resource configuration currently supported\n");
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC,"nb_resources %d\n",nb_resources);
|
||||
// computation of bit length depending on the report type
|
||||
switch(reportQuantity_type){
|
||||
case (NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP):
|
||||
@@ -705,13 +708,26 @@ void nr_csi_meas_reporting(int Mod_idP,
|
||||
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
|
||||
const NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue;
|
||||
if ((sched_ctrl->rrc_processing_timer > 0) || (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0)) {
|
||||
continue;
|
||||
}
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue;
|
||||
const NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
AssertFatal(csi_measconfig->csi_ReportConfigToAddModList->list.count > 0,
|
||||
"NO CSI report configuration available");
|
||||
NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup;
|
||||
NR_PUCCH_Config_t *pucch_Config = NULL;
|
||||
if (sched_ctrl->active_ubwp) {
|
||||
pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup;
|
||||
} else if (RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id] &&
|
||||
RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig &&
|
||||
RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated &&
|
||||
RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP &&
|
||||
RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) {
|
||||
pucch_Config = RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup;
|
||||
}
|
||||
|
||||
|
||||
for (int csi_report_id = 0; csi_report_id < csi_measconfig->csi_ReportConfigToAddModList->list.count; csi_report_id++){
|
||||
NR_CSI_ReportConfig_t *csirep = csi_measconfig->csi_ReportConfigToAddModList->list.array[csi_report_id];
|
||||
@@ -735,7 +751,7 @@ void nr_csi_meas_reporting(int Mod_idP,
|
||||
if (*pucchresset->resourceList.list.array[res_index] == pucchcsires->pucch_Resource)
|
||||
break;
|
||||
AssertFatal(res_index < n,
|
||||
"CSI resource not found among PUCCH resources\n");
|
||||
"CSI pucch resource %ld not found among PUCCH resources\n",pucchcsires->pucch_Resource);
|
||||
|
||||
// find free PUCCH that is in order with possibly existing PUCCH
|
||||
// schedulings (other CSI, SR)
|
||||
@@ -774,6 +790,7 @@ void nr_csi_meas_reporting(int Mod_idP,
|
||||
len = pucchres->format.choice.format2->nrofPRBs;
|
||||
mask = SL_to_bitmap(pucchres->format.choice.format2->startingSymbolIndex, pucchres->format.choice.format2->nrofSymbols);
|
||||
curr_pucch->simultaneous_harqcsi = pucch_Config->format2->choice.setup->simultaneousHARQ_ACK_CSI;
|
||||
LOG_D(NR_MAC,"%d.%d Allocating PUCCH format 2, startPRB %d, nPRB %d, simulHARQ %d, num_bits %d\n", frame, sched_slot,start,len,curr_pucch->simultaneous_harqcsi,curr_pucch->csi_bits);
|
||||
break;
|
||||
case NR_PUCCH_Resource__format_PR_format3:
|
||||
len = pucchres->format.choice.format3->nrofPRBs;
|
||||
@@ -815,7 +832,7 @@ static void handle_dl_harq(module_id_t mod_id,
|
||||
add_tail_nr_list(&UE_info->UE_sched_ctrl[UE_id].available_dl_harq, harq_pid);
|
||||
harq->round = 0;
|
||||
harq->ndi ^= 1;
|
||||
} else if (harq->round >= MAX_HARQ_ROUNDS - 1) {
|
||||
} else if (harq->round >= RC.nrmac[mod_id]->harq_round_max - 1) {
|
||||
add_tail_nr_list(&UE_info->UE_sched_ctrl[UE_id].available_dl_harq, harq_pid);
|
||||
harq->round = 0;
|
||||
harq->ndi ^= 1;
|
||||
@@ -930,18 +947,26 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
|
||||
int ssb_index[MAX_NUM_SSB] = {0};
|
||||
int ssb_rsrp[MAX_NUM_SSB] = {0};
|
||||
uint8_t idx = 0;
|
||||
int bwp_id = 1;
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
int bwp_id = sched_ctrl->active_bwp ? 1 : 0;
|
||||
NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
|
||||
NR_BWP_Downlink_t *bwp = CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
NR_BWP_Downlink_t *bwp = bwp_id>0 ?
|
||||
sched_ctrl->active_bwp:
|
||||
NULL;
|
||||
|
||||
|
||||
//bwp indicator
|
||||
int n_dl_bwp = CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count;
|
||||
int n_dl_bwp=0;
|
||||
if (CellGroup->spCellConfig->spCellConfigDedicated &&
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList)
|
||||
n_dl_bwp = CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count;
|
||||
|
||||
uint8_t nr_ssbri_cri = 0;
|
||||
uint8_t nb_of_csi_ssb_report = UE_info->csi_report_template[UE_id][cqi_idx].nb_of_csi_ssb_report;
|
||||
int better_rsrp_reported = -140-(-0); /*minimum_measured_RSRP_value - minimum_differntail_RSRP_value*///considering the minimum RSRP value as better RSRP initially
|
||||
uint8_t diff_rsrp_idx = 0;
|
||||
uint8_t i, j;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
|
||||
if (n_dl_bwp < 4)
|
||||
pdsch_bwp_id = bwp_id;
|
||||
@@ -1058,7 +1083,10 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
|
||||
}
|
||||
}
|
||||
|
||||
sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tci_present_inDCI = bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[bwp_id-1]->tci_PresentInDCI;
|
||||
sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tci_present_inDCI = bwp ?
|
||||
bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[bwp_id-1]->tci_PresentInDCI :
|
||||
CellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[0]->tci_PresentInDCI;
|
||||
|
||||
|
||||
//filling pdsch tci state activation deactivation mac ce structure fields
|
||||
if(sched_ctrl->UE_mac_ce_ctrl.pdcch_state_ind.tci_present_inDCI) {
|
||||
@@ -1167,9 +1195,6 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
|
||||
// including ssb rsrp in mac stats
|
||||
stats->cumul_rsrp += strongest_ssb_rsrp;
|
||||
stats->num_rsrp_meas++;
|
||||
LOG_D(MAC,"rsrp_id = %d rsrp = %d\n",
|
||||
sched_ctrl->CSI_report.ssb_cri_report.RSRP,
|
||||
get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP));
|
||||
}
|
||||
|
||||
|
||||
@@ -1194,7 +1219,7 @@ int evaluate_ri_report(uint8_t *payload,
|
||||
if ((ri_restriction>>i)&0x01) {
|
||||
if(count == ri_index) {
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri = i;
|
||||
LOG_I(MAC,"CSI Reported Rank %d\n", i+1);
|
||||
LOG_D(MAC,"CSI Reported Rank %d\n", i+1);
|
||||
return i;
|
||||
}
|
||||
count++;
|
||||
@@ -1224,7 +1249,7 @@ void evaluate_cqi_report(uint8_t *payload,
|
||||
else
|
||||
AssertFatal(1==0,"CQI Table not present in RRC configuration\n");
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb = temp_cqi;
|
||||
LOG_I(MAC,"Wide-band CQI for the first TB %d\n", temp_cqi);
|
||||
LOG_D(MAC,"Wide-band CQI for the first TB %d\n", temp_cqi);
|
||||
if (cqi_bitlen > 4) {
|
||||
temp_cqi = pickandreverse_bits(payload, 4, cumul_bits);
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_2tb = temp_cqi;
|
||||
@@ -1249,7 +1274,7 @@ uint8_t evaluate_pmi_report(uint8_t *payload,
|
||||
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1 = temp_pmi&((1<<x1_bitlen)-1);
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2 = (temp_pmi>>x1_bitlen)&((1<<x2_bitlen)-1);
|
||||
LOG_I(MAC,"PMI Report: X1 %d X2 %d\n",
|
||||
LOG_D(MAC,"PMI Report: X1 %d X2 %d\n",
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1,
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
|
||||
|
||||
@@ -1269,7 +1294,7 @@ int evaluate_li_report(uint8_t *payload,
|
||||
|
||||
if (li_bitlen>0) {
|
||||
int temp_li = pickandreverse_bits(payload, li_bitlen, cumul_bits);
|
||||
LOG_I(MAC,"LI %d\n",temp_li);
|
||||
LOG_D(MAC,"LI %d\n",temp_li);
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.li = temp_li;
|
||||
}
|
||||
return li_bitlen;
|
||||
@@ -1602,20 +1627,11 @@ int nr_acknack_scheduling(int mod_id,
|
||||
const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels[CC_id].ServingCellConfigCommon;
|
||||
const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
|
||||
// initializing the values for FDD
|
||||
int nr_slots_period = n_slots_frame;
|
||||
int first_ul_slot_tdd = slot + minfbtime;
|
||||
int first_ul_slot_period = 0;
|
||||
if(tdd){
|
||||
nr_slots_period /= get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity);
|
||||
first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slot / nr_slots_period);
|
||||
first_ul_slot_period = tdd->nrofDownlinkSlots;
|
||||
}
|
||||
else
|
||||
// if TDD configuration is not present and the band is not FDD, it means it is a dynamic TDD configuration
|
||||
AssertFatal(RC.nrmac[mod_id]->common_channels[CC_id].frame_type == FDD,"Dynamic TDD not handled yet\n");
|
||||
AssertFatal(tdd || RC.nrmac[mod_id]->common_channels[CC_id].frame_type == FDD, "Dynamic TDD not handled yet\n");
|
||||
const int nr_slots_period = tdd ? n_slots_frame / get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity) : n_slots_frame;
|
||||
const int next_ul_slot = tdd ? tdd->nrofDownlinkSlots + nr_slots_period * (slot / nr_slots_period) : slot + minfbtime;
|
||||
const int first_ul_slot_period = tdd ? tdd->nrofDownlinkSlots : 0;
|
||||
|
||||
NR_sched_pucch_t *csi_pucch;
|
||||
|
||||
/* for the moment, we consider:
|
||||
* * only pucch_sched[0] holds HARQ (and SR)
|
||||
@@ -1652,13 +1668,18 @@ int nr_acknack_scheduling(int mod_id,
|
||||
pucch->csi_bits);
|
||||
|
||||
/* if the currently allocated PUCCH of this UE is full, allocate it */
|
||||
NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1];
|
||||
if (pucch->dai_c == 2) {
|
||||
/* advance the UL slot information in PUCCH by one so we won't schedule in
|
||||
* the same slot again */
|
||||
const int f = pucch->frame;
|
||||
const int s = pucch->ul_slot;
|
||||
LOG_D(NR_MAC, "In %s: %4d.%2d DAI = 2 pucch currently in %4d.%2d, advancing by 1 slot\n", __FUNCTION__, frame, slot, f, s);
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, pucch, UE_id);
|
||||
if (!(csi_pucch
|
||||
&& csi_pucch->csi_bits > 0
|
||||
&& csi_pucch->frame == f
|
||||
&& csi_pucch->ul_slot == s))
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, pucch, UE_id);
|
||||
memset(pucch, 0, sizeof(*pucch));
|
||||
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
|
||||
if(((s + 1)%nr_slots_period) == 0)
|
||||
@@ -1666,14 +1687,15 @@ int nr_acknack_scheduling(int mod_id,
|
||||
else
|
||||
pucch->ul_slot = (s + 1) % n_slots_frame;
|
||||
// we assume that only two indices over the array sched_pucch exist
|
||||
csi_pucch = &sched_ctrl->sched_pucch[1];
|
||||
// skip the CSI PUCCH if it is present and if in the next frame/slot
|
||||
// and if we don't multiplex
|
||||
csi_pucch->r_pucch=-1;
|
||||
if (csi_pucch->csi_bits > 0
|
||||
if (csi_pucch
|
||||
&& csi_pucch->csi_bits > 0
|
||||
&& csi_pucch->frame == pucch->frame
|
||||
&& csi_pucch->ul_slot == pucch->ul_slot
|
||||
&& !csi_pucch->simultaneous_harqcsi) {
|
||||
LOG_D(NR_MAC,"Cannot multiplex csi_pucch for %d.%d\n",csi_pucch->frame,csi_pucch->ul_slot);
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
|
||||
memset(csi_pucch, 0, sizeof(*csi_pucch));
|
||||
pucch->frame = pucch->ul_slot == n_slots_frame - 1 ? (pucch->frame + 1) % 1024 : pucch->frame;
|
||||
@@ -1725,7 +1747,11 @@ int nr_acknack_scheduling(int mod_id,
|
||||
const int s = pucch->ul_slot;
|
||||
const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
LOG_D(NR_MAC, "In %s: %4d.%2d DAI > 0, cannot reach timing for pucch in %4d.%2d, advancing slot by 1 and trying again\n", __FUNCTION__, frame, slot, f, s);
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, pucch, UE_id);
|
||||
if (!(csi_pucch &&
|
||||
csi_pucch->csi_bits > 0 &&
|
||||
csi_pucch->frame == f &&
|
||||
csi_pucch->ul_slot == s))
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, pucch, UE_id);
|
||||
memset(pucch, 0, sizeof(*pucch));
|
||||
pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
|
||||
if(((s + 1)%nr_slots_period) == 0)
|
||||
@@ -1737,6 +1763,14 @@ int nr_acknack_scheduling(int mod_id,
|
||||
|
||||
pucch->timing_indicator = i;
|
||||
pucch->dai_c++;
|
||||
// if there is CSI in this slot update the HARQ information for that one too
|
||||
if (csi_pucch &&
|
||||
csi_pucch->csi_bits > 0 &&
|
||||
csi_pucch->frame == pucch->frame &&
|
||||
csi_pucch->ul_slot == pucch->ul_slot) {
|
||||
csi_pucch->timing_indicator = i;
|
||||
csi_pucch->dai_c++;
|
||||
}
|
||||
// retain old resource indicator, and we are good
|
||||
LOG_D(NR_MAC, "In %s: %4d.%2d. DAI > 0, pucch allocated for %4d.%2d (index %d)\n", __FUNCTION__, frame,slot,pucch->frame,pucch->ul_slot,pucch->timing_indicator);
|
||||
return 0;
|
||||
@@ -1752,8 +1786,8 @@ int nr_acknack_scheduling(int mod_id,
|
||||
AssertFatal(pucch->sr_flag + pucch->dai_c == 0,
|
||||
"expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n",
|
||||
UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot);
|
||||
const int s = first_ul_slot_tdd;
|
||||
pucch->frame = (s < n_slots_frame - 1) ? frame : (frame + 1) % 1024;
|
||||
const int s = next_ul_slot;
|
||||
pucch->frame = s < n_slots_frame ? frame : (frame + 1) % 1024;
|
||||
pucch->ul_slot = s % n_slots_frame;
|
||||
}
|
||||
|
||||
@@ -1810,8 +1844,6 @@ int nr_acknack_scheduling(int mod_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
// is there already CSI in this slot?
|
||||
csi_pucch = &sched_ctrl->sched_pucch[1];
|
||||
if (csi_pucch &&
|
||||
csi_pucch->csi_bits > 0 &&
|
||||
csi_pucch->frame == pucch->frame &&
|
||||
@@ -1821,6 +1853,7 @@ int nr_acknack_scheduling(int mod_id,
|
||||
// FIXME currently we support at most 11 bits in pucch2 so skip also in that case
|
||||
if(!csi_pucch->simultaneous_harqcsi
|
||||
|| ((csi_pucch->csi_bits + csi_pucch->dai_c) >= 11)) {
|
||||
LOG_D(NR_MAC,"Cannot multiplex csi_pucch %d +csi_pucch->dai_c %d for %d.%d\n",csi_pucch->csi_bits,csi_pucch->dai_c,csi_pucch->frame,csi_pucch->ul_slot);
|
||||
nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
|
||||
memset(csi_pucch, 0, sizeof(*csi_pucch));
|
||||
/* advance the UL slot information in PUCCH by one so we won't schedule in
|
||||
@@ -1839,6 +1872,11 @@ int nr_acknack_scheduling(int mod_id,
|
||||
else {
|
||||
csi_pucch->timing_indicator = ind_found;
|
||||
csi_pucch->dai_c++;
|
||||
// keep updating format 2 indicator
|
||||
pucch->timing_indicator = ind_found; // index in the list of timing indicators
|
||||
pucch->dai_c++;
|
||||
|
||||
LOG_D(NR_MAC,"multiplexing csi_pucch %d +csi_pucch->dai_c %d for %d.%d\n",csi_pucch->csi_bits,csi_pucch->dai_c,csi_pucch->frame,csi_pucch->ul_slot);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1939,11 +1977,51 @@ void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot)
|
||||
&& pdu->initial_cyclic_shift == pucch_res->format.choice.format0->initialCyclicShift
|
||||
&& pdu->nr_of_symbols == pucch_res->format.choice.format0->nrofSymbols
|
||||
&& pdu->start_symbol_index == pucch_res->format.choice.format0->startingSymbolIndex) {
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH format 0 nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
pdu->sr_flag = 1;
|
||||
nfapi_allocated = true;
|
||||
break;
|
||||
}
|
||||
else if (pdu->rnti == UE_info->rnti[UE_id]
|
||||
&& pdu->format_type == 2 // does not use NR_PUCCH_Resource__format_PR_format0
|
||||
&& pdu->nr_of_symbols == pucch_res->format.choice.format2->nrofSymbols
|
||||
&& pdu->start_symbol_index == pucch_res->format.choice.format2->startingSymbolIndex) {
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH format 2 nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
pdu->sr_flag = 1;
|
||||
nfapi_allocated = true;
|
||||
break;
|
||||
|
||||
}
|
||||
else if (pdu->rnti == UE_info->rnti[UE_id]
|
||||
&& pdu->format_type == 1 // does not use NR_PUCCH_Resource__format_PR_format0
|
||||
&& pdu->nr_of_symbols == pucch_res->format.choice.format1->nrofSymbols
|
||||
&& pdu->start_symbol_index == pucch_res->format.choice.format1->startingSymbolIndex) {
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH format 1 nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
pdu->sr_flag = 1;
|
||||
nfapi_allocated = true;
|
||||
break;
|
||||
|
||||
}
|
||||
else if (pdu->rnti == UE_info->rnti[UE_id]
|
||||
&& pdu->format_type == 3 // does not use NR_PUCCH_Resource__format_PR_format0
|
||||
&& pdu->nr_of_symbols == pucch_res->format.choice.format3->nrofSymbols
|
||||
&& pdu->start_symbol_index == pucch_res->format.choice.format3->startingSymbolIndex) {
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH format 3 nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
pdu->sr_flag = 1;
|
||||
nfapi_allocated = true;
|
||||
break;
|
||||
|
||||
}
|
||||
else if (pdu->rnti == UE_info->rnti[UE_id]
|
||||
&& pdu->format_type == 4 // does not use NR_PUCCH_Resource__format_PR_format0
|
||||
&& pdu->nr_of_symbols == pucch_res->format.choice.format4->nrofSymbols
|
||||
&& pdu->start_symbol_index == pucch_res->format.choice.format4->startingSymbolIndex) {
|
||||
LOG_D(NR_MAC,"%4d.%2d adding SR_flag 1 to PUCCH format 4 nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti);
|
||||
pdu->sr_flag = 1;
|
||||
nfapi_allocated = true;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (nfapi_allocated) // break scheduling resource loop, continue next UE
|
||||
|
||||
@@ -456,9 +456,8 @@ int nr_process_mac_pdu(module_id_t module_idP,
|
||||
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len))
|
||||
return 0;
|
||||
|
||||
LOG_D(NR_MAC, "In %s: [UE %d] %d.%d : ULSCH -> UL-%s %d (gNB %d, %d bytes)\n",
|
||||
__func__,
|
||||
module_idP,
|
||||
LOG_D(NR_MAC, "[UE %x] %d.%d: ULSCH -> UL-%s %d (gNB %d, %d bytes)\n",
|
||||
UE_info->rnti[UE_id],
|
||||
frameP,
|
||||
slot,
|
||||
rx_lcid<4?"DCCH":"DTCH",
|
||||
@@ -570,7 +569,7 @@ void handle_nr_ul_harq(const int CC_idP,
|
||||
|
||||
remove_front_nr_list(&sched_ctrl->feedback_ul_harq);
|
||||
sched_ctrl->ul_harq_processes[harq_pid].is_waiting = false;
|
||||
if(sched_ctrl->ul_harq_processes[harq_pid].round >= MAX_HARQ_ROUNDS - 1) {
|
||||
if(sched_ctrl->ul_harq_processes[harq_pid].round >= gNB_mac->harq_round_max - 1) {
|
||||
abort_nr_ul_harq(mod_id, UE_id, harq_pid);
|
||||
} else {
|
||||
sched_ctrl->ul_harq_processes[harq_pid].round++;
|
||||
@@ -591,7 +590,7 @@ void handle_nr_ul_harq(const int CC_idP,
|
||||
harq_pid,
|
||||
crc_pdu->rnti);
|
||||
add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid);
|
||||
} else if (harq->round >= MAX_HARQ_ROUNDS - 1) {
|
||||
} else if (harq->round >= gNB_mac->harq_round_max - 1) {
|
||||
abort_nr_ul_harq(mod_id, UE_id, harq_pid);
|
||||
LOG_D(NR_MAC,
|
||||
"RNTI %04x: Ulharq id %d crc failed in all rounds\n",
|
||||
@@ -659,11 +658,11 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
UE_scheduling_control->ta_update = timing_advance;
|
||||
UE_scheduling_control->raw_rssi = rssi;
|
||||
UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640;
|
||||
LOG_D(NR_MAC, "[UE %d] PUSCH TPC %d and TA %d\n",UE_id,UE_scheduling_control->tpc0,UE_scheduling_control->ta_update);
|
||||
LOG_D(NR_MAC, "[UE %d] PUSCH TPC %d(SNRx10 %d) and TA %d\n",UE_id,UE_scheduling_control->tpc0,UE_scheduling_control->pusch_snrx10,UE_scheduling_control->ta_update);
|
||||
}
|
||||
else{
|
||||
LOG_D(NR_MAC,"[UE %d] Detected DTX : increasing UE TX power\n",UE_id);
|
||||
UE_scheduling_control->tpc0 = 3;
|
||||
UE_scheduling_control->tpc0 = 1;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
@@ -703,8 +702,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
UE_info->mac_stats[UE_id].ulsch_DTX++;
|
||||
}
|
||||
if (!get_softmodem_params()->phy_test && UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) {
|
||||
LOG_W(NR_MAC,"Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
|
||||
UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt);
|
||||
LOG_W(NR_MAC,"%d.%d Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
|
||||
frameP,slotP,UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt);
|
||||
UE_info->UE_sched_ctrl[UE_id].ul_failure = 1;
|
||||
nr_mac_gNB_rrc_ul_failure(gnb_mod_idP,CC_idP,frameP,slotP,rntiP);
|
||||
}
|
||||
@@ -736,20 +735,20 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
continue;
|
||||
|
||||
if(no_sig) {
|
||||
LOG_W(NR_MAC, "Random Access %i failed at state %i (no signal)\n", i, ra->state);
|
||||
LOG_D(NR_MAC, "Random Access %i failed at state %i (no signal)\n", i, ra->state);
|
||||
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
|
||||
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
|
||||
} else {
|
||||
|
||||
// random access pusch with TC-RNTI
|
||||
if (ra->rnti != current_rnti) {
|
||||
LOG_W(NR_MAC,
|
||||
LOG_D(NR_MAC,
|
||||
"expected TC_RNTI %04x to match current RNTI %04x\n",
|
||||
ra->rnti,
|
||||
current_rnti);
|
||||
|
||||
if( (frameP==ra->Msg3_frame) && (slotP==ra->Msg3_slot) ) {
|
||||
LOG_W(NR_MAC, "Random Access %i failed at state %i (TC_RNTI %04x RNTI %04x)\n", i, ra->state,ra->rnti,current_rnti);
|
||||
LOG_D(NR_MAC, "Random Access %i failed at state %i (TC_RNTI %04x RNTI %04x)\n", i, ra->state,ra->rnti,current_rnti);
|
||||
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
|
||||
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
|
||||
}
|
||||
@@ -761,7 +760,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
|
||||
UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->CellGroup);
|
||||
if (UE_id<0) {
|
||||
LOG_W(NR_MAC, "Random Access %i discarded at state %i (TC_RNTI %04x RNTI %04x): max number of users achieved!\n", i, ra->state,ra->rnti,current_rnti);
|
||||
LOG_D(NR_MAC, "Random Access %i discarded at state %i (TC_RNTI %04x RNTI %04x): max number of users achieved!\n", i, ra->state,ra->rnti,current_rnti);
|
||||
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
|
||||
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
|
||||
return;
|
||||
@@ -859,20 +858,20 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
|
||||
// for CFRA (NSA) do not schedule retransmission of msg3
|
||||
if (ra->cfra) {
|
||||
LOG_W(NR_MAC, "Random Access %i failed at state %i (NSA msg3 reception failed)\n", i, ra->state);
|
||||
LOG_D(NR_MAC, "Random Access %i failed at state %i (NSA msg3 reception failed)\n", i, ra->state);
|
||||
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
|
||||
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ra->msg3_round >= MAX_HARQ_ROUNDS - 1) {
|
||||
LOG_W(NR_MAC, "Random Access %i failed at state %i (Reached msg3 max harq rounds)\n", i, ra->state);
|
||||
LOG_D(NR_MAC, "Random Access %i failed at state %i (Reached msg3 max harq rounds)\n", i, ra->state);
|
||||
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
|
||||
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_W(NR_MAC, "Random Access %i Msg3 CRC did not pass)\n", i);
|
||||
LOG_D(NR_MAC, "Random Access %i Msg3 CRC did not pass)\n", i);
|
||||
ra->msg3_round++;
|
||||
ra->state = Msg3_retransmission;
|
||||
}
|
||||
@@ -912,17 +911,22 @@ bool nr_UE_is_to_be_scheduled(module_id_t mod_id, int CC_id, int UE_id, frame_t
|
||||
|
||||
const struct gNB_MAC_INST_s *nrmac = RC.nrmac[mod_id];
|
||||
const NR_UE_sched_ctrl_t *sched_ctrl = &nrmac->UE_info.UE_sched_ctrl[UE_id];
|
||||
const int last_ul_sched = sched_ctrl->last_ul_frame * n + sched_ctrl->last_ul_slot;
|
||||
|
||||
const NR_TDD_UL_DL_Pattern_t *tdd =
|
||||
scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
|
||||
int num_slots_per_period;
|
||||
int last_ul_slot,last_ul_sched;
|
||||
int tdd_period_len[8] = {500,625,1000,1250,2000,2500,5000,10000};
|
||||
if (tdd)
|
||||
if (tdd) { // Force the default transmission in a full slot as early as possible in the UL portion of TDD period (last_ul_slot)
|
||||
num_slots_per_period = n*tdd_period_len[tdd->dl_UL_TransmissionPeriodicity]/10000;
|
||||
else
|
||||
last_ul_slot=1+tdd->nrofDownlinkSlots;
|
||||
}
|
||||
else {
|
||||
num_slots_per_period = n;
|
||||
last_ul_slot = sched_ctrl->last_ul_slot;
|
||||
}
|
||||
|
||||
last_ul_sched = sched_ctrl->last_ul_frame * n + last_ul_slot;
|
||||
const int diff = (now - last_ul_sched + 1024 * n) % (1024 * n);
|
||||
/* UE is to be scheduled if
|
||||
* (1) we think the UE has more bytes awaiting than what we scheduled
|
||||
@@ -988,8 +992,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -998,12 +1001,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
|
||||
/* Check the resource is enough for retransmission */
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
if (rbStart + retInfo->rbSize > bwpSize) {
|
||||
LOG_W(NR_MAC, "cannot allocate retransmission of UE %d/RNTI %04x: no resources (rbStart %d, retInfo->rbSize %d, bwpSize %d\n", UE_id, UE_info->rnti[UE_id], rbStart, retInfo->rbSize, bwpSize);
|
||||
@@ -1023,12 +1025,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
|
||||
&temp_ps);
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
* that we have enough resources */
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
|
||||
const uint16_t slbitmap = SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
int rbSize = 0;
|
||||
while (rbStart + rbSize < bwpSize &&
|
||||
(rballoc_mask[rbStart + rbSize]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
|
||||
while (rbStart + rbSize < bwpSize && (rballoc_mask[rbStart + rbSize] & slbitmap) == slbitmap)
|
||||
rbSize++;
|
||||
uint32_t new_tbs;
|
||||
uint16_t new_rbSize;
|
||||
@@ -1143,7 +1144,7 @@ void pf_ul(module_id_t module_id,
|
||||
NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
NR_UE_info_t *UE_info = &nrmac->UE_info;
|
||||
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
const int min_rb = 5;
|
||||
const int min_rb = nrmac->min_grant_prb;
|
||||
float coeff_ue[MAX_MOBILES_PER_GNB];
|
||||
// UEs that could be scheduled
|
||||
int ue_array[MAX_MOBILES_PER_GNB];
|
||||
@@ -1201,8 +1202,9 @@ void pf_ul(module_id_t module_id,
|
||||
const bool do_sched = nr_UE_is_to_be_scheduled(module_id, 0, UE_id, sched_pusch->frame, sched_pusch->slot);
|
||||
|
||||
LOG_D(NR_MAC,"pf_ul: do_sched UE %d => %s\n",UE_id,do_sched ? "yes" : "no");
|
||||
if (B == 0 && !do_sched)
|
||||
if ((B == 0 && !do_sched) || (sched_ctrl->rrc_processing_timer > 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled
|
||||
* based on data to transmit) */
|
||||
@@ -1246,8 +1248,7 @@ void pf_ul(module_id_t module_id,
|
||||
const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0;
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -1256,12 +1257,11 @@ void pf_ul(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC,"Looking for min_rb %d RBs, starting at %d\n", min_rb, rbStart);
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
if (rbStart + min_rb >= bwpSize) {
|
||||
LOG_W(NR_MAC, "cannot allocate continuous UL data for UE %d/RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d\n",
|
||||
@@ -1277,7 +1277,7 @@ void pf_ul(module_id_t module_id,
|
||||
sched_ctrl->aggregation_level);
|
||||
|
||||
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
|
||||
sched_pusch->mcs = 9;
|
||||
sched_pusch->mcs = nrmac->min_grant_mcs;
|
||||
update_ul_ue_R_Qm(sched_pusch, ps);
|
||||
sched_pusch->rbStart = rbStart;
|
||||
sched_pusch->rbSize = min_rb;
|
||||
@@ -1294,7 +1294,7 @@ void pf_ul(module_id_t module_id,
|
||||
/* Mark the corresponding RBs as used */
|
||||
n_rb_sched -= sched_pusch->rbSize;
|
||||
for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= slbitmap;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -1303,7 +1303,7 @@ void pf_ul(module_id_t module_id,
|
||||
add_tail_nr_list(&UE_sched, UE_id);
|
||||
|
||||
/* Calculate coefficient*/
|
||||
sched_pusch->mcs = 9;
|
||||
sched_pusch->mcs = nrmac->min_grant_mcs;
|
||||
const uint32_t tbs = ul_pf_tbs[ps->mcs_table][sched_pusch->mcs];
|
||||
coeff_ue[UE_id] = (float) tbs / ul_thr_ue[UE_id];
|
||||
LOG_D(NR_MAC,"b %d, ul_thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
|
||||
@@ -1384,8 +1384,7 @@ void pf_ul(module_id_t module_id,
|
||||
const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0;
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->dci_format != dci_format
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data
|
||||
|| sched_ctrl->update_pusch_ps) {
|
||||
|| ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) {
|
||||
nr_set_pusch_semi_static(sib1,
|
||||
scc,
|
||||
sched_ctrl->active_ubwp,
|
||||
@@ -1394,17 +1393,15 @@ void pf_ul(module_id_t module_id,
|
||||
tda,
|
||||
num_dmrs_cdm_grps_no_data,
|
||||
ps);
|
||||
sched_ctrl->update_pusch_ps = false;
|
||||
}
|
||||
update_ul_ue_R_Qm(sched_pusch, ps);
|
||||
|
||||
while (rbStart < bwpSize &&
|
||||
!(rballoc_mask[rbStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
sched_pusch->rbStart = rbStart;
|
||||
uint16_t max_rbSize = 1;
|
||||
while (rbStart + max_rbSize < bwpSize &&
|
||||
(rballoc_mask[rbStart + max_rbSize]&&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
while (rbStart + max_rbSize < bwpSize && (rballoc_mask[rbStart + max_rbSize] & slbitmap) == slbitmap)
|
||||
max_rbSize++;
|
||||
|
||||
if (rbStart + min_rb >= bwpSize) {
|
||||
@@ -1419,6 +1416,7 @@ void pf_ul(module_id_t module_id,
|
||||
const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0);
|
||||
uint16_t rbSize = 0;
|
||||
uint32_t TBS = 0;
|
||||
|
||||
nr_find_nb_rb(sched_pusch->Qm,
|
||||
sched_pusch->R,
|
||||
1, // layers
|
||||
@@ -1431,8 +1429,8 @@ void pf_ul(module_id_t module_id,
|
||||
&rbSize);
|
||||
sched_pusch->rbSize = rbSize;
|
||||
sched_pusch->tb_size = TBS;
|
||||
LOG_D(NR_MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n",
|
||||
rbSize, sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,sched_ctrl->cce_index,ps->num_dmrs_symb,ps->N_PRB_DMRS);
|
||||
LOG_D(NR_MAC,"rbSize %d (max_rbSize %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n",
|
||||
rbSize, max_rbSize,sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,sched_ctrl->cce_index,ps->num_dmrs_symb,ps->N_PRB_DMRS);
|
||||
|
||||
/* Mark the corresponding RBs as used */
|
||||
|
||||
@@ -1445,7 +1443,7 @@ void pf_ul(module_id_t module_id,
|
||||
|
||||
n_rb_sched -= sched_pusch->rbSize;
|
||||
for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= slbitmap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1479,7 +1477,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
|
||||
if (tda < 0)
|
||||
return false;
|
||||
int K2 = get_K2(scc, scc_sib1, sched_ctrl->active_ubwp, tda, mu);
|
||||
const int sched_frame = frame + (slot + K2 >= nr_slots_per_frame[mu]);
|
||||
const int sched_frame = (frame + (slot + K2 >= nr_slots_per_frame[mu])) % 1024;
|
||||
const int sched_slot = (slot + K2) % nr_slots_per_frame[mu];
|
||||
|
||||
if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot))
|
||||
@@ -1740,7 +1738,6 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes,
|
||||
sched_ctrl->tpc0);
|
||||
|
||||
|
||||
/* PUSCH in a later slot, but corresponding DCI now! */
|
||||
nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_id]->UL_tti_req_ahead[0][sched_pusch->slot];
|
||||
AssertFatal(future_ul_tti_req->SFN == sched_pusch->frame
|
||||
@@ -1836,6 +1833,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
pusch_pdu->pusch_data.tb_size = sched_pusch->tb_size;
|
||||
pusch_pdu->pusch_data.num_cb = 0; //CBG not supported
|
||||
|
||||
pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = 0;
|
||||
|
||||
LOG_D(NR_MAC,"PUSCH PDU : data_scrambling_identity %x, dmrs_scrambling_id %x\n",pusch_pdu->data_scrambling_id,pusch_pdu->ul_dmrs_scrambling_id);
|
||||
/* TRANSFORM PRECODING --------------------------------------------------------*/
|
||||
|
||||
@@ -1945,3 +1944,4 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
memset(sched_pusch, 0, sizeof(*sched_pusch));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,11 @@ void config_common(int Mod_idP,
|
||||
int pusch_AntennaPorts,
|
||||
NR_ServingCellConfigCommon_t *scc);
|
||||
|
||||
int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP,
|
||||
rnti_t rnti,
|
||||
NR_SubcarrierSpacing_t subcarrierSpacing,
|
||||
uint32_t rrc_reconfiguration_delay);
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int ssb_SubcarrierOffset,
|
||||
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts,
|
||||
@@ -64,6 +69,10 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
void nr_mac_update_timers(module_id_t module_id,
|
||||
frame_t frame,
|
||||
sub_frame_t slot);
|
||||
|
||||
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
frame_t frame_rxP, sub_frame_t slot_rxP);
|
||||
|
||||
@@ -222,7 +231,7 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
|
||||
void nr_configure_css_dci_initial(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
|
||||
nr_scs_e scs_common,
|
||||
nr_scs_e pdcch_scs,
|
||||
nr_frequency_range_e freq_range,
|
||||
frequency_range_t freq_range,
|
||||
uint8_t rmsi_pdcch_config,
|
||||
uint8_t ssb_idx,
|
||||
uint8_t k_ssb,
|
||||
@@ -506,6 +515,7 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
|
||||
|
||||
uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
int get_dci_format(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp);
|
||||
void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ubwp);
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
|
||||
sched_ctrl->pcmax,
|
||||
avg_rsrp,
|
||||
stats->num_rsrp_meas);
|
||||
stroff+=sprintf(output+stroff,"UE %d: CQI %d, RI %d, PMI (%d,%d)\n",
|
||||
UE_id,
|
||||
UE_info->UE_sched_ctrl[UE_id].CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb,
|
||||
UE_info->UE_sched_ctrl[UE_id].CSI_report.cri_ri_li_pmi_cqi_report.ri+1,
|
||||
UE_info->UE_sched_ctrl[UE_id].CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1,
|
||||
UE_info->UE_sched_ctrl[UE_id].CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
|
||||
|
||||
stroff+=sprintf(output+stroff,"UE %d: dlsch_rounds %"PRIu64"/%"PRIu64"/%"PRIu64"/%"PRIu64", dlsch_errors %"PRIu64", pucch0_DTX %d, BLER %.5f MCS %d\n",
|
||||
UE_id,
|
||||
|
||||