Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP
This commit is contained in:
@@ -278,6 +278,26 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA B200 Sanity Check") {
|
||||
when { expression {doMandatoryTests} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'Test-SA-B200')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
|
||||
when { expression {doMandatoryTests} }
|
||||
steps {
|
||||
|
||||
@@ -567,8 +567,10 @@ class Containerize():
|
||||
if status:
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
self.exitStatus = 1
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
|
||||
def UndeployObject(self, HTML, RAN):
|
||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||
lIpAddr = self.eNBIPAddress
|
||||
@@ -588,7 +590,7 @@ class Containerize():
|
||||
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
||||
logging.debug('\u001B[1m Undeploying OAI Object from server: ' + lIpAddr + '\u001B[0m')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({
|
||||
mcc = 222;
|
||||
mnc = 01;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
#sd = 0x1; // 0 false, else true
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 2;
|
||||
do_CSIRS = 1;
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 12;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 641280;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640008;
|
||||
#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=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
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 = 13;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
# Dedicated Serving Cell Configuration
|
||||
servingCellConfigDedicated = ({
|
||||
# BWP-Downlink
|
||||
# BWP 1 Configuration
|
||||
dl_bwp-Id_1 = 1;
|
||||
dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp1_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 2 Configuration
|
||||
dl_bwp-Id_2 = 2;
|
||||
dl_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp2_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 3 Configuration
|
||||
dl_bwp-Id_3 = 3;
|
||||
dl_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp3_subcarrierSpacing = 1;
|
||||
|
||||
firstActiveDownlinkBWP-Id = 1; #BWP-Id
|
||||
defaultDownlinkBWP-Id = 1; #BWP-Id
|
||||
|
||||
# bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30,
|
||||
# ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500,
|
||||
# ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8,
|
||||
# spare7, spare6, spare5, spare4, spare3, spare2, spare1 }
|
||||
|
||||
# UplinkConfig
|
||||
# BWP-Uplink
|
||||
# BWP 1 Configuration
|
||||
ul_bwp-Id_1 = 1;
|
||||
ul_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp1_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 2 Configuration
|
||||
ul_bwp-Id_2 = 2;
|
||||
ul_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp2_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 3 Configuration
|
||||
ul_bwp-Id_3 = 3;
|
||||
ul_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp3_subcarrierSpacing = 1;
|
||||
|
||||
firstActiveUplinkBWP-Id = 1; #BWP-Id
|
||||
}
|
||||
);
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "172.21.16.136";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.137/24";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.137/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 100;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 10;
|
||||
att_rx = 10;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
#beamforming 1x4 matrix:
|
||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
||||
clock_src = "internal";
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="debug";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
|
||||
@@ -311,6 +311,8 @@ class EPCManagement():
|
||||
tmp = str(response[0],'utf-8')
|
||||
self.MmeIPAddress = tmp.rstrip()
|
||||
logging.debug('AMF IP Address ' + self.MmeIPAddress)
|
||||
else:
|
||||
logging.error('no container with name oai-amf found, could not retrieve AMF IP address')
|
||||
mySSH.close()
|
||||
|
||||
def CheckHSSProcess(self, status_queue):
|
||||
|
||||
@@ -919,6 +919,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
CONTAINERS.Copy_Image_to_Test_Server(HTML)
|
||||
elif action == 'Deploy_Object':
|
||||
CONTAINERS.DeployObject(HTML, EPC)
|
||||
if CONTAINERS.exitStatus==1:
|
||||
RAN.prematureExit = True
|
||||
elif action == 'Undeploy_Object':
|
||||
CONTAINERS.UndeployObject(HTML, RAN)
|
||||
elif action == 'Cppcheck_Analysis':
|
||||
|
||||
@@ -60,7 +60,7 @@ class SSHConnection():
|
||||
count = 0
|
||||
connect_status = False
|
||||
while count < 4:
|
||||
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=no {}@{}'.format(username,ipaddress))
|
||||
self.ssh = pexpect.spawn('ssh -o PubkeyAuthentication=yes {}@{}'.format(username,ipaddress))
|
||||
# Longer timeout at connection due to asterix slowness
|
||||
self.ssh.timeout = 25
|
||||
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
|
||||
@@ -84,14 +84,11 @@ class SSHConnection():
|
||||
else:
|
||||
logging.debug('self.sshresponse = ' + str(self.sshresponse))
|
||||
elif self.sshresponse == 2:
|
||||
# Checking if we are really on the remote client defined by its IP address
|
||||
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', prompt, 5)
|
||||
result = re.search(str(ipaddress), str(self.ssh.before))
|
||||
if result is None:
|
||||
self.close()
|
||||
else:
|
||||
count = 10
|
||||
connect_status = True
|
||||
# We directly ended up on the remote server because of pubkey auth
|
||||
count = 10
|
||||
connect_status = True
|
||||
# this expect() seems to be necessary to advance the read buffer until the prompt, or getBefore() will not return the last command
|
||||
self.sshresponse = self.ssh.expect([prompt])
|
||||
else:
|
||||
# debug output
|
||||
logging.debug(str(self.ssh.before))
|
||||
@@ -272,4 +269,4 @@ class SSHConnection():
|
||||
sys.exit('SCP failed')
|
||||
|
||||
def getBefore(self):
|
||||
return str(self.ssh.before)
|
||||
return self.ssh.before.decode('utf-8')
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>idefix</id>
|
||||
<UE_Trace>yes</UE_Trace>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<!--
|
||||
|
||||
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>TEST-SA-FR1-B200</htmlTabRef>
|
||||
<htmlTabName>SA SanityCheck with QUECTEL</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
030000
|
||||
030101
|
||||
000001
|
||||
010000
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
010002
|
||||
000001
|
||||
030201
|
||||
</TestCaseRequestedList>
|
||||
<!--
|
||||
070001
|
||||
070000
|
||||
070002
|
||||
050002
|
||||
050003
|
||||
-->
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030000">
|
||||
<class>Copy_Image_to_Test</class>
|
||||
<desc>Copy gNB image to test server</desc>
|
||||
<image_name>oai-gnb</image_name>
|
||||
<registry_svr_id>1</registry_svr_id>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB (TDD/Band78/40MHz/B200) in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 100 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050002">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050003">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 100 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 125M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 8M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>UL</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 (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
|
||||
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>TEST-SA-FR1-B200-terminate</htmlTabRef>
|
||||
<htmlTabName>SA tear-down in case of problem</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy gNB</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
<image_tag>sa-test</image_tag>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -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>5gc-closure</htmlTabRef>
|
||||
<htmlTabName>5GC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
060000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="060000">
|
||||
<class>Terminate_5GCN</class>
|
||||
<desc>Terminate 5GC</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
|
||||
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>5gc-start-tab</htmlTabRef>
|
||||
<htmlTabName>5GC-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000100
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Initialize_5GCN</class>
|
||||
<desc>Initialize 5GC</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
030000
|
||||
040000
|
||||
000002
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
031000
|
||||
041000
|
||||
000002
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
030000
|
||||
040000
|
||||
000002
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
040000
|
||||
000002
|
||||
010000
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
042000
|
||||
000002
|
||||
010000
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
011002
|
||||
041000
|
||||
000002
|
||||
011000
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
030000
|
||||
000002
|
||||
010000
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010002
|
||||
030001
|
||||
000002
|
||||
010000
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
gnb_mono_tdd:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-b200-gnb
|
||||
environment:
|
||||
USE_SA_TDD_MONO_B2XX: 'yes'
|
||||
USE_B2XX: 'yes'
|
||||
GNB_NAME: gNB-in-docker
|
||||
MCC: '222'
|
||||
MNC: '01'
|
||||
MNC_LENGTH: 2
|
||||
TAC: 1
|
||||
NSSAI_SST: 1
|
||||
NSSAI_SD0: 1
|
||||
AMF_IP_ADDRESS: 172.21.16.136
|
||||
GNB_NGA_IF_NAME: eth0
|
||||
GNB_NGA_IP_ADDRESS: 192.168.68.194
|
||||
GNB_NGU_IF_NAME: eth0
|
||||
GNB_NGU_IP_ADDRESS: 192.168.68.194
|
||||
USE_ADDITIONAL_OPTIONS: --sa -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- /dev:/dev
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.194
|
||||
#entrypoint: /bin/bash -c "sleep infinity"
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
name: sa-b200-gnb-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.192/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "sa-gnb-net"
|
||||
@@ -197,8 +197,8 @@ check_warnings() {
|
||||
#argument:
|
||||
# $1: log file
|
||||
check_errors() {
|
||||
#we look for 'warning:' in the compilation log file
|
||||
error_count=`grep "error:" "$1" | wc -l`
|
||||
#we look for 'error:' in the compilation log file
|
||||
error_count=`grep -c "error:" "$1"`
|
||||
if [ $error_count -gt 0 ]; then
|
||||
echo_error "ERROR: $error_count error. See $1"
|
||||
fi
|
||||
|
||||
+10
-7
@@ -9,19 +9,19 @@
|
||||
|
||||
| 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) |
|
||||
| asterix | 172.21.16.127 | CI-Asterix-Usage | gNB (n78) | 173.21.19.14 |
|
||||
| obelix | 172.21.16.128 | CI-Obelix-Usage | eNB (n40, n78), nrUE | 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) |
|
||||
| nepes | 172.21.16.137 | CI-NSA-MiniBench | gNB (n78) | 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 |
|
||||
| amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | nrUE | 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) |
|
||||
| carabe | 192.168.12.211 | CI-Bench-2-OAI-Phone | UE (B7UE) | 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/):
|
||||
@@ -40,7 +40,7 @@ Note: The available resources, and their current usage, is indicated here:
|
||||
|
||||
### OTA Testbench
|
||||
|
||||
[Proper image to be followed up. TBD: add antennas/circulators]
|
||||
**Purpose**: Over-the-air 4G/5G (NSA/SA) tests
|
||||
|
||||
Note: obelix and porcepix are both used in the OTA testbench and the 5G
|
||||
NSA/Faraday Cage testbench!
|
||||
@@ -89,7 +89,10 @@ Webhook
|
||||
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
|
||||
- basic NSA test
|
||||
- [RAN-SA-B200-Module-SABOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/)
|
||||
- obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ sabox
|
||||
- basic SA test (40 MHz TDD)
|
||||
- [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.)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
@@ -30,7 +30,7 @@
|
||||
\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);
|
||||
\draw (b210n) -| node [pos=0.2, duplexer] {n78} (antn);
|
||||
|
||||
\node[left=5cm of faraday, label=above:porcepix] (porcepix)
|
||||
{\includegraphics[width=1.2cm]{server}};
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 94 KiB |
@@ -21,7 +21,7 @@
|
||||
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[right=.2cm of n310a, duplexer] (b78o) {n78} 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)
|
||||
@@ -32,20 +32,20 @@
|
||||
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[right=.2cm of n310o, duplexer] (b78o) {n40} 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[right=.2cm of x310o, duplexer] (b78o) {n78} 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)
|
||||
\node[above right=-1.3cm and 5.0cm of n310a.east, 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);
|
||||
@@ -59,5 +59,10 @@
|
||||
{\includegraphics[width=1.2cm]{server}}
|
||||
edge (quectel);
|
||||
|
||||
\node[above right=-0.3cm and 5.0cm of x310o.east, label=above:amariue] (amariue)
|
||||
{\includegraphics[height=1.2cm]{server}};
|
||||
\node[left=0.8cm of amariue.west] (aa1)
|
||||
{\includegraphics[width=0.3cm]{antenna}} edge (amariue);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
|
||||
@@ -60,6 +60,7 @@ def main():
|
||||
"rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.band78.tm1.fr1.106PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.band78.sa.fr1.106PRB.usrpn310.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.sa.band78.fr1.106PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gnb.sa.band66.fr1.106PRB.usrpn300.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gNB_SA_CU.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
"gNB_SA_DU.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
|
||||
|
||||
@@ -10,6 +10,7 @@ THREAD_PARALLEL_CONFIG=${THREAD_PARALLEL_CONFIG:-PARALLEL_SINGLE_THREAD}
|
||||
|
||||
if [[ -v USE_NSA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.nsa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_TDD_MONO_B2XX ]]; then cp $PREFIX/etc/gnb.sa.tdd.b2xx.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_FDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.fdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_CU ]]; then cp $PREFIX/etc/gnb.sa.cu.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_TDD_CU ]]; then cp $PREFIX/etc/gnb.sa.du.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
|
||||
@@ -94,6 +94,36 @@
|
||||
- key: parallel_config
|
||||
env: "@THREAD_PARALLEL_CONFIG@"
|
||||
|
||||
- filePrefix: gnb.sa.band78.fr1.106PRB.usrpb210.conf
|
||||
outputfilename: "gnb.sa.tdd.b2xx.conf"
|
||||
config:
|
||||
- key: Active_gNBs
|
||||
env: "@GNB_NAME@"
|
||||
- key: gNB_name
|
||||
env: "@GNB_NAME@"
|
||||
- key: mcc
|
||||
env: "@MCC@"
|
||||
- key: mnc
|
||||
env: "@MNC@"
|
||||
- key: mnc_length
|
||||
env: "@MNC_LENGTH@"
|
||||
- key: tracking_area_code
|
||||
env: "@TAC@"
|
||||
- key: sst
|
||||
env: "@NSSAI_SST@"
|
||||
- key: ipv4
|
||||
env: "@AMF_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_NG_AMF
|
||||
env: "@GNB_NGA_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_NG_AMF
|
||||
env: "@GNB_NGA_IP_ADDRESS@"
|
||||
- key: GNB_INTERFACE_NAME_FOR_NGU
|
||||
env: "@GNB_NGU_IF_NAME@"
|
||||
- key: GNB_IPV4_ADDRESS_FOR_NGU
|
||||
env: "@GNB_NGU_IP_ADDRESS@"
|
||||
- key: parallel_config
|
||||
env: "@THREAD_PARALLEL_CONFIG@"
|
||||
|
||||
- filePrefix: gnb.sa.band66.fr1.106PRB.usrpn300.conf
|
||||
outputfilename: "gnb.sa.fdd.conf"
|
||||
config:
|
||||
|
||||
@@ -466,7 +466,7 @@ void init_gNB_Tpool(int inst) {
|
||||
pushNotifiedFIFO(gNB->L1_tx_free,msgL1Tx); // to unblock the process in the beginning
|
||||
}
|
||||
|
||||
if (!get_softmodem_params()->emulate_l1)
|
||||
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS_BIT))
|
||||
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
|
||||
|
||||
threadCreate(&proc->pthread_tx_reorder, tx_reorder_thread, (void *)gNB, "thread_tx_reorder", -1, OAI_PRIORITY_RT_MAX);
|
||||
|
||||
+4
-2
@@ -1109,8 +1109,10 @@ void init_NR_UE_threads(int nb_inst) {
|
||||
|
||||
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
|
||||
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
|
||||
pthread_t stat_pthread;
|
||||
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
|
||||
if (!IS_SOFTMODEM_NOSTATS_BIT) {
|
||||
pthread_t stat_pthread;
|
||||
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
|
||||
}
|
||||
|
||||
void get_common_options(uint32_t execmask) {
|
||||
int32_t stats_disabled = 0;
|
||||
uint32_t online_log_messages=0;
|
||||
uint32_t glog_level=0 ;
|
||||
uint32_t start_telnetsrv = 0, start_telnetclt = 0;
|
||||
@@ -149,6 +150,8 @@ void get_common_options(uint32_t execmask) {
|
||||
|
||||
if(worker_config != NULL) set_worker_conf(worker_config);
|
||||
nfapi_setmode(nfapi_mode);
|
||||
if (stats_disabled)
|
||||
set_softmodem_optmask(SOFTMODEM_NOSTATS_BIT);
|
||||
}
|
||||
void softmodem_printresources(int sig, telnet_printfunc_t pf) {
|
||||
struct rusage usage;
|
||||
|
||||
@@ -101,6 +101,7 @@ extern "C"
|
||||
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
||||
#define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n"
|
||||
#define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n"
|
||||
#define CONFIG_HLP_STATS_DISABLE "disable globally the stats generation and persistence"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
@@ -171,6 +172,7 @@ extern int usrp_tx_thread;
|
||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \
|
||||
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \
|
||||
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
||||
@@ -217,6 +219,7 @@ extern int usrp_tx_thread;
|
||||
#define SOFTMODEM_GNB_BIT (1<<21)
|
||||
#define SOFTMODEM_4GUE_BIT (1<<22)
|
||||
#define SOFTMODEM_5GUE_BIT (1<<23)
|
||||
#define SOFTMODEM_NOSTATS_BIT (1<<24)
|
||||
#define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT)
|
||||
#define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}}
|
||||
|
||||
@@ -234,6 +237,7 @@ extern int usrp_tx_thread;
|
||||
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
||||
#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
|
||||
#define IS_SOFTMODEM_5GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_5GUE_BIT)
|
||||
#define IS_SOFTMODEM_NOSTATS_BIT ( get_softmodem_optmask() & SOFTMODEM_NOSTATS_BIT)
|
||||
|
||||
typedef struct {
|
||||
uint64_t optmask;
|
||||
|
||||
@@ -217,7 +217,7 @@ void oai_create_enb(void) {
|
||||
}
|
||||
|
||||
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
|
||||
// that will result in eNB->configured being set to TRUE.
|
||||
// that will result in eNB->configured being set to true.
|
||||
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
|
||||
if (RC.eNB[0][0]->if_inst==0 || RC.eNB[0][0]->if_inst->PHY_config_req==0 || RC.eNB[0][0]->if_inst->schedule_response==0) {
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.eNB[0][0]->if_inst->PHY_config_req is not installed - install it\n");
|
||||
@@ -267,7 +267,7 @@ void oai_create_gnb(void) {
|
||||
|
||||
|
||||
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
|
||||
// that will result in gNB->configured being set to TRUE.
|
||||
// that will result in gNB->configured being set to true.
|
||||
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
|
||||
if (RC.gNB[0]->if_inst==0 || RC.gNB[0]->if_inst->NR_PHY_config_req==0 || RC.gNB[0]->if_inst->NR_Schedule_response==0) {
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.gNB[0][0]->if_inst->NR_PHY_config_req is not installed - install it\n");
|
||||
|
||||
@@ -1666,41 +1666,34 @@ typedef struct
|
||||
|
||||
} nfapi_nr_uci_indication_t;
|
||||
|
||||
//3.4.10 srs_indication
|
||||
//table 3-73
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t rb_snr;
|
||||
}nfapi_nr_srs_indication_reported_symbol_resource_block_t;
|
||||
/// 5G PHY FAPI Specification: SRS indication - Section 3.4.10, Table 3-73
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t num_rbs;
|
||||
typedef struct {
|
||||
uint8_t rb_snr; // SNR value in dB. Value: 0 -> 255 representing -64 dB to 63 dB with a step size 0.5 dB, 0xff will be set if this field is invalid.
|
||||
} nfapi_nr_srs_indication_reported_symbol_resource_block_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t num_rbs; // Number of PRBs to be reported for this SRS PDU. Value: 0 -> 272.
|
||||
nfapi_nr_srs_indication_reported_symbol_resource_block_t* rb_list;
|
||||
}nfapi_nr_srs_indication_reported_symbol_t;
|
||||
} nfapi_nr_srs_indication_reported_symbol_t;
|
||||
|
||||
#define NFAPI_NR_SRS_IND_MAX_PDU 100
|
||||
typedef struct
|
||||
{
|
||||
uint32_t handle;
|
||||
uint16_t rnti;
|
||||
uint16_t timing_advance;
|
||||
uint8_t num_symbols;
|
||||
uint8_t wide_band_snr;
|
||||
uint8_t num_reported_symbols;
|
||||
typedef struct {
|
||||
uint32_t handle; // The handle passed to the PHY in the the UL_TTI.request SRS PDU.
|
||||
uint16_t rnti; // The RNTI passed to the PHY in the UL_TTI.request SRS PDU. Value: 1 -> 65535.
|
||||
uint16_t timing_advance; // Timing advance TA measured for the UE [TS 38.213, Section 4.2]. NTA_new = NTA_old + (TA − 31) * 16 * 64 / (2^u). Value: 0 -> 63. 0xffff should be set if this field is invalid.
|
||||
uint8_t num_symbols; // Number of symbols for SRS. Value: 1 -> 4. If a PHY does not report for individual symbols then this parameter should be set to 1.
|
||||
uint8_t wide_band_snr; // SNR value in dB measured within configured SRS bandwidth on each symbol. Value: 0 -> 255 representing -64 dB to 63 dB with a step size 0.5 dB. 0xff will be set if this field is invalid.
|
||||
uint8_t num_reported_symbols; // Number of symbols reported in this message. This allows PHY to report individual symbols or aggregated symbols where this field will be set to 1. Value: 1 -> 4.
|
||||
nfapi_nr_srs_indication_reported_symbol_t* reported_symbol_list;
|
||||
} nfapi_nr_srs_indication_pdu_t;
|
||||
|
||||
}nfapi_nr_srs_indication_pdu_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
nfapi_p7_message_header_t header;
|
||||
uint16_t sfn;
|
||||
uint16_t slot;
|
||||
uint8_t number_of_pdus;
|
||||
uint16_t sfn; // SFN. Value: 0 -> 1023
|
||||
uint16_t slot; // Slot. Value: 0 -> 159
|
||||
uint8_t number_of_pdus; // Number of PDUs included in this message. Value: 0 -> 255
|
||||
nfapi_nr_srs_indication_pdu_t* pdu_list;
|
||||
|
||||
} nfapi_nr_srs_indication_t;
|
||||
|
||||
|
||||
|
||||
@@ -613,21 +613,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
|
||||
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
|
||||
gNB->nr_srs_info[id]->sc_list = (uint16_t *) malloc16_clear(6*fp->N_RB_UL*sizeof(uint16_t));
|
||||
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->noise_power = (uint32_t*)malloc16_clear(sizeof(uint32_t));
|
||||
gNB->nr_srs_info[id]->srs_received_signal = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_ls_estimated_channel = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_freq = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted = (int32_t **)malloc16(Prx*sizeof(int32_t*));
|
||||
for (i=0;i<Prx;i++){
|
||||
gNB->nr_srs_info[id]->srs_received_signal[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_ls_estimated_channel[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_freq[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
@@ -785,21 +770,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
free_and_zero(gNB->nr_csi_rs_info);
|
||||
|
||||
for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) {
|
||||
for (int i = 0; i < Prx; i++) {
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_received_signal[i]);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_ls_estimated_channel[i]);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_freq[i]);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_time[i]);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted[i]);
|
||||
}
|
||||
free_and_zero(gNB->nr_srs_info[id]->sc_list);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal);
|
||||
free_and_zero(gNB->nr_srs_info[id]->noise_power);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_received_signal);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_ls_estimated_channel);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_freq);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_time);
|
||||
free_and_zero(gNB->nr_srs_info[id]->srs_estimated_channel_time_shifted);
|
||||
free_and_zero(gNB->nr_srs_info[id]);
|
||||
}
|
||||
|
||||
|
||||
@@ -377,22 +377,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
}
|
||||
|
||||
ue->nr_srs_info = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
|
||||
ue->nr_srs_info->sc_list = (uint16_t *) malloc16_clear(6*fp->N_RB_UL*sizeof(uint16_t));
|
||||
ue->nr_srs_info->srs_generated_signal = (int32_t *) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
|
||||
ue->nr_srs_info->noise_power = (uint32_t*)malloc16_clear(sizeof(uint32_t));
|
||||
ue->nr_srs_info->srs_received_signal = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_ls_estimated_channel = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_freq = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_time = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->nr_srs_info->srs_estimated_channel_time_shifted = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
ue->nr_srs_info->srs_received_signal[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_ls_estimated_channel[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_freq[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_time[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
ue->nr_srs_info->srs_estimated_channel_time_shifted[i] = (int32_t *) malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
|
||||
}
|
||||
|
||||
|
||||
// RACH
|
||||
prach_vars[gNB_id]->prachF = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||
@@ -520,21 +504,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
free_and_zero(ue->nr_csi_rs_info->csi_rs_estimated_channel_freq);
|
||||
free_and_zero(ue->nr_csi_rs_info);
|
||||
|
||||
for (int i = 0; i < fp->nb_antennas_rx; i++) {
|
||||
free_and_zero(ue->nr_srs_info->srs_received_signal[i]);
|
||||
free_and_zero(ue->nr_srs_info->srs_ls_estimated_channel[i]);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_freq[i]);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_time[i]);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_time_shifted[i]);
|
||||
}
|
||||
free_and_zero(ue->nr_srs_info->sc_list);
|
||||
free_and_zero(ue->nr_srs_info->srs_generated_signal);
|
||||
free_and_zero(ue->nr_srs_info->noise_power);
|
||||
free_and_zero(ue->nr_srs_info->srs_received_signal);
|
||||
free_and_zero(ue->nr_srs_info->srs_ls_estimated_channel);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_freq);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_time);
|
||||
free_and_zero(ue->nr_srs_info->srs_estimated_channel_time_shifted);
|
||||
free_and_zero(ue->nr_srs_info);
|
||||
|
||||
free_and_zero(ue->csiim_vars[gNB_id]);
|
||||
|
||||
@@ -41,10 +41,10 @@ extern int16_t *ul_ref_sigs_rx[30][2][34];
|
||||
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
unsigned char l,
|
||||
unsigned char Ns) {
|
||||
@@ -88,7 +88,7 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
uint16_t N_rb_alloc = ulsch->harq_processes[harq_pid]->nb_rb;
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(32)));
|
||||
Msc_RS = N_rb_alloc*12;
|
||||
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
||||
ulsch->harq_processes[harq_pid]->n_DMRS2 +
|
||||
@@ -334,14 +334,14 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
current_phase2 = cmin(abs(current_phase2),127);
|
||||
// msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
|
||||
// rotate channel estimates by estimated phase
|
||||
rotate_cpx_vector((int16_t *) ul_ch1,
|
||||
&ru1[2*current_phase1],
|
||||
(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
|
||||
rotate_cpx_vector((c16_t *) ul_ch1,
|
||||
(c16_t *)&ru1[2*current_phase1],
|
||||
(c16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
|
||||
Msc_RS,
|
||||
15);
|
||||
rotate_cpx_vector((int16_t *) ul_ch2,
|
||||
&ru2[2*current_phase2],
|
||||
(int16_t *) &tmp_estimates[0],
|
||||
rotate_cpx_vector((c16_t *) ul_ch2,
|
||||
(c16_t *)&ru2[2*current_phase2],
|
||||
(c16_t *) tmp_estimates,
|
||||
Msc_RS,
|
||||
15);
|
||||
// Combine the two rotated estimates
|
||||
@@ -657,14 +657,14 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
current_phase2 = cmin(abs(current_phase2),127);
|
||||
// msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
|
||||
// rotate channel estimates by estimated phase
|
||||
rotate_cpx_vector((int16_t *) ul_ch1,
|
||||
&ru1[2*current_phase1],
|
||||
(int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
|
||||
rotate_cpx_vector((c16_t *) ul_ch1,
|
||||
(c16_t *) &ru1[2*current_phase1],
|
||||
(c16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
|
||||
Msc_RS,
|
||||
15);
|
||||
rotate_cpx_vector((int16_t *) ul_ch2,
|
||||
&ru2[2*current_phase2],
|
||||
(int16_t *) &tmp_estimates[0],
|
||||
rotate_cpx_vector((c16_t *) ul_ch2,
|
||||
(c16_t *) &ru2[2*current_phase2],
|
||||
(c16_t *) &tmp_estimates[0],
|
||||
Msc_RS,
|
||||
15);
|
||||
// Combine the two rotated estimates
|
||||
|
||||
@@ -1997,7 +1997,7 @@ int get_narrowband_index(int N_RB_UL,int rb) {
|
||||
void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe) {
|
||||
uint8_t harq_pid;
|
||||
//uint8_t UE_id;
|
||||
boolean_t new_ulsch = (find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST)==-1) ? TRUE : FALSE;
|
||||
const bool new_ulsch = find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST) == -1;
|
||||
//AssertFatal((UE_id=find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
|
||||
// "No existing/free UE ULSCH for rnti %x\n",ulsch_pdu->ulsch_pdu_rel8.rnti);
|
||||
LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
|
||||
@@ -2063,7 +2063,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
|
||||
|
||||
if ((ulsch->harq_processes[harq_pid]->status == SCH_IDLE) ||
|
||||
(ulsch->harq_processes[harq_pid]->ndi != ulsch_pdu->ulsch_pdu_rel8.new_data_indication) ||
|
||||
(new_ulsch == TRUE)) {
|
||||
(new_ulsch == true)) {
|
||||
ulsch->harq_processes[harq_pid]->status = ACTIVE;
|
||||
ulsch->harq_processes[harq_pid]->TBS = ulsch_pdu->ulsch_pdu_rel8.size<<3;
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
|
||||
|
||||
@@ -509,7 +509,7 @@ typedef struct {
|
||||
/// Position of first CCE of the dci
|
||||
int firstCCE;
|
||||
/// flag to indicate that this is a RA response
|
||||
boolean_t ra_flag;
|
||||
bool ra_flag;
|
||||
/// rnti
|
||||
rnti_t rnti;
|
||||
/// Format
|
||||
|
||||
@@ -618,20 +618,20 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
||||
|
||||
double f0 = f[ll];
|
||||
double Ncpm1 = Ncp0;
|
||||
int16_t *symbol_rotation = fp->symbol_rotation[ll];
|
||||
c16_t *symbol_rotation = fp->symbol_rotation[ll];
|
||||
|
||||
double tl = 0;
|
||||
double poff = 2 * M_PI * ((Ncp0 * Tc)) * f0;
|
||||
double exp_re = cos(poff);
|
||||
double exp_im = sin(-poff);
|
||||
symbol_rotation[0] = (int16_t)floor(exp_re * 32767);
|
||||
symbol_rotation[1] = (int16_t)floor(exp_im * 32767);
|
||||
symbol_rotation[0].r = (int16_t)floor(exp_re * 32767);
|
||||
symbol_rotation[0].i = (int16_t)floor(exp_im * 32767);
|
||||
LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
|
||||
LOG_I(PHY, "Symbol rotation %d/%d => (%d,%d)\n",
|
||||
0,
|
||||
nsymb,
|
||||
symbol_rotation[0],
|
||||
symbol_rotation[1]);
|
||||
symbol_rotation[0].r,
|
||||
symbol_rotation[0].i);
|
||||
|
||||
for (int l = 1; l < nsymb; l++) {
|
||||
|
||||
@@ -646,15 +646,15 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
||||
poff = 2 * M_PI * (tl + (Ncp * Tc)) * f0;
|
||||
exp_re = cos(poff);
|
||||
exp_im = sin(-poff);
|
||||
symbol_rotation[l<<1] = (int16_t)floor(exp_re * 32767);
|
||||
symbol_rotation[1 + (l<<1)] = (int16_t)floor(exp_im * 32767);
|
||||
symbol_rotation[l].r = (int16_t)floor(exp_re * 32767);
|
||||
symbol_rotation[l].i = (int16_t)floor(exp_im * 32767);
|
||||
|
||||
LOG_I(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n",
|
||||
l,
|
||||
nsymb,
|
||||
tl,
|
||||
symbol_rotation[l<<1],
|
||||
symbol_rotation[1 + (l<<1)],
|
||||
symbol_rotation[l].r,
|
||||
symbol_rotation[l].i,
|
||||
(poff / 2 / M_PI) - floor(poff / 2 / M_PI));
|
||||
|
||||
Ncpm1 = Ncp;
|
||||
@@ -670,13 +670,13 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp)
|
||||
double poff = -i * 2.0 * M_PI * sample_offset / fp->ofdm_symbol_size;
|
||||
double exp_re = cos(poff);
|
||||
double exp_im = sin(-poff);
|
||||
fp->timeshift_symbol_rotation[i*2] = (int16_t)round(exp_re * 32767);
|
||||
fp->timeshift_symbol_rotation[i*2+1] = (int16_t)round(exp_im * 32767);
|
||||
fp->timeshift_symbol_rotation[i].r = (int16_t)round(exp_re * 32767);
|
||||
fp->timeshift_symbol_rotation[i].i = (int16_t)round(exp_im * 32767);
|
||||
|
||||
if (i < 10)
|
||||
LOG_I(PHY,"Timeshift symbol rotation %d => (%d,%d) %f\n",i,
|
||||
fp->timeshift_symbol_rotation[i*2],
|
||||
fp->timeshift_symbol_rotation[i*2+1],
|
||||
fp->timeshift_symbol_rotation[i].r,
|
||||
fp->timeshift_symbol_rotation[i].i,
|
||||
poff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,18 +46,18 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
|
||||
|
||||
|
||||
PHY_ofdm_mod(txdataF, // input
|
||||
txdata, // output
|
||||
frame_parms->ofdm_symbol_size,
|
||||
txdata, // output
|
||||
frame_parms->ofdm_symbol_size,
|
||||
|
||||
1, // number of symbols
|
||||
frame_parms->nb_prefix_samples0, // number of prefix samples
|
||||
CYCLIC_PREFIX);
|
||||
1, // number of symbols
|
||||
frame_parms->nb_prefix_samples0, // number of prefix samples
|
||||
CYCLIC_PREFIX);
|
||||
PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size, // input
|
||||
txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0, // output
|
||||
frame_parms->ofdm_symbol_size,
|
||||
nsymb-1,
|
||||
frame_parms->nb_prefix_samples, // number of prefix samples
|
||||
CYCLIC_PREFIX);
|
||||
txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0, // output
|
||||
frame_parms->ofdm_symbol_size,
|
||||
nsymb-1,
|
||||
frame_parms->nb_prefix_samples, // number of prefix samples
|
||||
CYCLIC_PREFIX);
|
||||
|
||||
|
||||
|
||||
@@ -341,14 +341,14 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
|
||||
}
|
||||
|
||||
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||
int16_t* trxdata,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length) {
|
||||
int16_t* trxdata,
|
||||
int slot,
|
||||
int first_symbol,
|
||||
int nsymb,
|
||||
int length) {
|
||||
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
|
||||
|
||||
int16_t *symbol_rotation = fp->symbol_rotation[0];
|
||||
c16_t *symbol_rotation = fp->symbol_rotation[0];
|
||||
|
||||
for (int sidx=0;sidx<nsymb;sidx++) {
|
||||
|
||||
@@ -357,14 +357,14 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||
slot,
|
||||
sidx + first_symbol + symb_offset,
|
||||
length,
|
||||
symbol_rotation[2 * (sidx + first_symbol + symb_offset)],
|
||||
symbol_rotation[1 + 2 * (sidx + first_symbol + symb_offset)]);
|
||||
symbol_rotation[sidx + first_symbol + symb_offset].r,
|
||||
symbol_rotation[sidx + first_symbol + symb_offset].i);
|
||||
|
||||
rotate_cpx_vector(trxdata + (sidx * length * 2),
|
||||
&symbol_rotation[2 * (sidx + first_symbol + symb_offset)],
|
||||
trxdata + (sidx * length * 2),
|
||||
rotate_cpx_vector(((c16_t*) trxdata) + sidx * length,
|
||||
symbol_rotation + sidx + first_symbol + symb_offset,
|
||||
((c16_t*) trxdata) + sidx * length,
|
||||
length,
|
||||
15);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,25 +98,25 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
|
||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol+symb_offset];
|
||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||
c16_t rot2 = frame_parms->symbol_rotation[0][symbol+symb_offset];
|
||||
rot2.i=-rot2.i;
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
printf("slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset,
|
||||
symbol+symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
||||
symbol+symb_offset,rot2.r,rot2.i);
|
||||
#endif
|
||||
|
||||
rotate_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
(int16_t*)&rot2,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
&rot2,
|
||||
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
|
||||
int16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
|
||||
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
shift_rot,
|
||||
(int16_t *)shift_rot,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
1,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
@@ -214,18 +214,18 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
|
||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol + symb_offset];
|
||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||
c16_t rot2 = frame_parms->symbol_rotation[0][symbol + symb_offset];
|
||||
rot2.i=-rot2.i;
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
printf("slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset,
|
||||
symbol+symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
||||
symbol+symb_offset,rot2.r,rot2.i);
|
||||
#endif
|
||||
|
||||
rotate_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
(int16_t*)&rot2,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
&rot2,
|
||||
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
}
|
||||
@@ -310,19 +310,19 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
for (int symbol=first_symbol;symbol<nsymb;symbol++) {
|
||||
|
||||
uint32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[1])[symbol + symb_offset];
|
||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
||||
rotate_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
(int16_t*)&rot2,
|
||||
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
c16_t rot2 = frame_parms->symbol_rotation[1][symbol + symb_offset];
|
||||
rot2.i=-rot2.i;
|
||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i);
|
||||
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
&rot2,
|
||||
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
length,
|
||||
15);
|
||||
|
||||
int16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
|
||||
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
shift_rot,
|
||||
(int16_t *)shift_rot,
|
||||
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
|
||||
1,
|
||||
length,
|
||||
|
||||
@@ -67,6 +67,49 @@ int nr_est_timing_advance_pusch(PHY_VARS_gNB* gNB, int UE_id)
|
||||
return max_pos - sync_pos;
|
||||
}
|
||||
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]) {
|
||||
int timing_advance = 0;
|
||||
int max_val = 0;
|
||||
|
||||
for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) {
|
||||
int temp = 0;
|
||||
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
||||
int Re = ((c16_t*)srs_estimated_channel_time[aa])[i].r;
|
||||
int Im = ((c16_t*)srs_estimated_channel_time[aa])[i].i;
|
||||
temp += (Re*Re/2) + (Im*Im/2);
|
||||
}
|
||||
if (temp > max_val) {
|
||||
timing_advance = i;
|
||||
max_val = temp;
|
||||
}
|
||||
}
|
||||
|
||||
if (timing_advance > frame_parms->ofdm_symbol_size/2) {
|
||||
timing_advance = timing_advance - frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
// Scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size
|
||||
const uint16_t bw_scaling = frame_parms->ofdm_symbol_size >> 7;
|
||||
|
||||
// do some integer rounding to improve TA accuracy
|
||||
int sync_pos_rounded;
|
||||
if (timing_advance > 0) {
|
||||
sync_pos_rounded = timing_advance + (bw_scaling >> 1) - 1;
|
||||
} else {
|
||||
sync_pos_rounded = timing_advance - (bw_scaling >> 1) + 1;
|
||||
}
|
||||
|
||||
int timing_advance_update = sync_pos_rounded / bw_scaling;
|
||||
|
||||
// put timing advance command in 0..63 range
|
||||
timing_advance_update += 31;
|
||||
|
||||
if (timing_advance_update < 0) timing_advance_update = 0;
|
||||
if (timing_advance_update > 63) timing_advance_update = 63;
|
||||
|
||||
return timing_advance_update;
|
||||
}
|
||||
|
||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB) {
|
||||
|
||||
|
||||
@@ -854,7 +854,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
uint32_t nb_re_pusch)
|
||||
{
|
||||
//#define DEBUG_UL_PTRS 1
|
||||
int16_t *phase_per_symbol = NULL;
|
||||
int32_t *ptrs_re_symbol = NULL;
|
||||
int8_t ret = 0;
|
||||
|
||||
@@ -871,20 +870,20 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
uint8_t *ptrsReOffset = &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset;
|
||||
/* loop over antennas */
|
||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
phase_per_symbol = (int16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx];
|
||||
c16_t *phase_per_symbol = (c16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx];
|
||||
ptrs_re_symbol = &gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot;
|
||||
*ptrs_re_symbol = 0;
|
||||
phase_per_symbol[(2*symbol)+1] = 0; // Imag
|
||||
phase_per_symbol[symbol].i = 0;
|
||||
/* set DMRS estimates to 0 angle with magnitude 1 */
|
||||
if(is_dmrs_symbol(symbol,*dmrsSymbPos)) {
|
||||
/* set DMRS real estimation to 32767 */
|
||||
phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
|
||||
phase_per_symbol[symbol].r=INT16_MAX; // 32767
|
||||
#ifdef DEBUG_UL_PTRS
|
||||
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
|
||||
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r,phase_per_symbol[symbol].i);
|
||||
#endif
|
||||
}
|
||||
else {// real ptrs value is set to 0
|
||||
phase_per_symbol[2*symbol] = 0; // Real
|
||||
phase_per_symbol[symbol].r = 0;
|
||||
}
|
||||
|
||||
if(symbol == *startSymbIndex) {
|
||||
@@ -909,7 +908,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
symbol,frame_parms->ofdm_symbol_size,
|
||||
(int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(symbol * nb_re_pusch)],
|
||||
gNB->nr_gold_pusch_dmrs[rel15_ul->scid][nr_tti_rx][symbol],
|
||||
&phase_per_symbol[2* symbol],
|
||||
(int16_t*)&phase_per_symbol[symbol],
|
||||
ptrs_re_symbol);
|
||||
}
|
||||
/* For last OFDM symbol at each antenna perform interpolation and compensation for the slot*/
|
||||
@@ -919,7 +918,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
/*------------------------------------------------------------------------------------------------------- */
|
||||
/* If L-PTRS is > 0 then we need interpolation */
|
||||
if(*L_ptrs > 0) {
|
||||
ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, phase_per_symbol, *startSymbIndex, *nbSymb);
|
||||
ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t*)phase_per_symbol, *startSymbIndex, *nbSymb);
|
||||
if(ret != 0) {
|
||||
LOG_W(PHY,"[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
|
||||
}
|
||||
@@ -938,11 +937,11 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
/* Skip rotation if the slot processing is wrong */
|
||||
if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
|
||||
#ifdef DEBUG_UL_PTRS
|
||||
printf("[PHY][UL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[2* i],phase_per_symbol[(2* i) +1]);
|
||||
printf("[PHY][UL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[i].r,phase_per_symbol[i].i);
|
||||
#endif
|
||||
rotate_cpx_vector((int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
|
||||
&phase_per_symbol[2* i],
|
||||
(int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
|
||||
rotate_cpx_vector((c16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
|
||||
&phase_per_symbol[i],
|
||||
(c16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
|
||||
((*nb_rb) * NR_NB_SC_PER_RB), 15);
|
||||
}// if not DMRS Symbol
|
||||
}// symbol loop
|
||||
@@ -950,9 +949,9 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
}//Antenna loop
|
||||
}
|
||||
|
||||
uint32_t calc_power(uint16_t *x, uint32_t size) {
|
||||
uint64_t sum_x = 0;
|
||||
uint64_t sum_x2 = 0;
|
||||
uint32_t calc_power(const int16_t *x, const uint32_t size) {
|
||||
int64_t sum_x = 0;
|
||||
int64_t sum_x2 = 0;
|
||||
for(int k = 0; k<size; k++) {
|
||||
sum_x = sum_x + x[k];
|
||||
sum_x2 = sum_x2 + x[k]*x[k];
|
||||
@@ -960,28 +959,34 @@ uint32_t calc_power(uint16_t *x, uint32_t size) {
|
||||
return sum_x2/size - (sum_x/size)*(sum_x/size);
|
||||
}
|
||||
|
||||
int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t *srs_generated_signal,
|
||||
int32_t **srs_received_signal,
|
||||
int32_t **srs_estimated_channel_freq,
|
||||
int32_t **srs_estimated_channel_time,
|
||||
int32_t **srs_estimated_channel_time_shifted,
|
||||
uint32_t *noise_power) {
|
||||
int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
|
||||
const int frame,
|
||||
const int slot,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const nr_srs_info_t *nr_srs_info,
|
||||
const int32_t *srs_generated_signal,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_ls_estimated_channel[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][gNB->frame_parms.ofdm_symbol_size],
|
||||
uint32_t *signal_power,
|
||||
uint32_t *noise_power_per_rb,
|
||||
uint32_t *noise_power,
|
||||
int8_t *snr_per_rb,
|
||||
int8_t *snr) {
|
||||
|
||||
if(nr_srs_info->sc_list_length == 0) {
|
||||
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
int32_t **srs_ls_estimated_channel = nr_srs_info->srs_ls_estimated_channel;
|
||||
const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
|
||||
uint16_t noise_real[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
uint16_t noise_imag[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
int16_t ch_real[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
int16_t ch_imag[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
int16_t noise_real[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
int16_t noise_imag[frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length];
|
||||
|
||||
int16_t ls_estimated[2];
|
||||
|
||||
@@ -994,11 +999,11 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
|
||||
int16_t generated_real = srs_generated_signal[nr_srs_info->sc_list[sc_idx]] & 0xFFFF;
|
||||
int16_t generated_imag = (srs_generated_signal[nr_srs_info->sc_list[sc_idx]] >> 16) & 0xFFFF;
|
||||
int16_t generated_real = ((c16_t*)srs_generated_signal)[nr_srs_info->sc_list[sc_idx]].r;
|
||||
int16_t generated_imag = ((c16_t*)srs_generated_signal)[nr_srs_info->sc_list[sc_idx]].i;
|
||||
|
||||
int16_t received_real = srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] & 0xFFFF;
|
||||
int16_t received_imag = (srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] >> 16) & 0xFFFF;
|
||||
int16_t received_real = ((c16_t*)srs_received_signal[ant])[nr_srs_info->sc_list[sc_idx]].r;
|
||||
int16_t received_imag = ((c16_t*)srs_received_signal[ant])[nr_srs_info->sc_list[sc_idx]].i;
|
||||
|
||||
// We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and generated_imag.
|
||||
// So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16 bits.
|
||||
@@ -1069,8 +1074,10 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
// Compute noise
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
noise_real[ant*nr_srs_info->sc_list_length + sc_idx] = abs((int16_t)((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]]-srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]]) & 0xFFFF));
|
||||
noise_imag[ant*nr_srs_info->sc_list_length + sc_idx] = abs((int16_t)(((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]]-srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]]) >> 16) & 0xFFFF));
|
||||
ch_real[ant*nr_srs_info->sc_list_length + sc_idx] = ((c16_t*)srs_estimated_channel_freq[ant])[nr_srs_info->sc_list[sc_idx]].r;
|
||||
ch_imag[ant*nr_srs_info->sc_list_length + sc_idx] = ((c16_t*)srs_estimated_channel_freq[ant])[nr_srs_info->sc_list[sc_idx]].i;
|
||||
noise_real[ant*nr_srs_info->sc_list_length + sc_idx] = abs(((c16_t*)srs_ls_estimated_channel[ant])[nr_srs_info->sc_list[sc_idx]].r - ch_real[ant*nr_srs_info->sc_list_length + sc_idx]);
|
||||
noise_imag[ant*nr_srs_info->sc_list_length + sc_idx] = abs(((c16_t*)srs_ls_estimated_channel[ant])[nr_srs_info->sc_list[sc_idx]].i - ch_imag[ant*nr_srs_info->sc_list_length + sc_idx]);
|
||||
}
|
||||
|
||||
// Convert to time domain
|
||||
@@ -1087,11 +1094,74 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
(gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
|
||||
}
|
||||
|
||||
// Compute signal power
|
||||
*signal_power = calc_power(ch_real,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length)
|
||||
+ calc_power(ch_imag,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length);
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,"signal_power = %u\n", *signal_power);
|
||||
#endif
|
||||
|
||||
if (*signal_power == 0) {
|
||||
LOG_W(NR_PHY, "Received SRS signal power is 0\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Compute noise power
|
||||
|
||||
const uint8_t signal_power_bits = log2_approx(*signal_power);
|
||||
const uint8_t factor_bits = signal_power_bits < 32 ? 32 - signal_power_bits : 0; // 32 due to input of dB_fixed(uint32_t x)
|
||||
const int32_t factor_dB = dB_fixed(1<<factor_bits);
|
||||
|
||||
const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
const uint8_t srs_symbols_per_rb = srs_pdu->comb_size == 0 ? 6 : 3;
|
||||
const uint8_t n_noise_estimates = frame_parms->nb_antennas_rx*srs_symbols_per_rb;
|
||||
uint8_t count_estimates = 0;
|
||||
uint64_t sum_re = 0;
|
||||
uint64_t sum_re2 = 0;
|
||||
uint64_t sum_im = 0;
|
||||
uint64_t sum_im2 = 0;
|
||||
|
||||
for (int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
|
||||
int subcarrier0 = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
if(subcarrier0 < 0) {
|
||||
subcarrier0 = subcarrier0 + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
int rb = subcarrier0/NR_NB_SC_PER_RB;
|
||||
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
|
||||
sum_re = sum_re + noise_real[ant*nr_srs_info->sc_list_length+sc_idx];
|
||||
sum_re2 = sum_re2 + noise_real[ant*nr_srs_info->sc_list_length+sc_idx]*noise_real[ant*nr_srs_info->sc_list_length+sc_idx];
|
||||
sum_im = sum_im + noise_imag[ant*nr_srs_info->sc_list_length+sc_idx];
|
||||
sum_im2 = sum_im2 + noise_imag[ant*nr_srs_info->sc_list_length+sc_idx]*noise_imag[ant*nr_srs_info->sc_list_length+sc_idx];
|
||||
|
||||
count_estimates++;
|
||||
if (count_estimates == n_noise_estimates) {
|
||||
noise_power_per_rb[rb] = sum_re2/n_noise_estimates - (sum_re/n_noise_estimates)*(sum_re/n_noise_estimates) +
|
||||
sum_im2/n_noise_estimates - (sum_im/n_noise_estimates)*(sum_im/n_noise_estimates);
|
||||
snr_per_rb[rb] = dB_fixed((int32_t)((*signal_power<<factor_bits)/noise_power_per_rb[rb])) - factor_dB;
|
||||
count_estimates = 0;
|
||||
sum_re = 0;
|
||||
sum_re2 = 0;
|
||||
sum_im = 0;
|
||||
sum_im2 = 0;
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,"noise_power_per_rb[%i] = %i, snr_per_rb[%i] = %i dB\n", rb, noise_power_per_rb[rb], rb, snr_per_rb[rb]);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*noise_power = calc_power(noise_real,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length)
|
||||
+ calc_power(noise_imag,frame_parms->nb_antennas_rx*nr_srs_info->sc_list_length);
|
||||
|
||||
*snr = dB_fixed((int32_t)((*signal_power<<factor_bits)/(*noise_power))) - factor_dB;
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
uint8_t R = srs_pdu->comb_size == 0 ? 2 : 4;
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
@@ -1119,7 +1189,7 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
}
|
||||
}
|
||||
LOG_I(NR_PHY,"noise_power = %u\n", *noise_power);
|
||||
LOG_I(NR_PHY,"noise_power = %u, SNR = %i dB\n", *noise_power, *snr);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -55,6 +55,9 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
|
||||
|
||||
int nr_est_timing_advance_pusch(PHY_VARS_gNB* phy_vars_gNB, int UE_id);
|
||||
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]);
|
||||
|
||||
void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul,
|
||||
@@ -63,15 +66,20 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
unsigned char symbol,
|
||||
uint32_t nb_re_pusch);
|
||||
|
||||
int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t *srs_generated_signal,
|
||||
int32_t **srs_received_signal,
|
||||
int32_t **srs_estimated_channel_freq,
|
||||
int32_t **srs_estimated_channel_time,
|
||||
int32_t **srs_estimated_channel_time_shifted,
|
||||
uint32_t *noise_power);
|
||||
int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
|
||||
const int frame,
|
||||
const int slot,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const nr_srs_info_t *nr_srs_info,
|
||||
const int32_t *srs_generated_signal,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_ls_estimated_channel[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][gNB->frame_parms.ofdm_symbol_size],
|
||||
uint32_t *signal_power,
|
||||
uint32_t *noise_power_per_rb,
|
||||
uint32_t *noise_power,
|
||||
int8_t *snr_per_rb,
|
||||
int8_t *snr);
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
//#define DEBUG_PBCH
|
||||
//#define DEBUG_PBCH_ENCODING
|
||||
@@ -248,6 +249,9 @@ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
|
||||
for (int i=0; i<NR_PBCH_PDU_BITS; i++)
|
||||
pbch->pbch_a |= ((pbch_pdu[i>>3]>>(7-(i&7)))&1)<<i;
|
||||
|
||||
// NSA to signal no coreset0
|
||||
const int ssb_sc_offset = get_softmodem_params()->sa ? config->ssb_table.ssb_subcarrier_offset.value : 31;
|
||||
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
for (int i=0; i<3; i++)
|
||||
printf("pbch_pdu[%d]: 0x%02x\n", i, pbch_pdu[i]);
|
||||
@@ -265,7 +269,7 @@ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
|
||||
for (int i=0; i<3; i++)
|
||||
pbch->pbch_a |= ((ssb_index>>(5-i))&1)<<(29+i); // resp. 6th, 5th and 4th bits of ssb_index
|
||||
else
|
||||
pbch->pbch_a |= ((config->ssb_table.ssb_subcarrier_offset.value>>4)&1)<<29; //MSB of k_SSB (bit index 4)
|
||||
pbch->pbch_a |= ((ssb_sc_offset>>4)&1)<<29; //MSB of k_SSB (bit index 4)
|
||||
|
||||
LOG_D(PHY,"After extra byte: pbch_a = 0x%08x\n",pbch->pbch_a);
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t **srs_received_signal);
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]);
|
||||
|
||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
|
||||
@@ -98,7 +98,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t **srs_received_signal) {
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]) {
|
||||
|
||||
if(nr_srs_info->sc_list_length == 0) {
|
||||
LOG_E(NR_PHY, "(%d.%d) nr_srs_info was not generated yet!\n", frame, slot);
|
||||
@@ -113,6 +113,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size;
|
||||
|
||||
int32_t *rx_signal;
|
||||
bool no_srs_signal = true;
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
|
||||
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||
@@ -121,6 +122,10 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
for(int sc_idx = 0; sc_idx < nr_srs_info->sc_list_length; sc_idx++) {
|
||||
srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]] = rx_signal[nr_srs_info->sc_list[sc_idx]];
|
||||
|
||||
if (rx_signal[nr_srs_info->sc_list[sc_idx]] != 0) {
|
||||
no_srs_signal = false;
|
||||
}
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*12;
|
||||
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
@@ -140,5 +145,11 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
if (no_srs_signal) {
|
||||
LOG_W(NR_PHY, "No SRS signal\n");
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1657,7 +1657,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
||||
RX_type_t rx_type)
|
||||
{
|
||||
//#define DEBUG_DL_PTRS 1
|
||||
int16_t *phase_per_symbol = NULL;
|
||||
int32_t *ptrs_re_symbol = NULL;
|
||||
int8_t ret = 0;
|
||||
/* harq specific variables */
|
||||
@@ -1701,20 +1700,20 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
/* loop over antennas */
|
||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
phase_per_symbol = (int16_t*)pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx];
|
||||
c16_t *phase_per_symbol = (c16_t*)pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx];
|
||||
ptrs_re_symbol = (int32_t*)pdsch_vars[gNB_id]->ptrs_re_per_slot[aarx];
|
||||
ptrs_re_symbol[symbol] = 0;
|
||||
phase_per_symbol[(2*symbol)+1] = 0; // Imag
|
||||
phase_per_symbol[symbol].i = 0; // Imag
|
||||
/* set DMRS estimates to 0 angle with magnitude 1 */
|
||||
if(is_dmrs_symbol(symbol,*dmrsSymbPos)) {
|
||||
/* set DMRS real estimation to 32767 */
|
||||
phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
|
||||
phase_per_symbol[symbol].r=INT16_MAX; // 32767
|
||||
#ifdef DEBUG_DL_PTRS
|
||||
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
|
||||
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r,phase_per_symbol[symbol].i);
|
||||
#endif
|
||||
}
|
||||
else { // real ptrs value is set to 0
|
||||
phase_per_symbol[2*symbol] = 0; // Real
|
||||
phase_per_symbol[symbol].r = 0; // Real
|
||||
}
|
||||
|
||||
if(dlsch0_harq->status == ACTIVE) {
|
||||
@@ -1740,7 +1739,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
||||
symbol,frame_parms->ofdm_symbol_size,
|
||||
(int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)],
|
||||
ue->nr_gold_pdsch[gNB_id][nr_slot_rx][symbol][0],
|
||||
&phase_per_symbol[2* symbol],
|
||||
(int16_t*)&phase_per_symbol[symbol],
|
||||
&ptrs_re_symbol[symbol]);
|
||||
}
|
||||
}// HARQ 0
|
||||
@@ -1752,7 +1751,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
||||
/*------------------------------------------------------------------------------------------------------- */
|
||||
/* If L-PTRS is > 0 then we need interpolation */
|
||||
if(*L_ptrs > 0) {
|
||||
ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, phase_per_symbol, *startSymbIndex, *nbSymb);
|
||||
ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t*)phase_per_symbol, *startSymbIndex, *nbSymb);
|
||||
if(ret != 0) {
|
||||
LOG_W(PHY,"[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
|
||||
}
|
||||
@@ -1771,11 +1770,11 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
|
||||
/* Skip rotation if the slot processing is wrong */
|
||||
if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
|
||||
#ifdef DEBUG_DL_PTRS
|
||||
printf("[PHY][DL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[2* i],phase_per_symbol[(2* i) +1]);
|
||||
printf("[PHY][DL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[i].r,phase_per_symbol[i].i);
|
||||
#endif
|
||||
rotate_cpx_vector((int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
|
||||
&phase_per_symbol[2* i],
|
||||
(int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
|
||||
rotate_cpx_vector((c16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
|
||||
&phase_per_symbol[i],
|
||||
(c16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
|
||||
((*nb_rb) * NR_NB_SC_PER_RB), 15);
|
||||
}// if not DMRS Symbol
|
||||
}// symbol loop
|
||||
|
||||
@@ -342,7 +342,7 @@ typedef struct {
|
||||
/// Position of first CCE of the dci
|
||||
int firstCCE;
|
||||
/// flag to indicate that this is a RA response
|
||||
boolean_t ra_flag;
|
||||
bool ra_flag;
|
||||
/// rnti
|
||||
rnti_t rnti;
|
||||
/// rnti type
|
||||
|
||||
@@ -597,17 +597,15 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
|
||||
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
for(ap = 0; ap < n_antenna_ports; ap++) {
|
||||
for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT;s++){
|
||||
c16_t rot=((c16_t*)frame_parms->symbol_rotation[1])[s + symb_offset];
|
||||
LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n",
|
||||
s,
|
||||
s + symb_offset,
|
||||
rot.r, rot.i);
|
||||
|
||||
LOG_D(PHY,"In %s: rotating txdataF symbol %d (%d) => (%d.%d)\n",
|
||||
__FUNCTION__,
|
||||
s,
|
||||
s + symb_offset,
|
||||
frame_parms->symbol_rotation[1][2 * (s + symb_offset)],
|
||||
frame_parms->symbol_rotation[1][1 + (2 * (s + symb_offset))]);
|
||||
|
||||
rotate_cpx_vector((int16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
|
||||
&frame_parms->symbol_rotation[1][2 * (s + symb_offset)],
|
||||
(int16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
|
||||
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
|
||||
&rot,
|
||||
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct OAIgraph {
|
||||
int h;
|
||||
int waterFallh;
|
||||
double *waterFallAvg;
|
||||
boolean_t initDone;
|
||||
bool initDone;
|
||||
int iteration;
|
||||
void (*funct) (struct OAIgraph *graph, calibData_t *);
|
||||
} OAIgraph_t;
|
||||
@@ -159,7 +159,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
|
||||
*y=old_y;
|
||||
}
|
||||
|
||||
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
|
||||
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
|
||||
fl_redraw_object(graph->graph);
|
||||
|
||||
if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
|
||||
|
||||
+25
-222
@@ -144,207 +144,10 @@ void multadd_real_four_symbols_vector_complex_scalar(int16_t *x,
|
||||
_m_empty();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
int rotate_cpx_vector(int16_t *x,
|
||||
int16_t *alpha,
|
||||
int16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift,
|
||||
uint8_t format)
|
||||
{
|
||||
// Multiply elementwise two complex vectors of N elements
|
||||
// x - input 1 in the format |Re0 Im0 Re0 Im0|,......,|Re(N-1) Im(N-1) Re(N-1) Im(N-1)|
|
||||
// We assume x1 with a dynamic of 15 bit maximum
|
||||
//
|
||||
// alpha - input 2 in the format |Re0 Im0|
|
||||
// We assume x2 with a dynamic of 15 bit maximum
|
||||
//
|
||||
// y - output in the format |Re0 Im0 Re0 Im0|,......,|Re(N-1) Im(N-1) Re(N-1) Im(N-1)|
|
||||
//
|
||||
// N - the size f the vectors (this function does N cpx mpy. WARNING: N>=4;
|
||||
//
|
||||
// output_shift - shift at output to return in Q1.15
|
||||
// format - 0 means alpha is in shuffled format, 1 means x is in shuffled format
|
||||
|
||||
uint32_t i; // loop counter
|
||||
|
||||
register __m128i m0,m1;
|
||||
|
||||
|
||||
|
||||
__m128i *x_128;
|
||||
__m128i *y_128;
|
||||
|
||||
|
||||
shift = _mm_cvtsi32_si128(output_shift);
|
||||
x_128 = (__m128i *)&x[0];
|
||||
|
||||
if (format==0) { // alpha is in shuffled format for complex multiply
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[1];
|
||||
((int16_t *)&alpha_128)[3] = alpha[0];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[1];
|
||||
((int16_t *)&alpha_128)[7] = alpha[0];
|
||||
} else { // input is in shuffled format for complex multiply
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[0];
|
||||
((int16_t *)&alpha_128)[3] = alpha[1];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[0];
|
||||
((int16_t *)&alpha_128)[7] = alpha[1];
|
||||
}
|
||||
|
||||
y_128 = (__m128i *)&y[0];
|
||||
|
||||
// _mm_empty();
|
||||
// return(0);
|
||||
|
||||
// we compute 4 cpx multiply for each loop
|
||||
for(i=0; i<(N>>3); i++) {
|
||||
|
||||
m0 = _mm_madd_epi16(x_128[0],alpha_128); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
|
||||
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
|
||||
m1=m0;
|
||||
m0 = _mm_packs_epi32(m1,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
y_128[0] = _mm_unpacklo_epi32(m0,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
m0 = _mm_madd_epi16(x_128[1],alpha_128); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
|
||||
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
|
||||
m1 = m0;
|
||||
m1 = _mm_packs_epi32(m1,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
y_128[1] = _mm_unpacklo_epi32(m1,m1); // 1- pack in a 128 bit register [re im re im]
|
||||
m0 = _mm_madd_epi16(x_128[2],alpha_128); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
|
||||
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
|
||||
m1 = m0;
|
||||
m1 = _mm_packs_epi32(m1,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
y_128[2] = _mm_unpacklo_epi32(m1,m1); // 1- pack in a 128 bit register [re im re im]
|
||||
m0 = _mm_madd_epi16(x_128[3],alpha_128); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
|
||||
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
|
||||
m1 = m0;
|
||||
m1 = _mm_packs_epi32(m1,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
y_128[3] = _mm_unpacklo_epi32(m1,m1); // 1- pack in a 128 bit register [re im re im]
|
||||
if (format==1) { // Put output in proper format (Re,-Im,Im,Re), shuffle = (0,1,3,2) = 0x1e
|
||||
|
||||
y_128[0] = _mm_shufflelo_epi16(y_128[0],0x1e);
|
||||
y_128[0] = _mm_shufflehi_epi16(y_128[0],0x1e);
|
||||
((int16_t*)&y_128[0])[1] = -((int16_t*)&y_128[0])[1];
|
||||
((int16_t*)&y_128[0])[5] = -((int16_t*)&y_128[0])[5];
|
||||
y_128[1] = _mm_shufflelo_epi16(y_128[1],0x1e);
|
||||
y_128[1] = _mm_shufflehi_epi16(y_128[1],0x1e);
|
||||
((int16_t*)&y_128[1])[1] = -((int16_t*)&y_128[1])[1];
|
||||
((int16_t*)&y_128[1])[5] = -((int16_t*)&y_128[1])[5];
|
||||
y_128[2] = _mm_shufflelo_epi16(y_128[2],0x1e);
|
||||
y_128[2] = _mm_shufflehi_epi16(y_128[2],0x1e);
|
||||
((int16_t*)&y_128[2])[1] = -((int16_t*)&y_128[2])[1];
|
||||
((int16_t*)&y_128[2])[5] = -((int16_t*)&y_128[2])[5];
|
||||
y_128[3] = _mm_shufflelo_epi16(y_128[3],0x1e);
|
||||
y_128[3] = _mm_shufflehi_epi16(y_128[3],0x1e);
|
||||
((int16_t*)&y_128[3])[1] = -((int16_t*)&y_128[3])[1];
|
||||
((int16_t*)&y_128[3])[5] = -((int16_t*)&y_128[3])[5];
|
||||
}
|
||||
|
||||
|
||||
x_128+=4;
|
||||
y_128 +=4;
|
||||
}
|
||||
|
||||
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int rotate_cpx_vector2(int16_t *x,
|
||||
int16_t *alpha,
|
||||
int16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift,
|
||||
uint8_t format)
|
||||
{
|
||||
// Multiply elementwise two complex vectors of N elements
|
||||
// x - input 1 in the format |Re0 Im0 Re0 Im0|,......,|Re(N-1) Im(N-1) Re(N-1) Im(N-1)|
|
||||
// We assume x1 with a dynamic of 15 bit maximum
|
||||
//
|
||||
// alpha - input 2 in the format |Re0 Im0|
|
||||
// We assume x2 with a dynamic of 15 bit maximum
|
||||
//
|
||||
// y - output in the format |Re0 Im0 Re0 Im0|,......,|Re(N-1) Im(N-1) Re(N-1) Im(N-1)|
|
||||
//
|
||||
// N - the size f the vectors (this function does N cpx mpy. WARNING: N>=4;
|
||||
//
|
||||
// log2_amp - increase the output amplitude by a factor 2^log2_amp (default is 0)
|
||||
// WARNING: log2_amp>0 can cause overflow!!
|
||||
|
||||
uint32_t i; // loop counter
|
||||
|
||||
register __m128i m0,m1;
|
||||
|
||||
|
||||
__m128i *x_128;
|
||||
__m128i *y_128;
|
||||
|
||||
|
||||
shift = _mm_cvtsi32_si128(output_shift);
|
||||
x_128 = (__m128i *)&x[0];
|
||||
|
||||
if (format==0) { // alpha is in shuffled format for complex multiply
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[1];
|
||||
((int16_t *)&alpha_128)[3] = alpha[0];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[1];
|
||||
((int16_t *)&alpha_128)[7] = alpha[0];
|
||||
} else { // input is in shuffled format for complex multiply
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[0];
|
||||
((int16_t *)&alpha_128)[3] = alpha[1];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[0];
|
||||
((int16_t *)&alpha_128)[7] = alpha[1];
|
||||
}
|
||||
|
||||
y_128 = (__m128i *)&y[0];
|
||||
|
||||
// we compute 4 cpx multiply for each loop
|
||||
for(i=0; i<(N>>1); i++) {
|
||||
|
||||
|
||||
m0 = _mm_madd_epi16(x_128[i],alpha_128); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
|
||||
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
|
||||
m1=m0;
|
||||
m1 = _mm_packs_epi32(m1,m0); // 1- pack in a 128 bit register [re im re im]
|
||||
y_128[i] = _mm_unpacklo_epi32(m1,m1); // 1- pack in a 128 bit register [re im re im]
|
||||
if (format==1) { // Put output in proper format (Re,-Im,Im,Re), shuffle = (0,1,3,2) = 0x1e
|
||||
|
||||
y_128[i] = _mm_shufflelo_epi16(y_128[i],0x1e);
|
||||
y_128[i] = _mm_shufflehi_epi16(y_128[i],0x1e);
|
||||
((int16_t*)&y_128[i])[1] = -((int16_t*)&y_128[i])[1];
|
||||
((int16_t*)&y_128[i])[5] = -((int16_t*)&y_128[i])[5];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
*/
|
||||
|
||||
int rotate_cpx_vector(int16_t *x,
|
||||
int16_t *alpha,
|
||||
int16_t *y,
|
||||
#ifdef __AVX2__
|
||||
void rotate_cpx_vector(c16_t *x,
|
||||
c16_t *alpha,
|
||||
c16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift)
|
||||
{
|
||||
@@ -372,28 +175,28 @@ int rotate_cpx_vector(int16_t *x,
|
||||
__m128i shift = _mm_cvtsi32_si128(output_shift);
|
||||
register simd_q15_t m0,m1,m2,m3;
|
||||
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[1];
|
||||
((int16_t *)&alpha_128)[3] = alpha[0];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = -alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[1];
|
||||
((int16_t *)&alpha_128)[7] = alpha[0];
|
||||
((int16_t *)&alpha_128)[0] = alpha->r;
|
||||
((int16_t *)&alpha_128)[1] = -alpha->i;
|
||||
((int16_t *)&alpha_128)[2] = alpha->i;
|
||||
((int16_t *)&alpha_128)[3] = alpha->r;
|
||||
((int16_t *)&alpha_128)[4] = alpha->r;
|
||||
((int16_t *)&alpha_128)[5] = -alpha->i;
|
||||
((int16_t *)&alpha_128)[6] = alpha->i;
|
||||
((int16_t *)&alpha_128)[7] = alpha->r;
|
||||
#elif defined(__arm__)
|
||||
int32x4_t shift;
|
||||
int32x4_t ab_re0,ab_re1,ab_im0,ab_im1,re32,im32;
|
||||
int16_t reflip[8] __attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
int32x4x2_t xtmp;
|
||||
|
||||
((int16_t *)&alpha_128)[0] = alpha[0];
|
||||
((int16_t *)&alpha_128)[1] = alpha[1];
|
||||
((int16_t *)&alpha_128)[2] = alpha[0];
|
||||
((int16_t *)&alpha_128)[3] = alpha[1];
|
||||
((int16_t *)&alpha_128)[4] = alpha[0];
|
||||
((int16_t *)&alpha_128)[5] = alpha[1];
|
||||
((int16_t *)&alpha_128)[6] = alpha[0];
|
||||
((int16_t *)&alpha_128)[7] = alpha[1];
|
||||
((int16_t *)&alpha_128)[0] = alpha->r;
|
||||
((int16_t *)&alpha_128)[1] = alpha->i;
|
||||
((int16_t *)&alpha_128)[2] = alpha->r;
|
||||
((int16_t *)&alpha_128)[3] = alpha->i;
|
||||
((int16_t *)&alpha_128)[4] = alpha->r;
|
||||
((int16_t *)&alpha_128)[5] = alpha->i;
|
||||
((int16_t *)&alpha_128)[6] = alpha->r;
|
||||
((int16_t *)&alpha_128)[7] = alpha->i;
|
||||
int16x8_t bflip = vrev32q_s16(alpha_128);
|
||||
int16x8_t bconj = vmulq_s16(alpha_128,*(int16x8_t *)reflip);
|
||||
shift = vdupq_n_s32(-output_shift);
|
||||
@@ -439,9 +242,9 @@ int rotate_cpx_vector(int16_t *x,
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
return(0);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
/*
|
||||
int mult_vector32_scalar(int16_t *x1,
|
||||
int x2,
|
||||
@@ -536,7 +339,7 @@ main ()
|
||||
int16_t input[256] __attribute__((aligned(16)));
|
||||
int16_t input2[256] __attribute__((aligned(16)));
|
||||
int16_t output[256] __attribute__((aligned(16)));
|
||||
int16_t alpha[2];
|
||||
c16_t alpha;
|
||||
|
||||
int i;
|
||||
|
||||
@@ -574,8 +377,8 @@ main ()
|
||||
input2[14] = 1000;
|
||||
input2[15] = 2000;
|
||||
|
||||
alpha[0]=32767;
|
||||
alpha[1]=0;
|
||||
alpha->r=32767;
|
||||
alpha->i=0;
|
||||
|
||||
//mult_cpx_vector(input,input2,output,L,0);
|
||||
rotate_cpx_vector_norep(input,alpha,input,L,15);
|
||||
|
||||
@@ -60,7 +60,7 @@ typedef struct OAIgraph {
|
||||
int h;
|
||||
int waterFallh;
|
||||
double *waterFallAvg;
|
||||
boolean_t initDone;
|
||||
bool initDone;
|
||||
int iteration;
|
||||
void (*gNBfunct) (struct OAIgraph *graph, scopeData_t *p, int UE_id);
|
||||
void (*nrUEfunct)(scopeGraphData_t **data, struct OAIgraph *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id);
|
||||
@@ -208,7 +208,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
|
||||
*y=old_y;
|
||||
}
|
||||
|
||||
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
|
||||
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
|
||||
fl_redraw_object(graph->graph);
|
||||
|
||||
if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
|
||||
|
||||
@@ -37,6 +37,7 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "common/utils/assertions.h"
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
@@ -104,15 +105,6 @@ void multadd_complex_vector_real_scalar(int16_t *x,
|
||||
uint8_t zero_flag,
|
||||
uint32_t N);
|
||||
|
||||
int rotate_cpx_vector(int16_t *x,
|
||||
int16_t *alpha,
|
||||
int16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift);
|
||||
|
||||
|
||||
|
||||
|
||||
/*!\fn void init_fft(uint16_t size,uint8_t logsize,uint16_t *rev)
|
||||
\brief Initialize the FFT engine for a given size
|
||||
@param size Size of the FFT
|
||||
@@ -461,7 +453,7 @@ idft_size_idx_t get_idft(int ofdm_symbol_size)
|
||||
}
|
||||
|
||||
|
||||
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
|
||||
/*!\fn int32_t rotate_cpx_vector(c16_t *x,c16_t *alpha,c16_t *y,uint32_t N,uint16_t output_shift)
|
||||
This function performs componentwise multiplication of a vector with a complex scalar.
|
||||
@param x Vector input (Q1.15) in the format |Re0 Im0|,......,|Re(N-1) Im(N-1)|
|
||||
@param alpha Scalar input (Q1.15) in the format |Re0 Im0|
|
||||
@@ -471,11 +463,11 @@ This function performs componentwise multiplication of a vector with a complex s
|
||||
|
||||
The function implemented is : \f$\mathbf{y} = \alpha\mathbf{x}\f$
|
||||
*/
|
||||
int32_t rotate_cpx_vector(int16_t *x,
|
||||
int16_t *alpha,
|
||||
int16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift);
|
||||
void rotate_cpx_vector(c16_t *x,
|
||||
c16_t *alpha,
|
||||
c16_t *y,
|
||||
uint32_t N,
|
||||
uint16_t output_shift);
|
||||
|
||||
|
||||
//cadd_sv.c
|
||||
|
||||
@@ -754,7 +754,7 @@ typedef struct {
|
||||
/// Position of first CCE of the dci
|
||||
int firstCCE;
|
||||
/// flag to indicate that this is a RA response
|
||||
boolean_t ra_flag;
|
||||
bool ra_flag;
|
||||
/// rnti
|
||||
rnti_t rnti;
|
||||
/// harq_pid
|
||||
@@ -775,7 +775,7 @@ typedef struct {
|
||||
/// Position of first CCE of the dci
|
||||
int firstCCE;
|
||||
/// flag to indicate that this is a RA response
|
||||
boolean_t ra_flag;
|
||||
bool ra_flag;
|
||||
/// rnti
|
||||
rnti_t rnti;
|
||||
/// Format
|
||||
@@ -806,7 +806,7 @@ typedef struct {
|
||||
/// Position of first CCE of the dci
|
||||
int firstCCE;
|
||||
/// flag to indicate that this is a RA response
|
||||
boolean_t ra_flag;
|
||||
bool ra_flag;
|
||||
/// rnti
|
||||
rnti_t rnti;
|
||||
/// Format
|
||||
|
||||
@@ -241,15 +241,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
uint16_t sc_list_length;
|
||||
uint16_t *sc_list;
|
||||
uint16_t sc_list[6*273];
|
||||
uint8_t srs_generated_signal_bits;
|
||||
int32_t *srs_generated_signal;
|
||||
int32_t **srs_received_signal;
|
||||
int32_t **srs_ls_estimated_channel;
|
||||
int32_t **srs_estimated_channel_freq;
|
||||
int32_t **srs_estimated_channel_time;
|
||||
int32_t **srs_estimated_channel_time_shifted;
|
||||
uint32_t *noise_power;
|
||||
int32_t srs_generated_signal[OFDM_SYMBOL_SIZE_SAMPLES_MAX * MAX_NUM_NR_SRS_SYMBOLS];
|
||||
} nr_srs_info_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -359,10 +353,10 @@ struct NR_DL_FRAME_PARMS {
|
||||
lte_prefix_type_t Ncp;
|
||||
/// sequence which is computed based on carrier frequency and numerology to rotate/derotate each OFDM symbol according to Section 5.3 in 38.211
|
||||
/// First dimension is for the direction of the link (0 DL, 1 UL)
|
||||
int16_t symbol_rotation[2][224*2];
|
||||
c16_t symbol_rotation[2][224];
|
||||
/// sequence used to compensate the phase rotation due to timeshifted OFDM symbols
|
||||
/// First dimenstion is for different CP lengths
|
||||
int16_t timeshift_symbol_rotation[4096*2] __attribute__ ((aligned (16)));
|
||||
c16_t timeshift_symbol_rotation[4096*2] __attribute__ ((aligned (16)));
|
||||
/// shift of pilot position in one RB
|
||||
uint8_t nushift;
|
||||
/// SRS configuration from TS 38.331 RRC
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "intertask_interface.h"
|
||||
|
||||
//#define DEBUG_RXDATA
|
||||
//#define SRS_IND_DEBUG
|
||||
|
||||
uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,254,32,34,36,38,40,42,44,46,254,254,48,50,52,54,56,58,60,62};
|
||||
|
||||
@@ -72,8 +73,11 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
|
||||
ssb_start_symbol = ssb_start_symbol_abs % fp->symbols_per_slot; // start symbol wrt slot
|
||||
|
||||
// setting the first subcarrier
|
||||
fp->ssb_start_subcarrier = (12 * cfg->ssb_table.ssb_offset_point_a.value + ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset);
|
||||
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier,cfg->ssb_table.ssb_offset_point_a.value,ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset);
|
||||
const int scs = cfg->ssb_config.scs_common.value;
|
||||
const int prb_offset = (fp->freq_range == nr_FR1) ? ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA>>scs : ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA>>(scs-2);
|
||||
const int sc_offset = (fp->freq_range == nr_FR1) ? ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset>>scs : ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset;
|
||||
fp->ssb_start_subcarrier = (12 * prb_offset + sc_offset);
|
||||
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier, prb_offset, sc_offset);
|
||||
|
||||
LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol);
|
||||
nr_generate_pss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
|
||||
@@ -621,10 +625,38 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
||||
|
||||
}
|
||||
|
||||
int fill_srs_reported_symbol_list(nfapi_nr_srs_indication_reported_symbol_t *reported_symbol_list,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const int N_RB_UL,
|
||||
const int8_t *snr_per_rb,
|
||||
const int srs_est) {
|
||||
|
||||
reported_symbol_list->num_rbs = srs_bandwidth_config[srs_pdu->config_index][srs_pdu->bandwidth_index][0];
|
||||
|
||||
if (!reported_symbol_list->rb_list) {
|
||||
reported_symbol_list->rb_list = (nfapi_nr_srs_indication_reported_symbol_resource_block_t*) calloc(1, N_RB_UL*sizeof(nfapi_nr_srs_indication_reported_symbol_resource_block_t));
|
||||
}
|
||||
|
||||
for(int rb = 0; rb < reported_symbol_list->num_rbs; rb++) {
|
||||
if (srs_est<0) {
|
||||
reported_symbol_list->rb_list[rb].rb_snr = 0xFF;
|
||||
} else if (snr_per_rb[rb] < -64) {
|
||||
reported_symbol_list->rb_list[rb].rb_snr = 0;
|
||||
} else if (snr_per_rb[rb] > 63) {
|
||||
reported_symbol_list->rb_list[rb].rb_snr = 0xFE;
|
||||
} else {
|
||||
reported_symbol_list->rb_list[rb].rb_snr = (snr_per_rb[rb] + 64)<<1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
/* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */
|
||||
int pucch_decode_done = 0;
|
||||
int pusch_decode_done = 0;
|
||||
int pusch_DTX = 0;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,1);
|
||||
LOG_D(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d\n",frame_rx,slot_rx);
|
||||
@@ -764,7 +796,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
if (no_sig) {
|
||||
LOG_D(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx);
|
||||
nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1,1);
|
||||
return 1;
|
||||
pusch_DTX++;
|
||||
continue;
|
||||
}
|
||||
gNB->pusch_vars[ULSCH_id]->ulsch_power_tot=0;
|
||||
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot=0;
|
||||
@@ -788,7 +821,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
/* in case of phy_test mode, we still want to decode to measure execution time.
|
||||
Therefore, we don't yet call nr_fill_indication, it will be called later */
|
||||
nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1,1);
|
||||
return 1;
|
||||
pusch_DTX++;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
LOG_D(PHY, "PUSCH detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx,
|
||||
@@ -819,29 +853,88 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
|
||||
LOG_D(NR_PHY, "(%d.%d) gNB is waiting for SRS, id = %i\n", frame_rx, slot_rx, i);
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu;
|
||||
uint8_t N_symb_SRS = 1<<srs_pdu->num_symbols;
|
||||
int32_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS];
|
||||
int32_t srs_ls_estimated_channel[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS];
|
||||
int32_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size*N_symb_SRS];
|
||||
int32_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size];
|
||||
int32_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size];
|
||||
uint32_t noise_power_per_rb[srs_pdu->bwp_size];
|
||||
int8_t snr_per_rb[srs_pdu->bwp_size];
|
||||
uint32_t signal_power;
|
||||
uint32_t noise_power;
|
||||
int8_t snr;
|
||||
|
||||
// At least currently, the configuration is constant, so it is enough to generate the sequence just once.
|
||||
if(gNB->nr_srs_info[i]->sc_list_length == 0) {
|
||||
generate_srs_nr(srs_pdu, &gNB->frame_parms, gNB->nr_srs_info[i]->srs_generated_signal, gNB->nr_srs_info[i], AMP, frame_rx, slot_rx);
|
||||
generate_srs_nr(srs_pdu, frame_parms, gNB->nr_srs_info[i]->srs_generated_signal, gNB->nr_srs_info[i], AMP, frame_rx, slot_rx);
|
||||
}
|
||||
|
||||
nr_get_srs_signal(gNB,frame_rx,slot_rx,srs_pdu, gNB->nr_srs_info[i], gNB->nr_srs_info[i]->srs_received_signal);
|
||||
const int srs_est = nr_get_srs_signal(gNB,frame_rx,slot_rx, srs_pdu, gNB->nr_srs_info[i], srs_received_signal);
|
||||
|
||||
nr_srs_channel_estimation(gNB,frame_rx,slot_rx,srs_pdu,
|
||||
gNB->nr_srs_info[i],
|
||||
gNB->nr_srs_info[i]->srs_generated_signal,
|
||||
gNB->nr_srs_info[i]->srs_received_signal,
|
||||
gNB->nr_srs_info[i]->srs_estimated_channel_freq,
|
||||
gNB->nr_srs_info[i]->srs_estimated_channel_time,
|
||||
gNB->nr_srs_info[i]->srs_estimated_channel_time_shifted,
|
||||
gNB->nr_srs_info[i]->noise_power);
|
||||
if (srs_est >= 0) {
|
||||
nr_srs_channel_estimation(gNB,
|
||||
frame_rx,
|
||||
slot_rx,
|
||||
srs_pdu,
|
||||
gNB->nr_srs_info[i],
|
||||
gNB->nr_srs_info[i]->srs_generated_signal,
|
||||
srs_received_signal,
|
||||
srs_ls_estimated_channel,
|
||||
srs_estimated_channel_freq,
|
||||
srs_estimated_channel_time,
|
||||
srs_estimated_channel_time_shifted,
|
||||
&signal_power,
|
||||
noise_power_per_rb,
|
||||
&noise_power,
|
||||
snr_per_rb,
|
||||
&snr);
|
||||
}
|
||||
|
||||
T(T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
|
||||
T_BUFFER(gNB->nr_srs_info[i]->srs_estimated_channel_freq[0], gNB->frame_parms.ofdm_symbol_size*sizeof(int32_t)));
|
||||
T_BUFFER(srs_estimated_channel_freq[0], frame_parms->ofdm_symbol_size*sizeof(int32_t)));
|
||||
|
||||
T(T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
|
||||
T_BUFFER(gNB->nr_srs_info[i]->srs_estimated_channel_time_shifted[0], gNB->frame_parms.ofdm_symbol_size*sizeof(int32_t)));
|
||||
T_BUFFER(srs_estimated_channel_time_shifted[0], frame_parms->ofdm_symbol_size*sizeof(int32_t)));
|
||||
|
||||
const uint16_t num_srs = gNB->UL_INFO.srs_ind.number_of_pdus;
|
||||
gNB->UL_INFO.srs_ind.pdu_list = &gNB->srs_pdu_list[0];
|
||||
gNB->UL_INFO.srs_ind.sfn = frame_rx;
|
||||
gNB->UL_INFO.srs_ind.slot = slot_rx;
|
||||
gNB->srs_pdu_list[num_srs].handle = srs_pdu->handle;
|
||||
gNB->srs_pdu_list[num_srs].rnti = srs_pdu->rnti;
|
||||
gNB->srs_pdu_list[num_srs].timing_advance = srs_est >= 0 ? nr_est_timing_advance_srs(frame_parms,
|
||||
srs_estimated_channel_time) : 0xFFFF;
|
||||
gNB->srs_pdu_list[num_srs].num_symbols = 1<<srs_pdu->num_symbols;
|
||||
gNB->srs_pdu_list[num_srs].wide_band_snr = srs_est >= 0 ? (snr + 64)<<1 : 0xFF; // 0xFF will be set if this field is invalid
|
||||
gNB->srs_pdu_list[num_srs].num_reported_symbols = 1<<srs_pdu->num_symbols;
|
||||
if(!gNB->srs_pdu_list[num_srs].reported_symbol_list) {
|
||||
gNB->srs_pdu_list[num_srs].reported_symbol_list = (nfapi_nr_srs_indication_reported_symbol_t*) calloc(1, gNB->srs_pdu_list[num_srs].num_reported_symbols*sizeof(nfapi_nr_srs_indication_reported_symbol_t));
|
||||
}
|
||||
fill_srs_reported_symbol_list(&gNB->srs_pdu_list[num_srs].reported_symbol_list[0],
|
||||
srs_pdu,
|
||||
frame_parms->N_RB_UL,
|
||||
snr_per_rb,
|
||||
srs_est);
|
||||
|
||||
gNB->UL_INFO.srs_ind.number_of_pdus += 1;
|
||||
|
||||
#ifdef SRS_IND_DEBUG
|
||||
LOG_I(NR_PHY, "gNB->UL_INFO.srs_ind.sfn = %i\n", gNB->UL_INFO.srs_ind.sfn);
|
||||
LOG_I(NR_PHY, "gNB->UL_INFO.srs_ind.slot = %i\n", gNB->UL_INFO.srs_ind.slot);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].rnti = 0x%04x\n", num_srs, gNB->srs_pdu_list[num_srs].rnti);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].timing_advance = %i\n", num_srs, gNB->srs_pdu_list[num_srs].timing_advance);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].num_symbols = %i\n", num_srs, gNB->srs_pdu_list[num_srs].num_symbols);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].wide_band_snr = %i\n", num_srs, gNB->srs_pdu_list[num_srs].wide_band_snr);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].num_reported_symbols = %i\n", num_srs, gNB->srs_pdu_list[num_srs].num_reported_symbols);
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].reported_symbol_list[0].num_rbs = %i\n", num_srs, gNB->srs_pdu_list[num_srs].reported_symbol_list[0].num_rbs);
|
||||
for(int rb = 0; rb < gNB->srs_pdu_list[num_srs].reported_symbol_list[0].num_rbs; rb++) {
|
||||
LOG_I(NR_PHY, "gNB->srs_pdu_list[%i].reported_symbol_list[0].rb_list[%3i].rb_snr = %i\n",
|
||||
num_srs, rb, gNB->srs_pdu_list[num_srs].reported_symbol_list[0].rb_list[rb].rb_snr);
|
||||
}
|
||||
#endif
|
||||
|
||||
srs->active = 0;
|
||||
}
|
||||
@@ -855,5 +948,5 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
|
||||
return 0;
|
||||
return pusch_DTX;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,
|
||||
is_pucch2_subframe = (is_ri_TXOp(ue,proc,eNB_id) && (ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex>0)) || is_pucch2_subframe;
|
||||
|
||||
// check ACK/SR transmission
|
||||
if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == FALSE) {
|
||||
if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == false) {
|
||||
if(is_SR_TXOp(ue,proc,eNB_id)) {
|
||||
uint32_t SR_payload = 0;
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1};
|
||||
|
||||
uint64_t get_softmodem_optmask(void) {return 0;}
|
||||
softmodem_params_t *get_softmodem_params(void) {return 0;}
|
||||
static softmodem_params_t softmodem_params;
|
||||
softmodem_params_t *get_softmodem_params(void) {
|
||||
return &softmodem_params;
|
||||
}
|
||||
|
||||
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
|
||||
|
||||
@@ -174,6 +177,7 @@ int main(int argc, char **argv)
|
||||
int ssb_subcarrier_offset = 0;
|
||||
|
||||
channel_desc_t *gNB2UE;
|
||||
get_softmodem_params()->sa = 1;
|
||||
|
||||
//uint8_t extended_prefix_flag=0;
|
||||
//int8_t interf1=-21,interf2=-21;
|
||||
@@ -460,6 +464,7 @@ int main(int argc, char **argv)
|
||||
frame_parms->Nid_cell = Nid_cell;
|
||||
frame_parms->nushift = Nid_cell%4;
|
||||
frame_parms->ssb_type = nr_ssb_type_C;
|
||||
frame_parms->freq_range = mu<2 ? nr_FR1 : nr_FR2;
|
||||
|
||||
nr_phy_config_request_sim_pbchsim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions);
|
||||
phy_init_nr_gNB(gNB,0,1);
|
||||
@@ -584,9 +589,12 @@ int main(int argc, char **argv)
|
||||
for (i=0; i<frame_parms->Lmax; i++) {
|
||||
if((SSB_positions >> i) & 0x01) {
|
||||
|
||||
const int sc_offset = frame_parms->freq_range == nr_FR1 ? ssb_subcarrier_offset<<mu : ssb_subcarrier_offset;
|
||||
const int prb_offset = frame_parms->freq_range == nr_FR1 ? gNB->gNB_config.ssb_table.ssb_offset_point_a.value<<mu : gNB->gNB_config.ssb_table.ssb_offset_point_a.value << (mu - 2);
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.bchPayload = 0x55dd33;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = i;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset = ssb_subcarrier_offset;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset = sc_offset;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA = prb_offset;
|
||||
|
||||
start_symbol = nr_get_ssb_start_symbol(frame_parms,i);
|
||||
int slot = start_symbol/14;
|
||||
|
||||
@@ -165,7 +165,7 @@ void common_pucch_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int pucch_in
|
||||
int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
{
|
||||
int v_return = 0;
|
||||
bool reset_harq = FALSE;
|
||||
bool reset_harq = false;
|
||||
|
||||
printf("%s", tst_separator);
|
||||
|
||||
@@ -175,7 +175,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_KO);
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
printf("\n => Test : Error due to acknownlegment not set \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
printf("\n => Test : Error due to DAI not set \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
harq_status->vDAI_DL = NR_DL_MAX_DAI + 1;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
harq_status->vDAI_DL = 0;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
harq_status->send_harq_status = 1; /* ack ready to be send */
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
harq_status->vDAI_DL = 1;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
|
||||
printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
{
|
||||
int v_return = 0;
|
||||
bool reset_harq = FALSE;
|
||||
bool reset_harq = false;
|
||||
|
||||
printf("%s", tst_separator);
|
||||
|
||||
@@ -273,7 +273,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -320,22 +320,22 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
harq_status->ack = DL_ACK;
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in dedicated mode: no resource is found \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
printf("\n => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ void init_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id)
|
||||
int i,j;
|
||||
|
||||
/* set cell group parameters which are supported */
|
||||
ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = FALSE;
|
||||
ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = false;
|
||||
ue->cell_group_config.physicalCellGroupConfig.pdsch_HARQ_ACK_Codebook = dynamic;
|
||||
|
||||
ue->PDSCH_ServingCellConfig.codeBlockGroupTransmission = NULL;
|
||||
@@ -554,7 +554,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
#define TST_NB_STEP_SINGLE_TRANSPORT_BLOCK (4)
|
||||
|
||||
int v_return = 0;
|
||||
int reset_harq = FALSE;
|
||||
int reset_harq = false;
|
||||
int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
|
||||
int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
@@ -575,7 +575,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config : pucch resource indicator is invalid \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -595,14 +595,14 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
|
||||
/* reset ack context on last test */
|
||||
if ((i == (TST_NB_STEP_SINGLE_TRANSPORT_BLOCK-1)) && (j == 1)) {
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
}
|
||||
|
||||
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with 1 transport block : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
}
|
||||
@@ -627,11 +627,11 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][0];
|
||||
}
|
||||
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[3][0]);
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
#define TST_NB_STEP_TWO_TRANSPORT_BLOCKS (4)
|
||||
|
||||
int v_return = 0;
|
||||
int reset_harq = FALSE;
|
||||
int reset_harq = false;
|
||||
int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
|
||||
int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
@@ -694,7 +694,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
|
||||
/* reset ack context on last test */
|
||||
if ((i == (TST_NB_STEP_TWO_TRANSPORT_BLOCKS-1)) && (j == 1)) {
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
}
|
||||
|
||||
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
@@ -703,7 +703,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -714,7 +714,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
/* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */
|
||||
/* here first and third block receptions have been missed */
|
||||
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
|
||||
for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 1) {
|
||||
|
||||
@@ -743,7 +743,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]);
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -775,7 +775,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
}
|
||||
}
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -907,7 +907,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
|
||||
|
||||
tst_scheduling_request_payload = 0;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -916,7 +916,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
|
||||
|
||||
tst_scheduling_request_payload = 1;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -929,7 +929,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
|
||||
|
||||
tst_scheduling_request_payload = 1;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -958,7 +958,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
|
||||
int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
{
|
||||
int v_return = 0;
|
||||
int reset_harq = 0;
|
||||
bool reset_harq = false;
|
||||
int sr_config_id = 0;
|
||||
int sr_resource_id = 0;
|
||||
int sr_offset = 0;
|
||||
@@ -988,7 +988,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
|
||||
tst_scheduling_request_payload = 0; /* set sr payload */
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -997,7 +997,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
|
||||
tst_scheduling_request_payload = 1; /* set sr payload */
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1006,7 +1006,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
|
||||
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
|
||||
tst_scheduling_request_payload = 1; /* set sr payload */
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1035,9 +1035,9 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n");
|
||||
|
||||
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1065,7 +1065,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
{
|
||||
int v_return = 0;
|
||||
int reset_harq = FALSE;
|
||||
int reset_harq = false;
|
||||
int sr_config_id = 0;
|
||||
int sr_resource_id = 0;
|
||||
int sr_offset = 0;
|
||||
@@ -1079,7 +1079,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with CSI alone \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1102,7 +1102,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
ue->pucch_config_dedicated_nr[gNB_id].formatConfig[2-1]->simultaneousHARQ_ACK_CSI = enable_feature; /* format 2 */
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1115,9 +1115,9 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
tst_scheduling_request_payload = 0; /* set sr payload */
|
||||
|
||||
reset_harq = TRUE;
|
||||
reset_harq = true;
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1126,7 +1126,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
harq_status->pucch_resource_indicator = pucch_resource_indicator[4];
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
printf("\n => Test : PUCCH format from dedicated config with positive SR and CSI \n");
|
||||
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
|
||||
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
|
||||
printf("Test fail \n");
|
||||
v_return = -1;
|
||||
}
|
||||
|
||||
@@ -43,27 +43,6 @@ Description Contains global common definitions
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/* boolean_t is also defined in openair2/COMMON/platform_types.h
|
||||
* let's protect potential redefinition
|
||||
*/
|
||||
|
||||
#ifndef _BOOLEAN_T_DEFINED_
|
||||
#define _BOOLEAN_T_DEFINED_
|
||||
|
||||
typedef signed char boolean_t;
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE (boolean_t)0x01
|
||||
#endif
|
||||
|
||||
#if !defined(FALSE)
|
||||
#define FALSE (boolean_t)0x00
|
||||
#endif
|
||||
|
||||
#define BOOL_NOT(b) (b^TRUE)
|
||||
|
||||
#endif /* _BOOLEAN_T_DEFINED_ */
|
||||
|
||||
#define NAS_UE_ID_FMT "0x%06x"
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -145,7 +145,7 @@ struct mac_tx_tb_management {
|
||||
struct mac_rx_tb_management {
|
||||
unsigned char *data_ptr;
|
||||
tb_size_t tb_size; // in bits
|
||||
boolean_t valid_checksum;
|
||||
bool valid_checksum;
|
||||
unsigned char first_bit; // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc
|
||||
};
|
||||
|
||||
|
||||
@@ -32,35 +32,12 @@
|
||||
|
||||
#if !defined(NAS_NETLINK)
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
#include <linux/types.h>
|
||||
typedef void * intptr_t;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GENERIC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* boolean_t is also defined in openair2/COMMON/commonDef.h,
|
||||
* let's protect potential redefinition
|
||||
*/
|
||||
#ifndef _BOOLEAN_T_DEFINED_
|
||||
#define _BOOLEAN_T_DEFINED_
|
||||
|
||||
typedef signed char boolean_t;
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE (boolean_t)0x01
|
||||
#endif
|
||||
|
||||
#if !defined(FALSE)
|
||||
#define FALSE (boolean_t)0x00
|
||||
#endif
|
||||
|
||||
#define BOOL_NOT(b) (b^TRUE)
|
||||
|
||||
#endif /* _BOOLEAN_T_DEFINED_ */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GENERIC ACCESS STRATUM TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -77,25 +54,25 @@ typedef int16_t smodule_id_t;
|
||||
typedef long rb_id_t;
|
||||
typedef long srb_id_t;
|
||||
|
||||
typedef boolean_t MBMS_flag_t;
|
||||
#define MBMS_FLAG_NO FALSE
|
||||
#define MBMS_FLAG_YES TRUE
|
||||
typedef bool MBMS_flag_t;
|
||||
#define MBMS_FLAG_NO false
|
||||
#define MBMS_FLAG_YES true
|
||||
|
||||
typedef boolean_t eNB_flag_t;
|
||||
#define ENB_FLAG_NO FALSE
|
||||
#define ENB_FLAG_YES TRUE
|
||||
typedef bool eNB_flag_t;
|
||||
#define ENB_FLAG_NO false
|
||||
#define ENB_FLAG_YES true
|
||||
|
||||
typedef boolean_t gNB_flag_t;
|
||||
#define GNB_FLAG_NO FALSE
|
||||
#define GNB_FLAG_YES TRUE
|
||||
typedef bool gNB_flag_t;
|
||||
#define GNB_FLAG_NO false
|
||||
#define GNB_FLAG_YES true
|
||||
|
||||
typedef boolean_t srb_flag_t;
|
||||
#define SRB_FLAG_NO FALSE
|
||||
#define SRB_FLAG_YES TRUE
|
||||
typedef bool srb_flag_t;
|
||||
#define SRB_FLAG_NO false
|
||||
#define SRB_FLAG_YES true
|
||||
|
||||
typedef boolean_t sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO FALSE
|
||||
#define SL_DISCOVERY_FLAG_YES TRUE
|
||||
typedef bool sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO false
|
||||
#define SL_DISCOVERY_FLAG_YES true
|
||||
|
||||
typedef enum link_direction_e {
|
||||
UNKNOWN_DIR = 0,
|
||||
@@ -152,8 +129,8 @@ typedef uint16_t rlc_usn_t;
|
||||
typedef int32_t rlc_buffer_occupancy_t;
|
||||
typedef signed int rlc_op_status_t;
|
||||
|
||||
#define SDU_CONFIRM_NO FALSE
|
||||
#define SDU_CONFIRM_YES TRUE
|
||||
#define SDU_CONFIRM_NO false
|
||||
#define SDU_CONFIRM_YES true
|
||||
//-----------------------------------------------------------------------------
|
||||
// PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -242,7 +219,7 @@ typedef struct protocol_ctxt_s {
|
||||
frame_t frame; /*!< \brief LTE frame number.*/
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
boolean_t brOption;
|
||||
bool brOption;
|
||||
} protocol_ctxt_t;
|
||||
// warning time hardcoded
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
|
||||
|
||||
@@ -583,9 +583,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
|
||||
else if (strcmp(ccparams_lte.prach_high_speed, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = true;
|
||||
} else if (strcmp(ccparams_lte.prach_high_speed, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
|
||||
@@ -689,9 +689,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
|
||||
else if (strcmp(ccparams_lte.pusch_enable64QAM, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = true;
|
||||
} else if (strcmp(ccparams_lte.pusch_enable64QAM, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
|
||||
@@ -702,9 +702,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
|
||||
else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = true;
|
||||
} else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
@@ -723,9 +723,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
|
||||
else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = true;
|
||||
} else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
@@ -766,15 +766,15 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].phich_duration,ccparams_lte.phich_duration);
|
||||
|
||||
if (strcmp(ccparams_lte.srs_enable, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= true;
|
||||
} else if (strcmp(ccparams_lte.srs_enable, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_enable);
|
||||
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== TRUE) {
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== true) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_BandwidthConfig= ccparams_lte.srs_BandwidthConfig;
|
||||
|
||||
if ((ccparams_lte.srs_BandwidthConfig < 0) ||
|
||||
@@ -791,18 +791,18 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.srs_SubframeConfig);
|
||||
|
||||
if (strcmp(ccparams_lte.srs_ackNackST, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= true;
|
||||
} else if (strcmp(ccparams_lte.srs_ackNackST, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_ackNackST);
|
||||
|
||||
if (strcmp(ccparams_lte.srs_MaxUpPts, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= true;
|
||||
} else if (strcmp(ccparams_lte.srs_MaxUpPts, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
|
||||
@@ -921,7 +921,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.rach_numberOfRA_Preambles);
|
||||
|
||||
if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= true;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_sizeOfRA_PreamblesGroupA= (ccparams_lte.rach_sizeOfRA_PreamblesGroupA/4)-1;
|
||||
|
||||
if ((ccparams_lte.rach_numberOfRA_Preambles <4) ||
|
||||
@@ -976,7 +976,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_messagePowerOffsetGroupB);
|
||||
} else if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
|
||||
@@ -1254,9 +1254,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = true;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = false;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
|
||||
@@ -61,18 +61,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = true;
|
||||
RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[cc_idx]= eMTCconfig->q_RxLevMinCE_r13;
|
||||
// RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= calloc(1, sizeof(long));
|
||||
// *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= q_QualMinRSRQ_CE_r13;
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = true;
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
}
|
||||
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = false;
|
||||
}
|
||||
|
||||
char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2];
|
||||
@@ -127,10 +127,10 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
|
||||
if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = FALSE;
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = false;
|
||||
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
|
||||
} else {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = TRUE;
|
||||
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = true;
|
||||
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
|
||||
}
|
||||
|
||||
@@ -156,18 +156,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE"))
|
||||
{
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = true;
|
||||
|
||||
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13"))
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = false;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = true;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val;
|
||||
|
||||
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13"))
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = false;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = true;
|
||||
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val;
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long));
|
||||
@@ -188,7 +188,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
}
|
||||
else
|
||||
{
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = false;
|
||||
}
|
||||
|
||||
/** ------------------------------SIB2/3 BR------------------------------------------ */
|
||||
@@ -213,9 +213,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
|
||||
else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
|
||||
@@ -310,9 +310,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
|
||||
else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
|
||||
@@ -323,9 +323,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
|
||||
else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
@@ -343,9 +343,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
|
||||
else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
@@ -385,15 +385,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration,eMTCconfig->ccparams.phich_duration);
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_enable);
|
||||
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== TRUE) {
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== true) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_BandwidthConfig= eMTCconfig->ccparams.srs_BandwidthConfig;
|
||||
|
||||
if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7))
|
||||
@@ -408,18 +408,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig);
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST);
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= true;
|
||||
} else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
|
||||
@@ -535,7 +535,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles);
|
||||
|
||||
if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= TRUE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= true;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA= (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA/4)-1;
|
||||
|
||||
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
|
||||
@@ -588,7 +588,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
|
||||
config_fname, cell_idx,eMTCconfig->ccparams.rach_messagePowerOffsetGroupB);
|
||||
} else if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= FALSE;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= false;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
|
||||
@@ -847,14 +847,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
|
||||
if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = true;
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t));
|
||||
|
||||
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = FALSE;
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = false;
|
||||
} else {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = TRUE;
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = true;
|
||||
}
|
||||
|
||||
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) {
|
||||
@@ -882,7 +882,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = calloc(1, sizeof(long));
|
||||
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = eMTCconfig->prach_HoppingOffset_r13;
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = FALSE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
|
||||
/** PCCH CONFIG V1310 */
|
||||
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = true;
|
||||
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
|
||||
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
|
||||
|
||||
@@ -1220,7 +1220,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
|
||||
|
||||
/** SIB2 FREQ HOPPING PARAMETERS R13 */
|
||||
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = TRUE;
|
||||
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = true;
|
||||
|
||||
char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16];
|
||||
sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13);
|
||||
|
||||
@@ -127,7 +127,7 @@ int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti) {
|
||||
|
||||
/* get the (active) UE with RNTI i */
|
||||
for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
|
||||
if (RC.mac[mod_id]->UE_info.active[n] == TRUE
|
||||
if (RC.mac[mod_id]->UE_info.active[n] == true
|
||||
&& rnti == UE_RNTI(mod_id, n)) {
|
||||
return n;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ int flexran_get_mac_ue_id(mid_t mod_id, int i) {
|
||||
|
||||
/* get the (i+1)'th active UE */
|
||||
for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
|
||||
if (RC.mac[mod_id]->UE_info.active[n] == TRUE) {
|
||||
if (RC.mac[mod_id]->UE_info.active[n] == true) {
|
||||
if (i == 0)
|
||||
return n;
|
||||
|
||||
@@ -580,7 +580,7 @@ uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id) {
|
||||
Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id) {
|
||||
if (!phy_is_present(mod_id, cc_id)) return 0;
|
||||
|
||||
if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == TRUE)
|
||||
if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == true)
|
||||
return PROTOCOL__FLEX_QAM__FLEQ_MOD_64QAM;
|
||||
else
|
||||
return PROTOCOL__FLEX_QAM__FLEQ_MOD_16QAM;
|
||||
@@ -3585,7 +3585,7 @@ int flexran_set_new_plmn_id(mid_t mod_id, int CC_id, size_t n_plmn, Protocol__Fl
|
||||
int CC_id,
|
||||
BOOLEAN_t brOption,
|
||||
RrcConfigurationReq *configuration);
|
||||
carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, FALSE, conf);
|
||||
carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, false, conf);
|
||||
if (carrier->sizeof_SIB1 < 0)
|
||||
return -1337; /* SIB1 encoding failed, hell will probably break loose */
|
||||
|
||||
|
||||
+13
-13
@@ -32,18 +32,18 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
|
||||
abort();
|
||||
}
|
||||
|
||||
boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
|
||||
const srb_flag_t srb_flag,
|
||||
const rb_id_t rb_id,
|
||||
const mui_t mui,
|
||||
const confirm_t confirm,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char *const sdu_buffer,
|
||||
const pdcp_transmission_mode_t pt_mode,
|
||||
const uint32_t *sourceL2Id,
|
||||
const uint32_t *destinationL2Id,
|
||||
const uint8_t qfi,
|
||||
const boolean_t rqi,
|
||||
const int pdusession_id) {
|
||||
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
||||
const srb_flag_t srb_flag,
|
||||
const rb_id_t rb_id,
|
||||
const mui_t mui,
|
||||
const confirm_t confirm,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char *const sdu_buffer,
|
||||
const pdcp_transmission_mode_t pt_mode,
|
||||
const uint32_t *sourceL2Id,
|
||||
const uint32_t *destinationL2Id,
|
||||
const uint8_t qfi,
|
||||
const bool rqi,
|
||||
const int pdusession_id) {
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -363,13 +363,6 @@
|
||||
# error "You are compiling f1ap with the wrong version of ASN1C"
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#define F1AP_UE_ID_FMT "0x%06"PRIX32
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
@@ -509,7 +509,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
|
||||
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
|
||||
rlc_op_status_t rlc_status;
|
||||
boolean_t ret = TRUE;
|
||||
bool ret = true;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
|
||||
|
||||
@@ -539,27 +539,27 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
switch (rlc_status) {
|
||||
case RLC_OP_STATUS_OK:
|
||||
//LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
|
||||
ret=TRUE;
|
||||
ret=true;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_BAD_PARAMETER:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
|
||||
ret= FALSE;
|
||||
ret= false;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_INTERNAL_ERROR:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
|
||||
ret= FALSE;
|
||||
ret= false;
|
||||
break;
|
||||
|
||||
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
|
||||
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
|
||||
ret= FALSE;
|
||||
ret= false;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
|
||||
ret= FALSE;
|
||||
ret= false;
|
||||
break;
|
||||
} // switch case
|
||||
|
||||
@@ -667,9 +667,9 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
|
||||
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]);
|
||||
|
||||
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
|
||||
UE_scheduling_control->cdrx_waiting_ack = FALSE;
|
||||
UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received
|
||||
if (UE_scheduling_control->cdrx_waiting_ack == true) {
|
||||
UE_scheduling_control->cdrx_waiting_ack = false;
|
||||
UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration Complete is received
|
||||
LOG_I(F1AP, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -42,16 +42,16 @@
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include <openair3/ocp-gtpu/gtp_itf.h>
|
||||
|
||||
boolean_t lteDURecvCb( protocol_ctxt_t *ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
const confirm_t confirmP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
unsigned char *const sdu_buffer_pP,
|
||||
const pdcp_transmission_mode_t modeP,
|
||||
const uint32_t *sourceL2Id,
|
||||
const uint32_t *destinationL2Id) {
|
||||
bool lteDURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
const confirm_t confirmP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
unsigned char *const sdu_buffer_pP,
|
||||
const pdcp_transmission_mode_t modeP,
|
||||
const uint32_t *sourceL2Id,
|
||||
const uint32_t *destinationL2Id) {
|
||||
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
|
||||
mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
|
||||
memcpy(sdu->data, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
@@ -704,7 +704,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
|
||||
LOG_E(F1AP,"Not found rnti: %x\n", rnti);
|
||||
} else {
|
||||
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
|
||||
if (RC.mac[instance]->UE_info.active[n] == TRUE
|
||||
if (RC.mac[instance]->UE_info.active[n] == true
|
||||
&& rnti == UE_RNTI(instance, n)) {
|
||||
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
|
||||
break;
|
||||
@@ -856,7 +856,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
|
||||
if(RC.rrc && RC.rrc[instance]->node_type == ngran_eNB_DU){
|
||||
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
|
||||
if (RC.mac[instance]->UE_info.active[n] == TRUE
|
||||
if (RC.mac[instance]->UE_info.active[n] == true
|
||||
&& rnti == UE_RNTI(instance, n)) {
|
||||
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
|
||||
break;
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#define CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY "ulsch_max_frame_inactivity"
|
||||
#define CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10 "pusch_TargetSNRx10"
|
||||
#define CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10 "pucch_TargetSNRx10"
|
||||
#define CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD "ul_prbblack_SNR_threshold"
|
||||
#define CONFIG_STRING_MACRLC_PUCCHFAILURETHRES "pucch_FailureThres"
|
||||
#define CONFIG_STRING_MACRLC_PUSCHFAILURETHRES "pusch_FailureThres"
|
||||
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER "dl_bler_target_upper"
|
||||
@@ -96,6 +97,7 @@
|
||||
{CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY, NULL, 0, uptr:NULL, defintval:10, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD, "SNR threshold to decide whether a PRB will be blacklisted or not", 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \
|
||||
@@ -128,17 +130,18 @@
|
||||
#define MACRLC_ULSCH_MAX_FRAME_INACTIVITY 17
|
||||
#define MACRLC_PUSCHTARGETSNRX10_IDX 18
|
||||
#define MACRLC_PUCCHTARGETSNRX10_IDX 19
|
||||
#define MACRLC_PUCCHFAILURETHRES_IDX 20
|
||||
#define MACRLC_PUSCHFAILURETHRES_IDX 21
|
||||
#define MACRLC_DL_BLER_TARGET_UPPER_IDX 22
|
||||
#define MACRLC_DL_BLER_TARGET_LOWER_IDX 23
|
||||
#define MACRLC_DL_MAX_MCS_IDX 24
|
||||
#define MACRLC_UL_BLER_TARGET_UPPER_IDX 25
|
||||
#define MACRLC_UL_BLER_TARGET_LOWER_IDX 26
|
||||
#define MACRLC_UL_MAX_MCS_IDX 27
|
||||
#define MACRLC_HARQ_ROUND_MAX_IDX 28
|
||||
#define MACRLC_MIN_GRANT_PRB_IDX 29
|
||||
#define MACRLC_MIN_GRANT_MCS_IDX 30
|
||||
#define MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX 20
|
||||
#define MACRLC_PUCCHFAILURETHRES_IDX 21
|
||||
#define MACRLC_PUSCHFAILURETHRES_IDX 22
|
||||
#define MACRLC_DL_BLER_TARGET_UPPER_IDX 23
|
||||
#define MACRLC_DL_BLER_TARGET_LOWER_IDX 24
|
||||
#define MACRLC_DL_MAX_MCS_IDX 25
|
||||
#define MACRLC_UL_BLER_TARGET_UPPER_IDX 26
|
||||
#define MACRLC_UL_BLER_TARGET_LOWER_IDX 27
|
||||
#define MACRLC_UL_MAX_MCS_IDX 28
|
||||
#define MACRLC_HARQ_ROUND_MAX_IDX 29
|
||||
#define MACRLC_MIN_GRANT_PRB_IDX 30
|
||||
#define MACRLC_MIN_GRANT_MCS_IDX 31
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
@@ -831,6 +831,7 @@ void RCconfig_nr_macrlc() {
|
||||
RC.nb_nr_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
|
||||
RC.nrmac[j]->pusch_target_snrx10 = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCHTARGETSNRX10_IDX].iptr);
|
||||
RC.nrmac[j]->pucch_target_snrx10 = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHTARGETSNRX10_IDX].iptr);
|
||||
RC.nrmac[j]->ul_prbblack_SNR_threshold = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX].iptr);
|
||||
RC.nrmac[j]->pucch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCHFAILURETHRES_IDX].iptr);
|
||||
RC.nrmac[j]->pusch_failure_thres = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCHFAILURETHRES_IDX].iptr);
|
||||
|
||||
|
||||
@@ -1104,7 +1104,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
|
||||
|
||||
/* Get struct to modify */
|
||||
UE_scheduling_control = &(UE_info_mac->UE_sched_ctrl[UE_id]);
|
||||
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error
|
||||
UE_scheduling_control->cdrx_configured = false; // will be set to true when no error
|
||||
|
||||
/* Check drx_Configuration */
|
||||
if (drx_Configuration == NULL) {
|
||||
@@ -1119,9 +1119,9 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
|
||||
}
|
||||
|
||||
/* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */
|
||||
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when receiving RRC Reconfiguration Complete
|
||||
UE_scheduling_control->cdrx_waiting_ack = TRUE; // waiting for RRC Reconfiguration Complete message
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
UE_scheduling_control->cdrx_configured = false; // will be set to true when receiving RRC Reconfiguration Complete
|
||||
UE_scheduling_control->cdrx_waiting_ack = true; // waiting for RRC Reconfiguration Complete message
|
||||
UE_scheduling_control->in_active_time = false;
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
UE_scheduling_control->on_duration_timer = 0;
|
||||
struct LTE_DRX_Config__setup *choiceSetup = &drx_Configuration->choice.setup;
|
||||
@@ -1297,13 +1297,13 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
|
||||
}
|
||||
|
||||
if (choiceSetup->shortDRX == NULL) {
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_short_drx_cycle = false;
|
||||
UE_scheduling_control->drx_shortCycle_timer_value = 0;
|
||||
UE_scheduling_control->short_drx_cycle_duration = 0;
|
||||
UE_scheduling_control->drx_shortCycle_timer = 0;
|
||||
UE_scheduling_control->drx_shortCycle_timer_thres = -1;
|
||||
} else {
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_short_drx_cycle = false;
|
||||
UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) choiceSetup->shortDRX->drxShortCycleTimer;
|
||||
|
||||
switch (choiceSetup->shortDRX->shortDRX_Cycle) {
|
||||
@@ -1380,7 +1380,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
|
||||
UE_scheduling_control->drx_shortCycle_timer_thres = UE_scheduling_control->drx_shortCycle_timer_value * UE_scheduling_control->short_drx_cycle_duration;
|
||||
}
|
||||
|
||||
UE_scheduling_control->in_long_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_long_drx_cycle = false;
|
||||
UE_scheduling_control->drx_longCycle_timer = 0;
|
||||
|
||||
switch (choiceSetup->longDRX_CycleStartOffset.present) {
|
||||
|
||||
@@ -243,7 +243,6 @@ typedef struct {
|
||||
// -1:No UE in list
|
||||
int tail;
|
||||
int num_UEs;
|
||||
//boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
|
||||
|
||||
} UE_list_NB_IoT_t;
|
||||
|
||||
@@ -403,7 +402,7 @@ typedef struct schedule_result{
|
||||
// pointer to DCI
|
||||
void *DCI_pdu;
|
||||
// when all the procedure related to this DCI, enable this flag
|
||||
boolean_t DCI_release;
|
||||
bool DCI_release;
|
||||
// Indicate the channel which to transmit
|
||||
channel_NB_IoT_t channel;
|
||||
// rnti
|
||||
@@ -452,7 +451,7 @@ typedef enum ce_level_e{
|
||||
/*! \brief eNB template for the Random access information */
|
||||
typedef struct RA_TEMPLATE_NB_IoT_s{
|
||||
|
||||
boolean_t active;
|
||||
bool active;
|
||||
uint32_t msg3_retransmit_count;
|
||||
uint32_t msg4_retransmit_count;
|
||||
uint16_t ta;
|
||||
@@ -461,8 +460,8 @@ typedef struct RA_TEMPLATE_NB_IoT_s{
|
||||
rnti_t ue_rnti;
|
||||
rnti_t ra_rnti;
|
||||
struct RA_TEMPLATE_NB_IoT_s *next, *prev;
|
||||
boolean_t wait_msg4_ack;
|
||||
boolean_t wait_msg3_ack;
|
||||
bool wait_msg4_ack;
|
||||
bool wait_msg3_ack;
|
||||
uint8_t rar_buffer[7];
|
||||
|
||||
} RA_TEMPLATE_NB_IoT;
|
||||
@@ -530,7 +529,7 @@ typedef struct {
|
||||
uint32_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
||||
uint32_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
||||
uint32_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
|
||||
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||
} mac_rlc_status_resp_NB_IoT_t;
|
||||
|
||||
// global variables
|
||||
|
||||
@@ -135,7 +135,7 @@ void schedule_SRS(module_id_t module_idP,
|
||||
UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
|
||||
|
||||
/* Test if Active Time not running since 6+ subframes */
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE && UE_scheduling_control->in_active_time == FALSE) {
|
||||
if (UE_scheduling_control->cdrx_configured == true && UE_scheduling_control->in_active_time == false) {
|
||||
/*
|
||||
* TODO: 6+ subframes condition not checked here
|
||||
*/
|
||||
@@ -204,7 +204,7 @@ void schedule_CSI(module_id_t module_idP,
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
|
||||
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
|
||||
if (UE_info->active[UE_id] == FALSE) {
|
||||
if (UE_info->active[UE_id] == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -223,9 +223,9 @@ void schedule_CSI(module_id_t module_idP,
|
||||
*/
|
||||
UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
if (UE_scheduling_control->cdrx_configured == true) {
|
||||
/* Test if CQI masking activated */
|
||||
if (UE_scheduling_control->cqi_mask_boolean == TRUE) {
|
||||
if (UE_scheduling_control->cqi_mask_boolean == true) {
|
||||
// CQI masking => test if onDurationTime not running since 6+ subframe
|
||||
if (UE_scheduling_control->on_duration_timer == 0) {
|
||||
/*
|
||||
@@ -234,7 +234,7 @@ void schedule_CSI(module_id_t module_idP,
|
||||
continue;
|
||||
}
|
||||
} else { // No CQI masking => test if Active Time not running since 6+ subframe
|
||||
if (UE_scheduling_control->in_active_time == FALSE) {
|
||||
if (UE_scheduling_control->in_active_time == false) {
|
||||
/*
|
||||
* TODO: 6+ subframes condition not checked here
|
||||
*/
|
||||
@@ -677,8 +677,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* Set and increment CDRX related timers */
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
boolean_t harq_active_time_condition = FALSE;
|
||||
if (UE_scheduling_control->cdrx_configured == true) {
|
||||
bool harq_active_time_condition = false;
|
||||
UE_TEMPLATE *UE_template = NULL;
|
||||
unsigned long active_time_condition = 0; // variable used only for tracing purpose
|
||||
|
||||
@@ -721,7 +721,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id]++;
|
||||
|
||||
if (UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] > 5) {
|
||||
harq_active_time_condition = TRUE;
|
||||
harq_active_time_condition = true;
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] = 0;
|
||||
active_time_condition = 5; // for tracing purpose
|
||||
}
|
||||
@@ -747,24 +747,24 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
/* When timer expires switch into short or long DRX cycle */
|
||||
if (UE_scheduling_control->drx_shortCycle_timer_thres > 0) {
|
||||
UE_scheduling_control->in_short_drx_cycle = TRUE;
|
||||
UE_scheduling_control->in_short_drx_cycle = true;
|
||||
UE_scheduling_control->drx_shortCycle_timer = 0;
|
||||
UE_scheduling_control->in_long_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_long_drx_cycle = false;
|
||||
} else {
|
||||
UE_scheduling_control->in_long_drx_cycle = TRUE;
|
||||
UE_scheduling_control->in_long_drx_cycle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Short DRX Cycle */
|
||||
if (UE_scheduling_control->in_short_drx_cycle == TRUE) {
|
||||
if (UE_scheduling_control->in_short_drx_cycle == true) {
|
||||
UE_scheduling_control->drx_shortCycle_timer++;
|
||||
|
||||
/* When the Short DRX cycles are over, switch to long DRX cycle */
|
||||
if (UE_scheduling_control->drx_shortCycle_timer > UE_scheduling_control->drx_shortCycle_timer_thres) {
|
||||
UE_scheduling_control->drx_shortCycle_timer = 0;
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_long_drx_cycle = TRUE;
|
||||
UE_scheduling_control->in_short_drx_cycle = false;
|
||||
UE_scheduling_control->in_long_drx_cycle = true;
|
||||
UE_scheduling_control->drx_longCycle_timer = 0;
|
||||
}
|
||||
} else {
|
||||
@@ -772,7 +772,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* Long DRX Cycle */
|
||||
if (UE_scheduling_control->in_long_drx_cycle == TRUE) {
|
||||
if (UE_scheduling_control->in_long_drx_cycle == true) {
|
||||
UE_scheduling_control->drx_longCycle_timer++;
|
||||
|
||||
if (UE_scheduling_control->drx_longCycle_timer > UE_scheduling_control->drx_longCycle_timer_thres) {
|
||||
@@ -783,18 +783,18 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* Check for error cases */
|
||||
if ((UE_scheduling_control->in_short_drx_cycle == TRUE) && (UE_scheduling_control->in_long_drx_cycle == TRUE)) {
|
||||
if ((UE_scheduling_control->in_short_drx_cycle == true) && (UE_scheduling_control->in_long_drx_cycle == true)) {
|
||||
LOG_E(MAC, "Error in C-DRX: UE id %d is in both short and long DRX cycle. Should not happen. Back it to long cycle only\n", UE_id);
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->in_short_drx_cycle = false;
|
||||
}
|
||||
|
||||
/* Condition to start On Duration Timer */
|
||||
if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (UE_scheduling_control->in_short_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
|
||||
(UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
}
|
||||
} else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
} else if (UE_scheduling_control->in_long_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
|
||||
(UE_scheduling_control->drx_start_offset)) {
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
@@ -811,7 +811,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
/* (a)synchronous HARQ processes handling for Active Time */
|
||||
for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
|
||||
if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
|
||||
harq_active_time_condition = TRUE;
|
||||
harq_active_time_condition = true;
|
||||
active_time_condition = 2; // for tracing purpose
|
||||
break;
|
||||
}
|
||||
@@ -822,9 +822,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->drx_inactivity_timer > 1 ||
|
||||
harq_active_time_condition ||
|
||||
UE_template->ul_SR > 0) {
|
||||
UE_scheduling_control->in_active_time = TRUE;
|
||||
UE_scheduling_control->in_active_time = true;
|
||||
} else {
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
UE_scheduling_control->in_active_time = false;
|
||||
}
|
||||
|
||||
/* BEGIN VCD */
|
||||
|
||||
@@ -1225,7 +1225,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:IDLE\n", module_idP, frameP, subframeP);
|
||||
UE_id = find_UE_id(module_idP, ra->rnti);
|
||||
DevAssert(UE_id != -1);
|
||||
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = TRUE;
|
||||
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = true;
|
||||
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].pusch_repetition_levels=ra->pusch_repetition_levels;
|
||||
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
|
||||
}
|
||||
|
||||
@@ -2075,7 +2075,7 @@ schedule_PCH(module_id_t module_idP,
|
||||
for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
ue_pf_po = &UE_PF_PO[CC_id][i];
|
||||
|
||||
if (ue_pf_po->enable_flag != TRUE) {
|
||||
if (ue_pf_po->enable_flag != true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ int last_ulsch_ue_id_volte[MAX_NUM_CCs] = {-1};
|
||||
uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
uint8_t dlsch_ue_select_tbl_in_use;
|
||||
uint8_t new_dlsch_ue_select_tbl_in_use;
|
||||
boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
#endif
|
||||
|
||||
@@ -125,7 +125,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
|
||||
UE_info_t *UE_info = &RC.mac[module_idP]->UE_info;
|
||||
|
||||
for (UE_id = 0; UE_id <NUMBER_OF_UE_MAX; UE_id++) {
|
||||
if (pre_scd_activeUE[UE_id] != TRUE)
|
||||
if (pre_scd_activeUE[UE_id] != true)
|
||||
continue;
|
||||
|
||||
// store dlsch buffer
|
||||
@@ -210,7 +210,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
DL_req = &eNB->DL_req[CC_id].dl_config_request_body;
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
if (UE_info->active[UE_id] == FALSE) {
|
||||
if (UE_info->active[UE_id] == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
break;
|
||||
}
|
||||
|
||||
if (UE_info->active[UE_id] == FALSE) {
|
||||
if (UE_info->active[UE_id] == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
break;
|
||||
}
|
||||
|
||||
if (UE_info->active[UE_id] == FALSE) {
|
||||
if (UE_info->active[UE_id] == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ static void dlsch_scheduler_pre_processor_reset_fairRR(
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
if (UE_info->active[UE_id] != TRUE)
|
||||
if (UE_info->active[UE_id] != true)
|
||||
continue;
|
||||
|
||||
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti);
|
||||
@@ -755,7 +755,7 @@ static void assign_rbs_required_fairRR(
|
||||
|
||||
// clear rb allocations across all CC_id
|
||||
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
|
||||
if (UE_info->active[UE_id] != TRUE)
|
||||
if (UE_info->active[UE_id] != true)
|
||||
continue;
|
||||
|
||||
pCCid = UE_PCCID(Mod_id, UE_id);
|
||||
@@ -945,7 +945,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
|
||||
min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id);
|
||||
|
||||
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
|
||||
if (UE_info->active[i] != TRUE)
|
||||
if (UE_info->active[i] != true)
|
||||
continue;
|
||||
|
||||
UE_id = i;
|
||||
@@ -2241,7 +2241,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
|
||||
// UE round >0
|
||||
for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
|
||||
if (UE_info->active[UE_id] == FALSE)
|
||||
if (UE_info->active[UE_id] == false)
|
||||
continue;
|
||||
|
||||
rnti = UE_RNTI(module_idP,UE_id);
|
||||
@@ -2251,7 +2251,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
|
||||
CC_id = UE_PCCID(module_idP,UE_id);
|
||||
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == false)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
@@ -2401,7 +2401,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
}
|
||||
|
||||
for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
|
||||
if (UE_info->active[UE_id] == FALSE)
|
||||
if (UE_info->active[UE_id] == false)
|
||||
continue;
|
||||
|
||||
rnti = UE_RNTI(module_idP,UE_id);
|
||||
@@ -2414,7 +2414,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
if (UE_id > last_ulsch_ue_id[CC_id])
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == false)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|
||||
@@ -1989,7 +1989,7 @@ find_UE_id(module_id_t mod_idP,
|
||||
return -1;
|
||||
|
||||
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
|
||||
if (UE_info->active[UE_id] == TRUE) {
|
||||
if (UE_info->active[UE_id] == true) {
|
||||
int CC_id = UE_PCCID(mod_idP, UE_id);
|
||||
if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) {
|
||||
return UE_id;
|
||||
@@ -2063,7 +2063,7 @@ UE_RNTI(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
boolean_t
|
||||
bool
|
||||
is_UE_active(module_id_t mod_idP,
|
||||
int ue_idP)
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -2187,20 +2187,20 @@ add_new_ue(module_id_t mod_idP,
|
||||
UE_info->num_UEs);
|
||||
|
||||
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
if (UE_info->active[i] == TRUE)
|
||||
if (UE_info->active[i] == true)
|
||||
continue;
|
||||
|
||||
UE_id = i;
|
||||
memset(&UE_info->UE_template[cc_idP][UE_id], 0, sizeof(UE_TEMPLATE));
|
||||
UE_info->UE_template[cc_idP][UE_id].rnti = rntiP;
|
||||
UE_info->UE_template[cc_idP][UE_id].configured = FALSE;
|
||||
UE_info->UE_template[cc_idP][UE_id].configured = false;
|
||||
UE_info->numactiveCCs[UE_id] = 1;
|
||||
UE_info->numactiveULCCs[UE_id] = 1;
|
||||
UE_info->pCC_id[UE_id] = cc_idP;
|
||||
UE_info->ordered_CCids[0][UE_id] = cc_idP;
|
||||
UE_info->ordered_ULCCids[0][UE_id] = cc_idP;
|
||||
UE_info->num_UEs++;
|
||||
UE_info->active[UE_id] = TRUE;
|
||||
UE_info->active[UE_id] = true;
|
||||
add_ue_list(&UE_info->list, UE_id);
|
||||
dump_ue_list(&UE_info->list);
|
||||
pp_impl_param_t* dl = &RC.mac[mod_idP]->pre_processor_dl;
|
||||
@@ -2280,7 +2280,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
UE_id,
|
||||
pCC_id,
|
||||
rntiP);
|
||||
UE_info->active[UE_id] = FALSE;
|
||||
UE_info->active[UE_id] = false;
|
||||
UE_info->num_UEs--;
|
||||
|
||||
remove_ue_list(&UE_info->list, UE_id);
|
||||
@@ -3488,7 +3488,7 @@ has_ul_grant(module_id_t module_idP,
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
boolean_t
|
||||
bool
|
||||
CCE_allocation_infeasible(int module_idP,
|
||||
int CC_idP,
|
||||
int format_flag,
|
||||
@@ -3501,7 +3501,7 @@ CCE_allocation_infeasible(int module_idP,
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu = &DL_req->dl_config_pdu_list[DL_req->number_pdu];
|
||||
nfapi_hi_dci0_request_body_t *HI_DCI0_req = &RC.mac[module_idP]->HI_DCI0_req[CC_idP][subframe].hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci + HI_DCI0_req->number_of_hi];
|
||||
boolean_t res = TRUE;
|
||||
bool res = true;
|
||||
|
||||
if (format_flag != 2) { // DL DCI
|
||||
if (DL_req->number_pdu == MAX_NUM_DL_PDU) {
|
||||
@@ -3517,7 +3517,7 @@ CCE_allocation_infeasible(int module_idP,
|
||||
subframe, format_flag, rnti, aggregation);
|
||||
|
||||
if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
|
||||
res = FALSE;
|
||||
res = false;
|
||||
|
||||
DL_req->number_pdu--;
|
||||
}
|
||||
@@ -3532,7 +3532,7 @@ CCE_allocation_infeasible(int module_idP,
|
||||
HI_DCI0_req->number_of_dci++;
|
||||
|
||||
if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
|
||||
res = FALSE;
|
||||
res = false;
|
||||
|
||||
HI_DCI0_req->number_of_dci--;
|
||||
}
|
||||
@@ -5029,7 +5029,7 @@ SR_indication(module_id_t mod_idP,
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_ctrl = &(UE_info->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == true) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer > 0) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
|
||||
LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d. \
|
||||
@@ -5052,7 +5052,7 @@ SR_indication(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
UE_info->UE_template[cc_idP][UE_id].ul_SR = 1;
|
||||
UE_info->UE_template[cc_idP][UE_id].ul_active = TRUE;
|
||||
UE_info->UE_template[cc_idP][UE_id].ul_active = true;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 0);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
}
|
||||
|
||||
/* CDRX UL HARQ timers */
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
if (UE_scheduling_control->cdrx_configured == true) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
@@ -1003,7 +1003,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
|
||||
/* CDRX UL HARQ timers */
|
||||
if (UE_id != -1) {
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
if (UE_scheduling_control->cdrx_configured == true) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
@@ -1447,7 +1447,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
continue;
|
||||
|
||||
// don't schedule if Msg5 is not received yet
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE) {
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == false) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] frame %d, subframe %d, UE %d: not configured, skipping "
|
||||
"UE scheduling \n",
|
||||
@@ -2033,7 +2033,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* Don't schedule if Msg4 is not received yet */
|
||||
if (UE_template->configured == FALSE) {
|
||||
if (UE_template->configured == false) {
|
||||
LOG_D(MAC,"[eNB %d] frame %d subframe %d, UE %d: not configured, skipping UE scheduling \n",
|
||||
module_idP,
|
||||
frameP,
|
||||
|
||||
+17
-17
@@ -811,9 +811,9 @@ typedef struct {
|
||||
/// TBS from last UL scheduling
|
||||
int TBS_UL[8];
|
||||
/// Flag to indicate UL has been scheduled at least once
|
||||
boolean_t ul_active;
|
||||
bool ul_active;
|
||||
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
|
||||
boolean_t configured;
|
||||
bool configured;
|
||||
|
||||
/// MCS from last scheduling
|
||||
uint8_t mcs[8];
|
||||
@@ -1026,16 +1026,16 @@ typedef struct {
|
||||
|
||||
/* C-DRX related timers */
|
||||
/* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
|
||||
/// is TRUE if the cqi mask feature is activated by RRC configuration
|
||||
boolean_t cqi_mask_boolean;
|
||||
/// is TRUE if the following drx parameters are configured for UE
|
||||
boolean_t cdrx_configured;
|
||||
/// is true if the cqi mask feature is activated by RRC configuration
|
||||
bool cqi_mask_boolean;
|
||||
/// is true if the following drx parameters are configured for UE
|
||||
bool cdrx_configured;
|
||||
/*
|
||||
* if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
|
||||
* if true, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
|
||||
* the activation. This is needed, during the RRC configuration process, when the context is
|
||||
* configured on the eNB side, but not yet on the UE side...
|
||||
*/
|
||||
boolean_t cdrx_waiting_ack;
|
||||
bool cdrx_waiting_ack;
|
||||
/*
|
||||
* Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes).
|
||||
* When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
|
||||
@@ -1043,16 +1043,16 @@ typedef struct {
|
||||
* create a lost in timers synchronization.
|
||||
*/
|
||||
uint8_t dci0_ongoing_timer;
|
||||
/// is TRUE if the UE is in "Active Time", hence listening to PDCCH
|
||||
boolean_t in_active_time;
|
||||
/// is true if the UE is in "Active Time", hence listening to PDCCH
|
||||
bool in_active_time;
|
||||
/// OnDurationTimer
|
||||
uint16_t on_duration_timer;
|
||||
uint16_t on_duration_timer_thres;
|
||||
/// drx-InactivityTimer
|
||||
uint16_t drx_inactivity_timer;
|
||||
uint16_t drx_inactivity_timer_thres;
|
||||
/// is TRUE if UE is currently in short DRX cycle
|
||||
boolean_t in_short_drx_cycle;
|
||||
/// is true if UE is currently in short DRX cycle
|
||||
bool in_short_drx_cycle;
|
||||
/// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
|
||||
uint8_t drx_shortCycle_timer_value;
|
||||
/// shortDRX-Cycle (duration of one short DRX cycle)
|
||||
@@ -1060,8 +1060,8 @@ typedef struct {
|
||||
/// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
|
||||
uint16_t drx_shortCycle_timer;
|
||||
uint16_t drx_shortCycle_timer_thres;
|
||||
/// is TRUE if UE is currently in long DRX cycle
|
||||
boolean_t in_long_drx_cycle;
|
||||
/// is true if UE is currently in long DRX cycle
|
||||
bool in_long_drx_cycle;
|
||||
/// longDRX-CycleStartOffset (long DRX cycle timer)
|
||||
uint16_t drx_longCycle_timer;
|
||||
uint16_t drx_longCycle_timer_thres;
|
||||
@@ -1183,7 +1183,7 @@ typedef struct {
|
||||
UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB];
|
||||
UE_list_t list;
|
||||
int num_UEs;
|
||||
boolean_t active[MAX_MOBILES_PER_ENB];
|
||||
bool active[MAX_MOBILES_PER_ENB];
|
||||
} UE_info_t;
|
||||
|
||||
/*! \brief deleting control information*/
|
||||
@@ -1191,9 +1191,9 @@ typedef struct {
|
||||
///rnti of UE
|
||||
rnti_t rnti;
|
||||
///remove UE context flag
|
||||
boolean_t removeContextFlg;
|
||||
bool removeContextFlg;
|
||||
///remove RA flag
|
||||
boolean_t raFlag;
|
||||
bool raFlag;
|
||||
} UE_free_ctrl_t;
|
||||
/*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
|
||||
typedef struct {
|
||||
|
||||
@@ -71,7 +71,7 @@ extern rb_id_t mbms_rab_id;
|
||||
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
extern uint8_t dlsch_ue_select_tbl_in_use;
|
||||
extern uint8_t new_dlsch_ue_select_tbl_in_use;
|
||||
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ int find_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP);
|
||||
rnti_t UE_RNTI(module_id_t module_idP, int UE_id);
|
||||
int UE_PCCID(module_id_t module_idP, int UE_id);
|
||||
uint8_t find_active_UEs(module_id_t module_idP);
|
||||
boolean_t is_UE_active(module_id_t module_idP, int UE_id);
|
||||
bool is_UE_active(module_id_t module_idP, int UE_id);
|
||||
uint8_t get_aggregation(uint8_t bw_index, uint8_t cqi, uint8_t dci_fmt);
|
||||
|
||||
int8_t find_active_UEs_with_traffic(module_id_t module_idP);
|
||||
@@ -416,11 +416,11 @@ int get_nCCE_offset(int *CCE_table,
|
||||
|
||||
int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
|
||||
|
||||
boolean_t CCE_allocation_infeasible(int module_idP,
|
||||
int CC_idP,
|
||||
int common_flag,
|
||||
int subframe,
|
||||
int aggregation, int rnti);
|
||||
bool CCE_allocation_infeasible(int module_idP,
|
||||
int CC_idP,
|
||||
int common_flag,
|
||||
int subframe,
|
||||
int aggregation, int rnti);
|
||||
/* tries to allocate a CCE. If it succeeds, reserves NFAPI DCI and DLSCH config */
|
||||
int CCE_try_allocate_dlsch(int module_id,
|
||||
int CC_id,
|
||||
@@ -741,13 +741,12 @@ BSR_SHORT *get_bsr_short(module_id_t module_idP, uint8_t bsr_len);
|
||||
*/
|
||||
BSR_LONG *get_bsr_long(module_id_t module_idP, uint8_t bsr_len);
|
||||
|
||||
/*! \fn boolean_t update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
|
||||
/*! \fn bool update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
|
||||
\brief get the rlc stats and update the bsr level for each lcid
|
||||
\param[in] Mod_id instance of the UE
|
||||
\param[in] frame Frame index
|
||||
*/
|
||||
boolean_t update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP, eNB_index_t eNB_index);
|
||||
bool update_bsr(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, eNB_index_t eNB_index);
|
||||
|
||||
/*! \fn locate_BsrIndexByBufferSize (int *table, int size, int value)
|
||||
\brief locate the BSR level in the table as defined in 36.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
|
||||
|
||||
@@ -638,7 +638,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
LOG_E(MAC, "UE %d has RNTI NOT_A_RNTI!\n", UE_id);
|
||||
continue;
|
||||
}
|
||||
if (UE_info->active[UE_id] != TRUE) {
|
||||
if (UE_info->active[UE_id] != true) {
|
||||
LOG_E(MAC, "UE %d RNTI %x is NOT active!\n", UE_id, rnti);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2325,8 +2325,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t bsr_len = 0, bsr_ce_len = 0, bsr_header_len = 0;
|
||||
uint8_t phr_header_len = 0, phr_ce_len = 0, phr_len = 0;
|
||||
uint8_t lcid = 0, lcid_rlc_pdu_count = 0;
|
||||
boolean_t is_lcid_processed = FALSE;
|
||||
boolean_t is_all_lcid_processed = FALSE;
|
||||
bool is_lcid_processed = false;
|
||||
bool is_all_lcid_processed = false;
|
||||
uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
uint8_t sdu_lcids[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
uint8_t payload_offset = 0, num_sdus = 0;
|
||||
@@ -2444,11 +2444,11 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
// Check for DCCH first
|
||||
// TO DO: Multiplex in the order defined by the logical channel prioritization
|
||||
for (lcid = DCCH;
|
||||
(lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE); lcid++) {
|
||||
(lcid < MAX_NUM_LCID) && (is_all_lcid_processed == false); lcid++) {
|
||||
if (UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] ==
|
||||
LCID_NOT_EMPTY) {
|
||||
lcid_rlc_pdu_count = 0;
|
||||
is_lcid_processed = FALSE;
|
||||
is_lcid_processed = false;
|
||||
lcid_buffer_occupancy_old =
|
||||
mac_rlc_get_buffer_occupancy_ind(module_idP,
|
||||
UE_mac_inst[module_idP].
|
||||
@@ -2536,8 +2536,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
//No more remaining TBS after this PDU
|
||||
//exit the function
|
||||
rlc_pdu_header_len_last = 1;
|
||||
is_lcid_processed = TRUE;
|
||||
is_all_lcid_processed = TRUE;
|
||||
is_lcid_processed = true;
|
||||
is_all_lcid_processed = true;
|
||||
} else {
|
||||
rlc_pdu_header_len_last =
|
||||
(sdu_lengths[num_sdus] > 128) ? 3 : 2;
|
||||
@@ -2547,8 +2547,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
(bsr_len + phr_len + total_rlc_pdu_header_len +
|
||||
rlc_pdu_header_len_last + sdu_length_total)) {
|
||||
rlc_pdu_header_len_last = 1;
|
||||
is_lcid_processed = TRUE;
|
||||
is_all_lcid_processed = TRUE;
|
||||
is_lcid_processed = true;
|
||||
is_all_lcid_processed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2559,7 +2559,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
lcid_rlc_pdu_count++;
|
||||
} else {
|
||||
/* avoid infinite loop ... */
|
||||
is_lcid_processed = TRUE;
|
||||
is_lcid_processed = true;
|
||||
}
|
||||
|
||||
/* Get updated BO after multiplexing this PDU */
|
||||
@@ -3164,7 +3164,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
}
|
||||
|
||||
//Check whether Regular BSR is triggered
|
||||
if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == TRUE) {
|
||||
if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == true) {
|
||||
// call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures
|
||||
// outlined in Sections 5.4.4 an 5.4.5 of 36.321
|
||||
UE_mac_inst[module_idP].scheduling_info.SR_pending = 1;
|
||||
@@ -3251,11 +3251,11 @@ ue_scheduler(const module_id_t module_idP,
|
||||
// to be improved
|
||||
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframeP, eNB_index_t eNB_index) {
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
boolean_t bsr_regular_triggered = FALSE;
|
||||
bool bsr_regular_triggered = false;
|
||||
uint8_t lcid;
|
||||
uint8_t lcgid;
|
||||
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
|
||||
@@ -3352,7 +3352,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
(lcgid_buffer_remain
|
||||
[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]] ==
|
||||
0)) {
|
||||
bsr_regular_triggered = TRUE;
|
||||
bsr_regular_triggered = true;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d subframe %d\n",
|
||||
module_idP, lcid,
|
||||
@@ -3364,7 +3364,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
// Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
|
||||
if (UE_mac_inst[module_idP].scheduling_info.retxBSR_SF == 0) {
|
||||
bsr_regular_triggered = TRUE;
|
||||
bsr_regular_triggered = true;
|
||||
|
||||
if ((UE_mac_inst[module_idP].BSR_reporting_active &
|
||||
BSR_TRIGGER_REGULAR) == 0) {
|
||||
|
||||
@@ -74,7 +74,7 @@ extern uint8_t rb_table[34];
|
||||
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
extern uint8_t dlsch_ue_select_tbl_in_use;
|
||||
extern uint8_t new_dlsch_ue_select_tbl_in_use;
|
||||
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
|
||||
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
#endif*/
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ int nr_rrc_mac_config_req_ue_logicalChannelBearer(
|
||||
int cc_idP,
|
||||
uint8_t gNB_index,
|
||||
long logicalChannelIdentity,
|
||||
boolean_t status){
|
||||
bool status){
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
mac->logicalChannelBearer_exist[logicalChannelIdentity] = status;
|
||||
return 0;
|
||||
|
||||
@@ -415,7 +415,7 @@ typedef struct {
|
||||
uint8_t BSR_reporting_active;
|
||||
|
||||
/// LogicalChannelConfig has bearer.
|
||||
boolean_t logicalChannelBearer_exist[NR_MAX_NUM_LCID];
|
||||
bool logicalChannelBearer_exist[NR_MAX_NUM_LCID];
|
||||
NR_UE_SCHEDULING_INFO scheduling_info;
|
||||
|
||||
/// PHR
|
||||
@@ -546,7 +546,7 @@ typedef struct prach_association_pattern {
|
||||
|
||||
// SSB details
|
||||
typedef struct ssb_info {
|
||||
boolean_t transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
|
||||
bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
|
||||
prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index
|
||||
uint16_t nb_mapped_ro; // Total number of mapped ROs to this SSB index
|
||||
} ssb_info_t;
|
||||
|
||||
@@ -85,14 +85,12 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
|
||||
\param cc_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param long logicalChannelIdentity
|
||||
\param boolean_t status*/
|
||||
int nr_rrc_mac_config_req_ue_logicalChannelBearer(
|
||||
module_id_t module_id,
|
||||
int cc_idP,
|
||||
uint8_t gNB_index,
|
||||
long logicalChannelIdentity,
|
||||
boolean_t status
|
||||
);
|
||||
\param bool status*/
|
||||
int nr_rrc_mac_config_req_ue_logicalChannelBearer(module_id_t module_id,
|
||||
int cc_idP,
|
||||
uint8_t gNB_index,
|
||||
long logicalChannelIdentity,
|
||||
bool status);
|
||||
|
||||
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
|
||||
\param module_id module id
|
||||
@@ -154,14 +152,14 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response,
|
||||
*/
|
||||
int8_t nr_ue_get_SR(module_id_t module_idP, frame_t frameP, slot_t slotP);
|
||||
|
||||
/*! \fn boolean_t update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
|
||||
/*! \fn bool update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
|
||||
\brief get the rlc stats and update the bsr level for each lcid
|
||||
\param[in] Mod_id instance of the UE
|
||||
\param[in] frameP Frame index
|
||||
\param[in] slot slotP number
|
||||
\param[in] uint8_t gNB_index
|
||||
*/
|
||||
boolean_t nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
|
||||
bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
|
||||
|
||||
/*! \fn nr_locate_BsrIndexByBufferSize (int *table, int size, int value)
|
||||
\brief locate the BSR level in the table as defined in 38.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
|
||||
|
||||
@@ -325,7 +325,7 @@ void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_
|
||||
// =======================================
|
||||
|
||||
NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
|
||||
boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
|
||||
bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
|
||||
uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
|
||||
int total_preambles_per_ssb;
|
||||
uint8_t ssb_nb_in_ro;
|
||||
|
||||
@@ -2003,7 +2003,7 @@ int find_pucch_resource_set(NR_UE_MAC_INST_t *mac, int uci_size) {
|
||||
* processing slots of reception/transmission
|
||||
* gNB_id identifier
|
||||
*
|
||||
* RETURN : TRUE a valid resource has been found
|
||||
* RETURN : true a valid resource has been found
|
||||
*
|
||||
* DESCRIPTION : return tx harq process identifier for given transmission slot
|
||||
* TS 38.213 9.2.1 PUCCH Resource Sets
|
||||
@@ -2133,7 +2133,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
int number_harq_feedback = 0;
|
||||
uint32_t dai_current = 0;
|
||||
uint32_t dai_max = 0;
|
||||
bool two_transport_blocks = FALSE;
|
||||
bool two_transport_blocks = false;
|
||||
int number_of_code_word = 1;
|
||||
int U_DAI_c = 0;
|
||||
int N_m_c_rx = 0;
|
||||
@@ -2155,7 +2155,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
bwpd->pdsch_Config->choice.setup &&
|
||||
bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI &&
|
||||
bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI[0] == 2) {
|
||||
two_transport_blocks = TRUE;
|
||||
two_transport_blocks = true;
|
||||
number_of_code_word = 2;
|
||||
}
|
||||
|
||||
@@ -2255,7 +2255,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
* For a monitoring occasion of a PDCCH with DCI format 1_0 or DCI format 1_1 in at least one serving cell,
|
||||
* when a UE receives a PDSCH with one transport block and the value of higher layer parameter maxNrofCodeWordsScheduledByDCI is 2,
|
||||
* the HARQ-ACK response is associated with the first transport block and the UE generates a NACK for the second transport block
|
||||
* if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = FALSE) and generates HARQ-ACK value of ACK for the second
|
||||
* if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = false) and generates HARQ-ACK value of ACK for the second
|
||||
* transport block if spatial bundling is applied.
|
||||
*/
|
||||
|
||||
@@ -2266,7 +2266,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
ack_data[code_word][i] = 0; /* nack data transport block which has been missed */
|
||||
number_harq_feedback++;
|
||||
}
|
||||
if (two_transport_blocks == TRUE) {
|
||||
if (two_transport_blocks == true) {
|
||||
dai_total[code_word][i] = dai[code_word][i]; /* for a single cell, dai_total is the same as dai of first cell */
|
||||
}
|
||||
}
|
||||
@@ -2297,7 +2297,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
o_ACK = o_ACK | (ack_data[1][m] << O_bit_number_cw1);
|
||||
}
|
||||
|
||||
if (two_transport_blocks == TRUE) {
|
||||
if (two_transport_blocks == true) {
|
||||
O_bit_number_cw0 = (8 * j) + 2*(V_temp - 1);
|
||||
}
|
||||
else {
|
||||
@@ -2312,7 +2312,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||
j = j + 1;
|
||||
}
|
||||
|
||||
if (two_transport_blocks == TRUE) {
|
||||
if (two_transport_blocks == true) {
|
||||
O_ACK = 2 * ( 4 * j + V_temp2); /* for two transport blocks */
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -929,15 +929,23 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
|
||||
bool srs_scheduled = false;
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
|
||||
const NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id;
|
||||
|
||||
NR_SRS_Config_t *srs_config = NULL;
|
||||
if (mac->cg &&
|
||||
mac->cg->spCellConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP) {
|
||||
if (ul_bwp_id > 0 && mac->ULbwp[ul_bwp_id-1]) {
|
||||
if (mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated &&
|
||||
mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->srs_Config) {
|
||||
srs_config = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->srs_Config->choice.setup;
|
||||
}
|
||||
} else if (mac->cg &&
|
||||
mac->cg->spCellConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP) {
|
||||
srs_config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config->choice.setup;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!srs_config) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -965,7 +973,6 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
|
||||
continue;
|
||||
}
|
||||
|
||||
NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id;
|
||||
NR_BWP_t ubwp = ul_bwp_id > 0 && mac->ULbwp[ul_bwp_id-1] ?
|
||||
mac->ULbwp[ul_bwp_id-1]->bwp_Common->genericParameters :
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters;
|
||||
@@ -1248,7 +1255,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
}
|
||||
|
||||
//Check whether Regular BSR is triggered
|
||||
if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == TRUE) {
|
||||
if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == true) {
|
||||
// call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures
|
||||
// outlined in Sections 5.4.4 an 5.4.5 of 38.321
|
||||
mac->scheduling_info.SR_pending = 1;
|
||||
@@ -1261,10 +1268,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index) {
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
boolean_t bsr_regular_triggered = FALSE;
|
||||
bool bsr_regular_triggered = false;
|
||||
uint8_t lcid;
|
||||
uint8_t lcgid;
|
||||
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
|
||||
@@ -1357,7 +1364,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
|
||||
which belong to any LCG and for which data is already available for transmission
|
||||
*/
|
||||
{
|
||||
bsr_regular_triggered = TRUE;
|
||||
bsr_regular_triggered = true;
|
||||
LOG_D(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d slot %d\n",
|
||||
module_idP, lcid,
|
||||
mac->scheduling_info.LCGID[lcid],
|
||||
@@ -1368,7 +1375,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
|
||||
|
||||
// Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
|
||||
if (mac->scheduling_info.retxBSR_SF == 0) {
|
||||
bsr_regular_triggered = TRUE;
|
||||
bsr_regular_triggered = true;
|
||||
|
||||
if ((mac->BSR_reporting_active & NR_BSR_TRIGGER_REGULAR) == 0) {
|
||||
LOG_I(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered ReTxBSR Timer expiry at frame %d slot %d\n",
|
||||
@@ -1629,7 +1636,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
|
||||
int y2; // PRACH Configuration Index table additional variable used to compute the valid frame numbers
|
||||
uint8_t slot_shift_for_map;
|
||||
uint8_t map_shift;
|
||||
boolean_t even_slot_invalid;
|
||||
bool even_slot_invalid;
|
||||
int64_t s_map;
|
||||
uint8_t prach_conf_start_symbol; // Starting symbol of the PRACH occasions in the PRACH slot
|
||||
uint8_t N_t_slot; // Number of PRACH occasions in a 14-symbols PRACH slot
|
||||
@@ -1901,7 +1908,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) {
|
||||
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
|
||||
NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
|
||||
|
||||
boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
|
||||
bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
|
||||
uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
|
||||
uint16_t required_nb_of_prach_occasion; // Nb of RACH occasions required to map all the SSBs
|
||||
uint8_t required_nb_of_prach_conf_period; // Nb of PRACH configuration periods required to map all the SSBs
|
||||
|
||||
@@ -335,22 +335,13 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts,
|
||||
cfg->num_tlv++;
|
||||
|
||||
// SSB Table Configuration
|
||||
int scs_scaling = 1<<(cfg->ssb_config.scs_common.value);
|
||||
if (scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA < 600000)
|
||||
scs_scaling = scs_scaling*3;
|
||||
if (scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666)
|
||||
scs_scaling = scs_scaling>>2;
|
||||
uint32_t absolute_diff = (*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
|
||||
|
||||
RC.nrmac[Mod_idP]->ssb_SubcarrierOffset = absolute_diff%(12*scs_scaling);
|
||||
int sco = 31; // no SIB1
|
||||
if(get_softmodem_params()->sa) {
|
||||
sco = RC.nrmac[Mod_idP]->ssb_SubcarrierOffset;
|
||||
if(frequency_range == FR1)
|
||||
sco <<= cfg->ssb_config.scs_common.value; // 38.211 section 7.4.3.1 in FR1 it is expresses in terms of 15kHz SCS
|
||||
}
|
||||
|
||||
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
|
||||
const int scaling_5khz = scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA < 600000 ? 3 : 1;
|
||||
int sco = (absolute_diff*scaling_5khz) % 24;
|
||||
if(frequency_range == FR2)
|
||||
sco >>= 1; // this assumes 120kHz SCS for SSB and subCarrierSpacingCommon (only option supported by OAI for
|
||||
const int scs_scaling = frequency_range == FR2 ? 1 << (*scc->ssbSubcarrierSpacing - 2) : 1 << *scc->ssbSubcarrierSpacing;
|
||||
cfg->ssb_table.ssb_offset_point_a.value = absolute_diff/(12*scaling_5khz) - 10*scs_scaling; //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;
|
||||
@@ -360,6 +351,9 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts,
|
||||
cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
RC.nrmac[Mod_idP]->ssb_SubcarrierOffset = cfg->ssb_table.ssb_subcarrier_offset.value;
|
||||
RC.nrmac[Mod_idP]->ssb_OffsetPointA = cfg->ssb_table.ssb_offset_point_a.value;
|
||||
|
||||
switch (scc->ssb_PositionsInBurst->present) {
|
||||
case 1 :
|
||||
cfg->ssb_table.ssb_mask_list[0].ssb_mask.value = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24;
|
||||
|
||||
@@ -54,52 +54,6 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
uint16_t get_ssboffset_pointa(NR_ServingCellConfigCommon_t *scc,const long band) {
|
||||
|
||||
int ratio;
|
||||
switch (*scc->ssbSubcarrierSpacing) {
|
||||
case NR_SubcarrierSpacing_kHz15:
|
||||
AssertFatal(band <= 95,
|
||||
"Band %ld is not possible for SSB with 15 kHz SCS\n",
|
||||
band);
|
||||
// no band available above 3GHz using 15kHz
|
||||
ratio = 3; // NRARFCN step is 5 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz30:
|
||||
AssertFatal(band <= 96,
|
||||
"Band %ld is not possible for SSB with 30 kHz SCS\n",
|
||||
band);
|
||||
if (band == 46 || band == 48 || band == 77 ||
|
||||
band == 78 || band == 79 || band == 96) // above 3GHz
|
||||
ratio = 2; // NRARFCN step is 15 kHz
|
||||
else
|
||||
ratio = 6; // NRARFCN step is 5 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz120:
|
||||
AssertFatal(band >= 257,
|
||||
"Band %ld is not possible for SSB with 120 kHz SCS\n",
|
||||
band);
|
||||
ratio = 2; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
case NR_SubcarrierSpacing_kHz240:
|
||||
AssertFatal(band >= 257,
|
||||
"Band %ld is not possible for SSB with 240 kHz SCS\n",
|
||||
band);
|
||||
ratio = 4; // NRARFCN step is 15 kHz
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1 == 0, "SCS %ld not allowed for SSB \n",
|
||||
*scc->ssbSubcarrierSpacing);
|
||||
}
|
||||
|
||||
const uint32_t ssb_offset0 = *scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
|
||||
|
||||
return (ssb_offset0/(ratio*12) - 10); // absoluteFrequencySSB is the center of SSB
|
||||
|
||||
}
|
||||
|
||||
|
||||
void schedule_ssb(frame_t frame, sub_frame_t slot,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req,
|
||||
@@ -190,7 +144,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
|
||||
NR_SubcarrierSpacing_t scs = *scc->ssbSubcarrierSpacing;
|
||||
const long band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||
uint16_t offset_pointa = get_ssboffset_pointa(scc,band);
|
||||
const uint16_t offset_pointa = gNB->ssb_OffsetPointA;
|
||||
uint8_t ssbSubcarrierOffset = gNB->ssb_SubcarrierOffset;
|
||||
|
||||
const BIT_STRING_t *shortBitmap = &scc->ssb_PositionsInBurst->choice.shortBitmap;
|
||||
@@ -207,8 +161,9 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
ssb_start_symbol = get_ssb_start_symbol(band,scs,i_ssb);
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
fill_ssb_vrb_map(cc, offset_pointa, ssb_start_symbol, CC_id);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
frameP,
|
||||
@@ -221,7 +176,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
band,
|
||||
i_ssb,
|
||||
ssb_frame_periodicity,
|
||||
offset_pointa);
|
||||
prb_offset);
|
||||
gNB->type0_PDCCH_CSS_config[i_ssb].active = true;
|
||||
}
|
||||
}
|
||||
@@ -235,8 +190,9 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
ssb_start_symbol = get_ssb_start_symbol(band,scs,i_ssb);
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> scs;
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
fill_ssb_vrb_map(cc, offset_pointa, ssb_start_symbol, CC_id);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id);
|
||||
if (get_softmodem_params()->sa == 1) {
|
||||
get_type0_PDCCH_CSS_config_parameters(&gNB->type0_PDCCH_CSS_config[i_ssb],
|
||||
frameP,
|
||||
@@ -249,7 +205,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
band,
|
||||
i_ssb,
|
||||
ssb_frame_periodicity,
|
||||
offset_pointa);
|
||||
prb_offset);
|
||||
gNB->type0_PDCCH_CSS_config[i_ssb].active = true;
|
||||
}
|
||||
}
|
||||
@@ -264,8 +220,9 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
ssb_start_symbol = get_ssb_start_symbol(band,scs,i_ssb);
|
||||
// if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters
|
||||
if ((ssb_start_symbol/14) == rel_slot){
|
||||
const int prb_offset = offset_pointa >> (scs-2); // reference 60kHz
|
||||
schedule_ssb(frameP, slotP, scc, dl_req, i_ssb, ssbSubcarrierOffset, offset_pointa, (*(uint32_t*)cc->MIB_pdu.payload) & ((1<<24)-1));
|
||||
fill_ssb_vrb_map(cc, offset_pointa, ssb_start_symbol, CC_id);
|
||||
fill_ssb_vrb_map(cc, prb_offset, ssbSubcarrierOffset, ssb_start_symbol, CC_id);
|
||||
const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
|
||||
const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||
// FR2 is only TDD, to be fixed for flexible TDD
|
||||
@@ -286,7 +243,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
band,
|
||||
i_ssb,
|
||||
ssb_frame_periodicity,
|
||||
offset_pointa);
|
||||
prb_offset);
|
||||
gNB->type0_PDCCH_CSS_config[i_ssb].active = true;
|
||||
}
|
||||
}
|
||||
@@ -306,7 +263,7 @@ void schedule_nr_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframe
|
||||
//----------------------------------------
|
||||
}
|
||||
|
||||
void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, uint16_t symStart, int CC_id) {
|
||||
void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, int ssb_subcarrier_offset, uint16_t symStart, int CC_id) {
|
||||
|
||||
AssertFatal(*cc->ServingCellConfigCommon->ssbSubcarrierSpacing !=
|
||||
NR_SubcarrierSpacing_kHz240,
|
||||
@@ -314,7 +271,8 @@ void fill_ssb_vrb_map (NR_COMMON_channels_t *cc, int rbStart, uint16_t symStart
|
||||
|
||||
uint16_t *vrb_map = cc[CC_id].vrb_map;
|
||||
|
||||
for (int rb = 0; rb < 20; rb++)
|
||||
const int extra_prb = ssb_subcarrier_offset > 0;
|
||||
for (int rb = 0; rb < 20+extra_prb; rb++)
|
||||
vrb_map[rbStart + rb] = SL_to_bitmap(symStart, 4);
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user