Merge remote-tracking branch 'origin/develop' into NR_UL_VRB_MAP_improv
This commit is contained in:
@@ -93,7 +93,7 @@ class Log_Mgt:
|
||||
avail_space =int(self.__CheckAvailSpace())*1000 #avail space in target folder, initially displayed in Gb
|
||||
avg_size=self.__AvgSize() #average size of artifacts in the target folder
|
||||
logging.debug("Avail Space : " + str(avail_space) + " / Artifact Avg Size : " + str(avg_size))
|
||||
if avail_space < 2*avg_size: #reserved space is 2x artifact file ; oldest file will be deleted
|
||||
if avail_space < 50*avg_size: #reserved space is 50x artifact file ; oldest file will be deleted
|
||||
oldestfile=self.__GetOldestFile()
|
||||
HOST=self.Username+'@'+self.IPAddress
|
||||
COMMAND="echo " + self.Password + " | sudo -S rm "+ self.path + "/" + oldestfile
|
||||
|
||||
+57
-25
@@ -2047,13 +2047,30 @@ class OaiCiTest():
|
||||
|
||||
|
||||
def Iperf_analyzeV2BIDIR(self, lock, UE_IPAddress, device_id, statusQueue,server_filename,client_filename):
|
||||
#server file is unused for the moment
|
||||
if (not os.path.isfile(client_filename)):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from client log')
|
||||
|
||||
#check the 2 files are here
|
||||
if (not os.path.isfile(client_filename)) or (not os.path.isfile(server_filename)):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client or Server Log File not present')
|
||||
return
|
||||
report=[]
|
||||
report_msg='Client Report:\n'
|
||||
with open(client_filename, 'r') as f_client:
|
||||
#check the 2 files size
|
||||
if (os.path.getsize(client_filename)==0) and (os.path.getsize(server_filename)==0):
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client and Server Log File are empty')
|
||||
return
|
||||
|
||||
report_msg='TCP BIDIR Report:\n'
|
||||
#if client is not empty, all the info is in, otherwise we ll use the server file to get some partial info
|
||||
client_filesize = os.path.getsize(client_filename)
|
||||
if client_filesize == 0:
|
||||
report_msg+="Client file (UE) present but !!! EMPTY !!!\n"
|
||||
report_msg+="Partial report from server file\n"
|
||||
filename = server_filename
|
||||
else :
|
||||
report_msg+="Report from client file (UE)\n"
|
||||
filename = client_filename
|
||||
|
||||
report=[] #used to check if relevant lines were found
|
||||
|
||||
with open(filename, 'r') as f_client:
|
||||
for line in f_client.readlines():
|
||||
result = re.search(rf'^\[\s+\d+\](?P<direction>\[.+\]).*\s+(?P<bitrate>[0-9\.]+ [KMG]bits\/sec).*\s+(?P<role>\bsender|receiver\b)', str(line))
|
||||
if result is not None:
|
||||
@@ -2070,7 +2087,7 @@ class OaiCiTest():
|
||||
logging.debug('\u001B[1;35m ' + report_msg + '\u001B[0m')
|
||||
lock.release()
|
||||
else:
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from client log')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file')
|
||||
|
||||
|
||||
|
||||
@@ -2386,7 +2403,7 @@ class OaiCiTest():
|
||||
iperf_time = self.Iperf_ComputeTime()
|
||||
if self.iperf_direction=="DL":
|
||||
logging.debug("Iperf for Module in DL mode detected")
|
||||
#server side UE
|
||||
##server side UE
|
||||
server_filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'rm ' + server_filename
|
||||
@@ -2394,20 +2411,21 @@ class OaiCiTest():
|
||||
cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > ' + server_filename + ' &'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
#client side EPC
|
||||
##client side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
#remove old client file in EPC.SourceCodePath
|
||||
cmd = 'rm ' + EPC.SourceCodePath + '/' + client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
iperf_cmd = 'bin/iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename
|
||||
cmd = 'docker exec -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
cmd = 'docker exec -w /iperf-2.0.13 -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',int(iperf_time)*5.0)
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/'+ client_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + client_filename, '.')
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
#copy the 2 resulting files locally (python executor)
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, server_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + client_filename, '.')
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,server_filename,1)
|
||||
|
||||
@@ -2418,7 +2436,7 @@ class OaiCiTest():
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename
|
||||
cmd = 'docker exec -d prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
@@ -2433,29 +2451,28 @@ class OaiCiTest():
|
||||
#once client is done, retrieve the server file from container to EPC Host
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/' + server_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, server_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,server_filename,1)
|
||||
|
||||
elif self.iperf_direction=="BIDIR":
|
||||
logging.debug("Iperf for Module in BIDIR mode detected")
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
#server side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
iperf_cmd = 'echo $USER; nohup /usr/local/bin/iperf3 -s 2>&1 > ' + server_filename
|
||||
cmd = 'docker exec -d prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
cmd = 'docker exec -d -w /iperf-2.0.13 prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
#client side UE
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
cmd = 'rm '+ client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.command('iperf3 -B ' + UE_IPAddress + ' -c ' + trf_gen_IP + ' ' + self.iperf_args + ' 2>&1 > ' + client_filename, '\$', int(iperf_time)*5.0)
|
||||
@@ -2463,13 +2480,17 @@ class OaiCiTest():
|
||||
|
||||
#once client is done, retrieve the server file from container to EPC Host
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
#remove old server file in EPC.SourceCodePath
|
||||
cmd = 'rm ' + EPC.SourceCodePath + '/' + server_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
#copy from docker container to EPC.SourceCodePath
|
||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.13/' + server_filename + ' ' + EPC.SourceCodePath, '\$', 5)
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
SSH.close()
|
||||
|
||||
#copy the 2 resulting files locally
|
||||
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, client_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, server_filename, '.')
|
||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/' + server_filename, '.')
|
||||
|
||||
#send for analysis
|
||||
self.Iperf_analyzeV2BIDIR(lock, UE_IPAddress, device_id, statusQueue, server_filename, client_filename)
|
||||
|
||||
@@ -2484,10 +2505,15 @@ class OaiCiTest():
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
|
||||
|
||||
@@ -2540,9 +2566,12 @@ class OaiCiTest():
|
||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
|
||||
elif self.iperf_direction=="BIDIR":
|
||||
logging.debug("Iperf for Module in BIDIR mode detected")
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
|
||||
|
||||
#server side EPC
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
cmd = 'rm ' + server_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'echo $USER; nohup iperf3 -s 2>&1 > '+server_filename+' &'
|
||||
@@ -2551,7 +2580,6 @@ class OaiCiTest():
|
||||
|
||||
#client side UE
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
client_filename = 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||
cmd = 'rm ' + client_filename
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.command('iperf3 -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > '+client_filename, '\$', int(iperf_time)*5.0)
|
||||
@@ -2569,10 +2597,14 @@ class OaiCiTest():
|
||||
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||
cmd = 'killall --signal=SIGKILL iperf'
|
||||
SSH.command(cmd,'\$',5)
|
||||
cmd = 'killall --signal=SIGKILL iperf3'
|
||||
SSH.command(cmd,'\$',5)
|
||||
SSH.close()
|
||||
return
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ serveraddr = "server";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="debug";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
|
||||
@@ -137,20 +137,6 @@ gNBs =
|
||||
# 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ gNBs =
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 2;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -234,6 +235,7 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ gNBs =
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime = 6;
|
||||
do_SRS = 1;
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
|
||||
@@ -39,11 +39,8 @@ gNBs =
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
#pusch_TargetSNRx10 = 200;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
min_rxtxtime = 6;
|
||||
pusch_AntennaPorts = 2;
|
||||
ul_prbblacklist = "79,80,81,82"
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
@@ -86,7 +83,7 @@ gNBs =
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 31889;
|
||||
initialDLBWPlocationAndBandwidth = 31899;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
@@ -94,8 +91,6 @@ gNBs =
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
@@ -108,7 +103,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 31889;
|
||||
initialULBWPlocationAndBandwidth = 31899;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
@@ -229,9 +224,9 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
# pusch_TargetSNRx10 = 200;
|
||||
# pucch_TargetSNRx10 = 150;
|
||||
ulsch_max_frame_inactivity = 0;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -239,6 +234,7 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
thread_pool_size = 8;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
@@ -247,8 +243,8 @@ L1s = (
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
|
||||
@@ -0,0 +1,299 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 95;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x1; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 2;
|
||||
sd = 2; // 0 false, else true
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
min_rxtxtime = 6;
|
||||
sib1_tda = 0;
|
||||
|
||||
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 = 433096;
|
||||
dl_frequencyBand = 66;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 430000;
|
||||
#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 = 13475; # 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 = 66;
|
||||
ul_absoluteFrequencyPointA = 350000;
|
||||
#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 = 13475;
|
||||
# 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 = -118;
|
||||
#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 = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
amf_ip_address = ( { ipv4 = "192.168.70.132";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
ulsch_max_slots_inactivity = 100;
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 8;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
#beamforming 1x4 matrix:
|
||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
||||
clock_src = "internal";
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = "4043";
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
ngap_log_level ="debug";
|
||||
ngap_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
+5
-1
@@ -671,10 +671,14 @@ class RANManagement():
|
||||
mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
|
||||
mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
|
||||
mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
|
||||
mySSH.command('killall --signal SIGKILL record', '\$', 5)
|
||||
mySSH.close()
|
||||
# if T tracer was run with option 0 (no logs), analyze logs
|
||||
# from textlog, otherwise do normal analysis (e.g., option 2)
|
||||
result = re.search('T_stdout 0', str(self.Initialize_eNB_args))
|
||||
if (result is not None):
|
||||
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
|
||||
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||
mySSH.command('killall --signal SIGKILL record', '\$', 5)
|
||||
mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
|
||||
enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
|
||||
raw_record_file = enbLogFile.replace('.log', '_record.raw')
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
|
||||
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 200K</client_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 3M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030022">
|
||||
@@ -109,7 +109,7 @@
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 5K</client_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100021">
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr-fdd</htmlTabRef>
|
||||
<htmlTabName>Testing 5G NR RF sim - Monolithic FDD gNB</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
100011
|
||||
000010
|
||||
000011
|
||||
000012
|
||||
000013
|
||||
020011
|
||||
020012
|
||||
100011
|
||||
</TestCaseRequestedList>
|
||||
<!-- Not done yet because of code instability
|
||||
030011
|
||||
030012
|
||||
-->
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000010">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy MySql Database</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>mysql</services>
|
||||
<nb_healthy>1</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
|
||||
<nb_healthy>6</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G gNB RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-gnb</services>
|
||||
<nb_healthy>7</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>DeployGenObject</class>
|
||||
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
<services>oai-nr-ue</services>
|
||||
<nb_healthy>8</nb_healthy>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<container_name>rfsim5g-oai-nr-ue</container_name>
|
||||
<options>-I oaitun_ue1 -c 20 192.168.72.135</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020012">
|
||||
<class>PingFromContainer</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<container_name>rfsim5g-oai-ext-dn</container_name>
|
||||
<options>-c 20 12.1.1.2</options>
|
||||
<loss_threshold>5</loss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Downlink</desc>
|
||||
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
|
||||
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
|
||||
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 3M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030012">
|
||||
<class>IperfFromContainer</class>
|
||||
<desc>Iperf UDP Uplink</desc>
|
||||
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
|
||||
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
|
||||
<server_options>-u -i 1 -s</server_options>
|
||||
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 1M</client_options>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
</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>rfsim-5gnr-fdd-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 5G RF - Monolithic FDD gNB</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100012
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="100012">
|
||||
<class>UndeployGenObject</class>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr</htmlTabRef>
|
||||
<htmlTabName>Testing 5G NR RF sim - Monolithic gNB</htmlTabName>
|
||||
<htmlTabRef>rfsim-5gnr-tdd</htmlTabRef>
|
||||
<htmlTabName>Testing 5G NR RF sim - Monolithic TDD gNB</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>rfsim-5gnr-down</htmlTabRef>
|
||||
<htmlTabName>CleanUp 5G RF - Monolithic gNB</htmlTabName>
|
||||
<htmlTabName>CleanUp 5G RF - Monolithic TDD gNB</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100002
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
000002
|
||||
070000
|
||||
070001
|
||||
070002
|
||||
000001
|
||||
010002
|
||||
080001
|
||||
@@ -132,6 +133,16 @@
|
||||
<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>nrmodule2_quectel</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
070003
|
||||
070002
|
||||
000001
|
||||
070002
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
010002
|
||||
@@ -157,14 +155,6 @@
|
||||
<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="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize OAI UE (N310)</desc>
|
||||
<air_interface>nr</air_interface>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,second_addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time</Initialize_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<TestCaseRequestedList>
|
||||
041000
|
||||
000002
|
||||
010000
|
||||
011000
|
||||
000001
|
||||
051000
|
||||
000001
|
||||
@@ -42,12 +42,12 @@
|
||||
000001
|
||||
071004
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
011002
|
||||
081000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<testCase id="011000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
@@ -55,7 +55,7 @@
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<testCase id="011002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<testCase id="081000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>40</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
<ping_rttavg_threshold>40</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
AMF_PORT_FOR_NGAP=38412
|
||||
AMF_PORT_FOR_N11_HTTP=80
|
||||
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
|
||||
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
|
||||
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
|
||||
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $N2_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
|
||||
fi
|
||||
|
||||
if [[ -z $N11_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
|
||||
fi
|
||||
|
||||
#host="${MYSQL_SERVER}"
|
||||
#user="${MYSQL_USER:-root}"
|
||||
#export MYSQL_PWD="${MYSQL_PASS}"
|
||||
|
||||
#args=(
|
||||
# -h"$host"
|
||||
# -u"$user"
|
||||
# --silent
|
||||
#)
|
||||
|
||||
#if ! command -v mysql &> /dev/null; then
|
||||
# echo "Installing mysql command"
|
||||
# apt update
|
||||
# apt-get -y install mysql-client
|
||||
#else
|
||||
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
# if [[ -z $database_check ]]; then
|
||||
# echo "Healthcheck error: oai_db not populated"
|
||||
# STATUS=1
|
||||
# fi
|
||||
# STATUS=0
|
||||
# else
|
||||
# echo "Healthcheck error: Mysql port inactive"
|
||||
# STATUS=1
|
||||
# fi
|
||||
#fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -0,0 +1,298 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
oai-nrf:
|
||||
container_name: "rfsim5g-oai-nrf"
|
||||
image: oai-nrf:latest
|
||||
environment:
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- NRF_API_VERSION=v1
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.130
|
||||
volumes:
|
||||
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.131
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oai-amf:latest
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=208
|
||||
- SERVED_GUAMI_MNC_0=99
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=208
|
||||
- PLMN_SUPPORT_MNC=99
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
- SST_0=1
|
||||
- SD_0=1
|
||||
- SST_1=1
|
||||
- SD_1=12
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=0.0.0.0
|
||||
- SMF_HTTP_VERSION_0=v1
|
||||
- SELECTED_0=true
|
||||
- SMF_INSTANCE_ID_1=2
|
||||
- SMF_FQDN_1=oai-smf
|
||||
- SMF_IPV4_ADDR_1=0.0.0.0
|
||||
- SMF_HTTP_VERSION_1=v1
|
||||
- SELECTED_1=false
|
||||
- MYSQL_SERVER=192.168.71.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- EXTERNAL_AUSF=no
|
||||
- AUSF_IPV4_ADDRESS=0.0.0.0
|
||||
- AUSF_PORT=80
|
||||
- AUSF_API_VERSION=v1
|
||||
- AUSF_FQDN=localhost
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- mysql
|
||||
volumes:
|
||||
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oai-smf:latest
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- SMF_INTERFACE_PORT_FOR_SBI=80
|
||||
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- SMF_API_VERSION=v1
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=0.0.0.0
|
||||
- AMF_PORT=80
|
||||
- AMF_API_VERSION=v1
|
||||
- AMF_FQDN=oai-amf
|
||||
- UDM_IPV4_ADDRESS=127.0.0.1
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v1
|
||||
- UDM_FQDN=localhost
|
||||
- UPF_IPV4_ADDRESS=192.168.71.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- DNN_NI0=oai
|
||||
- DNN_NI2=oai.ipv4
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
oai-spgwu:
|
||||
container_name: "rfsim5g-oai-spgwu"
|
||||
image: oai-spgwu-tiny:latest
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- SPGWC0_IP_ADDRESS=192.168.71.133
|
||||
- BYPASS_UL_PFCP_RULES=no
|
||||
- MCC=208
|
||||
- MNC=99
|
||||
- MNC03=099
|
||||
- TAC=1
|
||||
- GTP_EXTENSION_HEADER_PRESENT=yes
|
||||
- GW_ID=1
|
||||
- REALM=openairinterface.org
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.71.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=1
|
||||
- DNN_0=oai
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
oai-ext-dn:
|
||||
image: ubuntu:bionic
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb:
|
||||
image: oai-gnb:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-gnb
|
||||
environment:
|
||||
RFSIMULATOR: server
|
||||
USE_SA_FDD_MONO: 'yes'
|
||||
GNB_NAME: gnb-rfsim
|
||||
TAC: 1
|
||||
MCC: '208'
|
||||
MNC: '99'
|
||||
MNC_LENGTH: 2
|
||||
NSSAI_SST: 1
|
||||
NSSAI_SD0: 1
|
||||
NSSAI_SD1: 112233
|
||||
AMF_IP_ADDRESS: 192.168.71.132
|
||||
GNB_NGA_IF_NAME: eth0
|
||||
GNB_NGA_IP_ADDRESS: 192.168.71.140
|
||||
GNB_NGU_IF_NAME: eth0
|
||||
GNB_NGU_IP_ADDRESS: 192.168.71.140
|
||||
USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-nr-ue:
|
||||
image: oai-nr-ue:develop
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
environment:
|
||||
RFSIMULATOR: 192.168.71.140
|
||||
FULL_IMSI: '208990100001100'
|
||||
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
|
||||
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
|
||||
DNN: oai
|
||||
NSSAI_SST: 1
|
||||
NSSAI_SD: 1
|
||||
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --band 66 -C 2169080000 --CO -400000000 -s 396 --nokrnmod --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
+217
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
|
||||
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
|
||||
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
|
||||
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
|
||||
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
# STATUS=-1
|
||||
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
#fi
|
||||
#
|
||||
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
|
||||
STATUS=-1
|
||||
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
STATUS=0
|
||||
SGW_PORT_FOR_S1U_S12_S4_UP=2152
|
||||
SGW_PORT_FOR_SX=8805
|
||||
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
|
||||
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
|
||||
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
|
||||
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
|
||||
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
|
||||
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
|
||||
if [ $NB_UNREPLACED_AT -ne 0 ]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
|
||||
fi
|
||||
|
||||
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
|
||||
fi
|
||||
|
||||
if [[ -z $SX_PORT_STATUS ]]; then
|
||||
STATUS=1
|
||||
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
|
||||
fi
|
||||
|
||||
exit $STATUS
|
||||
@@ -1710,6 +1710,9 @@ set(PHY_SRC_UE
|
||||
|
||||
set(PHY_NR_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
)
|
||||
|
||||
set(PHY_NR_SRC
|
||||
@@ -1735,7 +1738,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
|
||||
@@ -1758,6 +1760,7 @@ set(PHY_SRC_UE
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NR_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/srs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_uci_tools_common.c
|
||||
)
|
||||
set(PHY_NR_UE_SRC
|
||||
@@ -1779,7 +1782,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_prach.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/pucch_nr.c
|
||||
@@ -2074,6 +2076,7 @@ set (MAC_NR_SRC
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_primitives.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_phytest.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_uci.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_srs.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_RA.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1069,12 +1069,12 @@
|
||||
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
||||
<pre_exec_args></pre_exec_args>
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/nr_pbchsim.Rel15</main_exec>
|
||||
<main_exec_args>-s0 -S1 -n1000 -R106
|
||||
-s0 -S1 -n10 -I -R106
|
||||
-s0 -S1 -n1000 -R217
|
||||
-s0 -S1 -n10 -I -R217
|
||||
-s0 -S1 -n1000 -R273
|
||||
-s0 -S1 -n10 -I -R273</main_exec_args>
|
||||
<main_exec_args>-s-11 -S-8 -n10 -R106
|
||||
-s-11 -S-8 -n10 -o8000 -I -R106
|
||||
-s-11 -S-8 -n10 -R217
|
||||
-s-11 -S-8 -n10 -o8000 -I -R217
|
||||
-s-11 -S-8 -n10 -R273
|
||||
-s-11 -S-8 -n10 -o8000 -I -R273</main_exec_args>
|
||||
<tags>nr_pbchsim.test1 nr_pbchsim.test2 nr_pbchsim.test3 nr_pbchsim.test4 nr_pbchsim.test5 nr_pbchsim.test6</tags>
|
||||
<search_expr_true>PBCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
|
||||
@@ -93,6 +93,14 @@ ID = GNB_PHY_PUCCH_PUSCH_IQ
|
||||
DESC = gNodeB input data in the frequency domain for a slot where some PUCCH or PUSCH detection was done
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : buffer,rxdataF
|
||||
ID = GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t
|
||||
ID = GNB_PHY_UL_TIME_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the time domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t
|
||||
ID = GNB_PHY_PRACH_INPUT_SIGNAL
|
||||
DESC = gNodeB input data in the time domain for slots with PRACH detection
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
|
||||
+124
-7
@@ -4,15 +4,28 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "config.h"
|
||||
#include "logger/logger.h"
|
||||
#include "view/view.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "openair_logo.h"
|
||||
|
||||
int ue_id[65536];
|
||||
int next_ue_id;
|
||||
|
||||
typedef struct {
|
||||
widget *pucch_pusch_iq_plot;
|
||||
widget *ul_freq_estimate_ue_xy_plot;
|
||||
widget *ul_time_estimate_ue_xy_plot;
|
||||
widget *current_ue_label;
|
||||
widget *current_ue_button;
|
||||
widget *prev_ue_button;
|
||||
widget *next_ue_button;
|
||||
logger *pucch_pusch_iq_logger;
|
||||
logger *ul_freq_estimate_ue_logger;
|
||||
logger *ul_time_estimate_ue_logger;
|
||||
} gnb_gui;
|
||||
|
||||
typedef struct {
|
||||
@@ -21,6 +34,7 @@ typedef struct {
|
||||
int nevents;
|
||||
pthread_mutex_t lock;
|
||||
gnb_gui *e;
|
||||
int ue; /* what UE is displayed in the UE specific views */
|
||||
void *database;
|
||||
} gnb_data;
|
||||
|
||||
@@ -69,34 +83,133 @@ static void *gui_thread(void *_g)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database,
|
||||
gnb_data *ed)
|
||||
static void set_current_ue(gui *g, gnb_data *e, int ue)
|
||||
{
|
||||
char s[256];
|
||||
|
||||
sprintf(s, "[UE %d] ", ue);
|
||||
label_set_text(g, e->e->current_ue_label, s);
|
||||
|
||||
sprintf(s, "GNB_PHY_PUCCH_PUSCH_IQ [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->pucch_pusch_iq_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation in frequency domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_freq_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation in time domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_time_estimate_ue_xy_plot, s);
|
||||
}
|
||||
|
||||
void reset_ue_ids(void)
|
||||
{
|
||||
int i;
|
||||
printf("resetting known UEs\n");
|
||||
for (i = 0; i < 65536; i++) ue_id[i] = -1;
|
||||
ue_id[65535] = 0;
|
||||
ue_id[65534] = 1; /* HACK: to be removed */
|
||||
ue_id[2] = 2; /* this supposes RA RNTI = 2, very openair specific */
|
||||
next_ue_id = 0;
|
||||
}
|
||||
|
||||
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
|
||||
{
|
||||
int *d = notification_data;
|
||||
int button = d[0];
|
||||
gnb_data *ed = private;
|
||||
gnb_gui *e = ed->e;
|
||||
int ue = ed->ue;
|
||||
int do_reset = 0;
|
||||
|
||||
if (button != 1) return;
|
||||
if (w == e->prev_ue_button) { ue--; if (ue < 0) ue = 0; }
|
||||
if (w == e->next_ue_button) ue++;
|
||||
if (w == e->current_ue_button) do_reset = 1;
|
||||
|
||||
if (pthread_mutex_lock(&ed->lock)) abort();
|
||||
if (do_reset) reset_ue_ids();
|
||||
if (ue != ed->ue) {
|
||||
set_current_ue(g, ed, ue);
|
||||
ed->ue = ue;
|
||||
}
|
||||
if (pthread_mutex_unlock(&ed->lock)) abort();
|
||||
}
|
||||
|
||||
static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, gnb_data *ed)
|
||||
{
|
||||
widget *main_window;
|
||||
widget *top_container;
|
||||
widget *line;
|
||||
widget *col;
|
||||
widget *logo;
|
||||
widget *w;
|
||||
widget *w2;
|
||||
logger *l;
|
||||
view *v;
|
||||
|
||||
main_window = new_toplevel_window(g, 500, 300, "gNB tracer");
|
||||
|
||||
main_window = new_toplevel_window(g, 1500, 230, "gNB tracer");
|
||||
top_container = new_container(g, VERTICAL);
|
||||
widget_add_child(g, main_window, top_container, -1);
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
logo = new_image(g, openair_logo_png, openair_logo_png_len);
|
||||
|
||||
/* logo + prev/next UE buttons */
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, col, logo, -1);
|
||||
w = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, col, w, -1);
|
||||
w2 = new_label(g, "");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->current_ue_button = w2;
|
||||
e->current_ue_label = w2;
|
||||
w2 = new_label(g, " [prev UE] ");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->prev_ue_button = w2;
|
||||
w2 = new_label(g, " [next UE] ");
|
||||
widget_add_child(g, w, w2, -1);
|
||||
label_set_clickable(g, w2, 1);
|
||||
e->next_ue_button = w2;
|
||||
widget_add_child(g, line, col, -1);
|
||||
|
||||
/* PUCCH/PUSCH IQ data */
|
||||
w = new_xy_plot(g, 55, 55, "", 50);
|
||||
w = new_xy_plot(g, 200, 200, "", 10);
|
||||
e->pucch_pusch_iq_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
|
||||
xy_plot_set_title(g, w, "rxdataF");
|
||||
l = new_iqlog_full(h, database, "GNB_PHY_PUCCH_PUSCH_IQ", "rxdataF");
|
||||
v = new_view_xy(300*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pucch_pusch_iq_logger = l;
|
||||
|
||||
/* UL channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_freq_estimate_ue_logger = l;
|
||||
|
||||
/* UL channel estimation in time domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_time_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_time_estimate_ue_logger = l;
|
||||
|
||||
set_current_ue(g, ed, ed->ue);
|
||||
register_notifier(g, "click", e->current_ue_button, click, ed);
|
||||
register_notifier(g, "click", e->prev_ue_button, click, ed);
|
||||
register_notifier(g, "click", e->next_ue_button, click, ed);
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
@@ -136,7 +249,11 @@ int main(int n, char **v)
|
||||
h = new_handler(database);
|
||||
|
||||
on_off(database, "GNB_PHY_PUCCH_PUSCH_IQ", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", is_on, 1);
|
||||
|
||||
gnb_data.ue = 0;
|
||||
gnb_data.e = ⪚
|
||||
gnb_data.database = database;
|
||||
gnb_data.socket = -1;
|
||||
gnb_data.is_on = is_on;
|
||||
|
||||
@@ -362,16 +362,6 @@ void nr_dl_retx(void *_d, event e)
|
||||
e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void nr_dl_retx(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
|
||||
e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i,
|
||||
e.e[d->nr_dl_retx_data].b, e.e[d->nr_dl_retx_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
}
|
||||
|
||||
void nr_mib(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
@@ -579,20 +569,6 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
|
||||
d->nr_dl_retx_data == -1)
|
||||
goto error;
|
||||
|
||||
/* NR dl retx: rnti, frame, slot, data */
|
||||
f = get_format(database, nr_dl_retx_id);
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("rnti", "int", d->nr_dl_retx_rnti);
|
||||
G("frame", "int", d->nr_dl_retx_frame);
|
||||
G("slot", "int", d->nr_dl_retx_slot);
|
||||
G("data", "buffer", d->nr_dl_retx_data);
|
||||
}
|
||||
|
||||
if (d->nr_dl_retx_rnti == -1 || d->nr_dl_retx_frame == -1 ||
|
||||
d->nr_dl_retx_slot == -1 || d->nr_dl_retx_data == -1)
|
||||
goto error;
|
||||
|
||||
/* NR MIB: frame, slot, data */
|
||||
f = get_format(database, nr_mib_id);
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ void SLIV2SL(int SLIV,int *S,int *L);
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period);
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -106,12 +106,13 @@
|
||||
{"phy_proc", &(UE->phy_proc[0]),0,RX_NB_TH},\
|
||||
{"phy_proc_rx", &(UE-> phy_proc_rx[0]),0,RX_NB_TH},\
|
||||
{"phy_proc_tx", &(UE->phy_proc_tx),0,1},\
|
||||
{"ue_ul_indication_stats", &(UE->ue_ul_indication_stats),0,1},\
|
||||
{"ofdm_mod_stats", &(UE->ofdm_mod_stats),0,1},\
|
||||
{"ulsch_encoding_stats", &(UE->ulsch_encoding_stats),0,1},\
|
||||
{"ulsch_modulation_stats", &(UE->ulsch_modulation_stats),0,1},\
|
||||
{"ulsch_segmentation_stats", &(UE->ulsch_segmentation_stats),0,1},\
|
||||
{"ulsch_rate_matching_stats", &(UE->ulsch_rate_matching_stats),0,1},\
|
||||
{"ulsch_turbo_encoding_stats", &(UE->ulsch_turbo_encoding_stats),0,1},\
|
||||
{"ulsch_ldpc_encoding_stats", &(UE->ulsch_ldpc_encoding_stats),0,1},\
|
||||
{"ulsch_interleaving_stats", &(UE->ulsch_interleaving_stats),0,1},\
|
||||
{"ulsch_multiplexing_stats", &(UE->ulsch_multiplexing_stats),0,1},\
|
||||
{"generic_stat", &(UE->generic_stat),0,1},\
|
||||
@@ -123,12 +124,12 @@
|
||||
{"dlsch_f...timation_stats", &(UE->dlsch_freq_offset_estimation_stats),0,1},\
|
||||
{"dlsch_demodulation_stats", &(UE->dlsch_demodulation_stats),0,1},\
|
||||
{"dlsch_rate_unmatching_stats", &(UE->dlsch_rate_unmatching_stats),0,1},\
|
||||
{"dlsch_turbo_decoding_stats", &(UE->dlsch_turbo_decoding_stats),0,1},\
|
||||
{"dlsch_ldpc_decoding_stats", &(UE->dlsch_ldpc_decoding_stats),0,1},\
|
||||
{"dlsch_deinterleaving_stats", &(UE->dlsch_deinterleaving_stats),0,1},\
|
||||
{"dlsch_llr_stats", &(UE->dlsch_llr_stats),0,1},\
|
||||
{"dlsch_unscrambling_stats", &(UE->dlsch_unscrambling_stats),0,1},\
|
||||
{"dlsch_rate_matching_stats", &(UE->dlsch_rate_matching_stats),0,1},\
|
||||
{"dlsch_turbo_encoding_stats", &(UE->dlsch_turbo_encoding_stats),0,1},\
|
||||
{"dlsch_ldpc_encoding_stats", &(UE->dlsch_ldpc_encoding_stats),0,1},\
|
||||
{"dlsch_interleaving_stats", &(UE->dlsch_interleaving_stats),0,1},\
|
||||
{"dlsch_tc_init_stats", &(UE->dlsch_tc_init_stats),0,1},\
|
||||
{"dlsch_tc_alpha_stats", &(UE->dlsch_tc_alpha_stats),0,1},\
|
||||
@@ -146,6 +147,7 @@
|
||||
{"ue_front_end_stat", &(UE->ue_front_end_stat[0]),0,RX_NB_TH},\
|
||||
{"ue_front_end_per_slot_stat", &(UE->ue_front_end_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||
{"pdcch_procedures_stat", &(UE->pdcch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
{"rx_pdsch_stats", &(UE->rx_pdsch_stats), 0, 1}, \
|
||||
{"pdsch_procedures_stat", &(UE->pdsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
{"pdsch_procedures_per_slot_stat", &(UE->pdsch_procedures_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||
{"dlsch_procedures_stat", &(UE->dlsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||
|
||||
+17
-8
@@ -294,6 +294,10 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits, for ACK/NACK and SR)
|
||||
- Format 2 (up to 11 bits, mainly for CSI feedback)
|
||||
* NR-SRS
|
||||
- SRS signal reception
|
||||
- Channel estimation (with T tracer real time monitoring)
|
||||
- Power noise estimation
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
@@ -322,6 +326,8 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- phy-test scheduler (fixed allocation)
|
||||
- regular scheduler with dynamic allocation
|
||||
- HARQ procedures for uplink
|
||||
- Scheduler procedures for SRS reception
|
||||
- Periodic SRS reception
|
||||
- MAC procedures to handle CSI measurement report
|
||||
- evalution of RSRP report
|
||||
- evaluation of CQI report
|
||||
@@ -433,11 +439,12 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- Format 0 (2 bits for ACK/NACK and SR)
|
||||
- Format 2 (up to 64 bits, mainly for CSI feedback)
|
||||
- Format 1, 3 and 4 present but old code never dested (need restructuring before verification)
|
||||
* NR-PRACH
|
||||
* NR-SRS
|
||||
- Generation of sequence at PHY
|
||||
- SRS signal transmission
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* NR-SRS
|
||||
- Old code never dested (need restructuring before verification)
|
||||
* SS-RSRP
|
||||
* SS-RSRP
|
||||
- RSRP measured on synchronization SSB (ok only for single SSB)
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
@@ -452,21 +459,21 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
## NR UE Higher Layers ##
|
||||
|
||||
**UE MAC**
|
||||
* Minimum system information (MSI)
|
||||
* Minimum system information (MSI)
|
||||
- MIB processing
|
||||
- Scheduling of system information block 1 (SIB1) reception
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
- Mapping SSBs to multiple ROs
|
||||
- Scheduling of PRACH
|
||||
- Processing of RAR
|
||||
- Transmission and re-transmission of Msg3
|
||||
- Msg4 and contention resolution
|
||||
* DCI processing
|
||||
* DCI processing
|
||||
- format 10 (RA-RNTI, C-RNTI, SI-RNTI, TC-RNTI)
|
||||
- format 00 (C-RNTI, TC-RNTI)
|
||||
- format 11 (C-RNTI)
|
||||
- format 01 (C-RNTI)
|
||||
* UCI processing
|
||||
* UCI processing
|
||||
- ACK/NACK processing
|
||||
- Triggering periodic SR
|
||||
- CSI measurement reporting (SSB RSRP only)
|
||||
@@ -475,6 +482,8 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- HARQ procedures
|
||||
* ULSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
* Scheduler procedures for SRS transmission
|
||||
- Periodic SRS transmission
|
||||
|
||||
|
||||
**UE RLC**
|
||||
|
||||
+16
-14
@@ -155,6 +155,14 @@ At the UE the --sa flag will:
|
||||
4) 5G-NR RRC Reconfiguration
|
||||
5) Start Downlink and Uplink Data Transfer
|
||||
|
||||
Command line parameters for UE in --sa mode:
|
||||
- `C` : downlink carrier frequency in Hz (default value 0)
|
||||
- `CO` : uplink frequency offset for FDD in Hz (default value 0)
|
||||
- `numerology` : numerology index (default value 1)
|
||||
- `r` : bandwidth in terms of RBs (default value 106)
|
||||
- `band` : NR band number (default value 78)
|
||||
- `s` : SSB start subcarrier (default value 512)
|
||||
|
||||
### Run OAI in SA mode
|
||||
|
||||
From the `cmake_targets/ran_build/build` folder:
|
||||
@@ -179,21 +187,15 @@ Additionally, at UE side `--uecap_file` option can be used to pass the UE Capabi
|
||||
|
||||
## IF setup with OAI
|
||||
|
||||
The -C and --CO flags can be used together at UE side to set custom downlink and uplink FR1 arbitrary frequencies for the IF equipment.
|
||||
OAI is also compatible with Intermediate Frequency (IF) equipment. This allows to use RF front-end that with arbitrary frequencies bands that do not comply with the standardised 3GPP NR bands.
|
||||
|
||||
In order to run this setup, the following flags are needed at the UE side:
|
||||
To configure the IF frequencies it is necessary to use two command-line options at UE side:
|
||||
- `if_freq`, downlink frequency in Hz
|
||||
- `if_freq_off`, uplink frequency offset in Hz
|
||||
|
||||
`-C`
|
||||
|
||||
`--CO`
|
||||
|
||||
and the following parameters must be configured in the RUs section of the gNB configuration file:
|
||||
|
||||
`if_freq`
|
||||
|
||||
`if_offset`
|
||||
|
||||
The values must be given in Hz.
|
||||
Accordingly, the following parameters must be configured in the RUs section of the gNB configuration file:
|
||||
- `if_freq`
|
||||
- `if_offset`
|
||||
|
||||
### Run OAI with custom DL/UL arbitrary frequencies
|
||||
|
||||
@@ -207,7 +209,7 @@ gNB on machine 1:
|
||||
|
||||
UE on machine 2:
|
||||
|
||||
`sudo ./nr-uesoftmodem -C 2169080000 --CO -400000000`
|
||||
`sudo ./nr-uesoftmodem --if_freq 2169080000 --if_freq_off -400000000`
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,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.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}',
|
||||
"ue.nfapi": 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_FDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.fdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_CU ]]; then ln -s $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
|
||||
# Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself.
|
||||
|
||||
@@ -94,6 +94,36 @@
|
||||
- key: parallel_config
|
||||
env: "@THREAD_PARALLEL_CONFIG@"
|
||||
|
||||
- filePrefix: gnb.sa.band66.fr1.106PRB.usrpn300.conf
|
||||
outputfilename: "gnb.sa.fdd.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_CU.conf
|
||||
outputfilename: "gnb.sa.cu.conf"
|
||||
config:
|
||||
|
||||
+58
-23
@@ -104,6 +104,49 @@ queue_t nr_rach_ind_queue;
|
||||
|
||||
static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
|
||||
|
||||
static int dump_L1_UE_meas_stats(PHY_VARS_NR_UE *ue, char *output, int max_len)
|
||||
{
|
||||
int stroff = 0;
|
||||
stroff += print_meas_log(&ue->phy_proc_tx, "L1 TX processing", NULL, NULL, output);
|
||||
stroff += print_meas_log(&ue->ulsch_encoding_stats, "ULSCH encoding", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->phy_proc_rx[0], "L1 RX processing t0", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->phy_proc_rx[1], "L1 RX processing t1", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->ue_ul_indication_stats, "UL Indication", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->rx_pdsch_stats, "PDSCH receiver", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_decoding_stats[0], "PDSCH decoding t0", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_decoding_stats[1], "PDSCH decoding t1", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_deinterleaving_stats, " -> Deinterleive", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_rate_unmatching_stats, " -> Rate Unmatch", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_ldpc_decoding_stats, " -> LDPC Decode", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_unscrambling_stats, "PDSCH unscrambling", NULL, NULL, output + stroff);
|
||||
stroff += print_meas_log(&ue->dlsch_rx_pdcch_stats, "PDCCH handling", NULL, NULL, output + stroff);
|
||||
return stroff;
|
||||
}
|
||||
|
||||
static void *nrL1_UE_stats_thread(void *param)
|
||||
{
|
||||
PHY_VARS_NR_UE *ue = (PHY_VARS_NR_UE *) param;
|
||||
const int max_len = 16384;
|
||||
char output[max_len];
|
||||
char filename[30];
|
||||
snprintf(filename, 29, "nrL1_UE_stats-%d.log", ue->Mod_id);
|
||||
filename[29] = 0;
|
||||
FILE *fd = fopen(filename, "w");
|
||||
AssertFatal(fd != NULL, "Cannot open %s\n", filename);
|
||||
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
const int len = dump_L1_UE_meas_stats(ue, output, max_len);
|
||||
AssertFatal(len < max_len, "exceeded length\n");
|
||||
fwrite(output, len + 1, 1, fd); // + 1 for terminating NULL byte
|
||||
fflush(fd);
|
||||
fseek(fd, 0, SEEK_SET);
|
||||
}
|
||||
fclose(fd);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag)
|
||||
@@ -593,7 +636,7 @@ static void UE_synch(void *arg) {
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
|
||||
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) {
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa) == 0) {
|
||||
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
|
||||
hw_slot_offset = ((UE->rx_offset<<1) / UE->frame_parms.samples_per_subframe * UE->frame_parms.slots_per_subframe) +
|
||||
round((float)((UE->rx_offset<<1) % UE->frame_parms.samples_per_subframe)/UE->frame_parms.samples_per_slot0);
|
||||
@@ -666,6 +709,7 @@ void processSlotTX(void *arg) {
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
start_meas(&UE->ue_ul_indication_stats);
|
||||
nr_uplink_indication_t ul_indication;
|
||||
memset((void*)&ul_indication, 0, sizeof(ul_indication));
|
||||
|
||||
@@ -680,6 +724,7 @@ void processSlotTX(void *arg) {
|
||||
ul_indication.ue_sched_mode = rxtxD->ue_sched_mode;
|
||||
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
stop_meas(&UE->ue_ul_indication_stats);
|
||||
}
|
||||
|
||||
if ((UE->mode != loop_through_memory) && (rxtxD->ue_sched_mode != NOT_PUSCH)) {
|
||||
@@ -731,15 +776,16 @@ void processSlotRX(void *arg) {
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
|
||||
pdcp_run(&ctxt);
|
||||
}
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
rxtxD->ue_sched_mode = NOT_PUSCH;
|
||||
processSlotTX(rxtxD);
|
||||
|
||||
// Wait for PUSCH processing to finish
|
||||
notifiedFIFO_elt_t *res;
|
||||
res = pullTpool(&rxtxD->txFifo,&(get_nrUE_params()->Tpool));
|
||||
delNotifiedFIFO_elt(res);
|
||||
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
rxtxD->ue_sched_mode = NOT_PUSCH;
|
||||
processSlotTX(rxtxD);
|
||||
|
||||
} else {
|
||||
rxtxD->ue_sched_mode = SCHED_ALL;
|
||||
processSlotTX(rxtxD);
|
||||
@@ -840,26 +886,13 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
}
|
||||
|
||||
int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
||||
|
||||
// compute TO compensation that should be applied for this frame
|
||||
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
||||
UE->rx_offset > 0 ) {
|
||||
LOG_I(PHY,"!!!adjusting -1 samples!!! rx_offset == %d\n", UE->rx_offset);
|
||||
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||
return -1 ;
|
||||
int samples_shift = -(UE->rx_offset>>1);
|
||||
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||
if (samples_shift != 0) {
|
||||
LOG_I(NR_PHY,"Adjusting frame in time by %i samples\n", samples_shift);
|
||||
}
|
||||
|
||||
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
|
||||
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
|
||||
int rx_offset = UE->rx_offset - UE->frame_parms.samples_per_frame;
|
||||
LOG_I(PHY,"!!!adjusting +1 samples!!! rx_offset == %d\n", rx_offset);
|
||||
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return samples_shift;
|
||||
}
|
||||
|
||||
static inline int get_firstSymSamp(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
|
||||
@@ -1164,6 +1197,8 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,11 +422,11 @@ int main( int argc, char **argv ) {
|
||||
get_options (); //Command-line options specific for NRUE
|
||||
|
||||
get_common_options(SOFTMODEM_5GUE_BIT);
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
//randominit (0);
|
||||
set_taus_seed (0);
|
||||
|
||||
|
||||
@@ -339,7 +339,33 @@ typedef struct
|
||||
} nfapi_nr_ue_pusch_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
} fapi_nr_ul_srs_parms_v4;
|
||||
|
||||
typedef struct {
|
||||
uint16_t rnti; // UE RNTI, Value: 1->65535
|
||||
uint32_t handle; // An opaque handling returned in the SRS.indication
|
||||
uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
|
||||
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
|
||||
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
|
||||
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
|
||||
uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
|
||||
uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
|
||||
uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
|
||||
uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
|
||||
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
|
||||
uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
|
||||
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
|
||||
uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
|
||||
uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
|
||||
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
|
||||
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
|
||||
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
|
||||
uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
|
||||
uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
|
||||
uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
|
||||
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
|
||||
nfapi_nr_ue_ul_beamforming_t beamforming;
|
||||
} fapi_nr_ul_config_srs_pdu;
|
||||
|
||||
typedef struct {
|
||||
@@ -348,7 +374,7 @@ typedef struct {
|
||||
fapi_nr_ul_config_prach_pdu prach_config_pdu;
|
||||
fapi_nr_ul_config_pucch_pdu pucch_config_pdu;
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_config_pdu;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
};
|
||||
} fapi_nr_ul_config_request_pdu_t;
|
||||
|
||||
|
||||
@@ -1312,7 +1312,7 @@ typedef struct
|
||||
uint8_t comb_offset;//Transmission comb offset 𝑘 ̄ TC [TS38.211, Sec 6.4.1.4.3] Value: 0 → 1 (combSize = 0) Value: 0 → 3 (combSize = 1)
|
||||
uint8_t cyclic_shift;
|
||||
uint8_t frequency_position;
|
||||
uint8_t frequency_shift;
|
||||
uint16_t frequency_shift;
|
||||
uint8_t frequency_hopping;
|
||||
uint8_t group_or_sequence_hopping;//Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRS-Resource
|
||||
uint8_t resource_type;//Type of SRS resource allocation
|
||||
|
||||
@@ -4548,7 +4548,7 @@ static uint8_t unpack_ul_tti_request_srs_pdu(void *tlv, uint8_t **ppReadPackedMs
|
||||
pull8(ppReadPackedMsg, &srs_pdu->comb_offset, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->cyclic_shift, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_position, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_shift, end) &&
|
||||
pull16(ppReadPackedMsg, &srs_pdu->frequency_shift, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->frequency_hopping, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->group_or_sequence_hopping, end) &&
|
||||
pull8(ppReadPackedMsg, &srs_pdu->resource_type, end) &&
|
||||
|
||||
@@ -405,7 +405,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d\n", E, F, Foffset,ind, Ncb, rvidx);
|
||||
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", E, F, Foffset,ind, Ncb, rvidx, Ilbrm);
|
||||
#endif
|
||||
|
||||
if (Foffset > E) {
|
||||
@@ -502,7 +502,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
|
||||
}
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d\n", clear, E, ind, Ncb, rvidx);
|
||||
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d, Ilbrm %d\n", clear, E, ind, Ncb, rvidx, Ilbrm);
|
||||
#endif
|
||||
|
||||
if (clear==1) memset(w,0,Ncb*sizeof(int16_t));
|
||||
|
||||
@@ -195,6 +195,26 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
nr_init_csi_rs(gNB, cfg->cell_config.phy_cell_id.value);
|
||||
|
||||
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]->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);
|
||||
|
||||
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
|
||||
generate_lowpapr_typ1_refsig_sequences(SHRT_MAX);
|
||||
|
||||
@@ -546,6 +566,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
|
||||
AssertFatal(gNB->pucch[i]!=NULL,"Can't initialize pucch %d \n", i);
|
||||
}
|
||||
|
||||
for (int i=0; i<NUMBER_OF_NR_SRS_MAX; i++) {
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n",i,NUMBER_OF_NR_SRS_MAX);
|
||||
gNB->srs[i] = new_gNB_srs();
|
||||
AssertFatal(gNB->srs[i]!=NULL,"Can't initialize srs %d \n", i);
|
||||
}
|
||||
|
||||
for (int i=0; i<gNB->number_of_nr_ulsch_max; i++) {
|
||||
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH %d/%d\n",i,gNB->number_of_nr_ulsch_max);
|
||||
|
||||
@@ -128,6 +128,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_COMMON *const common_vars = &ue->common_vars;
|
||||
NR_UE_PBCH **const pbch_vars = ue->pbch_vars;
|
||||
NR_UE_PRACH **const prach_vars = ue->prach_vars;
|
||||
NR_UE_SRS **const srs_vars = ue->srs_vars;
|
||||
|
||||
int i,j,k,l,slot,symb,q;
|
||||
int gNB_id;
|
||||
int th_id;
|
||||
@@ -310,6 +312,24 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
|
||||
prach_vars[gNB_id] = (NR_UE_PRACH *)malloc16_clear(sizeof(NR_UE_PRACH));
|
||||
pbch_vars[gNB_id] = (NR_UE_PBCH *)malloc16_clear(sizeof(NR_UE_PBCH));
|
||||
srs_vars[gNB_id] = (NR_UE_SRS *)malloc16_clear(sizeof(NR_UE_SRS));
|
||||
|
||||
srs_vars[gNB_id]->active = false;
|
||||
ue->nr_srs_info = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_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));
|
||||
}
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
@@ -522,6 +542,7 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
crcTableInit();
|
||||
init_scrambling_luts();
|
||||
load_dftslib();
|
||||
init_context_synchro_nr(frame_parms);
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
@@ -533,6 +554,5 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
//generate_16qam_table();
|
||||
//generate_RIV_tables();
|
||||
//init_unscrambling_lut();
|
||||
//init_scrambling_lut();
|
||||
//set_taus_seed(1328);
|
||||
}
|
||||
|
||||
@@ -601,7 +601,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
G = G - Q_RI - Q_CQI;
|
||||
ulsch_harq->G = G;
|
||||
AssertFatal((int)G > 0,
|
||||
"FATAL: ulsch_decoding.c G < 0 (%u) : Q_RI %u, Q_CQI %u\n",G,Q_RI,Q_CQI);
|
||||
"FATAL: ulsch_decoding.c G < 0 (%u) : Q_RI %u, Q_CQI %u, nb_rb %u, Q_m %u, ulsch_harq->Nsymb_pusch %u, Qprime %u\n",
|
||||
G, Q_RI, Q_CQI, nb_rb, Q_m, ulsch_harq->Nsymb_pusch, Qprime);
|
||||
H = G + Q_CQI;
|
||||
Hprime = H/Q_m;
|
||||
// Demultiplexing/Deinterleaving of PUSCH/ACK/RI/CQI
|
||||
|
||||
@@ -44,14 +44,13 @@ void pcfich_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int16_t *d)
|
||||
{
|
||||
|
||||
uint32_t i;
|
||||
uint8_t reset;
|
||||
uint32_t x1=0, x2=0, s=0;
|
||||
uint8_t reset = 1;
|
||||
uint32_t x1 = 0; // x1 is set in lte_gold_generic
|
||||
uint32_t s = 0;
|
||||
|
||||
reset = 1;
|
||||
x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
|
||||
uint32_t x2 = ((((2*frame_parms->Nid_cell)+1)*(1+subframe))<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.7.1
|
||||
|
||||
for (i=0; i<32; i++) {
|
||||
for (uint32_t i=0; i<32; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
//printf("lte_gold[%d]=%x\n",i,s);
|
||||
|
||||
@@ -36,10 +36,46 @@
|
||||
|
||||
//#define DEBUG_CH
|
||||
//#define DEBUG_PUSCH
|
||||
//#define SRS_DEBUG
|
||||
|
||||
#define NO_INTERP 1
|
||||
#define dBc(x,y) (dB_fixed(((int32_t)(x))*(x) + ((int32_t)(y))*(y)))
|
||||
|
||||
void freq2time(uint16_t ofdm_symbol_size,
|
||||
int16_t *freq_signal,
|
||||
int16_t *time_signal) {
|
||||
|
||||
switch (ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft(IDFT_128, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 256:
|
||||
idft(IDFT_256, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 512:
|
||||
idft(IDFT_512, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 1024:
|
||||
idft(IDFT_1024, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 1536:
|
||||
idft(IDFT_1536, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 2048:
|
||||
idft(IDFT_2048, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 4096:
|
||||
idft(IDFT_4096, freq_signal, time_signal, 1);
|
||||
break;
|
||||
case 8192:
|
||||
idft(IDFT_8192, freq_signal, time_signal, 1);
|
||||
break;
|
||||
default:
|
||||
idft(IDFT_512, freq_signal, time_signal, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
@@ -273,10 +309,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
|
||||
|
||||
//for (int i= 0; i<16; i++)
|
||||
//printf("ul_ch addr %p %d\n", ul_ch+i, *(ul_ch+i));
|
||||
|
||||
|
||||
pil += 2;
|
||||
re_offset = (re_offset+2) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(soffset+symbol_offset+nushift+re_offset)];
|
||||
@@ -898,63 +934,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
#endif
|
||||
|
||||
// Convert to time domain
|
||||
|
||||
switch (gNB->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft(IDFT_128,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft(IDFT_256,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft(IDFT_1024,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft(IDFT_1536,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft(IDFT_2048,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idft(IDFT_4096,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
idft(IDFT_8192,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
default:
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
}
|
||||
|
||||
freq2time(gNB->frame_parms.ofdm_symbol_size,
|
||||
(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx]);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
@@ -1091,3 +1073,178 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
}// last symbol check
|
||||
}//Antenna loop
|
||||
}
|
||||
|
||||
uint32_t calc_power(uint16_t *x, uint32_t size) {
|
||||
uint64_t sum_x = 0;
|
||||
uint64_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];
|
||||
}
|
||||
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) {
|
||||
|
||||
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;
|
||||
|
||||
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 ls_estimated[2];
|
||||
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
|
||||
memset(srs_ls_estimated_channel[ant], 0, frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols)*sizeof(int32_t));
|
||||
memset(srs_estimated_channel_freq[ant], 0, frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols)*sizeof(int32_t));
|
||||
|
||||
int16_t *srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[0]];
|
||||
|
||||
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 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;
|
||||
|
||||
// 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.
|
||||
ls_estimated[0] = (int16_t)(((int32_t)generated_real*received_real + (int32_t)generated_imag*received_imag)>>nr_srs_info->srs_generated_signal_bits);
|
||||
ls_estimated[1] = (int16_t)(((int32_t)generated_real*received_imag - (int32_t)generated_imag*received_real)>>nr_srs_info->srs_generated_signal_bits);
|
||||
srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]] = ls_estimated[0] + (((int32_t)ls_estimated[1] << 16) & 0xFFFF0000);
|
||||
|
||||
// Channel interpolation
|
||||
if(srs_pdu->comb_size == 0) {
|
||||
if(sc_idx == 0) { // First subcarrier case
|
||||
// filt8_start is {12288,8192,4096,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_start, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(nr_srs_info->sc_list[sc_idx] < nr_srs_info->sc_list[sc_idx - 1]) { // Start of OFDM symbol case
|
||||
// filt8_start is {12288,8192,4096,0,0,0,0,0}
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx + 2]] - sizeof(uint64_t);
|
||||
multadd_real_vector_complex_scalar(filt8_start, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if((sc_idx < (nr_srs_info->sc_list_length - 1) && nr_srs_info->sc_list[sc_idx + 1] < nr_srs_info->sc_list[sc_idx])
|
||||
|| (sc_idx == (nr_srs_info->sc_list_length - 1))) { // End of OFDM symbol or last subcarrier cases
|
||||
// filt8_end is {4096,8192,12288,16384,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_end, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(sc_idx%2 == 1) { // 1st middle case
|
||||
// filt8_middle2 is {4096,8192,8192,8192,4096,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt8_middle2, ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if(sc_idx%2 == 0) { // 2nd middle case
|
||||
// filt8_middle4 is {0,0,4096,8192,8192,8192,4096,0}
|
||||
multadd_real_vector_complex_scalar(filt8_middle4, ls_estimated, srs_estimated_channel16, 8);
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]];
|
||||
}
|
||||
} else {
|
||||
if(sc_idx == 0) { // First subcarrier case
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_start, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if(nr_srs_info->sc_list[sc_idx] < nr_srs_info->sc_list[sc_idx - 1]) { // Start of OFDM symbol case
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx + 1]] - sizeof(uint64_t);
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_start, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if((sc_idx < (nr_srs_info->sc_list_length - 1) && nr_srs_info->sc_list[sc_idx + 1] < nr_srs_info->sc_list[sc_idx])
|
||||
|| (sc_idx == (nr_srs_info->sc_list_length - 1))) { // End of OFDM symbol or last subcarrier cases
|
||||
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_end, ls_estimated, srs_estimated_channel16, 16);
|
||||
} else { // Middle case
|
||||
// filt16_middle4 is {4096,8192,8192,8192,8192,8192,8192,8192,4096,0,0,0,0,0,0,0}
|
||||
multadd_real_vector_complex_scalar(filt16_middle4, ls_estimated, srs_estimated_channel16, 16);
|
||||
srs_estimated_channel16 = (int16_t *)&srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]];
|
||||
}
|
||||
}
|
||||
|
||||
#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;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"______________________________ Rx antenna %i _______________________________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,":::::::::::::::::::::::::::::::::::: %i ::::::::::::::::::::::::::::::::::::\n", subcarrier_log/12);
|
||||
LOG_I(NR_PHY,"\t __genRe________genIm__|____rxRe_________rxIm__|____lsRe________lsIm_\n");
|
||||
}
|
||||
LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
|
||||
subcarrier_log,
|
||||
generated_real, generated_imag,
|
||||
received_real, received_imag,
|
||||
ls_estimated[0], ls_estimated[1]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
// Convert to time domain
|
||||
freq2time(gNB->frame_parms.ofdm_symbol_size,
|
||||
(int16_t*) srs_estimated_channel_freq[ant],
|
||||
(int16_t*) srs_estimated_channel_time[ant]);
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][0],
|
||||
&srs_estimated_channel_time[ant][gNB->frame_parms.ofdm_symbol_size>>1],
|
||||
(gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][gNB->frame_parms.ofdm_symbol_size>>1],
|
||||
&srs_estimated_channel_time[ant][0],
|
||||
(gNB->frame_parms.ofdm_symbol_size>>1)*sizeof(int32_t));
|
||||
}
|
||||
|
||||
*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);
|
||||
|
||||
#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++) {
|
||||
int subcarrier_log = nr_srs_info->sc_list[sc_idx]-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"______________________________ Rx antenna %i _______________________________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,":::::::::::::::::::::::::::::::::::: %i ::::::::::::::::::::::::::::::::::::\n", subcarrier_log/12);
|
||||
LOG_I(NR_PHY,"\t __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm_\n");
|
||||
}
|
||||
for(int r = 0; r<R; r++) {
|
||||
LOG_I(NR_PHY,"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
|
||||
subcarrier_log+r,
|
||||
(int16_t)(srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]+r]&0xFFFF),
|
||||
(int16_t)((srs_ls_estimated_channel[ant][nr_srs_info->sc_list[sc_idx]+r]>>16)&0xFFFF),
|
||||
(int16_t)(srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]+r]&0xFFFF),
|
||||
(int16_t)((srs_estimated_channel_freq[ant][nr_srs_info->sc_list[sc_idx]+r]>>16)&0xFFFF),
|
||||
noise_real[ant*nr_srs_info->sc_list_length+sc_idx],
|
||||
noise_imag[ant*nr_srs_info->sc_list_length+sc_idx]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
LOG_I(NR_PHY,"noise_power = %u\n", *noise_power);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -62,4 +62,16 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
uint8_t nr_tti_rx,
|
||||
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);
|
||||
#endif
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
/* SS/PBCH parameters */
|
||||
#define N_RB_SS_PBCH_BLOCK (20)
|
||||
#define NB_SYMBOLS_PBCH (3)
|
||||
#define NR_N_SYMBOLS_SSB (4)
|
||||
|
||||
#define IQ_SIZE (sizeof(int16_t) * 2) /* I and Q are alternatively stored into buffers */
|
||||
#define N_SYMB_SLOT (14)
|
||||
|
||||
@@ -63,18 +63,22 @@
|
||||
|
||||
/************** VARIABLES *****************************************/
|
||||
|
||||
#define PHASE_HYPOTHESIS_NUMBER (7)
|
||||
#define PHASE_HYPOTHESIS_NUMBER (16)
|
||||
#define INDEX_NO_PHASE_DIFFERENCE (3) /* this is for no phase shift case */
|
||||
|
||||
EXTERN const int16_t phase_re_nr[PHASE_HYPOTHESIS_NUMBER]
|
||||
#ifdef INIT_VARIABLES_SSS_NR_H
|
||||
= {16383, 25101, 30791, 32767, 30791, 25101, 16383}
|
||||
// -pi/3 ---- pi/3
|
||||
= {16384,20173,23571,26509,28932,30791,32051,32687,32687,32051,30791,
|
||||
28932,26509,23571,20173,16384}
|
||||
#endif
|
||||
;
|
||||
|
||||
EXTERN const int16_t phase_im_nr[PHASE_HYPOTHESIS_NUMBER]
|
||||
#ifdef INIT_VARIABLES_SSS_NR_H
|
||||
= {-28378, -21063, -11208, 0, 11207, 21062, 28377};
|
||||
// -pi/3 ---- pi/3
|
||||
= {-28377,-25821,-22762,-19260,-15383,-11207,-6813,-2286,2286,6813,11207,
|
||||
15383,19260,22762,25821,28377}
|
||||
#endif
|
||||
;
|
||||
|
||||
@@ -92,7 +96,7 @@ int pss_ch_est_nr(PHY_VARS_NR_UE *ue,
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
|
||||
int32_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR]);
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max);
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss);
|
||||
|
||||
#undef INIT_VARIABLES_SSS_NR_H
|
||||
#undef EXTERN
|
||||
|
||||
@@ -108,22 +108,22 @@ EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 */
|
||||
/* 0 */ -3, -1, 3, 3, -1, -3,
|
||||
/* 1 */ -3, 3, -1, -1, 3, -3,
|
||||
/* 2 */ -3, -3, -3, 3, 1, -3,
|
||||
/* 3 */ 1, 1, 1, 3, -1, -3,
|
||||
/* 4 */ 1, 1, 1, -3, -1, 3,
|
||||
/* 5 */ -3, 1, -1, -3, -3, -3,
|
||||
/* 6 */ -3, 1, 3, -3, -3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, 1, -1,
|
||||
/* 8 */ -3, -1, -3, 1, -3, -3,
|
||||
/* 9 */ -3, -3, 1, -3, 3, -3,
|
||||
/* 0 */ -3, -1, 3, 3, -1, -3,
|
||||
/* 1 */ -3, 3, -1, -1, 3, -3,
|
||||
/* 2 */ -3, -3, -3, 3, 1, -3,
|
||||
/* 3 */ 1, 1, 1, 3, -1, -3,
|
||||
/* 4 */ 1, 1, 1, -3, -1, 3,
|
||||
/* 5 */ -3, 1, -1, -3, -3, -3,
|
||||
/* 6 */ -3, 1, 3, -3, -3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, 1, -1,
|
||||
/* 8 */ -3, -1, -3, 1, -3, -3,
|
||||
/* 9 */ -3, -3, 1, -3, 3, -3,
|
||||
/* 10 */ -3, 1, 3, 1, -3, -3,
|
||||
/* 11 */ -3, -1, -3, 1, 1, -3,
|
||||
/* 12 */ 1, 1, 3, -1, -3, 3,
|
||||
/* 13 */ 1, 1, 3, 3, -1, 3,
|
||||
/* 14 */ 1, 1, 1, -3, 3, -1,
|
||||
/* 15 */ -1, 1, 1, -1, 3, -3,
|
||||
/* 15 */ 1, 1, 1, -1, 3, -3,
|
||||
/* 16 */ -3, -1, -1, -1, 3, -1,
|
||||
/* 17 */ -3, -3, -1, 1, -1, -3,
|
||||
/* 18 */ -3, -3, -3, 1, -3, -1,
|
||||
@@ -146,36 +146,36 @@ EXTERN const char phi_M_ZC_12[12*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
|
||||
/* 0 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
|
||||
/* 1 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
|
||||
/* 2 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
|
||||
/* 3 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
|
||||
/* 4 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
|
||||
/* 5 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
|
||||
/* 6 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
|
||||
/* 7 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
|
||||
/* 8 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
|
||||
/* 9 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
|
||||
/* 10 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
|
||||
/* 11 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
|
||||
/* 12 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
|
||||
/* 13 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
|
||||
/* 14 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
|
||||
/* 15 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
|
||||
/* 16 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
|
||||
/* 17 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
|
||||
/* 18 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
|
||||
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
|
||||
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
|
||||
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
|
||||
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
|
||||
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
|
||||
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
|
||||
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
|
||||
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
|
||||
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
|
||||
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
|
||||
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
|
||||
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
|
||||
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
|
||||
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
|
||||
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
|
||||
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
|
||||
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
|
||||
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
|
||||
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
|
||||
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
|
||||
/* 20 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
|
||||
/* 21 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
|
||||
/* 22 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
|
||||
/* 23 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
|
||||
/* 24 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
|
||||
/* 25 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
|
||||
/* 26 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
|
||||
/* 27 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
|
||||
/* 28 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
|
||||
/* 29 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
|
||||
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
|
||||
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
|
||||
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
|
||||
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
|
||||
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
|
||||
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
|
||||
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
|
||||
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
|
||||
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
|
||||
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
@@ -185,36 +185,36 @@ EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
|
||||
/* 0 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
|
||||
/* 1 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
|
||||
/* 2 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
|
||||
/* 3 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
|
||||
/* 4 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
|
||||
/* 5 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
|
||||
/* 6 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
|
||||
/* 7 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
|
||||
/* 8 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
|
||||
/* 9 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
|
||||
/* 10 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
|
||||
/* 11 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
|
||||
/* 12 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
|
||||
/* 13 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
|
||||
/* 14 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
|
||||
/* 15 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
|
||||
/* 16 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
|
||||
/* 17 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
|
||||
/* 18 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
|
||||
/* 19 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
|
||||
/* 20 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
|
||||
/* 21 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
|
||||
/* 22 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
|
||||
/* 23 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
|
||||
/* 24 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
|
||||
/* 25 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
|
||||
/* 26 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
|
||||
/* 27 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
|
||||
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
|
||||
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
|
||||
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
|
||||
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
|
||||
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
|
||||
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
|
||||
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
|
||||
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
|
||||
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
|
||||
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
|
||||
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
|
||||
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
|
||||
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
|
||||
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
|
||||
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
|
||||
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
|
||||
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
|
||||
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
|
||||
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
|
||||
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
|
||||
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
|
||||
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
|
||||
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
|
||||
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
|
||||
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
|
||||
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
|
||||
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
|
||||
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
|
||||
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
|
||||
/* 29 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
|
||||
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
@@ -224,36 +224,36 @@ EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
|
||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||
= {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
|
||||
/* 0 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
|
||||
/* 1 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
|
||||
/* 2 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
|
||||
/* 3 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
|
||||
/* 4 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
|
||||
/* 5 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
|
||||
/* 6 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
|
||||
/* 7 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
|
||||
/* 8 */ -3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
|
||||
/* 9 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
|
||||
/* 10 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
|
||||
/* 11 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
|
||||
/* 12 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
|
||||
/* 13 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
|
||||
/* 14 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
|
||||
/* 15 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
|
||||
/* 16 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
|
||||
/* 17 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
|
||||
/* 18 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
|
||||
/* 19 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
|
||||
/* 20 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
|
||||
/* 21 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
|
||||
/* 22 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
|
||||
/* 23 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
|
||||
/* 24 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
|
||||
/* 25 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
|
||||
/* 26 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
|
||||
/* 27 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
|
||||
/* 28 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
|
||||
/* 29 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
|
||||
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
|
||||
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
|
||||
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
|
||||
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
|
||||
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
|
||||
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
|
||||
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
|
||||
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
|
||||
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
|
||||
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
|
||||
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
|
||||
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
|
||||
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
|
||||
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
|
||||
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
|
||||
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
|
||||
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
|
||||
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
|
||||
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
|
||||
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
|
||||
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
|
||||
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
|
||||
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
|
||||
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
|
||||
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
|
||||
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
|
||||
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
|
||||
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
|
||||
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
|
||||
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
|
||||
}
|
||||
#endif
|
||||
;
|
||||
|
||||
@@ -47,70 +47,11 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out) {
|
||||
|
||||
uint8_t reset, b_idx;
|
||||
uint32_t x1, x2, s=0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
for (int i=0; i<size; i++) {
|
||||
b_idx = i&0x1f;
|
||||
if (b_idx==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
if (i)
|
||||
out++;
|
||||
}
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
|
||||
uint32_t* out)
|
||||
{
|
||||
nr_codeword_scrambling(in, size, q, Nid, n_RNTI, out);
|
||||
}
|
||||
|
||||
void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out) {
|
||||
|
||||
uint32_t x1, x2, s=0,in32;
|
||||
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
#if defined(__AVX2__)
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7));
|
||||
out[i]=(in32^s);
|
||||
//printf("in[%d] %x => %x\n",i,in32,out[i]);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#elif defined(__SSE4__)
|
||||
_m128i *in128;
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in128=&((__m128i*)in)[i<<1];
|
||||
((uint16_t*)&in32)[0] = _mm128_movemask_epi8(_mm256_slli_epi16(in128[0],7));
|
||||
((uint16_t*)&in32)[1] = _mm128_movemask_epi8(_mm256_slli_epi16(in128[1],7));
|
||||
out[i]=(in32^s);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
//#elsif defined(__arm__) || defined(__aarch64)
|
||||
|
||||
#else
|
||||
nr_pdsch_codeword_scrambling(in,
|
||||
size,
|
||||
q,
|
||||
Nid,
|
||||
n_RNTI,
|
||||
out);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
int frame,
|
||||
int slot) {
|
||||
@@ -214,12 +155,12 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
memset((void*)scrambled_output[q], 0, (encoded_length>>5)*sizeof(uint32_t));
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
nr_pdsch_codeword_scrambling_optim(output,
|
||||
encoded_length,
|
||||
q,
|
||||
rel15->dataScramblingId,
|
||||
rel15->rnti,
|
||||
scrambled_output[q]);
|
||||
nr_pdsch_codeword_scrambling(output,
|
||||
encoded_length,
|
||||
q,
|
||||
rel15->dataScramblingId,
|
||||
rel15->rnti,
|
||||
scrambled_output[q]);
|
||||
|
||||
stop_meas(dlsch_scrambling_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
|
||||
@@ -108,7 +108,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
a_segments = a_segments/273 +1;
|
||||
}
|
||||
|
||||
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
NR_gNB_DLSCH_t *dlsch = malloc16(sizeof(NR_gNB_DLSCH_t));
|
||||
AssertFatal(dlsch, "cannot allocate dlsch\n");
|
||||
bzero(dlsch,sizeof(NR_gNB_DLSCH_t));
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "nr_transport_common_proto.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
void nr_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out)
|
||||
{
|
||||
uint32_t x1;
|
||||
uint32_t x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
uint32_t s = 0;
|
||||
|
||||
#if defined(__AVX2__)
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
__m256i c = ((__m256i*)in)[i];
|
||||
uint32_t in32 = _mm256_movemask_epi8(_mm256_slli_epi16(c,7));
|
||||
out[i]=(in32^s);
|
||||
//printf("in[%d] %x => %x\n",i,in32,out[i]);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#elif defined(__SSE4__)
|
||||
s=lte_gold_generic(&x1, &x2, 1);
|
||||
__m128i *in128;
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
|
||||
in128=&((__m128i*)in)[i<<1];
|
||||
uint32_t in32;
|
||||
((uint16_t*)&in32)[0] = _mm_movemask_epi8(_mm_slli_epi16(in128[0],7));
|
||||
((uint16_t*)&in32)[1] = _mm_movemask_epi8(_mm_slli_epi16(in128[1],7));
|
||||
out[i]=(in32^s);
|
||||
s=lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
//#elsif defined(__arm__) || defined(__aarch64)
|
||||
#else
|
||||
uint8_t reset = 1;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
|
||||
for (int i = 0; i < size; i++) {
|
||||
const uint8_t b_idx = i&0x1f;
|
||||
if (b_idx==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
if (i)
|
||||
out++;
|
||||
}
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void nr_codeword_unscrambling(int16_t* llr, uint32_t size, uint8_t q, uint32_t Nid, uint32_t n_RNTI)
|
||||
{
|
||||
uint32_t x1;
|
||||
uint32_t x2 = (n_RNTI << 15) + (q << 14) + Nid;
|
||||
uint32_t s = 0;
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
uint8_t *s8=(uint8_t *)&s;
|
||||
__m128i *llr128 = (__m128i*)llr;
|
||||
s = lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
for (int i = 0, j = 0; i < ((size >> 5) + ((size & 0x1f) > 0 ? 1 : 0)); i++, j += 4) {
|
||||
llr128[j] = _mm_mullo_epi16(llr128[j],byte2m128i[s8[0]]);
|
||||
llr128[j+1] = _mm_mullo_epi16(llr128[j+1],byte2m128i[s8[1]]);
|
||||
llr128[j+2] = _mm_mullo_epi16(llr128[j+2],byte2m128i[s8[2]]);
|
||||
llr128[j+3] = _mm_mullo_epi16(llr128[j+3],byte2m128i[s8[3]]);
|
||||
s = lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#else
|
||||
uint8_t reset = 1;
|
||||
|
||||
for (uint32_t i=0; i<size; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
if (((s>>(i&0x1f))&1)==1)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -77,6 +77,15 @@ void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map);
|
||||
|
||||
void init_nr_prach_tables(int N_ZC);
|
||||
|
||||
void nr_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out);
|
||||
|
||||
void nr_codeword_unscrambling(int16_t* llr, uint32_t size, uint8_t q, uint32_t Nid, uint32_t n_RNTI);
|
||||
|
||||
/**@}*/
|
||||
|
||||
void init_pucch2_luts(void);
|
||||
|
||||
@@ -307,6 +307,24 @@ int nr_find_pucch(uint16_t rnti,
|
||||
int slot,
|
||||
PHY_VARS_gNB *gNB);
|
||||
|
||||
NR_gNB_SRS_t *new_gNB_srs(void);
|
||||
|
||||
int nr_find_srs(uint16_t rnti,
|
||||
int frame,
|
||||
int slot,
|
||||
PHY_VARS_gNB *gNB);
|
||||
|
||||
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu);
|
||||
|
||||
int nr_get_srs_signal(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_received_signal);
|
||||
|
||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <stdint.h>
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
|
||||
int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
|
||||
|
||||
@@ -82,59 +81,9 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
|
||||
|
||||
}
|
||||
|
||||
void nr_ulsch_unscrambling(int16_t* llr,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI) {
|
||||
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + Nid;
|
||||
|
||||
for (uint32_t i=0; i<size; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
if (((s>>(i&0x1f))&1)==1)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
}
|
||||
|
||||
void nr_ulsch_unscrambling_optim(int16_t* llr,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI) {
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
x2 = (n_RNTI<<15) + Nid;
|
||||
|
||||
uint8_t *s8=(uint8_t *)&s;
|
||||
__m128i *llr128 = (__m128i*)llr;
|
||||
int j=0;
|
||||
s = lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++,j+=4) {
|
||||
llr128[j] = _mm_mullo_epi16(llr128[j],byte2m128i[s8[0]]);
|
||||
llr128[j+1] = _mm_mullo_epi16(llr128[j+1],byte2m128i[s8[1]]);
|
||||
llr128[j+2] = _mm_mullo_epi16(llr128[j+2],byte2m128i[s8[2]]);
|
||||
llr128[j+3] = _mm_mullo_epi16(llr128[j+3],byte2m128i[s8[3]]);
|
||||
s = lte_gold_generic(&x1, &x2, 0);
|
||||
}
|
||||
#else
|
||||
|
||||
nr_ulsch_unscrambling(llr,
|
||||
size,
|
||||
q,
|
||||
Nid,
|
||||
n_RNTI);
|
||||
#endif
|
||||
void nr_ulsch_unscrambling(int16_t* llr, uint32_t size, uint32_t Nid, uint32_t n_RNTI)
|
||||
{
|
||||
nr_codeword_unscrambling(llr, size, 0, Nid, n_RNTI);
|
||||
}
|
||||
|
||||
void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) {
|
||||
|
||||
@@ -69,18 +69,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
@param n_RNTI, CRNTI
|
||||
*/
|
||||
|
||||
void nr_ulsch_unscrambling(int16_t* llr,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI);
|
||||
|
||||
|
||||
void nr_ulsch_unscrambling_optim(int16_t* llr,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI);
|
||||
void nr_ulsch_unscrambling(int16_t* llr, uint32_t size, uint32_t Nid, uint32_t n_RNTI);
|
||||
|
||||
void nr_ulsch_procedures(PHY_VARS_gNB *gNB,
|
||||
int frame_rx,
|
||||
|
||||
@@ -119,7 +119,7 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint16_t N_RB_UL, uint
|
||||
a_segments = a_segments/273 +1;
|
||||
}
|
||||
|
||||
uint16_t ulsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
uint32_t ulsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
ulsch = (NR_gNB_ULSCH_t *)malloc16_clear(sizeof(NR_gNB_ULSCH_t));
|
||||
|
||||
ulsch->max_ldpc_iterations = max_ldpc_iterations;
|
||||
@@ -480,7 +480,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
|
||||
A = (harq_process->TBS)<<3;
|
||||
|
||||
LOG_D(PHY,"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d, Coderate %d\n",harq_pid,A,G, mcs, n_layers, nb_rb, Qm, n_layers, R);
|
||||
LOG_D(NR_PHY, "ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d, Coderate %d\n", harq_pid, A, G, mcs, n_layers, nb_rb, Qm, n_layers, R);
|
||||
|
||||
if (R<1024)
|
||||
Coderate = (float) R /(float) 1024;
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/NR_TRANSPORT/srs_rx.c
|
||||
* \brief Top-level routines for getting the SRS physical channel
|
||||
* \date 2021
|
||||
* \version 1.0
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
//#define SRS_DEBUG
|
||||
|
||||
NR_gNB_SRS_t *new_gNB_srs(void){
|
||||
NR_gNB_SRS_t *srs;
|
||||
srs = (NR_gNB_SRS_t *)malloc16(sizeof(NR_gNB_SRS_t));
|
||||
srs->active = 0;
|
||||
return (srs);
|
||||
}
|
||||
|
||||
int nr_find_srs(uint16_t rnti,
|
||||
int frame,
|
||||
int slot,
|
||||
PHY_VARS_gNB *gNB) {
|
||||
|
||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
||||
int index = -1;
|
||||
|
||||
for (int i=0; i<NUMBER_OF_NR_SRS_MAX; i++) {
|
||||
AssertFatal(gNB->srs[i]!=NULL,"gNB->srs[%d] is null\n",i);
|
||||
if ((gNB->srs[i]->active>0) &&
|
||||
(gNB->srs[i]->srs_pdu.rnti==rnti) &&
|
||||
(gNB->srs[i]->frame==frame) &&
|
||||
(gNB->srs[i]->slot==slot)) return(i);
|
||||
else if ((gNB->srs[i]->active == 0) && (index==-1)) index=i;
|
||||
}
|
||||
|
||||
if (index==-1)
|
||||
LOG_E(MAC,"SRS list is full\n");
|
||||
|
||||
return(index);
|
||||
}
|
||||
|
||||
void nr_fill_srs(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu) {
|
||||
|
||||
int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB);
|
||||
AssertFatal( (id>=0) && (id<NUMBER_OF_NR_SRS_MAX),
|
||||
"invalid id found for srs !!! rnti %04x id %d\n",srs_pdu->rnti,id);
|
||||
|
||||
NR_gNB_SRS_t *srs = gNB->srs[id];
|
||||
srs->frame = frame;
|
||||
srs->slot = slot;
|
||||
srs->active = 1;
|
||||
memcpy((void*)&srs->srs_pdu, (void*)srs_pdu, sizeof(nfapi_nr_srs_pdu_t));
|
||||
}
|
||||
|
||||
int nr_get_srs_signal(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_received_signal) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
|
||||
uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot
|
||||
uint8_t l0 = frame_parms->symbols_per_slot - 1 - srs_pdu->time_start_position; // starting symbol in this slot
|
||||
uint64_t symbol_offset = (n_symbols+l0)*frame_parms->ofdm_symbol_size;
|
||||
|
||||
int32_t *rx_signal;
|
||||
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));
|
||||
rx_signal = &rxdataF[ant][symbol_offset];
|
||||
|
||||
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]];
|
||||
|
||||
#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;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if(sc_idx == 0) {
|
||||
LOG_I(NR_PHY,"________ Rx antenna %i ________\n", ant);
|
||||
}
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,"::::::::::::: %i :::::::::::::\n", subcarrier_log/12);
|
||||
}
|
||||
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
|
||||
subcarrier_log,
|
||||
(int16_t)(srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]&0xFFFF),
|
||||
(int16_t)((srs_received_signal[ant][nr_srs_info->sc_list[sc_idx]]>>16)&0xFFFF));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -260,3 +260,26 @@ short filt8_avlip5[8] = {
|
||||
|
||||
short filt8_avlip6[8] = {
|
||||
13653,15019,16384,16384,16384,16384,16384,16384};
|
||||
|
||||
// Comb size 2
|
||||
short filt8_start[8] = {
|
||||
12288,8192,4096,0,0,0,0,0};
|
||||
|
||||
short filt8_middle2[8] = {
|
||||
4096,8192,8192,8192,4096,0,0,0};
|
||||
|
||||
short filt8_middle4[8] = {
|
||||
0,0,4096,8192,8192,8192,4096,0};
|
||||
|
||||
short filt8_end[8] = {
|
||||
4096,8192,12288,16384,0,0,0,0};
|
||||
|
||||
// Comb size 4
|
||||
short filt16_start[16] = {
|
||||
12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
||||
short filt16_middle4[16] = {
|
||||
4096,8192,8192,8192,8192,8192,8192,8192,4096,0,0,0,0,0,0,0};
|
||||
|
||||
short filt16_end[16] = {
|
||||
4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0};
|
||||
@@ -182,4 +182,15 @@ extern short filt8_avlip4[8];
|
||||
extern short filt8_avlip5[8];
|
||||
|
||||
extern short filt8_avlip6[8];
|
||||
|
||||
/*Comb size 2*/
|
||||
extern short filt8_start[8];
|
||||
extern short filt8_middle2[8];
|
||||
extern short filt8_middle4[8];
|
||||
extern short filt8_end[8];
|
||||
|
||||
/*Comb size 4*/
|
||||
extern short filt16_start[16];
|
||||
extern short filt16_middle4[16];
|
||||
extern short filt16_end[16];
|
||||
#endif
|
||||
|
||||
@@ -115,12 +115,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
}
|
||||
|
||||
if (ue->rx_offset < 0)
|
||||
ue->rx_offset += frame_parms->samples_per_frame;
|
||||
|
||||
if (ue->rx_offset >= frame_parms->samples_per_frame)
|
||||
ue->rx_offset -= frame_parms->samples_per_frame;
|
||||
|
||||
#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"AbsSubframe %d: diff = %i, rx_offset (final) = %i : clear = %d, max_pos = %d, max_pos_fil = %d, max_val = %d, sync_pos %d\n",
|
||||
subframe,
|
||||
|
||||
@@ -141,7 +141,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
|
||||
a_segments = (a_segments/273)+1;
|
||||
}
|
||||
|
||||
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
dlsch = (NR_UE_DLSCH_t *)malloc16(sizeof(NR_UE_DLSCH_t));
|
||||
|
||||
if (dlsch) {
|
||||
@@ -206,25 +206,9 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
void nr_dlsch_unscrambling(int16_t *llr,
|
||||
uint32_t size,
|
||||
uint8_t q,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI) {
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
for (int i=0; i<size; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
if (((s>>(i&0x1f))&1)==1)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
void nr_dlsch_unscrambling(int16_t *llr, uint32_t size, uint8_t q, uint32_t Nid, uint32_t n_RNTI)
|
||||
{
|
||||
nr_codeword_unscrambling(llr, size, q, Nid, n_RNTI);
|
||||
}
|
||||
|
||||
bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool last, notifiedFIFO_t *nf_p) {
|
||||
@@ -233,6 +217,10 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
|
||||
NR_UE_DLSCH_t *dlsch = (NR_UE_DLSCH_t *) rdata->dlsch;
|
||||
int r = rdata->segment_r;
|
||||
|
||||
merge_meas(&phy_vars_ue->dlsch_deinterleaving_stats, &rdata->ts_deinterleave);
|
||||
merge_meas(&phy_vars_ue->dlsch_rate_unmatching_stats, &rdata->ts_rate_unmatch);
|
||||
merge_meas(&phy_vars_ue->dlsch_ldpc_decoding_stats, &rdata->ts_ldpc_decode);
|
||||
|
||||
bool decodeSuccess = (rdata->decodeIterations < (1+dlsch->max_ldpc_iterations));
|
||||
|
||||
if (decodeSuccess) {
|
||||
@@ -295,12 +283,6 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
|
||||
void nr_processDLSegment(void* arg) {
|
||||
ldpcDecode_ue_t *rdata = (ldpcDecode_ue_t*) arg;
|
||||
NR_UE_DLSCH_t *dlsch = rdata->dlsch;
|
||||
#if UE_TIMING_TRACE //TBD
|
||||
PHY_VARS_NR_UE *phy_vars_ue = rdata->phy_vars_ue;
|
||||
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
|
||||
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
|
||||
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
|
||||
#endif
|
||||
NR_DL_UE_HARQ_t *harq_process= rdata->harq_process;
|
||||
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
|
||||
int length_dec;
|
||||
@@ -329,7 +311,7 @@ void nr_processDLSegment(void* arg) {
|
||||
__m128i *pv = (__m128i*)&z;
|
||||
__m128i *pl = (__m128i*)&l;
|
||||
|
||||
uint8_t Ilbrm = 0;
|
||||
uint8_t Ilbrm = 1;
|
||||
|
||||
Kr = harq_process->K; // [hna] overwrites this line "Kr = p_decParams->Z*kb"
|
||||
Kr_bytes = Kr>>3;
|
||||
@@ -340,21 +322,16 @@ void nr_processDLSegment(void* arg) {
|
||||
|
||||
t_nrLDPC_procBuf **p_nrLDPC_procBuf = harq_process->p_nrLDPC_procBuf;
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
start_meas(&rdata->ts_deinterleave);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
|
||||
nr_deinterleaving_ldpc(E,
|
||||
Qm,
|
||||
harq_process->w[r], // [hna] w is e
|
||||
dlsch_llr+r_offset);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
stop_meas(&rdata->ts_deinterleave);
|
||||
|
||||
start_meas(&rdata->ts_rate_unmatch);
|
||||
/* LOG_D(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,E %d, F %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
|
||||
harq_pid,r, G,E,harq_process->F,
|
||||
Kr*3,
|
||||
@@ -379,22 +356,17 @@ void nr_processDLSegment(void* arg) {
|
||||
harq_process->F,
|
||||
Kr-harq_process->F-2*(p_decoderParms->Z))==-1) {
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
stop_meas(&rdata->ts_rate_unmatch);
|
||||
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
|
||||
rdata->decodeIterations = dlsch->max_ldpc_iterations + 1;
|
||||
return;
|
||||
} else {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
stop_meas(&rdata->ts_rate_unmatch);
|
||||
|
||||
r_offset += E;
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD)) {
|
||||
LOG_I(PHY,"decoder input(segment %u) :",r);
|
||||
LOG_D(PHY,"decoder input(segment %u) :",r);
|
||||
|
||||
for (int i=0; i<E; i++)
|
||||
LOG_D(PHY,"%d : %d\n",i,harq_process->d[r][i]);
|
||||
@@ -417,9 +389,7 @@ void nr_processDLSegment(void* arg) {
|
||||
}
|
||||
|
||||
{
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
start_meas(&rdata->ts_ldpc_decode);
|
||||
//set first 2*Z_c bits to zeros
|
||||
memset(&z[0],0,2*harq_process->Z*sizeof(int16_t));
|
||||
//set Filler bits
|
||||
@@ -469,9 +439,7 @@ void nr_processDLSegment(void* arg) {
|
||||
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
stop_meas(&rdata->ts_ldpc_decode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,6 +470,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
|
||||
// HARQ stats
|
||||
phy_vars_ue->dl_stats[harq_process->round]++;
|
||||
LOG_D(PHY,"Round %d RV idx %d\n",harq_process->round,harq_process->rvidx);
|
||||
uint8_t kc;
|
||||
uint32_t Tbslbrm;// = 950984;
|
||||
uint16_t nb_rb;// = 30;
|
||||
@@ -672,6 +641,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
rdata->offset = offset;
|
||||
rdata->dlsch = dlsch;
|
||||
rdata->dlsch_id = 0;
|
||||
reset_meas(&rdata->ts_deinterleave);
|
||||
reset_meas(&rdata->ts_rate_unmatch);
|
||||
reset_meas(&rdata->ts_ldpc_decode);
|
||||
pushTpool(&(pool_dl),req);
|
||||
nbDecode++;
|
||||
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",nbDecode);
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "nr_transport_proto_ue.h"
|
||||
//#include "SCHED/defs.h"
|
||||
//#include "PHY/defs.h"
|
||||
//#include "extern.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "T.h"
|
||||
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
*/
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "nr_transport_proto_ue.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
@@ -46,7 +44,6 @@
|
||||
#include "PHY/NR_REFSIG/pss_nr.h"
|
||||
#include "PHY/NR_REFSIG/sss_nr.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
|
||||
extern openair0_config_t openair0_cfg[];
|
||||
//static nfapi_nr_config_request_t config_t;
|
||||
@@ -196,11 +193,11 @@ char prefix_string[2][9] = {"NORMAL","EXTENDED"};
|
||||
|
||||
int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
int n_frames, int sa,
|
||||
int dlsch_parallel)
|
||||
int n_frames, int sa)
|
||||
{
|
||||
|
||||
int32_t sync_pos, sync_pos_frame; // k_ssb, N_ssb_crb, sync_pos2,
|
||||
int32_t accumulated_freq_offset = 0;
|
||||
int32_t metric_tdd_ncp=0;
|
||||
uint8_t phase_tdd_ncp;
|
||||
double im, re;
|
||||
@@ -249,22 +246,30 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
LOG_I(PHY,"sync_pos %d ssb_offset %d \n",sync_pos,ue->ssb_offset);
|
||||
#endif
|
||||
|
||||
accumulated_freq_offset += ue->common_vars.freq_offset;
|
||||
|
||||
// digital compensation of FFO for SSB symbols
|
||||
if (ue->UE_fo_compensation){
|
||||
double s_time = 1/(1.0e3*fp->samples_per_subframe); // sampling time
|
||||
double off_angle = -2*M_PI*s_time*(ue->common_vars.freq_offset); // offset rotation angle compensation per sample
|
||||
if (ue->UE_fo_compensation){
|
||||
double s_time = 1/(1.0e3*fp->samples_per_subframe); // sampling time
|
||||
double off_angle = -2*M_PI*s_time*(ue->common_vars.freq_offset); // offset rotation angle compensation per sample
|
||||
|
||||
int start = is*fp->samples_per_frame+ue->ssb_offset; // start for offset correction is at ssb_offset (pss time position)
|
||||
int end = start + 4*(fp->ofdm_symbol_size + fp->nb_prefix_samples); // loop over samples in 4 symbols (ssb size), including prefix
|
||||
// In SA we need to perform frequency offset correction until the end of buffer because we need to decode SIB1
|
||||
// and we do not know yet in which slot it goes.
|
||||
|
||||
for(int n=start; n<end; n++){
|
||||
for (int ar=0; ar<fp->nb_antennas_rx; ar++) {
|
||||
re = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n]);
|
||||
im = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n+1]);
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n] = (short)(round(re*cos(n*off_angle) - im*sin(n*off_angle)));
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n+1] = (short)(round(re*sin(n*off_angle) + im*cos(n*off_angle)));
|
||||
}
|
||||
}
|
||||
// start for offset correction
|
||||
int start = sa ? is*fp->samples_per_frame : is*fp->samples_per_frame + ue->ssb_offset;
|
||||
|
||||
// loop over samples
|
||||
int end = sa ? n_frames*fp->samples_per_frame-1 : start + NR_N_SYMBOLS_SSB*(fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||
|
||||
for(int n=start; n<end; n++){
|
||||
for (int ar=0; ar<fp->nb_antennas_rx; ar++) {
|
||||
re = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n]);
|
||||
im = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n+1]);
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n] = (short)(round(re*cos(n*off_angle) - im*sin(n*off_angle)));
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n+1] = (short)(round(re*sin(n*off_angle) + im*cos(n*off_angle)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check that SSS/PBCH block is continuous inside the received buffer */
|
||||
@@ -290,7 +295,34 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
LOG_I(PHY,"Calling sss detection (normal CP)\n");
|
||||
#endif
|
||||
|
||||
rx_sss_nr(ue, proc, &metric_tdd_ncp, &phase_tdd_ncp);
|
||||
int freq_offset_sss = 0;
|
||||
rx_sss_nr(ue, proc, &metric_tdd_ncp, &phase_tdd_ncp, &freq_offset_sss);
|
||||
|
||||
accumulated_freq_offset += freq_offset_sss;
|
||||
|
||||
// digital compensation of FFO for SSB symbols
|
||||
if (ue->UE_fo_compensation){
|
||||
double s_time = 1/(1.0e3*fp->samples_per_subframe); // sampling time
|
||||
double off_angle = -2*M_PI*s_time*freq_offset_sss; // offset rotation angle compensation per sample
|
||||
|
||||
// In SA we need to perform frequency offset correction until the end of buffer because we need to decode SIB1
|
||||
// and we do not know yet in which slot it goes.
|
||||
|
||||
// start for offset correction
|
||||
int start = sa ? is*fp->samples_per_frame : is*fp->samples_per_frame + ue->ssb_offset;
|
||||
|
||||
// loop over samples
|
||||
int end = sa ? n_frames*fp->samples_per_frame-1 : start + NR_N_SYMBOLS_SSB*(fp->ofdm_symbol_size + fp->nb_prefix_samples);
|
||||
|
||||
for(int n=start; n<end; n++){
|
||||
for (int ar=0; ar<fp->nb_antennas_rx; ar++) {
|
||||
re = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n]);
|
||||
im = ((double)(((short *)ue->common_vars.rxdata[ar]))[2*n+1]);
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n] = (short)(round(re*cos(n*off_angle) - im*sin(n*off_angle)));
|
||||
((short *)ue->common_vars.rxdata[ar])[2*n+1] = (short)(round(re*sin(n*off_angle) + im*cos(n*off_angle)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nr_gold_pbch(ue);
|
||||
ret = nr_pbch_detection(proc, ue, 1); // start pbch detection at first symbol after pss
|
||||
@@ -528,8 +560,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
SI_PDSCH,
|
||||
ue->dlsch_SI[gnb_id],
|
||||
NULL,
|
||||
&ue->dlsch_SI_errors[gnb_id],
|
||||
dlsch_parallel);
|
||||
&ue->dlsch_SI_errors[gnb_id]);
|
||||
|
||||
// deactivate dlsch once dlsch proc is done
|
||||
ue->dlsch_SI[gnb_id]->active = 0;
|
||||
@@ -538,6 +569,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
}
|
||||
if (dec == false) // sib1 not decoded
|
||||
ret = -1;
|
||||
|
||||
ue->common_vars.freq_offset = accumulated_freq_offset;
|
||||
}
|
||||
// exit_fun("debug exit");
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);
|
||||
|
||||
@@ -1055,14 +1055,15 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
||||
@param[in] size, of input bits
|
||||
@param[in] Nid, cell id
|
||||
@param[in] n_RNTI, CRNTI
|
||||
@param[in] uci_on_pusch whether UCI placeholder bits need to be scrambled (true -> no optimized scrambling)
|
||||
@param[out] out, the scrambled bits
|
||||
*/
|
||||
|
||||
void nr_pusch_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out);
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
bool uci_on_pusch,
|
||||
uint32_t* out);
|
||||
|
||||
/** \brief Perform the following functionalities:
|
||||
- encoding
|
||||
@@ -1423,8 +1424,7 @@ void generate_RIV_tables(void);
|
||||
int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
PHY_VARS_NR_UE *phy_vars_ue,
|
||||
int n_frames,
|
||||
int sa,
|
||||
int dlsch_parallel);
|
||||
int sa);
|
||||
|
||||
/*!
|
||||
\brief This function gets the carrier frequencies either from FP or command-line-set global variables, depending on the availability of the latter
|
||||
|
||||
@@ -149,7 +149,7 @@ typedef struct {
|
||||
/// ACK/NAK Bundling flag
|
||||
uint8_t bundling;
|
||||
/// Concatenated "g"-sequences (for definition see 36-212 V15.4.0 2018-12, p.31)
|
||||
uint8_t g[MAX_NUM_NR_CHANNEL_BITS];
|
||||
uint8_t g[MAX_NUM_NR_CHANNEL_BITS] __attribute__ ((aligned(32)));
|
||||
/// Interleaved "h"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
|
||||
uint8_t h[MAX_NUM_NR_CHANNEL_BITS];
|
||||
/// Scrambled "b"-sequences (for definition see 36-211 V8.6 2009-03, p.14)
|
||||
|
||||
@@ -118,7 +118,7 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(uint16_t N_RB_UL,
|
||||
a_segments = a_segments/273 +1;
|
||||
}
|
||||
|
||||
uint16_t ulsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
uint32_t ulsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
|
||||
ulsch = (NR_UE_ULSCH_t *)malloc16(sizeof(NR_UE_ULSCH_t));
|
||||
|
||||
@@ -263,9 +263,9 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
|
||||
LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
|
||||
LOG_D(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",
|
||||
LOG_D(NR_PHY, "ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
|
||||
LOG_D(NR_PHY, "ulsch coding A %d G %d mod_order %d\n", A, G, mod_order);
|
||||
LOG_D(NR_PHY, "harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",
|
||||
harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator);
|
||||
|
||||
if (harq_process->first_tx == 1 ||
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
|
||||
//extern int32_t uplink_counter;
|
||||
|
||||
void nr_pusch_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out) {
|
||||
|
||||
void nr_pusch_codeword_scrambling_uci(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t* out)
|
||||
{
|
||||
uint8_t reset, b_idx;
|
||||
uint32_t x1, x2, s=0, temp_out;
|
||||
|
||||
@@ -89,7 +89,19 @@ void nr_pusch_codeword_scrambling(uint8_t *in,
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
}
|
||||
|
||||
void nr_pusch_codeword_scrambling(uint8_t *in,
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
bool uci_on_pusch,
|
||||
uint32_t* out)
|
||||
{
|
||||
if (uci_on_pusch)
|
||||
nr_pusch_codeword_scrambling_uci(in, size, Nid, n_RNTI, out);
|
||||
else
|
||||
nr_codeword_scrambling(in, size, 0, Nid, n_RNTI, out);
|
||||
}
|
||||
|
||||
void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
@@ -187,6 +199,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
available_bits,
|
||||
ulsch_ue->Nid_cell,
|
||||
rnti,
|
||||
false,
|
||||
scrambled_output[cwd_index]); // assume one codeword for the moment
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <nr-uesoftmodem.h>
|
||||
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#undef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
|
||||
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
//#include "extern.h"
|
||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
|
||||
@@ -47,11 +46,13 @@
|
||||
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
|
||||
#undef DEFINE_VARIABLES_SRS_MODULATION_NR_H
|
||||
|
||||
//#define SRS_DEBUG
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : generate_srs
|
||||
*
|
||||
* PARAMETERS : pointer to resource set
|
||||
* PARAMETERS : pointer to srs config pdu
|
||||
* pointer to transmit buffer
|
||||
* amplitude scaling for this physical signal
|
||||
* slot number of transmission
|
||||
@@ -73,84 +74,94 @@
|
||||
* - no antenna switching*
|
||||
*
|
||||
*********************************************************************/
|
||||
int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *txptr,
|
||||
int16_t amp,
|
||||
UE_nr_rxtx_proc_t *proc)
|
||||
int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *txptr,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int16_t amp,
|
||||
int frame_number,
|
||||
int slot_number)
|
||||
{
|
||||
uint8_t n_SRS_cs_max;
|
||||
uint8_t u, v_nu;
|
||||
uint8_t u;
|
||||
uint8_t v_nu;
|
||||
uint32_t f_gh = 0;
|
||||
SRS_Resource_t *p_SRS_Resource;
|
||||
int frame_number = proc->frame_tx;
|
||||
int slot_number = proc->nr_slot_tx;
|
||||
uint16_t n_SRS, n_SRS_cs_i;
|
||||
uint16_t n_SRS;
|
||||
uint16_t n_SRS_cs_i;
|
||||
double alpha_i;
|
||||
uint8_t K_TC_p;
|
||||
uint16_t n_b[B_SRS_NUMBER], F_b, subcarrier;
|
||||
uint8_t N_b, k_0_overbar_p;
|
||||
uint16_t n_b[B_SRS_NUMBER];
|
||||
uint16_t F_b;
|
||||
uint16_t subcarrier;
|
||||
uint8_t N_b;
|
||||
uint8_t k_0_overbar_p;
|
||||
|
||||
if (p_srs_resource_set->p_srs_ResourceList[0] == NULL) {
|
||||
LOG_E(PHY,"generate_srs: No resource associated with the SRS resource set!\n");
|
||||
return (-1);
|
||||
}
|
||||
else {
|
||||
if (p_srs_resource_set->number_srs_Resource <= MAX_NR_OF_SRS_RESOURCES_PER_SET) {
|
||||
p_SRS_Resource = p_srs_resource_set->p_srs_ResourceList[0];
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY,"generate_srs: resource number of this resource set %d exceeds maximum supported value %d!\n", p_srs_resource_set->number_srs_Resource, MAX_NR_OF_SRS_RESOURCES_PER_SET);
|
||||
return (-1);
|
||||
}
|
||||
// get parameters from srs_config_pdu
|
||||
uint8_t B_SRS = srs_config_pdu->bandwidth_index;
|
||||
uint8_t C_SRS = srs_config_pdu->config_index;
|
||||
uint8_t b_hop = srs_config_pdu->frequency_hopping;
|
||||
uint8_t K_TC = 2<<srs_config_pdu->comb_size;
|
||||
uint8_t K_TC_overbar = srs_config_pdu->comb_offset; // FFS_TODO_NR is this parameter for K_TC_overbar ??
|
||||
uint8_t n_SRS_cs = srs_config_pdu->cyclic_shift;
|
||||
uint8_t n_ID_SRS = srs_config_pdu->sequence_id;
|
||||
uint8_t n_shift = srs_config_pdu->frequency_position; // it adjusts the SRS allocation to align with the common resource block grid in multiples of four
|
||||
uint8_t n_RRC = srs_config_pdu->frequency_shift;
|
||||
uint8_t groupOrSequenceHopping = srs_config_pdu->group_or_sequence_hopping;
|
||||
uint8_t l_offset = srs_config_pdu->time_start_position;
|
||||
uint16_t T_SRS = srs_config_pdu->t_srs;
|
||||
uint16_t T_offset = srs_config_pdu->t_offset; // FFS_TODO_NR to check interface with RRC
|
||||
uint8_t R = 1<<srs_config_pdu->num_repetitions;
|
||||
uint8_t N_ap = 1<<srs_config_pdu->num_ant_ports; // antenna port for transmission
|
||||
uint8_t N_symb_SRS = 1<<srs_config_pdu->num_symbols; // consecutive OFDM symbols
|
||||
uint8_t l0 = frame_parms->symbols_per_slot - 1 - l_offset; // starting position in the time domain
|
||||
uint8_t k_0_p; // frequency domain starting position
|
||||
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_config_pdu->bwp_start*N_SC_RB;
|
||||
|
||||
if(nr_srs_info) {
|
||||
nr_srs_info->sc_list_length = 0;
|
||||
nr_srs_info->srs_generated_signal_bits = log2_approx(amp);
|
||||
}
|
||||
|
||||
if (p_srs_resource_set->resourceType != periodic) {
|
||||
LOG_E(PHY,"generate_srs: only SRS periodic is supported up to now!\n");
|
||||
return (-1);
|
||||
}
|
||||
/* get parameters from SRS resource configuration */
|
||||
uint8_t B_SRS = p_SRS_Resource->freqHopping_b_SRS;
|
||||
uint8_t C_SRS = p_SRS_Resource->freqHopping_c_SRS;
|
||||
uint8_t b_hop = p_SRS_Resource->freqHopping_b_hop;
|
||||
uint8_t K_TC = p_SRS_Resource->transmissionComb;
|
||||
uint8_t K_TC_overbar = p_SRS_Resource->combOffset; /* FFS_TODO_NR is this parameter for K_TC_overbar ?? */
|
||||
uint8_t n_SRS_cs = p_SRS_Resource->cyclicShift;
|
||||
uint8_t n_ID_SRS = p_SRS_Resource->sequenceId;
|
||||
uint8_t n_shift = p_SRS_Resource->freqDomainPosition; /* it adjusts the SRS allocation to align with the common resource block grid in multiples of four */
|
||||
uint8_t n_RRC = p_SRS_Resource->freqDomainShift;
|
||||
uint8_t groupOrSequenceHopping = p_SRS_Resource->groupOrSequenceHopping;
|
||||
|
||||
uint8_t l_offset = p_SRS_Resource->resourceMapping_startPosition;
|
||||
|
||||
uint16_t T_SRS = srs_period[p_SRS_Resource->SRS_Periodicity];
|
||||
uint16_t T_offset = p_SRS_Resource->SRS_Offset;; /* FFS_TODO_NR to check interface with RRC */
|
||||
uint8_t R = p_SRS_Resource->resourceMapping_repetitionFactor;
|
||||
|
||||
/* TS 38.211 6.4.1.4.1 SRS resource */
|
||||
uint8_t N_ap = (uint8_t)p_SRS_Resource->nrof_SrsPorts; /* antenna port for transmission */
|
||||
uint8_t N_symb_SRS = p_SRS_Resource->resourceMapping_nrofSymbols; /* consecutive OFDM symbols */
|
||||
uint8_t l0 = N_SYMB_SLOT - 1 - l_offset; /* starting position in the time domain */
|
||||
uint8_t k_0_p; /* frequency domain starting position */
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,"Frame = %i, slot = %i\n", frame_number, slot_number);
|
||||
LOG_I(NR_PHY,"B_SRS = %i\n", B_SRS);
|
||||
LOG_I(NR_PHY,"C_SRS = %i\n", C_SRS);
|
||||
LOG_I(NR_PHY,"b_hop = %i\n", b_hop);
|
||||
LOG_I(NR_PHY,"K_TC = %i\n", K_TC);
|
||||
LOG_I(NR_PHY,"K_TC_overbar = %i\n", K_TC_overbar);
|
||||
LOG_I(NR_PHY,"n_SRS_cs = %i\n", n_SRS_cs);
|
||||
LOG_I(NR_PHY,"n_ID_SRS = %i\n", n_ID_SRS);
|
||||
LOG_I(NR_PHY,"n_shift = %i\n", n_shift);
|
||||
LOG_I(NR_PHY,"n_RRC = %i\n", n_RRC);
|
||||
LOG_I(NR_PHY,"groupOrSequenceHopping = %i\n", groupOrSequenceHopping);
|
||||
LOG_I(NR_PHY,"l_offset = %i\n", l_offset);
|
||||
LOG_I(NR_PHY,"T_SRS = %i\n", T_SRS);
|
||||
LOG_I(NR_PHY,"T_offset = %i\n", T_offset);
|
||||
LOG_I(NR_PHY,"R = %i\n", R);
|
||||
LOG_I(NR_PHY,"N_ap = %i\n", N_ap);
|
||||
LOG_I(NR_PHY,"N_symb_SRS = %i\n", N_symb_SRS);
|
||||
LOG_I(NR_PHY,"l0 = %i\n", l0);
|
||||
#endif
|
||||
|
||||
if (N_ap != port1) {
|
||||
LOG_E(PHY, "generate_srs: this number of antenna ports %d is not yet supported!\n", N_ap);
|
||||
LOG_E(NR_PHY, "generate_srs: this number of antenna ports %d is not yet supported!\n", N_ap);
|
||||
return (-1);
|
||||
}
|
||||
if (N_symb_SRS != 1) {
|
||||
LOG_E(PHY, "generate_srs: this number of srs symbol %d is not yet supported!\n", N_symb_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: this number of srs symbol %d is not yet supported!\n", N_symb_SRS);
|
||||
return (-1);
|
||||
}
|
||||
if (groupOrSequenceHopping != neitherHopping) {
|
||||
LOG_E(PHY, "generate_srs: sequence hopping is not yet supported!\n");
|
||||
LOG_E(NR_PHY, "generate_srs: sequence hopping is not yet supported!\n");
|
||||
return (-1);
|
||||
}
|
||||
if (R == 0) {
|
||||
LOG_E(PHY, "generate_srs: this parameter repetition factor %d is not consistent !\n", R);
|
||||
LOG_E(NR_PHY, "generate_srs: this parameter repetition factor %d is not consistent !\n", R);
|
||||
return (-1);
|
||||
}
|
||||
else if (R > N_symb_SRS) {
|
||||
LOG_E(PHY, "generate_srs: R %d can not be greater than N_symb_SRS %d !\n", R, N_symb_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: R %d can not be greater than N_symb_SRS %d !\n", R, N_symb_SRS);
|
||||
return (-1);
|
||||
}
|
||||
/* see 38211 6.4.1.4.2 Sequence generation */
|
||||
@@ -163,15 +174,15 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
// delta = 1; /* delta = log2(K_TC) */
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY, "generate_srs: SRS unknown value for K_TC %d !\n", K_TC);
|
||||
LOG_E(NR_PHY, "generate_srs: SRS unknown value for K_TC %d !\n", K_TC);
|
||||
return (-1);
|
||||
}
|
||||
if (n_SRS_cs >= n_SRS_cs_max) {
|
||||
LOG_E(PHY, "generate_srs: inconsistent parameter n_SRS_cs %d >= n_SRS_cs_max %d !\n", n_SRS_cs, n_SRS_cs_max);
|
||||
LOG_E(NR_PHY, "generate_srs: inconsistent parameter n_SRS_cs %d >= n_SRS_cs_max %d !\n", n_SRS_cs, n_SRS_cs_max);
|
||||
return (-1);
|
||||
}
|
||||
if (T_SRS == 0) {
|
||||
LOG_E(PHY, "generate_srs: inconsistent parameter T_SRS %d can not be equal to zero !\n", T_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: inconsistent parameter T_SRS %d can not be equal to zero !\n", T_SRS);
|
||||
return (-1);
|
||||
}
|
||||
else
|
||||
@@ -180,7 +191,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
while (srs_periodicity[index] != T_SRS) {
|
||||
index++;
|
||||
if (index == SRS_PERIODICITY) {
|
||||
LOG_E(PHY, "generate_srs: inconsistent parameter T_SRS %d not specified !\n", T_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: inconsistent parameter T_SRS %d not specified !\n", T_SRS);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -202,10 +213,9 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
/* A UE may be configured to transmit an SRS resource on adjacent symbols within the last six symbols of a slot, */
|
||||
/* where all antenna ports of the SRS resource are mapped to each symbol of the resource */
|
||||
|
||||
|
||||
uint8_t l = p_index;
|
||||
if (l >= N_symb_SRS) {
|
||||
LOG_E(PHY, "generate_srs: number of antenna ports %d and number of srs symbols %d are different !\n", N_ap, N_symb_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: number of antenna ports %d and number of srs symbols %d are different !\n", N_ap, N_symb_SRS);
|
||||
}
|
||||
|
||||
switch(groupOrSequenceHopping) {
|
||||
@@ -247,7 +257,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOG_E(PHY, "generate_srs: unknown hopping setting %d !\n", groupOrSequenceHopping);
|
||||
LOG_E(NR_PHY, "generate_srs: unknown hopping setting %d !\n", groupOrSequenceHopping);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -274,7 +284,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
N_b = 1;
|
||||
}
|
||||
/* periodicity and offset */
|
||||
if (p_srs_resource_set->resourceType == aperiodic) {
|
||||
if (srs_config_pdu->resource_type == aperiodic) {
|
||||
n_SRS = l/R;
|
||||
}
|
||||
else {
|
||||
@@ -315,7 +325,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
k_0_p += K_TC * M_sc_b_SRS * n_b[b];
|
||||
}
|
||||
|
||||
subcarrier = (frame_parms->first_carrier_offset) + k_0_p;
|
||||
subcarrier = subcarrier_offset + k_0_p;
|
||||
if (subcarrier>frame_parms->ofdm_symbol_size) {
|
||||
subcarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
@@ -327,7 +337,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
}
|
||||
|
||||
if (ul_allocated_re[M_sc_b_SRS_index] != M_sc_b_SRS) {
|
||||
LOG_E(PHY, "generate_srs: srs uplink allocation %d can not be found! \n", M_sc_b_SRS);
|
||||
LOG_E(NR_PHY, "generate_srs: srs uplink allocation %d can not be found! \n", M_sc_b_SRS);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -363,13 +373,31 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
|
||||
txptr[subcarrier] = (real_amp & 0xFFFF) + ((imag_amp<<16)&0xFFFF0000);
|
||||
|
||||
if(nr_srs_info) {
|
||||
nr_srs_info->sc_list[nr_srs_info->sc_list_length] = subcarrier;
|
||||
nr_srs_info->sc_list_length++;
|
||||
}
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
int subcarrier_log = subcarrier-subcarrier_offset;
|
||||
if(subcarrier_log < 0) {
|
||||
subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
if( subcarrier_log%12 == 0 ) {
|
||||
LOG_I(NR_PHY,"------------ %d ------------\n", subcarrier_log/12);
|
||||
}
|
||||
LOG_I(NR_PHY,"(%d) \t%i\t%i\n", subcarrier_log, (int16_t)(real_amp&0xFFFF), (int16_t)(imag_amp&0xFFFF));
|
||||
#endif
|
||||
|
||||
subcarrier += (K_TC); /* subcarrier increment */
|
||||
|
||||
if (subcarrier >= frame_parms->ofdm_symbol_size)
|
||||
if (subcarrier >= frame_parms->ofdm_symbol_size) {
|
||||
subcarrier=subcarrier-frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
}
|
||||
/* process next symbol */
|
||||
txptr = txptr + frame_parms->ofdm_symbol_size;
|
||||
//txptr = txptr + frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
return (0);
|
||||
@@ -377,40 +405,7 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_srs_period_nr
|
||||
*
|
||||
* PARAMETERS : pointer to resource set
|
||||
* pointer to transmit buffer
|
||||
* amplitude scaling for this physical signal
|
||||
* slot number of transmission
|
||||
* RETURN : 0 if it is a valid slot for transmitting srs
|
||||
* -1 if srs should not be transmitted
|
||||
*
|
||||
* DESCRIPTION : for periodic,
|
||||
*
|
||||
*********************************************************************/
|
||||
int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource, NR_DL_FRAME_PARMS *frame_parms, int frame_tx, int slot_tx)
|
||||
{
|
||||
uint16_t T_SRS = srs_period[p_SRS_Resource->SRS_Periodicity];
|
||||
uint16_t T_offset = p_SRS_Resource->SRS_Offset; /* FFS_TODO_NR to check interface */
|
||||
|
||||
if (T_offset > T_SRS) {
|
||||
LOG_E(PHY,"is_srs_occasion_nr: T_offset %d is greater than T_SRS %d!\n", T_offset, T_SRS);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int16_t N_slot_frame = frame_parms->slots_per_frame;
|
||||
if ((N_slot_frame*frame_tx + slot_tx - T_offset)%T_SRS == 0) {
|
||||
return (0);
|
||||
}
|
||||
else {
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : ue_srs_procedure_nr
|
||||
* NAME : ue_srs_procedures_nr
|
||||
*
|
||||
* PARAMETERS : pointer to ue context
|
||||
* pointer to rxtx context*
|
||||
@@ -422,54 +417,51 @@ int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource, NR_DL_FRAME_PARMS *frame_pa
|
||||
* send srs according to current configuration
|
||||
*
|
||||
*********************************************************************/
|
||||
int ue_srs_procedure_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_id)
|
||||
int ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id)
|
||||
{
|
||||
|
||||
if(!ue->srs_vars[0]->active) {
|
||||
return -1;
|
||||
}
|
||||
ue->srs_vars[0]->active = false;
|
||||
|
||||
nfapi_nr_srs_pdu_t *srs_config_pdu = (nfapi_nr_srs_pdu_t*)&ue->srs_vars[0]->srs_config_pdu;
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY,"Frame = %i, slot = %i\n", proc->frame_tx, proc->nr_slot_tx);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->rnti = 0x%04x\n", srs_config_pdu->rnti);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->handle = %u\n", srs_config_pdu->handle);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->bwp_size = %u\n", srs_config_pdu->bwp_size);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->bwp_start = %u\n", srs_config_pdu->bwp_start);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->subcarrier_spacing = %u\n", srs_config_pdu->subcarrier_spacing);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->cyclic_prefix = %u (0: Normal; 1: Extended)\n", srs_config_pdu->cyclic_prefix);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->num_ant_ports = %u (0 = 1 port, 1 = 2 ports, 2 = 4 ports)\n", srs_config_pdu->num_ant_ports);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->num_symbols = %u (0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols)\n", srs_config_pdu->num_symbols);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->num_repetitions = %u (0 = 1, 1 = 2, 2 = 4)\n", srs_config_pdu->num_repetitions);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->time_start_position = %u\n", srs_config_pdu->time_start_position);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->config_index = %u\n", srs_config_pdu->config_index);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->sequence_id = %u\n", srs_config_pdu->sequence_id);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->bandwidth_index = %u\n", srs_config_pdu->bandwidth_index);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->comb_size = %u (0 = comb size 2, 1 = comb size 4, 2 = comb size 8)\n", srs_config_pdu->comb_size);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->comb_offset = %u\n", srs_config_pdu->comb_offset);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->cyclic_shift = %u\n", srs_config_pdu->cyclic_shift);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->frequency_position = %u\n", srs_config_pdu->frequency_position);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->frequency_shift = %u\n", srs_config_pdu->frequency_shift);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->frequency_hopping = %u\n", srs_config_pdu->frequency_hopping);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->group_or_sequence_hopping = %u (0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping)\n", srs_config_pdu->group_or_sequence_hopping);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->resource_type = %u (0: aperiodic, 1: semi-persistent, 2: periodic)\n", srs_config_pdu->resource_type);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->t_srs = %u\n", srs_config_pdu->t_srs);
|
||||
LOG_I(NR_PHY,"srs_config_pdu->t_offset = %u\n", srs_config_pdu->t_offset);
|
||||
#endif
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &(ue->frame_parms);
|
||||
SRS_NR *p_srs_nr = &(ue->frame_parms.srs_nr);
|
||||
SRS_ResourceSet_t *p_srs_resource_set = frame_parms->srs_nr.p_SRS_ResourceSetList[p_srs_nr->active_srs_Resource_Set];
|
||||
int generate_srs = 0;
|
||||
uint16_t symbol_offset = (frame_parms->symbols_per_slot - 1 - srs_config_pdu->time_start_position)*frame_parms->ofdm_symbol_size;
|
||||
|
||||
/* is there any resource set which has been configurated ? */
|
||||
if (p_srs_nr->number_srs_Resource_Set != 0) {
|
||||
|
||||
/* what is the current active resource set ? */
|
||||
if (p_srs_nr->active_srs_Resource_Set > MAX_NR_OF_SRS_RESOURCE_SET) {
|
||||
LOG_W(PHY,"phy_procedures_UE_TX: srs active %d greater than maximum %d!\n", p_srs_nr->active_srs_Resource_Set, MAX_NR_OF_SRS_RESOURCE_SET);
|
||||
}
|
||||
else {
|
||||
/* SRS resource set configurated ? */
|
||||
if (p_srs_resource_set != NULL) {
|
||||
|
||||
SRS_Resource_t *p_srs_resource = frame_parms->srs_nr.p_SRS_ResourceSetList[p_srs_nr->active_srs_Resource_Set]->p_srs_ResourceList[0];
|
||||
|
||||
/* SRS resource configurated ? */
|
||||
if (p_srs_resource != NULL) {
|
||||
if (p_srs_resource_set->resourceType == periodic) {
|
||||
if (is_srs_period_nr(p_srs_resource, frame_parms, proc->frame_tx, proc->nr_slot_tx) == 0) {
|
||||
generate_srs = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_W(PHY,"phy_procedures_UE_TX: no configurated srs resource!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (generate_srs == 1) {
|
||||
int16_t txptr = AMP;
|
||||
uint16_t nsymb = (ue->frame_parms.Ncp==0) ? 14:12;
|
||||
uint16_t symbol_offset = (int)ue->frame_parms.ofdm_symbol_size*((proc->nr_slot_tx*nsymb)+(nsymb-1));
|
||||
if (generate_srs_nr(p_srs_resource_set, frame_parms, &ue->common_vars.txdataF[eNB_id][symbol_offset], txptr, proc) == 0) {
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return (-1);
|
||||
if (generate_srs_nr(srs_config_pdu, frame_parms, &ue->common_vars.txdataF[gNB_id][symbol_offset], ue->nr_srs_info,
|
||||
AMP, proc->frame_tx, proc->nr_slot_tx) == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,15 +136,19 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
|
||||
/** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 38.211 6.4.1.4 Sounding reference signal
|
||||
@param frame_parms NR DL Frame parameters
|
||||
@param txdataF pointer to the frequency domain TX signal
|
||||
@param nr_srs_info pointer to the srs info structure
|
||||
@param amp amplitude of generated signal
|
||||
@param proc pointer to the transmit parameters
|
||||
@param frame_number frame number
|
||||
@param slot_number slot number
|
||||
@returns 0 on success -1 on error with message */
|
||||
|
||||
int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *txptr,
|
||||
int16_t amp,
|
||||
UE_nr_rxtx_proc_t *proc);
|
||||
int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *txptr,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int16_t amp,
|
||||
int frame_number,
|
||||
int slot_number);
|
||||
|
||||
/** \brief This function checks for periodic srs if srs should be transmitted in this slot
|
||||
* @param p_SRS_Resource pointer to active resource
|
||||
@@ -155,13 +159,14 @@ int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
|
||||
int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
int frame_tx, int slot_tx);
|
||||
|
||||
/** \brief This function processes srs configuration
|
||||
* @param ue context
|
||||
@param rxtx context
|
||||
@param current eNB identifier
|
||||
@param current gNB_id identifier
|
||||
@returns 0 if srs is transmitted -1 otherwise */
|
||||
|
||||
int ue_srs_procedure_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_id);
|
||||
int ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id);
|
||||
|
||||
#undef EXTERN
|
||||
#undef INIT_VARIABLES_SRS_MODULATION_NR_H
|
||||
|
||||
@@ -420,7 +420,7 @@ int pss_sss_extract_nr(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max)
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss)
|
||||
{
|
||||
uint8_t i;
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR];
|
||||
@@ -558,5 +558,19 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric,
|
||||
}
|
||||
//#endif
|
||||
|
||||
int re = 0;
|
||||
int im = 0;
|
||||
d = (int16_t *)&d_sss[Nid2][Nid1];
|
||||
for(i = 0; i<LENGTH_SSS_NR; i++) {
|
||||
re += d[i]*sss[2*i];
|
||||
im += d[i]*sss[2*i+1];
|
||||
}
|
||||
double ffo_sss = atan2(im,re)/M_PI/4.3;
|
||||
*freq_offset_sss = (int)(ffo_sss*frame_parms->subcarrier_spacing);
|
||||
|
||||
double ffo_pss = ((double)ue->common_vars.freq_offset)/frame_parms->subcarrier_spacing;
|
||||
LOG_I(NR_PHY, "ffo_pss %f (%i Hz), ffo_sss %f (%i Hz), ffo_pss+ffo_sss %f (%i Hz)\n",
|
||||
ffo_pss, (int)(ffo_pss*frame_parms->subcarrier_spacing), ffo_sss, *freq_offset_sss, ffo_pss+ffo_sss, (int)((ffo_pss+ffo_sss)*frame_parms->subcarrier_spacing));
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -179,6 +179,16 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline void merge_meas(time_stats_t *dst_ts, time_stats_t *src_ts)
|
||||
{
|
||||
if (!opp_enabled)
|
||||
return;
|
||||
dst_ts->trials += src_ts->trials;
|
||||
dst_ts->diff += src_ts->diff;
|
||||
if (src_ts->max > dst_ts->max)
|
||||
dst_ts->max = src_ts->max;
|
||||
}
|
||||
|
||||
extern notifiedFIFO_t measur_fifo;
|
||||
#define CPUMEASUR_SECTION "cpumeasur"
|
||||
|
||||
|
||||
@@ -397,6 +397,16 @@ typedef struct {
|
||||
nfapi_nr_pucch_pdu_t pucch_pdu;
|
||||
} NR_gNB_PUCCH_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t active;
|
||||
/// Frame where current SRS pdu was received
|
||||
uint32_t frame;
|
||||
/// Slot where current SRS pdu was received
|
||||
uint32_t slot;
|
||||
/// ULSCH PDU
|
||||
nfapi_nr_srs_pdu_t srs_pdu;
|
||||
} NR_gNB_SRS_t;
|
||||
|
||||
typedef struct {
|
||||
/// \brief Pointers (dynamic) to the received data in the time domain.
|
||||
/// - first index: rx antenna [0..nb_antennas_rx[
|
||||
@@ -757,6 +767,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
NR_gNB_PRACH prach_vars;
|
||||
NR_gNB_PUSCH *pusch_vars[NUMBER_OF_NR_ULSCH_MAX];
|
||||
NR_gNB_PUCCH_t *pucch[NUMBER_OF_NR_PUCCH_MAX];
|
||||
NR_gNB_SRS_t *srs[NUMBER_OF_NR_SRS_MAX];
|
||||
NR_gNB_PDCCH_t pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
|
||||
NR_gNB_UL_PDCCH_t ul_pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
|
||||
NR_gNB_DLSCH_t *dlsch[NUMBER_OF_NR_DLSCH_MAX][2]; // Nusers times two spatial streams
|
||||
@@ -770,6 +781,9 @@ typedef struct PHY_VARS_gNB_s {
|
||||
NR_gNB_UCI_STATS_t uci_stats[NUMBER_OF_NR_UCI_STATS_MAX];
|
||||
t_nrPolar_params *uci_polarParams;
|
||||
|
||||
/// SRS variables
|
||||
nr_srs_info_t *nr_srs_info[NUMBER_OF_NR_SRS_MAX];
|
||||
|
||||
uint8_t pbch_configured;
|
||||
char gNB_generate_rar;
|
||||
|
||||
|
||||
@@ -706,6 +706,11 @@ typedef struct {
|
||||
fapi_nr_ul_config_prach_pdu prach_pdu;
|
||||
} NR_UE_PRACH;
|
||||
|
||||
typedef struct {
|
||||
bool active;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
} NR_UE_SRS;
|
||||
|
||||
// structure used for multiple SSB detection
|
||||
typedef struct NR_UE_SSB {
|
||||
uint8_t i_ssb; // i_ssb between 0 and 7 (it corresponds to ssb_index only for Lmax=4,8)
|
||||
@@ -815,6 +820,7 @@ typedef struct {
|
||||
NR_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PDCCH *pdcch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_SRS *srs_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PUSCH *pusch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_PUCCH *pucch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX];
|
||||
NR_UE_DLSCH_t *dlsch[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_gNB_MAX][NR_MAX_NB_CODEWORDS]; // two RxTx Threads
|
||||
@@ -967,6 +973,8 @@ typedef struct {
|
||||
/// PUSCH contention-based access vars
|
||||
PUSCH_CA_CONFIG_DEDICATED pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
|
||||
|
||||
/// SRS variables
|
||||
nr_srs_info_t *nr_srs_info;
|
||||
|
||||
//#if defined(UPGRADE_RAT_NR)
|
||||
#if 1
|
||||
@@ -1004,6 +1012,8 @@ typedef struct {
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx[RX_NB_TH];
|
||||
|
||||
time_stats_t ue_ul_indication_stats;
|
||||
|
||||
uint32_t use_ia_receiver;
|
||||
|
||||
time_stats_t ofdm_mod_stats;
|
||||
@@ -1012,7 +1022,6 @@ typedef struct {
|
||||
time_stats_t ulsch_modulation_stats;
|
||||
time_stats_t ulsch_segmentation_stats;
|
||||
time_stats_t ulsch_rate_matching_stats;
|
||||
time_stats_t ulsch_turbo_encoding_stats;
|
||||
time_stats_t ulsch_interleaving_stats;
|
||||
time_stats_t ulsch_multiplexing_stats;
|
||||
|
||||
@@ -1025,6 +1034,7 @@ typedef struct {
|
||||
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t dlsch_procedures_stat[RX_NB_TH];
|
||||
|
||||
time_stats_t rx_pdsch_stats;
|
||||
time_stats_t ofdm_demod_stats;
|
||||
time_stats_t dlsch_rx_pdcch_stats;
|
||||
time_stats_t rx_dft_stats;
|
||||
@@ -1033,13 +1043,13 @@ typedef struct {
|
||||
time_stats_t dlsch_decoding_stats[2];
|
||||
time_stats_t dlsch_demodulation_stats;
|
||||
time_stats_t dlsch_rate_unmatching_stats;
|
||||
time_stats_t dlsch_turbo_decoding_stats;
|
||||
time_stats_t dlsch_ldpc_decoding_stats;
|
||||
time_stats_t dlsch_deinterleaving_stats;
|
||||
time_stats_t dlsch_llr_stats;
|
||||
time_stats_t dlsch_llr_stats_parallelization[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
|
||||
time_stats_t dlsch_unscrambling_stats;
|
||||
time_stats_t dlsch_rate_matching_stats;
|
||||
time_stats_t dlsch_turbo_encoding_stats;
|
||||
time_stats_t dlsch_ldpc_encoding_stats;
|
||||
time_stats_t dlsch_interleaving_stats;
|
||||
time_stats_t dlsch_tc_init_stats;
|
||||
time_stats_t dlsch_tc_alpha_stats;
|
||||
@@ -1098,6 +1108,9 @@ typedef struct LDPCDecode_ue_s {
|
||||
int offset;
|
||||
int Tbslbrm;
|
||||
int decodeIterations;
|
||||
time_stats_t ts_deinterleave;
|
||||
time_stats_t ts_rate_unmatch;
|
||||
time_stats_t ts_ldpc_decode;
|
||||
} ldpcDecode_ue_t;
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/defs.h"
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
#define MAX_NUM_NR_ULSCH_SEGMENTS 34
|
||||
#define MAX_NR_ULSCH_PAYLOAD_BYTES (MAX_NUM_NR_ULSCH_SEGMENTS*1056)
|
||||
|
||||
#define MAX_NUM_NR_SRS_SYMBOLS 4
|
||||
|
||||
#define MAX_NUM_NR_CHANNEL_BITS (14*273*12*8) // 14 symbols, 273 RB
|
||||
#define MAX_NUM_NR_RE (14*273*12)
|
||||
#define NR_RX_NB_TH 1
|
||||
@@ -249,6 +251,19 @@ typedef struct {
|
||||
uint8_t init_msg1;
|
||||
} NR_PRACH_RESOURCES_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t sc_list_length;
|
||||
uint16_t sc_list[6 * NR_MAX_NB_RB];
|
||||
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;
|
||||
} nr_srs_info_t;
|
||||
|
||||
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
|
||||
|
||||
typedef uint32_t (*get_samples_per_slot_t)(int slot, NR_DL_FRAME_PARMS* fp);
|
||||
|
||||
@@ -211,10 +211,10 @@ typedef enum {
|
||||
srs_sl2560 = 16
|
||||
} SRS_Periodicity_t;
|
||||
|
||||
#define NB_SRS_PERIOD (17)
|
||||
#define NB_SRS_PERIOD (18)
|
||||
|
||||
static const uint16_t srs_period[NB_SRS_PERIOD]
|
||||
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
|
||||
= { 0, 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
|
||||
;
|
||||
|
||||
/// SRS_Resource of SRS_Config information element from 38.331 RRC specifications
|
||||
|
||||
@@ -227,6 +227,10 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
nr_fill_prach(gNB, UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
if (gNB->RU_list[0]->if_south == LOCAL_RF) nr_fill_prach_ru(gNB->RU_list[0], UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
break;
|
||||
case NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE:
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
nr_fill_srs(gNB,UL_tti_req->SFN, UL_tti_req->Slot, &UL_tti_req->pdus_list[i].srs_pdu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,19 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "sched_nr.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "sched_nr.h"
|
||||
#include "SCHED/sched_common_extern.h"
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h"
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
|
||||
#include "fapi_nr_l1.h"
|
||||
@@ -39,6 +33,7 @@
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
|
||||
#include "T.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
@@ -183,7 +178,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
|
||||
for (int i=0;i<NUMBER_OF_NR_CSIRS_MAX;i++){
|
||||
NR_gNB_CSIRS_t *csirs = &msgTx->csirs_pdu[i];
|
||||
if ((csirs->active == 1)) {
|
||||
if (csirs->active == 1) {
|
||||
LOG_D(PHY, "CSI-RS generation started in frame %d.%d\n",frame,slot);
|
||||
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params = csirs->csirs_pdu.csi_rs_pdu_rel15;
|
||||
nr_generate_csi_rs(gNB, AMP, csi_params, gNB->gNB_config.cell_config.phy_cell_id.value, slot);
|
||||
@@ -191,8 +186,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
}
|
||||
|
||||
if (do_meas==1) stop_meas(&msgTx->phy_proc_tx);
|
||||
|
||||
// if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||
|
||||
//apply the OFDM symbol rotation here
|
||||
@@ -201,21 +194,10 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
||||
//pthread_mutex_unlock(&mutextest);
|
||||
|
||||
if (do_meas==1) stop_meas(&msgTx->phy_proc_tx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
if ((cfg->subframe_config.duplex_mode.value == TDD) &&
|
||||
((nr_slot_select(fp,frame,slot)&NR_DOWNLINK_SLOT)==SF_DL)) return;
|
||||
|
||||
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,1);
|
||||
|
||||
*/
|
||||
|
||||
void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
||||
ldpcDecode_t *rdata = (ldpcDecode_t*) NotifiedFifoData(req);
|
||||
NR_UL_gNB_HARQ_t *ulsch_harq = rdata->ulsch_harq;
|
||||
@@ -369,11 +351,10 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
|
||||
//------------------- ULSCH unscrambling -------------------
|
||||
//----------------------------------------------------------
|
||||
start_meas(&gNB->ulsch_unscrambling_stats);
|
||||
nr_ulsch_unscrambling_optim(gNB->pusch_vars[ULSCH_id]->llr,
|
||||
G,
|
||||
0,
|
||||
pusch_pdu->data_scrambling_id,
|
||||
pusch_pdu->rnti);
|
||||
nr_ulsch_unscrambling(gNB->pusch_vars[ULSCH_id]->llr,
|
||||
G,
|
||||
pusch_pdu->data_scrambling_id,
|
||||
pusch_pdu->rnti);
|
||||
stop_meas(&gNB->ulsch_unscrambling_stats);
|
||||
//----------------------------------------------------------
|
||||
//--------------------- ULSCH decoding ---------------------
|
||||
@@ -601,6 +582,20 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0;i<NUMBER_OF_NR_SRS_MAX;i++) {
|
||||
NR_gNB_SRS_t *srs = gNB->srs[i];
|
||||
if (srs) {
|
||||
if ((srs->active == 1) && (srs->frame == frame_rx) && (srs->slot == slot_rx)) {
|
||||
nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu;
|
||||
for(int symbol = 0; symbol<(1<<srs_pdu->num_symbols); symbol++) {
|
||||
for(rb = srs_pdu->bwp_start; rb < (srs_pdu->bwp_start+srs_pdu->bwp_size); rb++) {
|
||||
gNB->rb_mask_ul[gNB->frame_parms.symbols_per_slot-srs_pdu->time_start_position-1+symbol][rb>>5] |= 1<<(rb&31);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
@@ -808,6 +803,43 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0;i<NUMBER_OF_NR_SRS_MAX;i++) {
|
||||
NR_gNB_SRS_t *srs = gNB->srs[i];
|
||||
if (srs) {
|
||||
if ((srs->active == 1) && (srs->frame == frame_rx) && (srs->slot == slot_rx)) {
|
||||
|
||||
LOG_D(NR_PHY, "(%d.%d) gNB is waiting for SRS, id = %i\n", frame_rx, slot_rx, i);
|
||||
|
||||
nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu;
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
nr_get_srs_signal(gNB,frame_rx,slot_rx,srs_pdu, gNB->nr_srs_info[i], 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);
|
||||
|
||||
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(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)));
|
||||
|
||||
srs->active = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stop_meas(&gNB->phy_proc_rx);
|
||||
// figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS
|
||||
if ((frame_rx&127) == 0 && slot_rx==19) {
|
||||
|
||||
@@ -358,31 +358,12 @@ int16_t nr_pucch_power_cntl(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t s
|
||||
*/
|
||||
void nr_pusch_power_cntl(PHY_VARS_NR_UE *phy_vars_ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag);
|
||||
|
||||
/*! \brief This function implements the power control mechanism for SRS from 36.213.
|
||||
@param phy_vars_ue PHY variables
|
||||
@param proc Pointer to proc descriptor
|
||||
@param eNB_id Index of eNB
|
||||
@param j index of type of PUSCH (SPS, Normal, Msg3)
|
||||
@returns Transmit power
|
||||
*/
|
||||
void nr_srs_power_cntl(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t *pnb_rb_srs, uint8_t abstraction_flag);
|
||||
|
||||
void nr_get_cqipmiri_params(PHY_VARS_NR_UE *ue,uint8_t eNB_id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void nr_dump_dlsch(PHY_VARS_NR_UE *phy_vars_ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe,uint8_t harq_pid);
|
||||
void nr_dump_dlsch_SI(PHY_VARS_NR_UE *phy_vars_ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
||||
void nr_dump_dlsch_ra(PHY_VARS_NR_UE *phy_vars_ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
||||
|
||||
|
||||
int nr_is_srs_occasion_common(NR_DL_FRAME_PARMS *frame_parms,int frame_tx,int subframe_tx);
|
||||
|
||||
void nr_compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
|
||||
|
||||
void set_tx_harq_id(NR_UE_ULSCH_t *ulsch, int harq_pid, int slot_tx);
|
||||
int get_tx_harq_id(NR_UE_ULSCH_t *ulsch, int slot_tx);
|
||||
|
||||
@@ -425,8 +406,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
PDSCH_t pdsch,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
int *dlsch_errors,
|
||||
uint8_t dlsch_parallel);
|
||||
int *dlsch_errors);
|
||||
|
||||
int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
|
||||
@@ -336,6 +336,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
/* PUCCH */
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_config_pdu;
|
||||
LOG_D(PHY, "%d.%d ul B ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
|
||||
/* SRS */
|
||||
fapi_nr_ul_config_srs_pdu *srs_config_pdu;
|
||||
|
||||
switch (pdu_type){
|
||||
|
||||
@@ -411,6 +413,15 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
LOG_D(PHY, "%d.%d ul A ul_config %p t %d pdu_done %d number_pdus %d\n", scheduled_response->frame, slot, ul_config, pdu_type, pdu_done, ul_config->number_pdus);
|
||||
break;
|
||||
|
||||
case (FAPI_NR_UL_CONFIG_TYPE_SRS):
|
||||
// srs config pdu
|
||||
srs_config_pdu = &ul_config->ul_config_list[i].srs_config_pdu;
|
||||
memcpy((void*)&(PHY_vars_UE_g[module_id][cc_id]->srs_vars[gNB_id]->srs_config_pdu), (void*)srs_config_pdu, sizeof(fapi_nr_ul_config_srs_pdu));
|
||||
PHY_vars_UE_g[module_id][cc_id]->srs_vars[gNB_id]->active = true;
|
||||
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
|
||||
pdu_done++;
|
||||
break;
|
||||
|
||||
default:
|
||||
ul_config->ul_config_list[i].pdu_type = FAPI_NR_UL_CONFIG_TYPE_DONE; // not handle it any more
|
||||
pdu_done++; // count the no of pdu processed
|
||||
|
||||
@@ -38,15 +38,12 @@
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "SCHED_NR_UE/defs.h"
|
||||
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
|
||||
#include "SCHED_NR/extern.h"
|
||||
#include "SCHED_NR_UE/phy_sch_processing_time.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
#ifdef EMOS
|
||||
#include "SCHED/phy_procedures_emos.h"
|
||||
#endif
|
||||
@@ -60,6 +57,7 @@
|
||||
//#define NR_PDCCH_SCHED_DEBUG
|
||||
//#define NR_PUCCH_SCHED
|
||||
//#define NR_PUCCH_SCHED_DEBUG
|
||||
//#define NR_PDSCH_DEBUG
|
||||
|
||||
#ifndef PUCCH
|
||||
#define PUCCH
|
||||
@@ -284,16 +282,17 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
|
||||
|
||||
LOG_D(PHY,"****** start TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx);
|
||||
|
||||
|
||||
start_meas(&ue->phy_proc_tx);
|
||||
|
||||
if (ue->UE_mode[gNB_id] <= PUSCH){
|
||||
|
||||
for (uint8_t harq_pid = 0; harq_pid < ue->ulsch[proc->thread_id][gNB_id][0]->number_harq_processes_for_pusch; harq_pid++) {
|
||||
if (ue->ulsch[proc->thread_id][gNB_id][0]->harq_processes[harq_pid]->status == ACTIVE)
|
||||
nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, proc->thread_id, gNB_id);
|
||||
}
|
||||
}
|
||||
|
||||
if (ue->UE_mode[gNB_id] == PUSCH) {
|
||||
ue_srs_procedures_nr(ue, proc, gNB_id);
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT);
|
||||
@@ -493,187 +492,8 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][gNB_id];
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &pdcch_vars->pdcch_config[n_ss];
|
||||
|
||||
/*
|
||||
// unsigned int dci_cnt=0, i; //removed for nr_ue_pdcch_procedures and added in the loop for nb_coreset_active
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_ue_pdcch_procedures() \n");
|
||||
#endif
|
||||
start_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
|
||||
int frame_rx = proc->frame_rx;
|
||||
int nr_slot_rx = proc->nr_slot_rx;
|
||||
NR_DCI_ALLOC_t dci_alloc_rx[8];
|
||||
|
||||
//uint8_t next1_thread_id = proc->thread_id== (RX_NB_TH-1) ? 0:(proc->thread_id+1);
|
||||
//uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
|
||||
|
||||
|
||||
// table dci_fields_sizes_cnt contains dci_fields_sizes for each time a dci is decoded in the slot
|
||||
// each element represents the size in bits for each dci field, for each decoded dci -> [dci_cnt-1]
|
||||
// each time a dci is decode at dci_cnt, the values of the table dci_fields_sizes[i][j] will be copied at table dci_fields_sizes_cnt[dci_cnt-1][i][j]
|
||||
// table dci_fields_sizes_cnt[dci_cnt-1][i][j] will then be used in function nr_extract_dci_info
|
||||
uint8_t dci_fields_sizes_cnt[MAX_NR_DCI_DECODED_SLOT][NBR_NR_DCI_FIELDS][NBR_NR_FORMATS];
|
||||
|
||||
int nb_searchspace_active=0;
|
||||
NR_UE_PDCCH **pdcch_vars = ue->pdcch_vars[proc->thread_id];
|
||||
NR_UE_PDCCH *pdcch_vars2 = ue->pdcch_vars[proc->thread_id][gNB_id];
|
||||
// s in TS 38.212 Subclause 10.1, for each active BWP the UE can deal with 10 different search spaces
|
||||
// Higher layers have updated the number of searchSpaces with are active in the current slot and this value is stored in variable nb_searchspace_total
|
||||
int nb_searchspace_total = pdcch_vars2->nb_search_space;
|
||||
|
||||
pdcch_vars[gNB_id]->crnti = 0x1234; //to be check how to set when using loop memory
|
||||
|
||||
uint16_t c_rnti=pdcch_vars[gNB_id]->crnti;
|
||||
uint16_t cs_rnti=0,new_rnti=0,tc_rnti=0;
|
||||
uint16_t p_rnti=P_RNTI;
|
||||
uint16_t si_rnti=SI_RNTI;
|
||||
uint16_t ra_rnti=99;
|
||||
uint16_t sp_csi_rnti=0,sfi_rnti=0,int_rnti=0,tpc_pusch_rnti=0,tpc_pucch_rnti=0,tpc_srs_rnti=0; //FIXME
|
||||
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES] =
|
||||
{c_rnti,cs_rnti,new_rnti,tc_rnti,p_rnti,si_rnti,ra_rnti,sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti};
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> there is a bug in FAPI to calculate nb_searchspace_total=%d\n",nb_searchspace_total);
|
||||
#endif
|
||||
if (nb_searchspace_total>1) nb_searchspace_total=1; // to be removed when fixing bug in FAPI
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> there is a bug in FAPI to calculate nb_searchspace_total so we set it to 1...\n");
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> the number of searchSpaces active in the current slot(%d) is %d) \n",
|
||||
nr_slot_rx,nb_searchspace_total);
|
||||
#endif
|
||||
|
||||
//FK: we define dci_ind and dl_indication as local variables, this way the call to the mac should be thread safe
|
||||
fapi_nr_dci_indication_t dci_ind;
|
||||
nr_downlink_indication_t dl_indication;
|
||||
|
||||
// p in TS 38.212 Subclause 10.1, for each active BWP the UE can deal with 3 different CORESETs (including coresetId 0 for common search space)
|
||||
//int nb_coreset_total = NR_NBR_CORESET_ACT_BWP;
|
||||
unsigned int dci_cnt=0;
|
||||
// this table contains 56 (NBR_NR_DCI_FIELDS) elements for each dci field and format described in TS 38.212. Each element represents the size in bits for each dci field
|
||||
//uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {{0}};
|
||||
// this is the UL bandwidth part. FIXME! To be defined where this value comes from
|
||||
// uint16_t n_RB_ULBWP = 106;
|
||||
// this is the DL bandwidth part. FIXME! To be defined where this value comes from
|
||||
|
||||
// First we have to identify each searchSpace active at a time and do PDCCH monitoring corresponding to current searchSpace
|
||||
// Up to 10 searchSpaces can be configured to UE (s<=10)
|
||||
for (nb_searchspace_active=0; nb_searchspace_active<nb_searchspace_total; nb_searchspace_active++){
|
||||
int nb_coreset_active=nb_searchspace_active;
|
||||
//int do_pdcch_monitoring_current_slot=1; // this variable can be removed and fapi is handling
|
||||
|
||||
// The following code has been removed as it is handled by higher layers (fapi)
|
||||
//
|
||||
// Verify that monitoring is required at the slot nr_slot_rx. We will run pdcch procedure only if do_pdcch_monitoring_current_slot=1
|
||||
// For Type0-PDCCH searchspace, we need to calculate the monitoring slot from Tables 13-1 .. 13-15 in TS 38.213 Subsection 13
|
||||
//NR_UE_SLOT_PERIOD_OFFSET_t sl_period_offset_mon = pdcch_vars2->searchSpace[nb_searchspace_active].monitoringSlotPeriodicityAndOffset;
|
||||
//if (sl_period_offset_mon == nr_sl1) {
|
||||
//do_pdcch_monitoring_current_slot=1; // PDCCH monitoring in every slot
|
||||
//} else if (nr_slot_rx%(uint16_t)sl_period_offset_mon == pdcch_vars2->searchSpace[nb_searchspace_active].monitoringSlotPeriodicityAndOffset_offset) {
|
||||
//do_pdcch_monitoring_current_slot=1; // PDCCH monitoring in every monitoringSlotPeriodicityAndOffset slot with offset
|
||||
//}
|
||||
|
||||
// FIXME
|
||||
// For PDCCH monitoring when overlap with SS/PBCH according to 38.213 v15.1.0 Section 10
|
||||
// To be implemented LATER !!!
|
||||
|
||||
//int _offset,_index,_M;
|
||||
//int searchSpace_id = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceId;
|
||||
|
||||
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> nb_searchspace_active=%d do_pdcch_monitoring_current_slot=%d (to be removed)\n",
|
||||
nb_searchspace_active,
|
||||
do_pdcch_monitoring_current_slot);
|
||||
#endif
|
||||
|
||||
// if (do_pdcch_monitoring_current_slot) {
|
||||
// the searchSpace indicates that we need to monitor PDCCH in current nr_slot_rx
|
||||
// get the parameters describing the current SEARCHSPACE
|
||||
// the CORESET id applicable to the current SearchSpace
|
||||
//int searchSpace_coreset_id = pdcch_vars2->searchSpace[nb_searchspace_active].controlResourceSetId;
|
||||
// FIXME this variable is a bit string (14 bits) identifying every OFDM symbol in a slot.
|
||||
// at the moment we will not take into consideration this variable and we will consider that the OFDM symbol offset is always the first OFDM in a symbol
|
||||
uint16_t symbol_within_slot_mon = pdcch_vars2->searchSpace[nb_searchspace_active].monitoringSymbolWithinSlot;
|
||||
// get the remaining parameters describing the current SEARCHSPACE: // FIXME! To be defined where we get this information from
|
||||
//NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L1 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel1;
|
||||
//NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L2 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel2;
|
||||
//NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L4 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel4;
|
||||
//NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L8 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel8;
|
||||
//NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L16 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel16;
|
||||
// FIXME! A table of five enum elements
|
||||
// searchSpaceType indicates whether this is a common search space or a UE-specific search space
|
||||
//int searchSpaceType = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceType.type;
|
||||
NR_SEARCHSPACE_TYPE_t searchSpaceType = ue_specific;//common;
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> searchSpaceType=%d is hardcoded THIS HAS TO BE FIXED!!!\n",
|
||||
searchSpaceType);
|
||||
#endif
|
||||
|
||||
//while ((searchSpace_coreset_id != pdcch_vars2->coreset[nb_coreset_active].controlResourceSetId) && (nb_coreset_active<nb_coreset_total)) {
|
||||
// we need to identify the CORESET associated to the active searchSpace
|
||||
//nb_coreset_active++;
|
||||
if (nb_coreset_active >= nb_coreset_total) return 0; // the coreset_id could not be found. There is a problem
|
||||
}
|
||||
|
||||
|
||||
|
||||
//we do not need these parameters yet
|
||||
|
||||
// get the parameters describing the current CORESET
|
||||
//int coreset_duration = pdcch_vars2->coreset[nb_coreset_active].duration;
|
||||
//uint64_t coreset_freq_dom = pdcch_vars2->coreset[nb_coreset_active].frequencyDomainResources;
|
||||
//int coreset_shift_index = pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.shiftIndex;
|
||||
// NR_UE_CORESET_REG_bundlesize_t coreset_bundlesize = pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.reg_bundlesize;
|
||||
// NR_UE_CORESET_interleaversize_t coreset_interleaversize = pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.interleaversize;
|
||||
// NR_UE_CORESET_precoder_granularity_t precoder_granularity = pdcch_vars2->coreset[nb_coreset_active].precoderGranularity;
|
||||
// int tci_statesPDCCH = pdcch_vars2->coreset[nb_coreset_active].tciStatesPDCCH;
|
||||
// int tci_present = pdcch_vars2->coreset[nb_coreset_active].tciPresentInDCI;
|
||||
// uint16_t pdcch_DMRS_scrambling_id = pdcch_vars2->coreset[nb_coreset_active].pdcchDMRSScramblingID;
|
||||
|
||||
|
||||
// A set of PDCCH candidates for a UE to monitor is defined in terms of PDCCH search spaces.
|
||||
// Searchspace types:
|
||||
// Type0-PDCCH common search space for a DCI format with CRC scrambled by a SI-RNTI
|
||||
// number of consecutive resource blocks and a number of consecutive symbols for
|
||||
// the control resource set of the Type0-PDCCH common search space from
|
||||
// the four most significant bits of RMSI-PDCCH-Config as described in Tables 13-1 through 13-10
|
||||
// and determines PDCCH monitoring occasions
|
||||
// from the four least significant bits of RMSI-PDCCH-Config,
|
||||
// included in MasterInformationBlock, as described in Tables 13-11 through 13-15
|
||||
// Type0A-PDCCH common search space for a DCI format with CRC scrambled by a SI-RNTI
|
||||
// Type1-PDCCH common search space for a DCI format with CRC scrambled by a RA-RNTI, or a TC-RNTI, or a C-RNTI
|
||||
// Type2-PDCCH common search space for a DCI format with CRC scrambled by a P-RNTI
|
||||
// Type3-PDCCH common search space for a DCI format with CRC scrambled by INT-RNTI, or SFI-RNTI,
|
||||
// or TPC-PUSCH-RNTI, or TPC-PUCCH-RNTI, or TPC-SRS-RNTI, or C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI
|
||||
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN);
|
||||
start_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN);
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_rx_pdcch with gNB_id=%d (nb_coreset_active=%d, (symbol_within_slot_mon&0x3FFF)=%d, searchSpaceType=%d)\n",
|
||||
gNB_id,nb_coreset_active,(symbol_within_slot_mon&0x3FFF),
|
||||
searchSpaceType);
|
||||
#endif
|
||||
nr_rx_pdcch(ue,
|
||||
frame_rx,
|
||||
nr_slot_rx,
|
||||
gNB_id,
|
||||
//(ue->frame_parms.mode1_flag == 1) ? SISO : ALAMOUTI,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
ue->is_secondary_ue,
|
||||
nb_coreset_active,
|
||||
(symbol_within_slot_mon&0x3FFF),
|
||||
searchSpaceType);
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_rx_pdcch(nb_coreset_active=%d, (symbol_within_slot_mon&0x3FFF)=%d, searchSpaceType=%d)\n",
|
||||
nb_coreset_active,(symbol_within_slot_mon&0x3FFF),
|
||||
searchSpaceType);
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN);
|
||||
nr_rx_pdcch(ue, proc, rel15);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT);
|
||||
@@ -706,46 +526,10 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
ue->pdcch_vars[proc->thread_id][gNB_id]->dci_received += dci_cnt;
|
||||
|
||||
dci_ind->number_of_dcis = dci_cnt;
|
||||
/*
|
||||
for (int i=0; i<dci_cnt; i++) {
|
||||
|
||||
memset(&dci_ind.dci_list[i].dci,0,sizeof(fapi_nr_dci_pdu_rel15_t));
|
||||
|
||||
dci_ind.dci_list[i].rnti = dci_alloc_rx[i].rnti;
|
||||
dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format;
|
||||
dci_ind.dci_list[i].n_CCE = dci_alloc_rx[i].firstCCE;
|
||||
dci_ind.dci_list[i].N_CCE = (int)dci_alloc_rx[i].L;
|
||||
|
||||
status = nr_extract_dci_info(ue,
|
||||
gNB_id,
|
||||
ue->frame_parms.frame_type,
|
||||
dci_alloc_rx[i].dci_length,
|
||||
dci_alloc_rx[i].rnti,
|
||||
dci_alloc_rx[i].dci_pdu,
|
||||
&dci_ind.dci_list[i].dci,
|
||||
dci_fields_sizes_cnt[i],
|
||||
dci_alloc_rx[i].format,
|
||||
nr_slot_rx,
|
||||
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
||||
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
||||
crc_scrambled_values);
|
||||
|
||||
if(status == 0) {
|
||||
LOG_W(PHY,"<-NR_PDCCH_PHY_PROCEDURES_UE (nr_ue_pdcch_procedures)-> bad DCI %d !!! \n",dci_alloc_rx[i].format);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
LOG_D(PHY,"<-NR_PDCCH_PHY_PROCEDURES_UE (nr_ue_pdcch_procedures)-> Ending function nr_extract_dci_info()\n");
|
||||
|
||||
|
||||
|
||||
} // end for loop dci_cnt
|
||||
*/
|
||||
|
||||
// fill dl_indication message
|
||||
nr_fill_dl_indication(&dl_indication, dci_ind, NULL, proc, ue, gNB_id);
|
||||
// send to mac
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
// fill dl_indication message
|
||||
nr_fill_dl_indication(&dl_indication, dci_ind, NULL, proc, ue, gNB_id);
|
||||
// send to mac
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
|
||||
stop_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
|
||||
@@ -820,6 +604,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
first_symbol_with_data++;
|
||||
}
|
||||
|
||||
start_meas(&ue->rx_pdsch_stats);
|
||||
for (m = s0; m < (s1 + s0); m++) {
|
||||
|
||||
dual_stream_UE = 0;
|
||||
@@ -859,6 +644,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
proc->first_symbol_available = 1;
|
||||
}
|
||||
} // CRNTI active
|
||||
stop_meas(&ue->rx_pdsch_stats);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -869,8 +655,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
PDSCH_t pdsch,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
int *dlsch_errors,
|
||||
uint8_t dlsch_parallel) {
|
||||
int *dlsch_errors) {
|
||||
|
||||
if (dlsch0==NULL)
|
||||
AssertFatal(0,"dlsch0 should be defined at this level \n");
|
||||
@@ -999,12 +784,9 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
harq_pid,
|
||||
pdsch==PDSCH?1:0,
|
||||
dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
|
||||
if( dlsch_parallel) {
|
||||
LOG_T(PHY,"dlsch decoding is parallelized, ret = %d\n", ret);
|
||||
}
|
||||
else {
|
||||
LOG_T(PHY,"Sequential dlsch decoding , ret = %d\n", ret);
|
||||
}
|
||||
|
||||
LOG_T(PHY,"dlsch decoding, ret = %d\n", ret);
|
||||
|
||||
|
||||
if(ret<dlsch0->max_ldpc_iterations+1)
|
||||
dec = true;
|
||||
@@ -1079,13 +861,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
harq_pid,
|
||||
pdsch==PDSCH?1:0,//proc->decoder_switch,
|
||||
dlsch1->harq_processes[harq_pid]->TBS>256?1:0);
|
||||
if(dlsch_parallel) {
|
||||
LOG_T(PHY,"CW dlsch decoding is parallelized, ret1 = %d\n", ret1);
|
||||
}
|
||||
else {
|
||||
|
||||
LOG_T(PHY,"CWW sequential dlsch decoding, ret1 = %d\n", ret1);
|
||||
}
|
||||
LOG_T(PHY,"CW dlsch decoding, ret1 = %d\n", ret1);
|
||||
|
||||
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE)) {
|
||||
@@ -1599,6 +1375,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
|
||||
start_meas(&ue->phy_proc_rx[proc->thread_id]);
|
||||
|
||||
LOG_D(PHY," ****** start RX-Chain for Frame.Slot %d.%d (energy %d dB)****** \n",
|
||||
frame_rx%1024, nr_slot_rx,
|
||||
@@ -1780,8 +1557,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
SI_PDSCH,
|
||||
ue->dlsch_SI[gNB_id],
|
||||
NULL,
|
||||
&ue->dlsch_SI_errors[gNB_id],
|
||||
dlsch_parallel);
|
||||
&ue->dlsch_SI_errors[gNB_id]);
|
||||
|
||||
// deactivate dlsch once dlsch proc is done
|
||||
ue->dlsch_SI[gNB_id]->active = 0;
|
||||
@@ -1805,8 +1581,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
P_PDSCH,
|
||||
ue->dlsch_p[gNB_id],
|
||||
NULL,
|
||||
&ue->dlsch_p_errors[gNB_id],
|
||||
dlsch_parallel);
|
||||
&ue->dlsch_p_errors[gNB_id]);
|
||||
|
||||
// deactivate dlsch once dlsch proc is done
|
||||
ue->dlsch_p[gNB_id]->active = 0;
|
||||
@@ -1829,8 +1604,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
RA_PDSCH,
|
||||
ue->dlsch_ra[gNB_id],
|
||||
NULL,
|
||||
&ue->dlsch_ra_errors[gNB_id],
|
||||
dlsch_parallel);
|
||||
&ue->dlsch_ra_errors[gNB_id]);
|
||||
|
||||
// deactivate dlsch once dlsch proc is done
|
||||
ue->dlsch_ra[gNB_id]->active = 0;
|
||||
@@ -1852,8 +1626,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
PDSCH,
|
||||
ue->dlsch[proc->thread_id][gNB_id][0],
|
||||
ue->dlsch[proc->thread_id][gNB_id][1],
|
||||
&ue->dlsch_errors[gNB_id],
|
||||
dlsch_parallel);
|
||||
&ue->dlsch_errors[gNB_id]);
|
||||
|
||||
stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE)) {
|
||||
@@ -1868,91 +1641,49 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
|
||||
}
|
||||
|
||||
start_meas(&ue->generic_stat);
|
||||
start_meas(&ue->generic_stat);
|
||||
|
||||
#if 0
|
||||
if (nr_slot_rx==9) {
|
||||
if (frame_rx % 10 == 0) {
|
||||
if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
|
||||
ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
|
||||
|
||||
if(nr_slot_rx==5 && ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid]->nb_rb > 20){
|
||||
//write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
|
||||
//write_output("llr.m","llr", &ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
|
||||
|
||||
write_output("rxdataF0_current.m" , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
|
||||
//write_output("rxdataF0_previous.m" , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
|
||||
|
||||
//write_output("rxdataF0_previous.m" , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
|
||||
|
||||
write_output("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].dl_ch_estimates[0][0][0],14*fp->ofdm_symbol_size,1,1);
|
||||
write_output("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0][0],14*fp->N_RB_DL*12,1,1);
|
||||
write_output("rxdataF_comp00.m","rxdataF_comp00", &ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0][0],14*fp->N_RB_DL*12,1,1);
|
||||
//write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0][0],14*fp->N_RB_DL*12,1,1);
|
||||
//write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0][0],14*fp->N_RB_DL*12,1,1);
|
||||
|
||||
AssertFatal (0,"");
|
||||
}
|
||||
#endif
|
||||
|
||||
// duplicate harq structure
|
||||
/*
|
||||
uint8_t current_harq_pid = ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid;
|
||||
NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[current_harq_pid];
|
||||
NR_DL_UE_HARQ_t *harq_processes_dest = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
|
||||
NR_DL_UE_HARQ_t *harq_processes_dest1 = ue->dlsch[next2_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
|
||||
*/
|
||||
/*nr_harq_status_t *current_harq_ack = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
|
||||
nr_harq_status_t *harq_ack_dest = &ue->dlsch[next1_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
|
||||
nr_harq_status_t *harq_ack_dest1 = &ue->dlsch[next2_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
|
||||
*/
|
||||
|
||||
//copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
|
||||
//copy_ack_struct(harq_ack_dest, current_harq_ack);
|
||||
|
||||
//copy_harq_proc_struct(harq_processes_dest1, current_harq_processes);
|
||||
//copy_ack_struct(harq_ack_dest1, current_harq_ack);
|
||||
|
||||
if (nr_slot_rx==9) {
|
||||
if (frame_rx % 10 == 0) {
|
||||
if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
|
||||
ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
|
||||
|
||||
ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
|
||||
ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
|
||||
}
|
||||
ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
|
||||
ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
|
||||
}
|
||||
|
||||
|
||||
ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
|
||||
ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
|
||||
LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
|
||||
ue->Mod_id,frame_rx,ue->total_TBS[gNB_id],
|
||||
ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
|
||||
ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
|
||||
ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
|
||||
LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
|
||||
ue->Mod_id,frame_rx,ue->total_TBS[gNB_id],
|
||||
ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
|
||||
|
||||
#if UE_AUTOTEST_TRACE
|
||||
if ((frame_rx % 100 == 0)) {
|
||||
LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, frame_rx);
|
||||
}
|
||||
if ((frame_rx % 100 == 0)) {
|
||||
LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, frame_rx);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
stop_meas(&ue->generic_stat);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->generic_stat);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
|
||||
#ifdef EMOS
|
||||
phy_procedures_emos_UE_RX(ue,slot,gNB_id);
|
||||
phy_procedures_emos_UE_RX(ue,slot,gNB_id);
|
||||
#endif
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
|
||||
|
||||
stop_meas(&ue->phy_proc_rx[proc->thread_id]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->phy_proc_rx[proc->thread_id]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
|
||||
|
||||
//#endif //pdsch
|
||||
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, nr_slot_rx);
|
||||
return (0);
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, nr_slot_rx);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
UE_info->CellGroup[0],
|
||||
sched_ctrl->active_bwp,
|
||||
NULL,
|
||||
/* tda = */ 0,
|
||||
/* tda = */ 2,
|
||||
dci_format,
|
||||
ps);
|
||||
|
||||
@@ -777,7 +777,7 @@ int main(int argc, char **argv)
|
||||
|
||||
prepare_scd(scd);
|
||||
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 6, 0, 0, 0);
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 6, 0, 0, 0, 0);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
fix_scd(scd);
|
||||
@@ -796,9 +796,9 @@ int main(int argc, char **argv)
|
||||
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
// common configuration
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, 0, 0, NULL);
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, 6, scc, NULL, 0, 0, NULL);
|
||||
// UE dedicated configuration
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, scc, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_tx, 0, 6, scc, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
// reset preprocessor to the one of DLSIM after it has been set during
|
||||
// rrc_mac_config_req_gNB
|
||||
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
|
||||
|
||||
@@ -90,8 +90,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
PDSCH_t pdsch,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
int *dlsch_errors,
|
||||
uint8_t dlsch_parallel) {
|
||||
int *dlsch_errors) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -203,15 +202,15 @@ int main(int argc, char **argv)
|
||||
|
||||
float target_error_rate = 0.01;
|
||||
|
||||
int seed = 0;
|
||||
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
randominit(0);
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hA:pf:g:i:j:n:o:s:S:t:x:y:z:M:N:F:GR:dP:IL:m:")) != -1) {
|
||||
while ((c = getopt (argc, argv, "F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) {
|
||||
switch (c) {
|
||||
/*case 'f':
|
||||
write_output_file=1;
|
||||
@@ -228,6 +227,14 @@ int main(int argc, char **argv)
|
||||
frame_type = 1;
|
||||
break;*/
|
||||
|
||||
case 'F':
|
||||
input_fd = fopen(optarg,"r");
|
||||
if (input_fd==NULL) {
|
||||
printf("Problem with filename %s. Exiting.\n", optarg);
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
switch((char)*optarg) {
|
||||
case 'A':
|
||||
@@ -265,18 +272,42 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
/*case 'i':
|
||||
/*
|
||||
case 'i':
|
||||
interf1=atoi(optarg);
|
||||
break;
|
||||
*/
|
||||
|
||||
case 'I':
|
||||
run_initial_sync=1;
|
||||
target_error_rate=0.1;
|
||||
break;
|
||||
|
||||
/*
|
||||
case 'j':
|
||||
interf2=atoi(optarg);
|
||||
break;*/
|
||||
|
||||
case 'L':
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
mu = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
SSB_positions = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
n_trials = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
Nid_cell = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
cfo = atof(optarg);
|
||||
#ifdef DEBUG_NR_PBCHSIM
|
||||
@@ -284,6 +315,34 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
break;
|
||||
|
||||
/*case 'p':
|
||||
extended_prefix_flag=1;
|
||||
break;*/
|
||||
|
||||
case 'P':
|
||||
pbch_phase = atoi(optarg);
|
||||
if (pbch_phase>3)
|
||||
printf("Illegal PBCH phase (0-3) got %d\n",pbch_phase);
|
||||
break;
|
||||
|
||||
/*
|
||||
case 'r':
|
||||
ricean_factor = pow(10,-.1*atof(optarg));
|
||||
if (ricean_factor>1) {
|
||||
printf("Ricean factor must be between 0 and 1\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
*/
|
||||
|
||||
case 'r':
|
||||
seed = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
N_RB_DL = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
snr0 = atof(optarg);
|
||||
#ifdef DEBUG_NR_PBCHSIM
|
||||
@@ -304,19 +363,7 @@ int main(int argc, char **argv)
|
||||
Td= atof(optarg);
|
||||
break;
|
||||
*/
|
||||
/*case 'p':
|
||||
extended_prefix_flag=1;
|
||||
break;*/
|
||||
|
||||
/*
|
||||
case 'r':
|
||||
ricean_factor = pow(10,-.1*atof(optarg));
|
||||
if (ricean_factor>1) {
|
||||
printf("Ricean factor must be between 0 and 1\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case 'x':
|
||||
transmission_mode=atoi(optarg);
|
||||
|
||||
@@ -329,99 +376,58 @@ int main(int argc, char **argv)
|
||||
|
||||
case 'y':
|
||||
n_tx=atoi(optarg);
|
||||
|
||||
if ((n_tx==0) || (n_tx>2)) {
|
||||
printf("Unsupported number of TX antennas %d. Exiting.\n", n_tx);
|
||||
printf("Unsupported number of TX antennas %d. Exiting.\n", n_tx);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
n_rx=atoi(optarg);
|
||||
|
||||
if ((n_rx==0) || (n_rx>2)) {
|
||||
printf("Unsupported number of RX antennas %d. Exiting.\n", n_rx);
|
||||
printf("Unsupported number of RX antennas %d. Exiting.\n", n_rx);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
SSB_positions = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
Nid_cell = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
N_RB_DL = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
input_fd = fopen(optarg,"r");
|
||||
|
||||
if (input_fd==NULL) {
|
||||
printf("Problem with filename %s. Exiting.\n", optarg);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
pbch_phase = atoi(optarg);
|
||||
|
||||
if (pbch_phase>3)
|
||||
printf("Illegal PBCH phase (0-3) got %d\n",pbch_phase);
|
||||
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
run_initial_sync=1;
|
||||
target_error_rate=0.1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
mu = atoi(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'h':
|
||||
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n",
|
||||
printf("%s -F input_filename -g channel_mod -h(elp) -I(nitial sync) -L log_lvl -n n_frames -M SSBs -n frames -N cell_id -o FO -P phase -r seed -R RBs -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant\n",
|
||||
argv[0]);
|
||||
printf("-h This message\n");
|
||||
//printf("-p Use extended prefix mode\n");
|
||||
//printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n");
|
||||
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
|
||||
//printf("-d Use TDD\n");
|
||||
printf("-n Number of frames to simulate\n");
|
||||
printf("-m Numerology index\n");
|
||||
printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n");
|
||||
printf("-S Ending SNR, runs from SNR0 to SNR1\n");
|
||||
printf("-t Delay spread for multipath channel\n");
|
||||
//printf("-f Output filename (.txt format) for Pe/SNR results\n");
|
||||
printf("-F Input filename (.txt format) for RX conformance testing\n");
|
||||
printf("-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)\n");
|
||||
printf("-h This message\n");
|
||||
//printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n");
|
||||
printf("-I run initial sync with target error rate 0.1\n");
|
||||
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
|
||||
printf("-L set the log level (-1 disable, 0 error, 1 warning, 2 info, 3 debug, 4 trace)\n");
|
||||
printf("-m Numerology index\n");
|
||||
printf("-M Multiple SSB positions in burst\n");
|
||||
printf("-n Number of frames to simulate\n");
|
||||
printf("-N Nid_cell\n");
|
||||
printf("-o Carrier frequency offset in Hz\n");
|
||||
//printf("-O oversampling factor (1,2,4,8,16)\n");
|
||||
//printf("-p Use extended prefix mode\n");
|
||||
printf("-P PBCH phase, allowed values 0-3\n");
|
||||
printf("-r set the random number generator seed (default: 0 = current time)\n");
|
||||
printf("-R N_RB_DL\n");
|
||||
printf("-s Starting SNR, runs from SNR0 to SNR0 + 10 dB if not -S given. If -n 1, then just SNR is simulated\n");
|
||||
printf("-S Ending SNR, runs from SNR0 to SNR1\n");
|
||||
//printf("-t Delay spread for multipath channel\n");
|
||||
printf("-x Transmission mode (1,2,6 for the moment)\n");
|
||||
printf("-y Number of TX antennas used in eNB\n");
|
||||
printf("-z Number of RX antennas used in UE\n");
|
||||
//printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n");
|
||||
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
|
||||
printf("-o Carrier frequency offset in Hz\n");
|
||||
printf("-M Multiple SSB positions in burst\n");
|
||||
printf("-N Nid_cell\n");
|
||||
printf("-R N_RB_DL\n");
|
||||
printf("-O oversampling factor (1,2,4,8,16)\n");
|
||||
printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n");
|
||||
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
|
||||
//printf("-f Output filename (.txt format) for Pe/SNR results\n");
|
||||
printf("-F Input filename (.txt format) for RX conformance testing\n");
|
||||
exit (-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
randominit(seed);
|
||||
|
||||
logInit();
|
||||
set_glog(loglvl);
|
||||
T_stdout = 1;
|
||||
@@ -655,13 +661,6 @@ int main(int argc, char **argv)
|
||||
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||
printf("txlev %d (%f)\n",txlev,10*log10(txlev));*/
|
||||
|
||||
|
||||
for (i=0; i<frame_length_complex_samples; i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
r_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
|
||||
r_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
|
||||
}
|
||||
}
|
||||
|
||||
for (SNR=snr0; SNR<snr1; SNR+=.2) {
|
||||
|
||||
@@ -669,6 +668,14 @@ int main(int argc, char **argv)
|
||||
n_errors_payload = 0;
|
||||
|
||||
for (trial=0; trial<n_trials; trial++) {
|
||||
|
||||
for (i=0; i<frame_length_complex_samples; i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
r_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
|
||||
r_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
|
||||
}
|
||||
}
|
||||
|
||||
// multipath channel
|
||||
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0);
|
||||
|
||||
@@ -697,13 +704,11 @@ int main(int argc, char **argv)
|
||||
0.0, // IQ imbalance (dB),
|
||||
0.0); // IQ phase imbalance (rad)
|
||||
|
||||
|
||||
for (i=0; i<frame_length_complex_samples; i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
|
||||
((short*) UE->common_vars.rxdata[aa])[2*i] = (short) ((r_re[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||
((short*) UE->common_vars.rxdata[aa])[2*i+1] = (short) ((r_im[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||
}
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
((short*) UE->common_vars.rxdata[aa])[2*i] = (short) ((r_re[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||
((short*) UE->common_vars.rxdata[aa])[2*i+1] = (short) ((r_im[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||
}
|
||||
}
|
||||
|
||||
if (n_trials==1) {
|
||||
@@ -713,7 +718,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if (UE->is_synchronized == 0) {
|
||||
UE_nr_rxtx_proc_t proc={0};
|
||||
ret = nr_initial_sync(&proc, UE, 1, 0, 0);
|
||||
ret = nr_initial_sync(&proc, UE, 1, 0);
|
||||
printf("nr_initial_sync1 returns %d\n",ret);
|
||||
if (ret<0) n_errors++;
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ int main(int argc, char **argv)
|
||||
|
||||
prepare_scd(scd);
|
||||
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0, 0, 0);
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0, 0, 0, 0);
|
||||
|
||||
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
||||
|
||||
@@ -731,9 +731,9 @@ int main(int argc, char **argv)
|
||||
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
// common configuration
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib,0, 0, NULL);
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, 6, scc, &rrc.carrier.mib,0, 0, NULL);
|
||||
// UE dedicated configuration
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, scc, &rrc.carrier.mib,1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
rrc_mac_config_req_gNB(0,0, n_tx, n_rx, 0, 6, scc, &rrc.carrier.mib,1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
frame_parms->nb_antennas_tx = n_tx;
|
||||
frame_parms->nb_antennas_rx = n_rx;
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||
|
||||
@@ -229,7 +229,7 @@ int test_srs_periodicity(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
|
||||
for (int slot_tx = 0; slot_tx < frame_parms->slots_per_frame; slot_tx++) {
|
||||
proc->frame_tx = frame_tx;
|
||||
proc->nr_slot_tx = slot_tx;
|
||||
if (ue_srs_procedure_nr( ue, proc, 0) == 0) {
|
||||
if (ue_srs_procedures_nr( ue, proc, 0) == 0) {
|
||||
printf("test_srs_periodicity srs at frame %d slot %d \n", frame_tx, slot_tx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
int pusch_AntennaPorts;
|
||||
int minRXTXTIME;
|
||||
int do_CSIRS;
|
||||
int do_SRS;
|
||||
int pusch_TargetSNRx10;
|
||||
int pucch_TargetSNRx10;
|
||||
} gNB_RrcConfigurationReq;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
#include "assertions.h"
|
||||
#include "gnb_config.h"
|
||||
@@ -47,7 +48,6 @@
|
||||
// #include "SystemInformationBlockType2.h"
|
||||
// #include "LAYER2/MAC/extern.h"
|
||||
// #include "LAYER2/MAC/proto.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
@@ -346,9 +346,16 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
|
||||
// prepare DL Allocation lists
|
||||
nr_rrc_config_dl_tda(scc);
|
||||
|
||||
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320 ) {
|
||||
free(scc->tdd_UL_DL_ConfigurationCommon->pattern2);
|
||||
scc->tdd_UL_DL_ConfigurationCommon->pattern2=NULL;
|
||||
lte_frame_type_t frame_type = get_frame_type((int)*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
|
||||
if (frame_type == FDD) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_TDD_UL_DL_ConfigCommon, scc->tdd_UL_DL_ConfigurationCommon);
|
||||
scc->tdd_UL_DL_ConfigurationCommon = NULL;
|
||||
} else { // TDD
|
||||
if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320 ) {
|
||||
free(scc->tdd_UL_DL_ConfigurationCommon->pattern2);
|
||||
scc->tdd_UL_DL_ConfigurationCommon->pattern2 = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((int)*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing == -1) {
|
||||
@@ -998,8 +1005,6 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
if (num_gnbs>0) {
|
||||
|
||||
|
||||
|
||||
// Output a list of all gNBs. ////////// Identification parameters
|
||||
config_getlist( &GNBParamList,GNBParams,sizeof(GNBParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
@@ -1155,20 +1160,22 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
(NRRRC_CONFIGURATION_REQ (msg_p).mnc_digit_length[l] == 3),"BAD MNC DIGIT LENGTH %d",
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).mnc_digit_length[l]);
|
||||
}
|
||||
printf("SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr);
|
||||
LOG_I(RRC,"SSB SCO %d\n",*GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr;
|
||||
printf("pdsch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr);
|
||||
LOG_I(RRC,"pdsch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr;
|
||||
printf("pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr);
|
||||
LOG_I(RRC,"pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr;
|
||||
printf("minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
|
||||
LOG_I(RRC,"minTXRXTIME %d\n",*GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).minRXTXTIME = *GNBParamList.paramarray[i][GNB_MINRXTXTIME_IDX].iptr;
|
||||
LOG_I(RRC,"SIB1 TDA %d\n",*GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).sib1_tda = *GNBParamList.paramarray[i][GNB_SIB1_TDA_IDX].iptr;
|
||||
printf("Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
|
||||
LOG_I(RRC,"Do CSI-RS %d\n",*GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).do_CSIRS = *GNBParamList.paramarray[i][GNB_DO_CSIRS_IDX].iptr;
|
||||
printf("Do SRS %d\n",*GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr);
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).do_SRS = *GNBParamList.paramarray[i][GNB_DO_SRS_IDX].iptr;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).scc = scc;
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).scd = scd;
|
||||
|
||||
|
||||
}//
|
||||
}//End for (k=0; k <num_gnbs ; k++)
|
||||
@@ -2033,6 +2040,7 @@ void configure_gnb_du_mac(int inst) {
|
||||
rrc->configuration.pdsch_AntennaPorts,
|
||||
rrc->configuration.pusch_AntennaPorts,
|
||||
rrc->configuration.sib1_tda,
|
||||
rrc->configuration.minRXTXTIME,
|
||||
rrc->configuration.scc,
|
||||
NULL,
|
||||
0,
|
||||
|
||||
@@ -118,6 +118,7 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_PUSCHANTENNAPORTS "pusch_AntennaPorts"
|
||||
#define GNB_CONFIG_STRING_SIB1TDA "sib1_tda"
|
||||
#define GNB_CONFIG_STRING_DOCSIRS "do_CSIRS"
|
||||
#define GNB_CONFIG_STRING_DOSRS "do_SRS"
|
||||
#define GNB_CONFIG_STRING_NRCELLID "nr_cellid"
|
||||
#define GNB_CONFIG_STRING_MINRXTXTIME "min_rxtxtime"
|
||||
#define GNB_CONFIG_STRING_ULPRBBLACKLIST "ul_prbblacklist"
|
||||
@@ -147,6 +148,7 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_SIB1TDA, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DOCSIRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DOSRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
|
||||
{GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, iptr:NULL, defintval:2, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0} \
|
||||
@@ -171,9 +173,10 @@ typedef enum {
|
||||
#define GNB_PUSCH_ANTENNAPORTS_IDX 16
|
||||
#define GNB_SIB1_TDA_IDX 17
|
||||
#define GNB_DO_CSIRS_IDX 18
|
||||
#define GNB_NRCELLID_IDX 19
|
||||
#define GNB_MINRXTXTIME_IDX 20
|
||||
#define GNB_ULPRBBLACKLIST_IDX 21
|
||||
#define GNB_DO_SRS_IDX 19
|
||||
#define GNB_NRCELLID_IDX 20
|
||||
#define GNB_MINRXTXTIME_IDX 21
|
||||
#define GNB_ULPRBBLACKLIST_IDX 22
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define GNBPARAMS_CHECK { \
|
||||
|
||||
@@ -220,6 +220,11 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|| UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
if(mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) {
|
||||
continue;
|
||||
}
|
||||
@@ -335,6 +340,10 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|| UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
if(mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) {
|
||||
continue;
|
||||
}
|
||||
@@ -459,6 +468,10 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
if (rnti == NOT_A_RNTI)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|| UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
if(mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) {
|
||||
continue;
|
||||
}
|
||||
@@ -2241,7 +2254,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|| UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
// UL DCI
|
||||
@@ -2403,7 +2417,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
|
||||
continue;
|
||||
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
|
||||
|| UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
|
||||
continue;
|
||||
|
||||
if ( (ulsch_ue_select[CC_id].ue_num >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
|
||||
@@ -2769,13 +2784,12 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
} else {
|
||||
// assigne RBS( 3 RBs)
|
||||
/*
|
||||
first_rb[CC_id] = first_rb[CC_id] + 3;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul = 3;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
|
||||
// assigne RBS( 5 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 5;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul = 5;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 4;
|
||||
UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
*/ }
|
||||
}
|
||||
}
|
||||
} else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE ) {
|
||||
// assigne RBS( 3 RBs)
|
||||
|
||||
@@ -68,7 +68,7 @@ void *mac_stats_thread(void *param) {
|
||||
else {
|
||||
total_bler = (double)UE_scheduling_control->pusch_rx_error_num[CC_id] / (double)(UE_scheduling_control->pusch_rx_error_num[CC_id] + UE_scheduling_control->pusch_rx_num[CC_id]) * 100;
|
||||
}
|
||||
fprintf(fd,"MAC UE rnti %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf (%lf/%lf) total_bler %lf mcsoff %d pre_allocated nb_rb %d, mcs %d, bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d\n",
|
||||
fprintf(fd,"MAC UE rnti %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf (%lf/%lf) total_bler %lf mcsoff %d pre_allocated nb_rb %d, mcs %d, bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d inactivity timer %d\n",
|
||||
rnti,
|
||||
UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync",
|
||||
UE_info->UE_template[CC_id][UE_id].phr_info,
|
||||
@@ -97,7 +97,8 @@ void *mac_stats_thread(void *param) {
|
||||
#endif
|
||||
UE_scheduling_control->first_cnt[CC_id],
|
||||
UE_scheduling_control->ret_cnt[CC_id],
|
||||
UE_scheduling_control->aperiodic_ri_received[CC_id]
|
||||
UE_scheduling_control->aperiodic_ri_received[CC_id],
|
||||
UE_scheduling_control->ul_inactivity_timer
|
||||
);
|
||||
fprintf(fd," ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n",
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0],
|
||||
|
||||
@@ -51,7 +51,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
uint32_t Ninfo, Np_info, C;
|
||||
uint8_t n, scale;
|
||||
|
||||
LOG_D(NR_MAC,"nb_symb_sch %d, nb_dmrs_prb %d, nb_rb_oh %d\n",nb_symb_sch,nb_dmrs_prb,nb_rb_oh);
|
||||
LOG_D(NR_MAC, "In %s: nb_symb_sch %d, nb_dmrs_prb %d, nb_rb %d, nb_rb_oh %d, tb_scaling %d Nl %d\n", __FUNCTION__, nb_symb_sch, nb_dmrs_prb, nb_rb, nb_rb_oh, tb_scaling, Nl);
|
||||
|
||||
nbp_re = NR_NB_SC_PER_RB * nb_symb_sch - nb_dmrs_prb - nb_rb_oh;
|
||||
nb_re = min(156, nbp_re) * nb_rb;
|
||||
@@ -86,7 +86,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC, "In %s: Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d\n", __FUNCTION__, Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
|
||||
LOG_D(NR_MAC, "In %s: Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d bits\n", __FUNCTION__, Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
|
||||
|
||||
return nr_tbs;
|
||||
|
||||
|
||||
@@ -1725,9 +1725,11 @@ int get_nr_prach_info_from_index(uint8_t index,
|
||||
subframe = slot >> mu;
|
||||
s_map = table_6_3_3_2_2_prachConfig_Index[index][4];
|
||||
if ( (s_map>>subframe)&0x01 ) {
|
||||
*N_RA_slot = table_6_3_3_2_2_prachConfig_Index[index][6]; // Number of RACH slots within a subframe
|
||||
if (mu == 1) {
|
||||
if ( (table_6_3_3_2_2_prachConfig_Index[index][6] <= 1) && (slot%2 == 0) )
|
||||
if ((*N_RA_slot <= 1) && (slot % 2 == 0)){
|
||||
return 0; // no prach in even slots @ 30kHz for 1 prach per subframe
|
||||
}
|
||||
}
|
||||
for(int i = 0; i <= subframe ; i++) {
|
||||
if ( (s_map >> i) & 0x01) {
|
||||
@@ -1736,6 +1738,7 @@ int get_nr_prach_info_from_index(uint8_t index,
|
||||
}
|
||||
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
|
||||
*start_symbol = table_6_3_3_2_2_prachConfig_Index[index][5];
|
||||
*config_period = x;
|
||||
*N_t_slot = table_6_3_3_2_2_prachConfig_Index[index][7];
|
||||
*N_dur = table_6_3_3_2_2_prachConfig_Index[index][8];
|
||||
if (table_6_3_3_2_2_prachConfig_Index[index][1] != -1)
|
||||
@@ -2396,7 +2399,14 @@ int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmr
|
||||
uint8_t row, colomn;
|
||||
int32_t l_prime;
|
||||
|
||||
LOG_D(NR_MAC, "PUSCH: NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", duration_in_symbols, start_symbol, mapping_type, dmrs_typeA_position);
|
||||
LOG_D(NR_MAC, "In %s: PUSCH NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d additional_pos:%d, pusch_maxLength:%d\n",
|
||||
__FUNCTION__,
|
||||
duration_in_symbols,
|
||||
start_symbol,
|
||||
mapping_type,
|
||||
dmrs_typeA_position,
|
||||
additional_pos,
|
||||
pusch_maxLength);
|
||||
|
||||
// Section 6.4.1.1.3 in Spec 38.211
|
||||
// For PDSCH Mapping TypeA, ld is duration between first OFDM of the slot and last OFDM symbol of the scheduled PUSCH resources
|
||||
@@ -2495,6 +2505,61 @@ uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_nr_srs_offset
|
||||
*
|
||||
* PARAMETERS : periodicityAndOffset for SRS
|
||||
*
|
||||
* RETURN : the offset parameter for SRS
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint16_t get_nr_srs_offset(NR_SRS_PeriodicityAndOffset_t periodicityAndOffset) {
|
||||
|
||||
switch(periodicityAndOffset.present) {
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl1:
|
||||
return periodicityAndOffset.choice.sl1;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl2:
|
||||
return periodicityAndOffset.choice.sl2;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl4:
|
||||
return periodicityAndOffset.choice.sl4;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl5:
|
||||
return periodicityAndOffset.choice.sl5;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl8:
|
||||
return periodicityAndOffset.choice.sl8;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl10:
|
||||
return periodicityAndOffset.choice.sl10;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl16:
|
||||
return periodicityAndOffset.choice.sl16;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl20:
|
||||
return periodicityAndOffset.choice.sl20;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl32:
|
||||
return periodicityAndOffset.choice.sl32;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl40:
|
||||
return periodicityAndOffset.choice.sl40;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl64:
|
||||
return periodicityAndOffset.choice.sl64;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl80:
|
||||
return periodicityAndOffset.choice.sl80;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl160:
|
||||
return periodicityAndOffset.choice.sl160;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl320:
|
||||
return periodicityAndOffset.choice.sl320;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl640:
|
||||
return periodicityAndOffset.choice.sl640;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl1280:
|
||||
return periodicityAndOffset.choice.sl1280;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_sl2560:
|
||||
return periodicityAndOffset.choice.sl2560;
|
||||
case NR_SRS_PeriodicityAndOffset_PR_NOTHING:
|
||||
LOG_W(NR_MAC,"NR_SRS_PeriodicityAndOffset_PR_NOTHING\n");
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the transform precoding status according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16:
|
||||
// - "UE procedure for applying transform precoding on PUSCH"
|
||||
uint8_t get_transformPrecoding(const NR_BWP_UplinkCommon_t *initialUplinkBWP,
|
||||
@@ -4095,4 +4160,3 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmr
|
||||
uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint8_t mcs_table);
|
||||
uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB);
|
||||
|
||||
uint16_t get_nr_srs_offset(NR_SRS_PeriodicityAndOffset_t periodicityAndOffset);
|
||||
|
||||
void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
frame_t frameP,
|
||||
NR_MIB_t *mib,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user