Merge remote-tracking branch 'origin/develop' into NR_SA_F1AP_5GRECORDS
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||||
|
|
||||||
|
// Location of the python executor node shall be in the same subnet as the others servers
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage ("gDashboard") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
//retrieve MR data from gitlab and export to gSheet
|
||||||
|
sh returnStdout: true, script: 'python3 ci-scripts/ran_dashboard.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -224,14 +224,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage ("Variant Builds") {
|
stage ("Variant Builds") {
|
||||||
parallel {
|
parallel {
|
||||||
stage ("Build basic simulator") {
|
stage ("Build basic simulator") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build basic-sim") {
|
gitlabCommitStatus(name: "Build basic-sim") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ pipeline {
|
|||||||
stage ("Build 5G gNB-USRP") {
|
stage ("Build 5G gNB-USRP") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build gNB-USRP") {
|
gitlabCommitStatus(name: "Build gNB-USRP") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,7 +249,7 @@ pipeline {
|
|||||||
stage ("Build 5G NR-UE-USRP") {
|
stage ("Build 5G NR-UE-USRP") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build nr-UE-USRP") {
|
gitlabCommitStatus(name: "Build nr-UE-USRP") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -258,7 +258,7 @@ pipeline {
|
|||||||
stage ("Build physical simulators") {
|
stage ("Build physical simulators") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build phy-sim") {
|
gitlabCommitStatus(name: "Build phy-sim") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ pipeline {
|
|||||||
stage ("Build eNB-ethernet") {
|
stage ("Build eNB-ethernet") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build eNB-ethernet") {
|
gitlabCommitStatus(name: "Build eNB-ethernet") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ pipeline {
|
|||||||
// This is typically the last one to finish.
|
// This is typically the last one to finish.
|
||||||
lock (vmResource) {
|
lock (vmResource) {
|
||||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#/* configuration for channel modelisation */
|
||||||
|
#/* To be included in main config file when */
|
||||||
|
#/* channel modelisation is used (rfsimulator with chanmod options enabled) */
|
||||||
|
channelmod = {
|
||||||
|
max_chan=10;
|
||||||
|
modellist="modellist_rfsimu_1";
|
||||||
|
modellist_rfsimu_1 = (
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_enB0"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = -10;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue1"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
modellist_rfsimu_2 = (
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue0"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue1"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue2"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -260,7 +260,6 @@ NETWORK_CONTROLLER :
|
|||||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||||
FLEXRAN_AWAIT_RECONF = "no";
|
FLEXRAN_AWAIT_RECONF = "no";
|
||||||
};
|
};
|
||||||
|
|
||||||
log_config :
|
log_config :
|
||||||
{
|
{
|
||||||
global_log_level ="info";
|
global_log_level ="info";
|
||||||
@@ -279,3 +278,4 @@ NETWORK_CONTROLLER :
|
|||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@include "channelmod_rfsimu.conf"
|
||||||
|
|||||||
@@ -0,0 +1,305 @@
|
|||||||
|
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||||
|
# Asn1_verbosity, choice in: none, info, annoying
|
||||||
|
Asn1_verbosity = "none";
|
||||||
|
|
||||||
|
|
||||||
|
gNBs =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
////////// Identification parameters:
|
||||||
|
gNB_ID = 0xe00;
|
||||||
|
|
||||||
|
cell_type = "CELL_MACRO_GNB";
|
||||||
|
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||||
|
|
||||||
|
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||||
|
tracking_area_code = 1;
|
||||||
|
plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;});
|
||||||
|
|
||||||
|
tr_s_preference = "local_mac"
|
||||||
|
|
||||||
|
////////// Physical parameters:
|
||||||
|
|
||||||
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
pusch_TargetSNRx10 = 200;
|
||||||
|
pucch_TargetSNRx10 = 200;
|
||||||
|
|
||||||
|
|
||||||
|
servingCellConfigCommon = (
|
||||||
|
{
|
||||||
|
#spCellConfigCommon
|
||||||
|
|
||||||
|
physCellId = 0;
|
||||||
|
|
||||||
|
# downlinkConfigCommon
|
||||||
|
#frequencyInfoDL
|
||||||
|
# this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP)
|
||||||
|
absoluteFrequencySSB = 641272; //641032; #641968; 641968=start of ssb at 3600MHz + 82 RBs 641032=center of SSB at center of cell
|
||||||
|
dl_frequencyBand = 78;
|
||||||
|
# this is 3600 MHz
|
||||||
|
dl_absoluteFrequencyPointA = 640000;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
dl_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
dl_subcarrierSpacing = 1;
|
||||||
|
dl_carrierBandwidth = 106;
|
||||||
|
#initialDownlinkBWP
|
||||||
|
#genericParameters
|
||||||
|
# this is RBstart=84,L=13 (275*(L-1))+RBstart
|
||||||
|
initialDLBWPlocationAndBandwidth = 6368;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
initialDLBWPsubcarrierSpacing = 1;
|
||||||
|
#pdcch-ConfigCommon
|
||||||
|
initialDLBWPcontrolResourceSetZero = 0;
|
||||||
|
initialDLBWPsearchSpaceZero = 0;
|
||||||
|
#pdsch-ConfigCommon
|
||||||
|
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||||
|
initialDLBWPk0_0 = 0;
|
||||||
|
#initialULBWPmappingType
|
||||||
|
#0=typeA,1=typeB
|
||||||
|
initialDLBWPmappingType_0 = 0;
|
||||||
|
#this is SS=1,L=13
|
||||||
|
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||||
|
|
||||||
|
initialDLBWPk0_1 = 0;
|
||||||
|
initialDLBWPmappingType_1 = 0;
|
||||||
|
#this is SS=2,L=12
|
||||||
|
initialDLBWPstartSymbolAndLength_1 = 53;
|
||||||
|
|
||||||
|
initialDLBWPk0_2 = 0;
|
||||||
|
initialDLBWPmappingType_2 = 0;
|
||||||
|
#this is SS=1,L=12
|
||||||
|
initialDLBWPstartSymbolAndLength_2 = 54;
|
||||||
|
|
||||||
|
initialDLBWPk0_3 = 0;
|
||||||
|
initialDLBWPmappingType_3 = 0;
|
||||||
|
#this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
|
||||||
|
initialDLBWPstartSymbolAndLength_3 = 57; //43; //57;
|
||||||
|
#uplinkConfigCommon
|
||||||
|
#frequencyInfoUL
|
||||||
|
ul_frequencyBand = 78;
|
||||||
|
#scs-SpecificCarrierList
|
||||||
|
ul_offstToCarrier = 0;
|
||||||
|
# subcarrierSpacing
|
||||||
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
|
ul_subcarrierSpacing = 1;
|
||||||
|
ul_carrierBandwidth = 106;
|
||||||
|
pMax = 20;
|
||||||
|
#initialUplinkBWP
|
||||||
|
#genericParameters
|
||||||
|
initialULBWPlocationAndBandwidth = 6368;
|
||||||
|
# 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 = -100;
|
||||||
|
#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 = 5;
|
||||||
|
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||||
|
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||||
|
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||||
|
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||||
|
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
|
||||||
|
#ra_ContentionResolutionTimer
|
||||||
|
#(0..7) 8,16,24,32,40,48,56,64
|
||||||
|
ra_ContentionResolutionTimer = 7;
|
||||||
|
rsrp_ThresholdSSB = 19;
|
||||||
|
#prach-RootSequenceIndex_PR
|
||||||
|
#1 = 839, 2 = 139
|
||||||
|
prach_RootSequenceIndex_PR = 2;
|
||||||
|
prach_RootSequenceIndex = 1;
|
||||||
|
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||||
|
#
|
||||||
|
msg1_SubcarrierSpacing = 1,
|
||||||
|
|
||||||
|
# restrictedSetConfig
|
||||||
|
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||||
|
restrictedSetConfig = 0,
|
||||||
|
# pusch-ConfigCommon (up to 16 elements)
|
||||||
|
initialULBWPk2_0 = 2;
|
||||||
|
initialULBWPmappingType_0 = 1
|
||||||
|
# this is SS=0 L=11
|
||||||
|
initialULBWPstartSymbolAndLength_0 = 55;
|
||||||
|
|
||||||
|
initialULBWPk2_1 = 2;
|
||||||
|
initialULBWPmappingType_1 = 1;
|
||||||
|
# this is SS=0 L=12
|
||||||
|
initialULBWPstartSymbolAndLength_1 = 69;
|
||||||
|
|
||||||
|
initialULBWPk2_2 = 7;
|
||||||
|
initialULBWPmappingType_2 = 1;
|
||||||
|
# this is SS=10 L=4
|
||||||
|
initialULBWPstartSymbolAndLength_2 = 52;
|
||||||
|
|
||||||
|
msg3_DeltaPreamble = 1;
|
||||||
|
p0_NominalWithGrant =-90;
|
||||||
|
|
||||||
|
# pucch-ConfigCommon setup :
|
||||||
|
# pucchGroupHopping
|
||||||
|
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||||
|
pucchGroupHopping = 0;
|
||||||
|
hoppingId = 40;
|
||||||
|
p0_nominal = -90;
|
||||||
|
# ssb_PositionsInBurs_BitmapPR
|
||||||
|
# 1=short, 2=medium, 3=long
|
||||||
|
ssb_PositionsInBurst_PR = 2;
|
||||||
|
ssb_PositionsInBurst_Bitmap = 1; #0x80;
|
||||||
|
|
||||||
|
# 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; //8; //7;
|
||||||
|
nrofDownlinkSymbols = 6; //0; //6;
|
||||||
|
nrofUplinkSlots = 2;
|
||||||
|
nrofUplinkSymbols = 4; //0; //4;
|
||||||
|
|
||||||
|
ssPBCH_BlockPower = -25;
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
# ------- SCTP definitions
|
||||||
|
SCTP :
|
||||||
|
{
|
||||||
|
# Number of streams to use in input/output
|
||||||
|
SCTP_INSTREAMS = 2;
|
||||||
|
SCTP_OUTSTREAMS = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
////////// MME parameters:
|
||||||
|
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
port = 36412 ;
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
///X2
|
||||||
|
enable_x2 = "yes";
|
||||||
|
t_reloc_prep = 1000; /* unit: millisecond */
|
||||||
|
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||||
|
t_dc_prep = 1000; /* unit: millisecond */
|
||||||
|
t_dc_overall = 2000; /* unit: millisecond */
|
||||||
|
target_enb_x2_ip_address = (
|
||||||
|
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
|
||||||
|
ipv6 = "192:168:30::17";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
|
||||||
|
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
|
||||||
|
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||||
|
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
|
||||||
|
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
|
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
|
||||||
|
GNB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
MACRLCs = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_s_preference = "local_L1";
|
||||||
|
tr_n_preference = "local_RRC";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "local_mac";
|
||||||
|
pusch_proc_threads = 6;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 1
|
||||||
|
nb_rx = 1
|
||||||
|
att_tx = 0
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [7];
|
||||||
|
max_pdschReferenceSignalPower = -27;
|
||||||
|
max_rxgain = 75; #114
|
||||||
|
eNB_instances = [0];
|
||||||
|
sdr_addrs = "addr=192.168.80.50"
|
||||||
|
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_RU_L1_TRX_SPLIT";
|
||||||
|
//parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||||
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
|
worker_config = "WORKER_ENABLE";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
};
|
||||||
|
|
||||||
|
uicc: {
|
||||||
|
opc = "testopc";
|
||||||
|
};
|
||||||
+25
-13
@@ -694,8 +694,8 @@ class RANManagement():
|
|||||||
NSA_RAPROC_PUSCH_check = 0
|
NSA_RAPROC_PUSCH_check = 0
|
||||||
#dlsch and ulsch statistics (dictionary)
|
#dlsch and ulsch statistics (dictionary)
|
||||||
dlsch_ulsch_stats = {}
|
dlsch_ulsch_stats = {}
|
||||||
#count "L1 thread not ready" msg
|
#real time statistics (dictionary)
|
||||||
L1_thread_not_ready_cnt = 0
|
real_time_stats = {}
|
||||||
#count "problem receiving samples" msg
|
#count "problem receiving samples" msg
|
||||||
pb_receiving_samples_cnt = 0
|
pb_receiving_samples_cnt = 0
|
||||||
|
|
||||||
@@ -857,16 +857,21 @@ class RANManagement():
|
|||||||
#keys below are the markers we are loooking for, loop over this keys list
|
#keys below are the markers we are loooking for, loop over this keys list
|
||||||
#everytime these markers are found in the log file, the previous ones are overwritten in the dict
|
#everytime these markers are found in the log file, the previous ones are overwritten in the dict
|
||||||
#eventually we record and print only the last occurence
|
#eventually we record and print only the last occurence
|
||||||
keys = {'dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'}
|
keys = {'UE ID','dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled', 'scheduling timing stats'}
|
||||||
for k in keys:
|
for k in keys:
|
||||||
result = re.search(k, line)
|
result = re.search(k, line)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
|
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
|
||||||
dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
|
dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
|
||||||
#count "L1 thread not ready" msg
|
#real time statistics
|
||||||
result = re.search('\[PHY\]\s+L1_thread isn\'t ready', str(line))
|
#same method as above
|
||||||
if result is not None:
|
keys = {'feprx','feptx_prec','feptx_ofdm','feptx_total','L1 Tx processing','DLSCH encoding','L1 Rx processing','PUSCH inner-receiver','PUSCH decoding'}
|
||||||
L1_thread_not_ready_cnt += 1
|
for k in keys:
|
||||||
|
result = re.search(k, line)
|
||||||
|
if result is not None:
|
||||||
|
#remove 1- all useless char before relevant info 2- trailing char
|
||||||
|
tmp=re.match(rf'^.*?(\b{k}\b.*)',line.rstrip()) #from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
|
||||||
|
real_time_stats[k]=tmp.group(1)
|
||||||
#count "problem receiving samples" msg
|
#count "problem receiving samples" msg
|
||||||
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
|
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
@@ -897,15 +902,10 @@ class RANManagement():
|
|||||||
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS '
|
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : PASS '
|
||||||
htmlMsg = statMsg+'\n'
|
htmlMsg = statMsg+'\n'
|
||||||
else:
|
else:
|
||||||
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL '
|
statMsg = '[RAPROC] PUSCH with TC_RNTI message check for ' + nodeB_prefix + 'NB : FAIL or not relevant'
|
||||||
htmlMsg = statMsg+'\n'
|
htmlMsg = statMsg+'\n'
|
||||||
logging.debug(statMsg)
|
logging.debug(statMsg)
|
||||||
htmleNBFailureMsg += htmlMsg
|
htmleNBFailureMsg += htmlMsg
|
||||||
#L1 thread not ready log
|
|
||||||
statMsg = '[PHY] L1 thread is not ready msg count = '+str(L1_thread_not_ready_cnt)
|
|
||||||
htmlMsg = statMsg+'\n'
|
|
||||||
logging.debug(statMsg)
|
|
||||||
htmleNBFailureMsg += htmlMsg
|
|
||||||
#problem receiving samples log
|
#problem receiving samples log
|
||||||
statMsg = '[PHY] problem receiving samples msg count = '+str(pb_receiving_samples_cnt)
|
statMsg = '[PHY] problem receiving samples msg count = '+str(pb_receiving_samples_cnt)
|
||||||
htmlMsg = statMsg+'\n'
|
htmlMsg = statMsg+'\n'
|
||||||
@@ -920,6 +920,18 @@ class RANManagement():
|
|||||||
logging.debug(dlsch_ulsch_stats[key])
|
logging.debug(dlsch_ulsch_stats[key])
|
||||||
htmleNBFailureMsg += statMsg
|
htmleNBFailureMsg += statMsg
|
||||||
|
|
||||||
|
#real time statistics statistics
|
||||||
|
if len(real_time_stats)!=0: #check if dictionary is not empty
|
||||||
|
statMsg=''
|
||||||
|
for key in real_time_stats: #for each dictionary key
|
||||||
|
statMsg += real_time_stats[key] + '\n'
|
||||||
|
logging.debug(real_time_stats[key])
|
||||||
|
htmleNBFailureMsg += statMsg
|
||||||
|
else:
|
||||||
|
statMsg = 'No real time stats found in the log file\n'
|
||||||
|
logging.debug('No real time stats found in the log file')
|
||||||
|
htmleNBFailureMsg += statMsg
|
||||||
|
|
||||||
if uciStatMsgCount > 0:
|
if uciStatMsgCount > 0:
|
||||||
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||||
|
|||||||
@@ -0,0 +1,275 @@
|
|||||||
|
#/*
|
||||||
|
# * 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
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Merge Requests Dashboard for RAN on googleSheet
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# Import
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
|
||||||
|
#import google spreadsheet API
|
||||||
|
import gspread
|
||||||
|
from oauth2client.service_account import ServiceAccountCredentials
|
||||||
|
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import shlex #lexical analysis
|
||||||
|
import json #json structures
|
||||||
|
import datetime #now() and date formating
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# Class Declaration
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
|
||||||
|
class gDashboard:
|
||||||
|
def __init__(self, creds_file, spreadsheet, worksheet): #"creds.json", 'OAI RAN Dashboard', 'MR Status'
|
||||||
|
self.scope = ["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive"]
|
||||||
|
self.creds = ServiceAccountCredentials.from_json_keyfile_name(creds_file, self.scope)
|
||||||
|
self.client = gspread.authorize(self.creds)
|
||||||
|
#spreadsheet
|
||||||
|
self.ss = self.client.open(spreadsheet)
|
||||||
|
#worksheet
|
||||||
|
self.sheet = self.ss.worksheet(worksheet)
|
||||||
|
self.ss.del_worksheet(self.sheet) #start by deleting the old sheet
|
||||||
|
self.sheet = self.ss.add_worksheet(title=worksheet, rows="100", cols="20") #create a new one
|
||||||
|
|
||||||
|
self.d = {} #data dictionary
|
||||||
|
|
||||||
|
|
||||||
|
def fetchData(self,cmd):
|
||||||
|
#cmd="""curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100" """
|
||||||
|
process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE)
|
||||||
|
output = process.stdout.readline()
|
||||||
|
tmp=output.decode("utf-8")
|
||||||
|
self.d = json.loads(tmp)
|
||||||
|
|
||||||
|
|
||||||
|
def gBuild(self, destinationSheetName):
|
||||||
|
|
||||||
|
#line 1 : update date/time, format dd/mm/YY H:M:S
|
||||||
|
now = datetime.now()
|
||||||
|
dt_string = "Update : " + now.strftime("%d/%m/%Y %H:%M")
|
||||||
|
row =[dt_string]
|
||||||
|
self.sheet.insert_row(row, index=1, value_input_option='RAW')
|
||||||
|
|
||||||
|
#line 2 empty
|
||||||
|
#line 3 is for the column names
|
||||||
|
i=3
|
||||||
|
row =["MR","Created_at","Author","Title","Assignee", "Reviewer", "CAN START","IN PROGRESS","COMPLETED","OK MERGE","Merge conflicts"]
|
||||||
|
self.sheet.insert_row(row, index=i, value_input_option='RAW')
|
||||||
|
|
||||||
|
#line 4 onward, MR data lines
|
||||||
|
for x in range(len(self.d)):
|
||||||
|
i=i+1
|
||||||
|
date_time_str = self.d[x]['created_at']
|
||||||
|
date_time_obj = datetime.strptime(date_time_str, '%Y-%m-%dT%H:%M:%S.%fZ')
|
||||||
|
|
||||||
|
milestone1=milestone2=milestone3=milestone4=""
|
||||||
|
if self.d[x]['milestone']!=None:
|
||||||
|
if self.d[x]['milestone']['title']=="REVIEW_CAN_START":
|
||||||
|
milestone1="X"
|
||||||
|
elif self.d[x]['milestone']['title']=="REVIEW_IN_PROGRESS":
|
||||||
|
milestone2="X"
|
||||||
|
elif self.d[x]['milestone']['title']=="REVIEW_COMPLETED_AND_APPROVED":
|
||||||
|
milestone3="X"
|
||||||
|
elif self.d[x]['milestone']['title']=="OK_TO_BE_MERGED":
|
||||||
|
milestone4="X"
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
|
#check if empty or not
|
||||||
|
if self.d[x]['assignee']!=None:
|
||||||
|
assignee = str(self.d[x]['assignee']['name'])
|
||||||
|
else:
|
||||||
|
assignee = ""
|
||||||
|
|
||||||
|
#check if empty or not
|
||||||
|
if len(self.d[x]['reviewers'])!=0:
|
||||||
|
reviewer = str(self.d[x]['reviewers'][0]['name'])
|
||||||
|
else:
|
||||||
|
reviewer = ""
|
||||||
|
|
||||||
|
if self.d[x]['has_conflicts']==True:
|
||||||
|
conflicts = "YES"
|
||||||
|
else:
|
||||||
|
conflicts = ""
|
||||||
|
|
||||||
|
#build final row to be inserted, the first column is left empty for now, will be filled afterward with hyperlinks to gitlab MR
|
||||||
|
row =["", str(date_time_obj.date()),str(self.d[x]['author']['name']),str(self.d[x]['title']),\
|
||||||
|
assignee, reviewer,\
|
||||||
|
milestone1,milestone2,milestone3,milestone4,conflicts]
|
||||||
|
|
||||||
|
#insert the row to worksheet
|
||||||
|
self.sheet.insert_row(row, index=i, value_input_option='RAW')
|
||||||
|
|
||||||
|
|
||||||
|
#add MR hyperlinks in a list of requests to be sent as one update batch; this to save API calls (quotas)
|
||||||
|
i=3
|
||||||
|
requests=[]
|
||||||
|
for x in range(len(self.d)):
|
||||||
|
rowIndex=i
|
||||||
|
colIndex=0
|
||||||
|
hyperlink= '\"'+"https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/"+ str(self.d[x]['iid']) +'\"'
|
||||||
|
text= '\"'+str(self.d[x]['iid'])+'"'
|
||||||
|
requests.append(self.addHyperlink(hyperlink, text, destinationSheetName, rowIndex, colIndex))
|
||||||
|
i=i+1
|
||||||
|
body = {"requests": requests}
|
||||||
|
self.ss.batch_update(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def addHyperlink(self, hyperlink, text, destinationSheetName, rowIndex, colIndex):
|
||||||
|
sheetId = self.ss.worksheet(destinationSheetName)._properties['sheetId']
|
||||||
|
request =\
|
||||||
|
{
|
||||||
|
"updateCells": {
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"userEnteredValue": {
|
||||||
|
"formulaValue":"=HYPERLINK({},{})".format(hyperlink, text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fields": "userEnteredValue",
|
||||||
|
"start": {
|
||||||
|
"sheetId": sheetId,
|
||||||
|
"rowIndex": rowIndex,
|
||||||
|
"columnIndex": colIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return request
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def gFormat(self,sourceSheetName,destinationSheetName): # "Formating" , "MR Status"
|
||||||
|
#the requests are appended in a list of requests to be sent as one update batch; this to save API calls (quotas)
|
||||||
|
#copy formating template
|
||||||
|
sourceSheetId = self.ss.worksheet(sourceSheetName)._properties['sheetId']
|
||||||
|
destinationSheetId = self.ss.worksheet(destinationSheetName)._properties['sheetId']
|
||||||
|
requests=[]
|
||||||
|
requests.append(
|
||||||
|
{
|
||||||
|
"copyPaste": {
|
||||||
|
"source": {
|
||||||
|
"sheetId": sourceSheetId,
|
||||||
|
"startRowIndex": 0,
|
||||||
|
"endRowIndex": 40,
|
||||||
|
"startColumnIndex": 0,
|
||||||
|
"endColumnIndex": 12
|
||||||
|
},
|
||||||
|
"destination": {
|
||||||
|
"sheetId": destinationSheetId,
|
||||||
|
"startRowIndex": 0,
|
||||||
|
"endRowIndex": 40,
|
||||||
|
"startColumnIndex": 0,
|
||||||
|
"endColumnIndex": 12
|
||||||
|
},
|
||||||
|
"pasteType": "PASTE_FORMAT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#resize columns fit to data, except col 0
|
||||||
|
sheetId = self.ss.worksheet(destinationSheetName)._properties['sheetId']
|
||||||
|
requests.append(
|
||||||
|
{
|
||||||
|
'autoResizeDimensions': {
|
||||||
|
'dimensions': {
|
||||||
|
'sheetId': sheetId,
|
||||||
|
'dimension': 'COLUMNS',
|
||||||
|
'startIndex': 1,
|
||||||
|
'endIndex': 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#resize col 0
|
||||||
|
sheetId = self.ss.worksheet(destinationSheetName)._properties['sheetId']
|
||||||
|
requests.append(
|
||||||
|
{
|
||||||
|
"updateDimensionProperties": {
|
||||||
|
"range": {
|
||||||
|
"sheetId": sheetId,
|
||||||
|
"dimension": "COLUMNS",
|
||||||
|
"startIndex": 0,
|
||||||
|
"endIndex": 1
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"pixelSize": 100
|
||||||
|
},
|
||||||
|
"fields": "pixelSize"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#resize milestones to be cleaner
|
||||||
|
sheetId = self.ss.worksheet(destinationSheetName)._properties['sheetId']
|
||||||
|
requests.append(
|
||||||
|
{
|
||||||
|
"updateDimensionProperties": {
|
||||||
|
"range": {
|
||||||
|
"sheetId": sheetId,
|
||||||
|
"dimension": "COLUMNS",
|
||||||
|
"startIndex": 6,
|
||||||
|
"endIndex": 10
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"pixelSize": 135
|
||||||
|
},
|
||||||
|
"fields": "pixelSize"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
body = {"requests": requests}
|
||||||
|
self.ss.batch_update(body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
my_gDashboard=gDashboard("/home/oaicicd/remi/creds.json", 'OAI RAN Dashboard', 'MR Status')
|
||||||
|
cmd="""curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100" """
|
||||||
|
my_gDashboard.fetchData(cmd)
|
||||||
|
my_gDashboard.gBuild("MR Status")
|
||||||
|
my_gDashboard.gFormat("Formating" , "MR Status")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# execute only if run as a script
|
||||||
|
main()
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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>gNB-PHY-Test</htmlTabRef>
|
||||||
|
<htmlTabName>Run-gNB-PHY-Test</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>2</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090101 000001 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090101">
|
||||||
|
<class>Initialize_eNB</class>
|
||||||
|
<desc>Initialize gNB USRP</desc>
|
||||||
|
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106</Initialize_eNB_args>
|
||||||
|
<air_interface>NR</air_interface>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>180</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate gNB</desc>
|
||||||
|
<air_interface>NR</air_interface>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -45,6 +45,8 @@ include_directories(${CONFIG_INCLUDE_DIRS})
|
|||||||
pkg_search_module(CRYPTO libcrypto REQUIRED)
|
pkg_search_module(CRYPTO libcrypto REQUIRED)
|
||||||
include_directories(${CRYPTO_INCLUDE_DIRS})
|
include_directories(${CRYPTO_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
#uhd 4.0 and iris installs by default in /usr/local
|
||||||
|
include_directories("/usr/local/include/")
|
||||||
#use native cmake method as this package is not in pkg-config
|
#use native cmake method as this package is not in pkg-config
|
||||||
if (${RF_BOARD} STREQUAL "OAI_USRP")
|
if (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
@@ -52,7 +54,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
|
|||||||
|
|
||||||
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
||||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||||
include_directories("/usr/local/include/")
|
|
||||||
set(HW_SOURCE ${HW_SOURCE}
|
set(HW_SOURCE ${HW_SOURCE}
|
||||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||||
LINK_DIRECTORIES("/usr/local/lib")
|
LINK_DIRECTORIES("/usr/local/lib")
|
||||||
@@ -410,6 +412,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs
|
|||||||
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
|
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
|
||||||
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
|
||||||
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
|
||||||
|
add_boolean_option(NEW_GTPU False "NEW_GTP")
|
||||||
|
|
||||||
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||||
add_library(ITTI
|
add_library(ITTI
|
||||||
@@ -418,7 +421,6 @@ add_library(ITTI
|
|||||||
)
|
)
|
||||||
add_dependencies(ITTI rrc_flag)
|
add_dependencies(ITTI rrc_flag)
|
||||||
set(ITTI_LIB ITTI)
|
set(ITTI_LIB ITTI)
|
||||||
set(GTPU_need_ITTI ${OPENAIR3_DIR}/GTPV1-U/gtpv1u_eNB.c)
|
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
@@ -2234,26 +2236,21 @@ add_library(CN_UTILS
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(GTPV1U_DIR ${OPENAIR3_DIR}/GTPV1-U)
|
set(GTPV1U_DIR ${OPENAIR3_DIR}/GTPV1-U)
|
||||||
set (GTPV1U_SRC
|
|
||||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
|
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTrxn.c
|
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
|
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1u.c
|
|
||||||
${GTPV1U_DIR}/gtpv1u_teid_pool.c
|
|
||||||
)
|
|
||||||
add_library(GTPV1U ${GTPV1U_SRC})
|
|
||||||
add_dependencies(GTPV1U rrc_flag)
|
|
||||||
|
|
||||||
#add_library (GTPV1U_OCP
|
add_library (GTPV1U_OCP
|
||||||
#${OPENAIR3_DIR}/ocp-gtp/gtp_itf.cpp
|
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
||||||
#)
|
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||||
#include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
||||||
|
)
|
||||||
|
add_dependencies(GTPV1U_OCP rrc_flag)
|
||||||
|
include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
||||||
|
|
||||||
#NR case
|
#NR case
|
||||||
set (NR_GTPV1U_SRC
|
set (NR_GTPV1U_SRC
|
||||||
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
||||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||||
|
${GTPV1U_DIR}/gtpv1u_eNB.c
|
||||||
|
${GTPV1U_DIR}/gtpv1u_gNB.c
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
|
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTrxn.c
|
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTrxn.c
|
||||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
|
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
|
||||||
@@ -2263,6 +2260,12 @@ set (NR_GTPV1U_SRC
|
|||||||
add_library(NR_GTPV1U ${NR_GTPV1U_SRC})
|
add_library(NR_GTPV1U ${NR_GTPV1U_SRC})
|
||||||
add_dependencies(NR_GTPV1U rrc_flag)
|
add_dependencies(NR_GTPV1U rrc_flag)
|
||||||
|
|
||||||
|
if (${NEW_GTPU})
|
||||||
|
set(GTPV1U GTPV1U_OCP)
|
||||||
|
else()
|
||||||
|
set(GTPV1U NR_GTPV1U)
|
||||||
|
endif()
|
||||||
|
|
||||||
set (MME_APP_SRC
|
set (MME_APP_SRC
|
||||||
${OPENAIR3_DIR}/MME_APP/mme_app.c
|
${OPENAIR3_DIR}/MME_APP/mme_app.c
|
||||||
${OPENAIR3_DIR}/MME_APP/mme_config.c
|
${OPENAIR3_DIR}/MME_APP/mme_config.c
|
||||||
@@ -2801,6 +2804,7 @@ add_library(rfsimulator MODULE
|
|||||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c
|
${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c
|
||||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c
|
${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c
|
||||||
|
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||||
)
|
)
|
||||||
target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES})
|
target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES})
|
||||||
|
|
||||||
@@ -2815,6 +2819,7 @@ include_directories("${OPENAIR_DIR}/common/utils/T")
|
|||||||
|
|
||||||
if (${T_TRACER})
|
if (${T_TRACER})
|
||||||
set(T_SOURCE
|
set(T_SOURCE
|
||||||
|
${OPENAIR_DIR}/common/utils/T/T_IDs.h
|
||||||
${OPENAIR_DIR}/common/utils/T/T.c
|
${OPENAIR_DIR}/common/utils/T/T.c
|
||||||
${OPENAIR_DIR}/common/utils/T/local_tracer.c)
|
${OPENAIR_DIR}/common/utils/T/local_tracer.c)
|
||||||
set(T_LIB "rt")
|
set(T_LIB "rt")
|
||||||
@@ -2824,8 +2829,6 @@ endif (${T_TRACER})
|
|||||||
#This rule and the following deal with it.
|
#This rule and the following deal with it.
|
||||||
add_custom_command (
|
add_custom_command (
|
||||||
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
|
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
|
||||||
COMMAND make clean
|
|
||||||
COMMAND make -j2
|
|
||||||
COMMAND make check_vcd
|
COMMAND make check_vcd
|
||||||
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
|
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
|
||||||
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
|
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
|
||||||
@@ -2833,6 +2836,10 @@ add_custom_command (
|
|||||||
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.h
|
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
execute_process (
|
||||||
|
COMMAND make check_vcd
|
||||||
|
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
|
||||||
|
)
|
||||||
#This rule is specifically needed to generate T files
|
#This rule is specifically needed to generate T files
|
||||||
#before anything else in a project that uses the T.
|
#before anything else in a project that uses the T.
|
||||||
#See below, there are some 'add_dependencies' showing that.
|
#See below, there are some 'add_dependencies' showing that.
|
||||||
@@ -2902,7 +2909,6 @@ add_executable(lte-softmodem
|
|||||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${GTPU_need_ITTI}
|
|
||||||
${XFORMSINTERFACE_SOURCE}
|
${XFORMSINTERFACE_SOURCE}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
@@ -2912,7 +2918,8 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
|
|||||||
|
|
||||||
target_link_libraries (lte-softmodem
|
target_link_libraries (lte-softmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
|
||||||
|
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB ${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
|
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
@@ -2943,7 +2950,6 @@ add_executable(ocp-enb
|
|||||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${GTPU_need_ITTI}
|
|
||||||
${XFORMSINTERFACE_SOURCE}
|
${XFORMSINTERFACE_SOURCE}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
@@ -2953,7 +2959,8 @@ add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer coding params_l
|
|||||||
|
|
||||||
target_link_libraries (ocp-enb
|
target_link_libraries (ocp-enb
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
|
||||||
|
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB ${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
@@ -3023,7 +3030,8 @@ endif()
|
|||||||
target_link_libraries (lte-uesoftmodem
|
target_link_libraries (lte-uesoftmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
||||||
GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
|
||||||
|
${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
@@ -3051,21 +3059,20 @@ add_executable(nr-softmodem
|
|||||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||||
${OPENAIR3_DIR}/GTPV1-U/gtpv1u_gNB.c
|
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||||
${GTPU_need_ITTI}
|
|
||||||
${XFORMSINTERFACE_SOURCE}
|
${XFORMSINTERFACE_SOURCE}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
|
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries (nr-softmodem
|
target_link_libraries (nr-softmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
|
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA
|
||||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||||
@@ -3095,7 +3102,6 @@ add_executable(ocp-gnb
|
|||||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${GTPU_need_ITTI}
|
|
||||||
${XFORMS_SOURCE_NR}
|
${XFORMS_SOURCE_NR}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
@@ -3105,7 +3111,7 @@ add_executable(ocp-gnb
|
|||||||
|
|
||||||
target_link_libraries (ocp-gnb
|
target_link_libraries (ocp-gnb
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
|
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA
|
||||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
|
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
|
||||||
@@ -3182,6 +3188,17 @@ target_link_libraries (dlsim_tm4
|
|||||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_executable(rftest
|
||||||
|
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
|
||||||
|
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c
|
||||||
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
|
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||||
|
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||||
|
${CONFIG_SOURCES}
|
||||||
|
${SHLIB_LOADER_SOURCES}
|
||||||
|
)
|
||||||
|
target_link_libraries(rftest minimal_lib PHY_NR_COMMON pthread dl m forms ${T_LIB} )
|
||||||
|
|
||||||
add_executable(polartest
|
add_executable(polartest
|
||||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c
|
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c
|
||||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||||
@@ -3414,7 +3431,7 @@ add_executable(test_epc_generate_scenario
|
|||||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||||
)
|
)
|
||||||
target_link_libraries (test_epc_generate_scenario
|
target_link_libraries (test_epc_generate_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP ${GTPV1U} LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(test_epc_play_scenario
|
add_executable(test_epc_play_scenario
|
||||||
@@ -3433,7 +3450,7 @@ add_executable(test_epc_play_scenario
|
|||||||
)
|
)
|
||||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||||
target_link_libraries (test_epc_play_scenario
|
target_link_libraries (test_epc_play_scenario
|
||||||
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP ${GTPV1U} LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -3479,7 +3496,7 @@ if (${T_TRACER})
|
|||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
|
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
|
||||||
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
CN_UTILS ${GTPV1U} SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
||||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
|
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
|
||||||
if (TARGET ${i})
|
if (TARGET ${i})
|
||||||
add_dependencies(${i} generate_T)
|
add_dependencies(${i} generate_T)
|
||||||
@@ -3570,14 +3587,12 @@ add_executable(nr-ittisim
|
|||||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||||
${OPENAIR3_DIR}/GTPV1-U/gtpv1u_gNB.c
|
|
||||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||||
${OPENAIR_DIR}/common/utils/utils.c
|
${OPENAIR_DIR}/common/utils/utils.c
|
||||||
${OPENAIR_DIR}/common/utils/system.c
|
${OPENAIR_DIR}/common/utils/system.c
|
||||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||||
${GTPU_need_ITTI}
|
|
||||||
${XFORMSINTERFACE_SOURCE}
|
${XFORMSINTERFACE_SOURCE}
|
||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${CONFIG_SOURCES}
|
${CONFIG_SOURCES}
|
||||||
@@ -3586,7 +3601,7 @@ add_executable(nr-ittisim
|
|||||||
|
|
||||||
target_link_libraries (nr-ittisim
|
target_link_libraries (nr-ittisim
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
|
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA
|
||||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
|
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
|
||||||
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ get_distribution_release() {
|
|||||||
check_supported_distribution() {
|
check_supported_distribution() {
|
||||||
case $(get_distribution_release) in
|
case $(get_distribution_release) in
|
||||||
"ubuntu20.04") return 0 ;;
|
"ubuntu20.04") return 0 ;;
|
||||||
|
"ubuntu20.10") return 0 ;;
|
||||||
|
"ubuntu21.04") return 0 ;;
|
||||||
esac
|
esac
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -157,8 +159,16 @@ install_protobuf_from_source(){
|
|||||||
#cd protobuf-2.6.1/
|
#cd protobuf-2.6.1/
|
||||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||||
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner "$USER" --group "$(groups | cut -d" " -f1)" --no-same-owner
|
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner
|
||||||
cd protobuf-3.3.0/ || exit
|
cd protobuf-3.3.0/
|
||||||
|
else
|
||||||
|
export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs
|
||||||
|
rm -rf /tmp/protobuf
|
||||||
|
git clone --depth=1 --branch=v3.3.0 https://github.com/protocolbuffers/protobuf.git /tmp/protobuf
|
||||||
|
cd /tmp/protobuf
|
||||||
|
git submodule update --init --recursive
|
||||||
|
./autogen.sh
|
||||||
|
fi
|
||||||
./configure
|
./configure
|
||||||
echo "Compiling protobuf"
|
echo "Compiling protobuf"
|
||||||
make -j"$(nproc)"
|
make -j"$(nproc)"
|
||||||
@@ -198,15 +208,15 @@ install_usrp_uhd_driver_from_source(){
|
|||||||
rm -rf /tmp/uhd
|
rm -rf /tmp/uhd
|
||||||
git clone https://github.com/EttusResearch/uhd.git
|
git clone https://github.com/EttusResearch/uhd.git
|
||||||
cd uhd || exit
|
cd uhd || exit
|
||||||
git checkout tags/v3.13.0.2
|
git checkout UHD-3.15.LTS
|
||||||
mkdir -p host/build
|
mkdir -p host/build
|
||||||
cd host/build || exit
|
cd host/build || exit
|
||||||
$CMAKE ../
|
$CMAKE ../ -GNinja
|
||||||
echo "Compiling UHD"
|
echo "Compiling UHD"
|
||||||
make -j"$(nproc)"
|
ninja
|
||||||
make test
|
$SUDO ninja install
|
||||||
$SUDO make install
|
|
||||||
$SUDO ldconfig
|
$SUDO ldconfig
|
||||||
|
$SUDO /usr/lib/uhd/utils/uhd_images_downloader.py
|
||||||
) >& "$uhd_install_log"
|
) >& "$uhd_install_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,6 +339,7 @@ check_install_ubuntu_packages() {
|
|||||||
$SUDO apt install -y software-properties-common
|
$SUDO apt install -y software-properties-common
|
||||||
case "$(get_distribution_release)" in
|
case "$(get_distribution_release)" in
|
||||||
"ubuntu20.04")
|
"ubuntu20.04")
|
||||||
|
"ubuntu21.04")
|
||||||
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
|
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
|
||||||
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
|
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
|
||||||
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
|
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
|
||||||
@@ -345,7 +356,6 @@ check_install_ubuntu_packages() {
|
|||||||
openvpn \
|
openvpn \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python-pexpect \
|
|
||||||
sshfs \
|
sshfs \
|
||||||
swig \
|
swig \
|
||||||
tshark \
|
tshark \
|
||||||
@@ -358,7 +368,6 @@ check_install_ubuntu_packages() {
|
|||||||
iperf3 \
|
iperf3 \
|
||||||
android-tools-adb \
|
android-tools-adb \
|
||||||
wvdial \
|
wvdial \
|
||||||
python-numpy \
|
|
||||||
sshpass \
|
sshpass \
|
||||||
nscd \
|
nscd \
|
||||||
bc \
|
bc \
|
||||||
@@ -379,7 +388,6 @@ check_install_ubuntu_packages() {
|
|||||||
git \
|
git \
|
||||||
graphviz \
|
graphviz \
|
||||||
gtkwave \
|
gtkwave \
|
||||||
guile-2.0-dev \
|
|
||||||
iperf \
|
iperf \
|
||||||
iptables \
|
iptables \
|
||||||
libxtables-dev \
|
libxtables-dev \
|
||||||
@@ -419,7 +427,8 @@ check_install_ubuntu_packages() {
|
|||||||
libxpm-dev \
|
libxpm-dev \
|
||||||
libboost-all-dev \
|
libboost-all-dev \
|
||||||
nettle-dev \
|
nettle-dev \
|
||||||
nettle-bin
|
nettle-bin \
|
||||||
|
libreadline-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ function main()
|
|||||||
local -i run_gdb=0
|
local -i run_gdb=0
|
||||||
local -i show_stdout=0
|
local -i show_stdout=0
|
||||||
local exe_arguments=""
|
local exe_arguments=""
|
||||||
local itti_dump_file=""
|
|
||||||
|
|
||||||
until [ -z "$1" ]
|
until [ -z "$1" ]
|
||||||
do
|
do
|
||||||
@@ -154,18 +153,6 @@ function main()
|
|||||||
exe_arguments="$exe_arguments --rf-config-file=$rf_config_file"
|
exe_arguments="$exe_arguments --rf-config-file=$rf_config_file"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-K | --itti-dump-file)
|
|
||||||
itti_dump_file=$2
|
|
||||||
# can omit file name if last arg on the line
|
|
||||||
if [ "x$itti_dump_file" = "x" ]; then
|
|
||||||
itti_dump_file="/tmp/enb_s1_usrp_itti.log"
|
|
||||||
shift 1;
|
|
||||||
else
|
|
||||||
shift 2;
|
|
||||||
fi
|
|
||||||
echo "setting ITTI dump file to: $itti_dump_file"
|
|
||||||
exe_arguments="$exe_arguments -K $itti_dump_file"
|
|
||||||
;;
|
|
||||||
-m | --mscgen)
|
-m | --mscgen)
|
||||||
g_msc_dir=$2
|
g_msc_dir=$2
|
||||||
# can omit file name if last arg on the line
|
# can omit file name if last arg on the line
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
|||||||
if ( ((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgpath) == 0)) || /* short option, one "-" */
|
if ( ((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgpath) == 0)) || /* short option, one "-" */
|
||||||
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 )) || /* long option beginning with "--" */
|
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 )) || /* long option beginning with "--" */
|
||||||
((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgoptions[n].optname) == 0) && (cfgoptions[n].paramflags & PARAMFLAG_CMDLINE_NOPREFIXENABLED )) ||
|
((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgoptions[n].optname) == 0) && (cfgoptions[n].paramflags & PARAMFLAG_CMDLINE_NOPREFIXENABLED )) ||
|
||||||
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 ) && (cfgoptions[n].paramflags & PARAMFLAG_CMDLINE_NOPREFIXENABLED )) ) {
|
((strlen(oneargv) > 2) && (strcmp(oneargv + 2, cfgoptions[n].optname) == 0 ) && (cfgoptions[n].paramflags & PARAMFLAG_CMDLINE_NOPREFIXENABLED )) ) {
|
||||||
char *valptr=NULL;
|
char *valptr=NULL;
|
||||||
int ret;
|
int ret;
|
||||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||||
|
|||||||
@@ -82,10 +82,12 @@ typedef struct configmodule_interface {
|
|||||||
#ifdef CONFIG_LOADCONFIG_MAIN
|
#ifdef CONFIG_LOADCONFIG_MAIN
|
||||||
configmodule_interface_t *cfgptr=NULL;
|
configmodule_interface_t *cfgptr=NULL;
|
||||||
|
|
||||||
static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugflags]> \n \
|
static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugflags]><:incp[path]>\n \
|
||||||
debugflags can also be defined in the config_libconfig section of the config file\n \
|
debugflags can also be defined in the config section of the config file\n \
|
||||||
debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \
|
debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \
|
||||||
4->print command line processing debug messages\n ";
|
4->print command line processing debug messages\n \
|
||||||
|
incp parameter can be used to define the include path used for config files (@include directive)\n \
|
||||||
|
defaults is set to the path of the main config file.\n";
|
||||||
|
|
||||||
#define CONFIG_SECTIONNAME "config"
|
#define CONFIG_SECTIONNAME "config"
|
||||||
#define CONFIGPARAM_DEBUGFLAGS_IDX 0
|
#define CONFIGPARAM_DEBUGFLAGS_IDX 0
|
||||||
|
|||||||
@@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
#include "config_libconfig.h"
|
#include "config_libconfig.h"
|
||||||
#include "config_libconfig_private.h"
|
#include "config_libconfig_private.h"
|
||||||
@@ -347,17 +348,35 @@ int config_libconfig_init(char *cfgP[], int numP) {
|
|||||||
config_get_if()->numptrs=0;
|
config_get_if()->numptrs=0;
|
||||||
memset(config_get_if()->ptrs,0,sizeof(void *) * CONFIG_MAX_ALLOCATEDPTRS);
|
memset(config_get_if()->ptrs,0,sizeof(void *) * CONFIG_MAX_ALLOCATEDPTRS);
|
||||||
memset(config_get_if()->ptrsAllocated, 0, sizeof(config_get_if()->ptrsAllocated));
|
memset(config_get_if()->ptrsAllocated, 0, sizeof(config_get_if()->ptrsAllocated));
|
||||||
|
/* search for include path parameter and set config file include path accordingly */
|
||||||
|
for (int i=0; i<numP; i++) {
|
||||||
|
if (strncmp(cfgP[i],"incp",4) == 0) {
|
||||||
|
config_set_include_dir (&(libconfig_privdata.cfg),cfgP[i]+4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* dirname may modify the input path and returned ptr may points to part of input path */
|
||||||
|
char *tmppath = strdup(libconfig_privdata.configfile);
|
||||||
|
if ( config_get_include_dir (&(libconfig_privdata.cfg)) == NULL) {
|
||||||
|
config_set_include_dir (&(libconfig_privdata.cfg),dirname( tmppath ));
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *incp = config_get_include_dir (&(libconfig_privdata.cfg)) ;
|
||||||
|
|
||||||
|
printf("[LIBCONFIG] Path for include directive set to: %s\n", (incp!=NULL)?incp:"libconfig defaults");
|
||||||
|
/* set convertion option to allow integer to float conversion*/
|
||||||
|
config_set_auto_convert (&(libconfig_privdata.cfg), CONFIG_TRUE);
|
||||||
/* Read the file. If there is an error, report it and exit. */
|
/* Read the file. If there is an error, report it and exit. */
|
||||||
if(! config_read_file(&(libconfig_privdata.cfg), libconfig_privdata.configfile)) {
|
if( config_read_file(&(libconfig_privdata.cfg), libconfig_privdata.configfile) == CONFIG_FALSE) {
|
||||||
fprintf(stderr,"[LIBCONFIG] %s %d file %s - %d - %s\n",__FILE__, __LINE__,
|
fprintf(stderr,"[LIBCONFIG] %s %d file %s - line %d: %s\n",__FILE__, __LINE__,
|
||||||
libconfig_privdata.configfile, config_error_line(&(libconfig_privdata.cfg)),
|
libconfig_privdata.configfile, config_error_line(&(libconfig_privdata.cfg)),
|
||||||
config_error_text(&(libconfig_privdata.cfg)));
|
config_error_text(&(libconfig_privdata.cfg)));
|
||||||
config_destroy(&(libconfig_privdata.cfg));
|
config_destroy(&(libconfig_privdata.cfg));
|
||||||
printf( "\n");
|
printf( "\n");
|
||||||
|
free(tmppath);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
free(tmppath);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ int write_file_matlab(const char *fname,
|
|||||||
fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
|
fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
AssertFatal(false, "unknown dump format: %d\n", format);
|
AssertFatal(false, "unknown dump format: %u\n", format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((format != 10 && format !=11 && format !=12 && format != 13 && format != 15) || multiVec) {
|
if ((format != 10 && format !=11 && format !=12 && format != 13 && format != 15) || multiVec) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ T_messages.txt.h: T_messages.txt
|
|||||||
T_IDs.h: $(GENIDS) T_messages.txt
|
T_IDs.h: $(GENIDS) T_messages.txt
|
||||||
./$(GENIDS) T_messages.txt T_IDs.h
|
./$(GENIDS) T_messages.txt T_IDs.h
|
||||||
|
|
||||||
check_vcd:
|
check_vcd: T_IDs.h T_messages.txt.h
|
||||||
gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
||||||
./_check_vcd || (rm -f ./_check_vcd ./T_IDs.h ./T_messages.txt.h && false)
|
./_check_vcd || (rm -f ./_check_vcd ./T_IDs.h ./T_messages.txt.h && false)
|
||||||
rm -f ./_check_vcd
|
rm -f ./_check_vcd
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ void output_log_mem(void);
|
|||||||
display_backtrace(); \
|
display_backtrace(); \
|
||||||
fflush(stdout); \
|
fflush(stdout); \
|
||||||
fflush(stderr); \
|
fflush(stderr); \
|
||||||
exit(EXIT_FAILURE); \
|
abort();
|
||||||
|
|
||||||
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void display_backtrace(void) {
|
|||||||
size_t i;
|
size_t i;
|
||||||
char *test=getenv("NO_BACKTRACE");
|
char *test=getenv("NO_BACKTRACE");
|
||||||
|
|
||||||
if (test!=0) *((int *)0)=0;
|
if (test!=0) abort();
|
||||||
|
|
||||||
size = backtrace(array, 10);
|
size = backtrace(array, 10);
|
||||||
strings = backtrace_symbols(array, size);
|
strings = backtrace_symbols(array, size);
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
FILE *g_msc_fd;
|
FILE *g_msc_fd;
|
||||||
char g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
|
char g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
|
||||||
|
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
|
||||||
typedef unsigned long msc_message_number_t;
|
typedef unsigned long msc_message_number_t;
|
||||||
typedef struct msc_queue_item_s {
|
typedef struct msc_queue_item_s {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void msc_log_message(
|
|||||||
|
|
||||||
#define MESSAGE_CHART_GENERATOR msc_interface.msc_loaded
|
#define MESSAGE_CHART_GENERATOR msc_interface.msc_loaded
|
||||||
|
|
||||||
msc_interface_t msc_interface;
|
extern msc_interface_t msc_interface;
|
||||||
#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
|
#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
|
||||||
#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use
|
#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use
|
||||||
#define MSC_END if(msc_interface.msc_loaded) msc_interface.msc_end
|
#define MSC_END if(msc_interface.msc_loaded) msc_interface.msc_end
|
||||||
|
|||||||
@@ -340,6 +340,7 @@ void *rrc_enb_process_msg(void *);
|
|||||||
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||||
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\
|
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\
|
||||||
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
|
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
|
||||||
|
TASK_DEF(OCP_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
|
||||||
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\
|
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\
|
||||||
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||||
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||||
@@ -472,6 +473,9 @@ void itti_subscribe_event_fd(task_id_t task_id, int fd);
|
|||||||
void itti_unsubscribe_event_fd(task_id_t task_id, int fd);
|
void itti_unsubscribe_event_fd(task_id_t task_id, int fd);
|
||||||
|
|
||||||
/** \brief Return the list of events excluding the fd associated with itti
|
/** \brief Return the list of events excluding the fd associated with itti
|
||||||
|
\the fd associated with itti can return, but it is marked events[i].events &= ~EPOLLIN
|
||||||
|
\as it is not EPOLLIN, the reader should ignore this fd
|
||||||
|
\or it can manage the list of fd's in his interest, so ignore the other ones
|
||||||
\param task_id Task ID of the task
|
\param task_id Task ID of the task
|
||||||
\param events events list
|
\param events events list
|
||||||
@returns number of events to handle
|
@returns number of events to handle
|
||||||
|
|||||||
+24
-8
@@ -199,15 +199,32 @@ void start_background_system(void) {
|
|||||||
|
|
||||||
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
|
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
pthread_attr_init(&attr);
|
int ret;
|
||||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
ret=pthread_attr_init(&attr);
|
||||||
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
|
ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||||
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
|
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||||
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
|
ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
|
||||||
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
|
if(priority<sched_get_priority_min(SCHED_OAI) || priority>sched_get_priority_max(SCHED_FIFO)) {
|
||||||
|
LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
|
||||||
|
priority,
|
||||||
|
sched_get_priority_min(SCHED_OAI),
|
||||||
|
sched_get_priority_max(SCHED_OAI));
|
||||||
|
if(priority<sched_get_priority_min(SCHED_OAI))
|
||||||
|
priority=sched_get_priority_min(SCHED_OAI);
|
||||||
|
if(priority>sched_get_priority_max(SCHED_OAI))
|
||||||
|
priority=sched_get_priority_max(SCHED_OAI);
|
||||||
|
}
|
||||||
|
AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),"");
|
||||||
struct sched_param sparam={0};
|
struct sched_param sparam={0};
|
||||||
sparam.sched_priority = priority;
|
sparam.sched_priority = priority;
|
||||||
pthread_attr_setschedparam(&attr, &sparam);
|
ret=pthread_attr_setschedparam(&attr, &sparam);
|
||||||
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
pthread_create(t, &attr, func, param);
|
ret=pthread_create(t, &attr, func, param);
|
||||||
|
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||||
|
|
||||||
pthread_setname_np(*t, name);
|
pthread_setname_np(*t, name);
|
||||||
if (affinity != -1 ) {
|
if (affinity != -1 ) {
|
||||||
@@ -216,7 +233,6 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
|
|||||||
CPU_SET(affinity, &cpuset);
|
CPU_SET(affinity, &cpuset);
|
||||||
AssertFatal( pthread_setaffinity_np(*t, sizeof(cpu_set_t), &cpuset) == 0, "Error setting processor affinity");
|
AssertFatal( pthread_setaffinity_np(*t, sizeof(cpu_set_t), &cpuset) == 0, "Error setting processor affinity");
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_attr_destroy(&attr);
|
pthread_attr_destroy(&attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ void set_latency_target(void);
|
|||||||
void configure_linux(void);
|
void configure_linux(void);
|
||||||
|
|
||||||
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority);
|
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority);
|
||||||
#define OAI_PRIORITY_RT_LOW sched_get_priority_min(SCHED_FIFO)
|
|
||||||
#define OAI_PRIORITY_RT sched_get_priority_max(SCHED_FIFO)-10
|
#define SCHED_OAI SCHED_RR
|
||||||
#define OAI_PRIORITY_RT_MAX sched_get_priority_max(SCHED_FIFO)
|
#define OAI_PRIORITY_RT_LOW sched_get_priority_min(SCHED_OAI)
|
||||||
|
#define OAI_PRIORITY_RT ((sched_get_priority_min(SCHED_OAI)+sched_get_priority_max(SCHED_OAI))/2)
|
||||||
|
#define OAI_PRIORITY_RT_MAX sched_get_priority_max(SCHED_OAI)-2
|
||||||
|
|
||||||
void thread_top_init(char *thread_name,
|
void thread_top_init(char *thread_name,
|
||||||
int affinity,
|
int affinity,
|
||||||
|
|||||||
@@ -461,12 +461,12 @@ int process_command(char *buf) {
|
|||||||
int i,j,k;
|
int i,j,k;
|
||||||
char modulename[TELNET_CMD_MAXSIZE];
|
char modulename[TELNET_CMD_MAXSIZE];
|
||||||
char cmd[TELNET_CMD_MAXSIZE];
|
char cmd[TELNET_CMD_MAXSIZE];
|
||||||
char cmdb[TELNET_MAX_MSGLENGTH];
|
char *cmdb=NULL;
|
||||||
char *bufbck;
|
char *bufbck;
|
||||||
int rt;
|
int rt;
|
||||||
memset(modulename,0,sizeof(modulename));
|
memset(modulename,0,sizeof(modulename));
|
||||||
memset(cmd,0,sizeof(cmd));
|
memset(cmd,0,sizeof(cmd));
|
||||||
memset(cmdb,0,sizeof(cmdb));
|
|
||||||
|
|
||||||
if (strncasecmp(buf,"ex",2) == 0)
|
if (strncasecmp(buf,"ex",2) == 0)
|
||||||
return CMDSTATUS_EXIT;
|
return CMDSTATUS_EXIT;
|
||||||
@@ -490,12 +490,10 @@ int process_command(char *buf) {
|
|||||||
return CMDSTATUS_FOUND;
|
return CMDSTATUS_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(modulename,0,sizeof(modulename));
|
|
||||||
memset(cmd,0,sizeof(cmd));
|
|
||||||
memset(cmdb,0,sizeof(cmdb));
|
|
||||||
bufbck=strdup(buf);
|
bufbck=strdup(buf);
|
||||||
rt=CMDSTATUS_NOTFOUND;
|
rt=CMDSTATUS_NOTFOUND;
|
||||||
j = sscanf(buf,"%19s %19s %19[^\t\n]",modulename,cmd,cmdb);
|
j = sscanf(buf,"%19s %19s %m[^\t\n]",modulename,cmd,&cmdb);
|
||||||
|
|
||||||
if (telnetparams.telnetdbg > 0)
|
if (telnetparams.telnetdbg > 0)
|
||||||
printf("process_command: %i words, module=%s cmd=%s, parameters= %s\n",j,modulename,cmd,cmdb);
|
printf("process_command: %i words, module=%s cmd=%s, parameters= %s\n",j,modulename,cmd,cmdb);
|
||||||
@@ -562,7 +560,7 @@ int process_command(char *buf) {
|
|||||||
rt= CMDSTATUS_FOUND;
|
rt= CMDSTATUS_FOUND;
|
||||||
} /* loop */
|
} /* loop */
|
||||||
} /* for i */
|
} /* for i */
|
||||||
|
free(cmdb);
|
||||||
free(bufbck);
|
free(bufbck);
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
@@ -702,7 +700,7 @@ void poll_telnetcmdq(void *qid, void *arg) {
|
|||||||
*/
|
*/
|
||||||
void exec_moduleinit(char *modname) {
|
void exec_moduleinit(char *modname) {
|
||||||
void (*fptr)(void);
|
void (*fptr)(void);
|
||||||
char initfunc[TELNET_CMD_MAXSIZE+9];
|
char initfunc[TELNET_CMD_MAXSIZE+10];
|
||||||
|
|
||||||
if (strlen(modname) > TELNET_CMD_MAXSIZE) {
|
if (strlen(modname) > TELNET_CMD_MAXSIZE) {
|
||||||
fprintf(stderr,"[TELNETSRV] module %s not loaded, name exceeds the %i size limit\n",
|
fprintf(stderr,"[TELNETSRV] module %s not loaded, name exceeds the %i size limit\n",
|
||||||
|
|||||||
@@ -37,14 +37,21 @@
|
|||||||
#else
|
#else
|
||||||
#define THREADINIT PTHREAD_MUTEX_INITIALIZER
|
#define THREADINIT PTHREAD_MUTEX_INITIALIZER
|
||||||
#endif
|
#endif
|
||||||
#define mutexinit(mutex) AssertFatal(pthread_mutex_init(&mutex,NULL)==0,"");
|
#define mutexinit(mutex) {int ret=pthread_mutex_init(&mutex,NULL); \
|
||||||
#define condinit(signal) AssertFatal(pthread_cond_init(&signal,NULL)==0,"");
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
#define mutexlock(mutex) AssertFatal(pthread_mutex_lock(&mutex)==0,"");
|
#define condinit(signal) {int ret=pthread_cond_init(&signal,NULL); \
|
||||||
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
|
#define mutexlock(mutex) {int ret=pthread_mutex_lock(&mutex); \
|
||||||
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
#define mutextrylock(mutex) pthread_mutex_trylock(&mutex)
|
#define mutextrylock(mutex) pthread_mutex_trylock(&mutex)
|
||||||
#define mutexunlock(mutex) AssertFatal(pthread_mutex_unlock(&mutex)==0,"");
|
#define mutexunlock(mutex) {int ret=pthread_mutex_unlock(&mutex); \
|
||||||
#define condwait(condition, mutex) AssertFatal(pthread_cond_wait(&condition, &mutex)==0,"");
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
#define condbroadcast(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
|
#define condwait(condition, mutex) {int ret=pthread_cond_wait(&condition, &mutex); \
|
||||||
#define condsignal(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
|
#define condbroadcast(signal) {int ret=pthread_cond_broadcast(&signal); \
|
||||||
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
|
#define condsignal(signal) {int ret=pthread_cond_broadcast(&signal); \
|
||||||
|
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||||
#define tpool_nbthreads(tpool) (tpool.nbThreads)
|
#define tpool_nbthreads(tpool) (tpool.nbThreads)
|
||||||
typedef struct notifiedFIFO_elt_s {
|
typedef struct notifiedFIFO_elt_s {
|
||||||
struct notifiedFIFO_elt_s *next;
|
struct notifiedFIFO_elt_s *next;
|
||||||
@@ -78,7 +85,7 @@ static inline notifiedFIFO_elt_t *newNotifiedFIFO_elt(int size,
|
|||||||
ret->reponseFifo=reponseFifo;
|
ret->reponseFifo=reponseFifo;
|
||||||
ret->processingFunc=processingFunc;
|
ret->processingFunc=processingFunc;
|
||||||
// We set user data piece aligend 32 bytes to be able to process it with SIMD
|
// We set user data piece aligend 32 bytes to be able to process it with SIMD
|
||||||
ret->msgData=(void *)ret+(sizeof(notifiedFIFO_elt_t)/32+1)*32;
|
ret->msgData=(void *)((uint8_t*)ret+(sizeof(notifiedFIFO_elt_t)/32+1)*32);
|
||||||
ret->malloced=true;
|
ret->malloced=true;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,8 +210,8 @@ time the worker finished the job
|
|||||||
time the client reads the result
|
time the client reads the result
|
||||||
|
|
||||||
if you set the environement variable:
|
if you set the environement variable:
|
||||||
thread-pool-measurements to a valid file name
|
threadPoolMeasurements to a valid file name
|
||||||
These measurements will be wrote to this Linux pipe.
|
These measurements will be wrote to this Linux pipe.
|
||||||
|
|
||||||
A tool to read the linux fifo and display it in ascii is provided:
|
A tool to read the linux fifo and display it in ascii is provided; compute the binay:
|
||||||
see the local directory Makefile for this tool and to compile the thread pool unitary tests.
|
in cmake building directory: make/ninja measurement_display
|
||||||
|
|||||||
@@ -296,6 +296,28 @@ gtp thread calls directly pdcp_data_req(), so it runs inside it's context intern
|
|||||||
## inside other threads
|
## inside other threads
|
||||||
gtpv1u_create_s1u_tunnel(), delete tunnel, ... functions are called inside the other threads, without mutex.
|
gtpv1u_create_s1u_tunnel(), delete tunnel, ... functions are called inside the other threads, without mutex.
|
||||||
|
|
||||||
|
# New GTP
|
||||||
|
## initialization
|
||||||
|
Coexistance until full merge with legacy GTP
|
||||||
|
cmake new option: NEW_GTPU to use the new implementation (it changes for the entire executable)
|
||||||
|
It is possible to use both old and new GTP in same executable because the itti task and all functions names are different
|
||||||
|
Current status of new implementation: not tested, X2 not developped, 5G new GTP option not developped, remain issues on data coming from void: muid, enb_flag, ...
|
||||||
|
|
||||||
|
ocp_gtpv1uTask(): this creates only the thread, doesn't configure anything
|
||||||
|
gtpv1Init(): creates a listening socket to Linux for a given reception and select a local IP address
|
||||||
|
|
||||||
|
newGtpuCreateTunnel() this function will replace the xxx_create_tunnel_xxx() for various cases
|
||||||
|
This creates a outgoing context for a teid (in input), it computes and return the incoming teid that will be used for incoming packets
|
||||||
|
These teids and in a "instance", so in a Linux socket: same teid can co-exist for different sockets
|
||||||
|
Remain here a lack to fill: the information given in the legacy funtions is not enough to fullfil the data needed by the callback
|
||||||
|
stuff like enb_flag, but also mui and more important data are not given explicitly by any legacy function (gtpv1u_create_s1u_tunnel), but the legacy and the new interface to lower layer (like pdcp) require this data.
|
||||||
|
The datamodel is still not fully understood, so this data source remain unknown
|
||||||
|
A new parameter is the callback function: will be pdpcp_data_req() and gtpv_data_req() (x2 case) for existing implementation and later other call backs like the F1-U implementation.
|
||||||
|
|
||||||
|
incoming packets
|
||||||
|
the gtp layer retrieves the data, the teid, find out the related data: rnti, bearer and quite a lot of other parameters (not clear why, because it looks like all is statefull, so the lower layer should have the context)
|
||||||
|
if lower layers can be stateless, it is a good idea to keep the context in the gtp layer and pass it to the callback, but the design remain obfuscated.
|
||||||
|
|
||||||
# NGAP
|
# NGAP
|
||||||
NGAP would be a itti thread as is S1AP (+twin thread SCTP that is almost void processing)?
|
NGAP would be a itti thread as is S1AP (+twin thread SCTP that is almost void processing)?
|
||||||
About all messages are exchanged with RRC thread
|
About all messages are exchanged with RRC thread
|
||||||
|
|||||||
@@ -73,13 +73,15 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
|||||||
int config_sync_var=-1;
|
int config_sync_var=-1;
|
||||||
volatile int oai_exit = 0;
|
volatile int oai_exit = 0;
|
||||||
double cpuf;
|
double cpuf;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
|
||||||
uint16_t sf_ahead=4;
|
uint16_t sf_ahead=4;
|
||||||
//uint16_t slot_ahead=6;
|
//uint16_t slot_ahead=6;
|
||||||
int otg_enabled;
|
int otg_enabled;
|
||||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||||
int split73;
|
int split73;
|
||||||
int usrp_tx_thread = 0;
|
|
||||||
char * split73_config;
|
char * split73_config;
|
||||||
int split73;
|
int split73;
|
||||||
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
|
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
|
||||||
|
|||||||
+23
-15
@@ -228,16 +228,6 @@ void rx_func(void *param) {
|
|||||||
rnti_to_remove_count = 0;
|
rnti_to_remove_count = 0;
|
||||||
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
|
if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1);
|
||||||
|
|
||||||
// Call the scheduler
|
|
||||||
|
|
||||||
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
|
||||||
gNB->UL_INFO.frame = frame_rx;
|
|
||||||
gNB->UL_INFO.slot = slot_rx;
|
|
||||||
gNB->UL_INFO.module_id = gNB->Mod_id;
|
|
||||||
gNB->UL_INFO.CC_id = gNB->CC_id;
|
|
||||||
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
|
||||||
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
|
||||||
|
|
||||||
// RX processing
|
// RX processing
|
||||||
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
|
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
|
||||||
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
|
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
|
||||||
@@ -264,6 +254,18 @@ void rx_func(void *param) {
|
|||||||
stop_meas( &softmodem_stats_rxtx_sf );
|
stop_meas( &softmodem_stats_rxtx_sf );
|
||||||
LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, frame_rx, slot_rx, frame_tx, slot_tx);
|
LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, frame_rx, slot_rx, frame_tx, slot_tx);
|
||||||
|
|
||||||
|
// Call the scheduler
|
||||||
|
|
||||||
|
start_meas(&gNB->ul_indication_stats);
|
||||||
|
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
||||||
|
gNB->UL_INFO.frame = frame_rx;
|
||||||
|
gNB->UL_INFO.slot = slot_rx;
|
||||||
|
gNB->UL_INFO.module_id = gNB->Mod_id;
|
||||||
|
gNB->UL_INFO.CC_id = gNB->CC_id;
|
||||||
|
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
||||||
|
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
||||||
|
stop_meas(&gNB->ul_indication_stats);
|
||||||
|
|
||||||
notifiedFIFO_elt_t *res;
|
notifiedFIFO_elt_t *res;
|
||||||
|
|
||||||
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
|
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) {
|
||||||
@@ -323,18 +325,24 @@ static void *process_stats_thread(void *param) {
|
|||||||
|
|
||||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||||
|
|
||||||
|
reset_meas(&gNB->phy_proc_tx);
|
||||||
reset_meas(&gNB->dlsch_encoding_stats);
|
reset_meas(&gNB->dlsch_encoding_stats);
|
||||||
reset_meas(&gNB->dlsch_scrambling_stats);
|
reset_meas(&gNB->phy_proc_rx);
|
||||||
reset_meas(&gNB->dlsch_modulation_stats);
|
reset_meas(&gNB->ul_indication_stats);
|
||||||
|
reset_meas(&gNB->rx_pusch_stats);
|
||||||
|
reset_meas(&gNB->ulsch_decoding_stats);
|
||||||
|
|
||||||
wait_sync("process_stats_thread");
|
wait_sync("process_stats_thread");
|
||||||
|
|
||||||
while(!oai_exit)
|
while(!oai_exit)
|
||||||
{
|
{
|
||||||
sleep(1);
|
sleep(1);
|
||||||
print_meas(&gNB->dlsch_encoding_stats, "pdsch_encoding", NULL, NULL);
|
print_meas(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL);
|
||||||
print_meas(&gNB->dlsch_scrambling_stats, "pdsch_scrambling", NULL, NULL);
|
print_meas(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL);
|
||||||
print_meas(&gNB->dlsch_modulation_stats, "pdsch_modulation", NULL, NULL);
|
print_meas(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL);
|
||||||
|
print_meas(&gNB->ul_indication_stats, "UL Indication", NULL, NULL);
|
||||||
|
print_meas(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL);
|
||||||
|
print_meas(&gNB->ulsch_decoding_stats, "PUSCH decoding", NULL, NULL);
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ uint16_t sl_ahead;
|
|||||||
|
|
||||||
extern int emulate_rf;
|
extern int emulate_rf;
|
||||||
extern int numerology;
|
extern int numerology;
|
||||||
extern int usrp_tx_thread;
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
/* Functions to attach and configure RRU */
|
/* Functions to attach and configure RRU */
|
||||||
|
|||||||
@@ -68,11 +68,15 @@
|
|||||||
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
|
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
|
||||||
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
|
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
|
||||||
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
|
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
|
||||||
#define CONFIG_HLP_DLMCS "Set the maximum downlink MCS\n"
|
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
|
||||||
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
|
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
|
||||||
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
|
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
|
||||||
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
|
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
|
||||||
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
|
#define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n"
|
||||||
|
#define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
|
||||||
|
#define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
|
||||||
|
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots (slot 0 starts at LSB)\n"
|
||||||
|
#define CONFIG_HLP_ULBM_PHYTEST "Bitmap for ULSCH slots (slot 0 starts at LSB)\n"
|
||||||
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
||||||
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
|
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
|
||||||
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
|
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
#include "x2ap_eNB.h"
|
#include "x2ap_eNB.h"
|
||||||
#include "ngap_gNB.h"
|
#include "ngap_gNB.h"
|
||||||
#include "gnb_paramdef.h"
|
#include "gnb_paramdef.h"
|
||||||
|
#include <openair3/ocp-gtpu/gtp_itf.h>
|
||||||
#include "nfapi/oai_integration/vendor_ext.h"
|
#include "nfapi/oai_integration/vendor_ext.h"
|
||||||
|
|
||||||
pthread_cond_t nfapi_sync_cond;
|
pthread_cond_t nfapi_sync_cond;
|
||||||
@@ -92,11 +93,12 @@ pthread_mutex_t nfapi_sync_mutex;
|
|||||||
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
||||||
|
|
||||||
extern uint8_t nfapi_mode; // Default to monolithic mode
|
extern uint8_t nfapi_mode; // Default to monolithic mode
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
pthread_cond_t sync_cond;
|
pthread_cond_t sync_cond;
|
||||||
pthread_mutex_t sync_mutex;
|
pthread_mutex_t sync_mutex;
|
||||||
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||||
int config_sync_var=-1;
|
int config_sync_var=-1;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
|
||||||
volatile int start_gNB = 0;
|
volatile int start_gNB = 0;
|
||||||
volatile int oai_exit = 0;
|
volatile int oai_exit = 0;
|
||||||
@@ -114,7 +116,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
|||||||
//Temp fix for inexistent NR upper layer
|
//Temp fix for inexistent NR upper layer
|
||||||
unsigned char NB_gNB_INST = 1;
|
unsigned char NB_gNB_INST = 1;
|
||||||
|
|
||||||
static char *itti_dump_file = NULL;
|
|
||||||
|
|
||||||
int UE_scan = 1;
|
int UE_scan = 1;
|
||||||
int UE_scan_carrier = 0;
|
int UE_scan_carrier = 0;
|
||||||
@@ -160,8 +161,6 @@ int otg_enabled;
|
|||||||
|
|
||||||
//static NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
//static NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||||
//static nfapi_nr_config_request_t *config[MAX_NUM_CCs];
|
//static nfapi_nr_config_request_t *config[MAX_NUM_CCs];
|
||||||
uint32_t target_dl_mcs = 28; //maximum allowed mcs
|
|
||||||
uint32_t target_ul_mcs = 20;
|
|
||||||
uint32_t timing_advance = 0;
|
uint32_t timing_advance = 0;
|
||||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||||
|
|
||||||
@@ -179,7 +178,6 @@ extern void *udp_eNB_task(void *args_p);
|
|||||||
int transmission_mode=1;
|
int transmission_mode=1;
|
||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
int numerology = 0;
|
int numerology = 0;
|
||||||
int usrp_tx_thread = 0;
|
|
||||||
|
|
||||||
|
|
||||||
static char *parallel_config = NULL;
|
static char *parallel_config = NULL;
|
||||||
|
|||||||
@@ -18,19 +18,27 @@
|
|||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#define CMDLINE_PARAMS_DESC_GNB { \
|
#define CMDLINE_PARAMS_DESC_GNB { \
|
||||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
|
|
||||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
||||||
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
|
{"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
{"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
{"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \
|
||||||
|
{"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \
|
||||||
|
{"D" , CONFIG_HLP_DLBM_PHYTEST,0, u64ptr:&dlsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||||
|
{"U" , CONFIG_HLP_ULBM_PHYTEST,0, u64ptr:&ulsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "threads_t.h"
|
#include "threads_t.h"
|
||||||
extern threads_t threads;
|
extern threads_t threads;
|
||||||
|
extern uint32_t target_dl_mcs;
|
||||||
|
extern uint32_t target_ul_mcs;
|
||||||
|
extern uint32_t target_dl_bw;
|
||||||
|
extern uint32_t target_ul_bw;
|
||||||
|
extern uint64_t dlsch_slot_bitmap;
|
||||||
|
extern uint64_t ulsch_slot_bitmap;
|
||||||
|
|
||||||
// In nr-gnb.c
|
// In nr-gnb.c
|
||||||
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char *duplex_mode[];
|
extern const char *duplex_mode[];
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
|
||||||
// Thread variables
|
// Thread variables
|
||||||
pthread_cond_t nfapi_sync_cond;
|
pthread_cond_t nfapi_sync_cond;
|
||||||
@@ -149,7 +151,7 @@ int chain_offset = 0;
|
|||||||
int card_offset = 0;
|
int card_offset = 0;
|
||||||
uint64_t num_missed_slots = 0; // counter for the number of missed slots
|
uint64_t num_missed_slots = 0; // counter for the number of missed slots
|
||||||
int transmission_mode = 1;
|
int transmission_mode = 1;
|
||||||
int usrp_tx_thread = 0;
|
int numerology = 0;
|
||||||
int oaisim_flag = 0;
|
int oaisim_flag = 0;
|
||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
uint32_t N_RB_DL=106;
|
uint32_t N_RB_DL=106;
|
||||||
|
|||||||
@@ -61,8 +61,6 @@ uint32_t do_forms=0;
|
|||||||
unsigned int mmapped_dma=0;
|
unsigned int mmapped_dma=0;
|
||||||
int8_t threequarter_fs=0;
|
int8_t threequarter_fs=0;
|
||||||
|
|
||||||
uint32_t target_dl_mcs = 28; //maximum allowed mcs
|
|
||||||
uint32_t target_ul_mcs = 20;
|
|
||||||
int chain_offset=0;
|
int chain_offset=0;
|
||||||
uint16_t sl_ahead=6;
|
uint16_t sl_ahead=6;
|
||||||
uint16_t sf_ahead=6;
|
uint16_t sf_ahead=6;
|
||||||
@@ -70,16 +68,15 @@ uint32_t timing_advance = 0;
|
|||||||
int transmission_mode=1;
|
int transmission_mode=1;
|
||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
int numerology = 0;
|
int numerology = 0;
|
||||||
int usrp_tx_thread = 0;
|
|
||||||
|
|
||||||
|
|
||||||
int config_sync_var=-1;
|
int config_sync_var=-1;
|
||||||
pthread_mutex_t nfapi_sync_mutex;
|
pthread_mutex_t nfapi_sync_mutex;
|
||||||
pthread_cond_t nfapi_sync_cond;
|
pthread_cond_t nfapi_sync_cond;
|
||||||
int nfapi_sync_var=-1;
|
int nfapi_sync_var=-1;
|
||||||
uint8_t nfapi_mode = NFAPI_MONOLITHIC; // Default to monolithic mode
|
|
||||||
double cpuf;
|
double cpuf;
|
||||||
|
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
|
||||||
pthread_cond_t sync_cond;
|
pthread_cond_t sync_cond;
|
||||||
pthread_mutex_t sync_mutex;
|
pthread_mutex_t sync_mutex;
|
||||||
@@ -95,7 +92,8 @@ time_stats_t nfapi_meas; // total tx time
|
|||||||
time_stats_t softmodem_stats_rx_sf; // total rx time
|
time_stats_t softmodem_stats_rx_sf; // total rx time
|
||||||
// not used but needed for link
|
// not used but needed for link
|
||||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||||
|
uint16_t slot_ahead=6;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
|
||||||
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
|
||||||
int flexran_agent_start(mid_t mod_id) {
|
int flexran_agent_start(mid_t mod_id) {
|
||||||
@@ -122,7 +120,6 @@ int restart_L1L2(module_id_t gnb_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int wait_for_sync = 0;
|
static int wait_for_sync = 0;
|
||||||
static char *itti_dump_file = NULL;
|
|
||||||
static double snr_dB=20;
|
static double snr_dB=20;
|
||||||
static int DEFBANDS[] = {7};
|
static int DEFBANDS[] = {7};
|
||||||
static int DEFENBS[] = {0};
|
static int DEFENBS[] = {0};
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
static softmodem_params_t softmodem_params;
|
static softmodem_params_t softmodem_params;
|
||||||
char *parallel_config=NULL;
|
char *parallel_config=NULL;
|
||||||
char *worker_config=NULL;
|
char *worker_config=NULL;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
int usrp_tx_thread = 0;
|
||||||
|
|
||||||
uint8_t nfapi_mode=0;
|
uint8_t nfapi_mode=0;
|
||||||
|
|
||||||
@@ -86,7 +88,7 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
|
|||||||
void get_common_options(uint32_t execmask) {
|
void get_common_options(uint32_t execmask) {
|
||||||
uint32_t online_log_messages=0;
|
uint32_t online_log_messages=0;
|
||||||
uint32_t glog_level=0 ;
|
uint32_t glog_level=0 ;
|
||||||
uint32_t start_telnetsrv = 0;
|
uint32_t start_telnetsrv = 0, start_telnetclt = 0;
|
||||||
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
|
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
|
||||||
uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
|
uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
|
||||||
char *logmem_filename = NULL;
|
char *logmem_filename = NULL;
|
||||||
@@ -95,21 +97,26 @@ void get_common_options(uint32_t execmask) {
|
|||||||
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
||||||
check_execmask(execmask);
|
check_execmask(execmask);
|
||||||
config_get( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
config_get( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||||
config_set_checkfunctions(cmdline_logparams, cmdline_log_CheckParams,
|
|
||||||
sizeof(cmdline_logparams)/sizeof(paramdef_t));
|
int numparams=sizeof(cmdline_logparams)/sizeof(paramdef_t);
|
||||||
config_get( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
|
config_set_checkfunctions(cmdline_logparams, cmdline_log_CheckParams,numparams);
|
||||||
|
config_get( cmdline_logparams,numparams,NULL);
|
||||||
if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) {
|
|
||||||
|
if(config_isparamset(cmdline_logparams,config_paramidx_fromname(cmdline_logparams,numparams, CONFIG_FLOG_OPT))) {
|
||||||
set_glog_onlinelog(online_log_messages);
|
set_glog_onlinelog(online_log_messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config_isparamset(cmdline_logparams,CMDLINE_GLOGLEVEL_IDX)) {
|
if(config_isparamset(cmdline_logparams,config_paramidx_fromname(cmdline_logparams,numparams, CONFIG_LOGL_OPT))) {
|
||||||
set_glog(glog_level);
|
set_glog(glog_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start_telnetsrv) {
|
if (start_telnetsrv) {
|
||||||
load_module_shlib("telnetsrv",NULL,0,NULL);
|
load_module_shlib("telnetsrv",NULL,0,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (start_telnetclt) {
|
||||||
|
set_softmodem_optmask(SOFTMODEM_TELNETCLT_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
if (logmem_filename != NULL && strlen(logmem_filename) > 0) {
|
if (logmem_filename != NULL && strlen(logmem_filename) > 0) {
|
||||||
log_mem_filename = &logmem_filename[0];
|
log_mem_filename = &logmem_filename[0];
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ extern "C"
|
|||||||
#define CONFIG_HLP_RFSIM "Run in rf simulator mode (also known as basic simulator)\n"
|
#define CONFIG_HLP_RFSIM "Run in rf simulator mode (also known as basic simulator)\n"
|
||||||
#define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n"
|
#define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n"
|
||||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||||
|
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||||
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -119,6 +120,7 @@ extern "C"
|
|||||||
|
|
||||||
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
||||||
|
|
||||||
|
extern int usrp_tx_thread;
|
||||||
#define CMDLINE_PARAMS_DESC { \
|
#define CMDLINE_PARAMS_DESC { \
|
||||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
|
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
|
||||||
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
|
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
|
||||||
@@ -147,6 +149,7 @@ extern "C"
|
|||||||
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
|
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
|
||||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
|
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
|
||||||
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
|
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
|
||||||
|
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||||
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,23 +159,22 @@ extern "C"
|
|||||||
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
||||||
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
||||||
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
||||||
/*----------------------------------------------------------------------------------------------------------------------------*/
|
#define CONFIG_FLOG_OPT "R"
|
||||||
/* command line parameters for LOG utility */
|
#define CONFIG_LOGL_OPT "g"
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/*----------------------------------------------------------------------------------------------------------------------------*/
|
/* command line parameters for LOG utility */
|
||||||
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
|
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#define START_MSC softmodem_params.start_msc
|
#define START_MSC softmodem_params.start_msc
|
||||||
#define CMDLINE_LOGPARAMS_DESC { \
|
#define CMDLINE_LOGPARAMS_DESC { \
|
||||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
{CONFIG_FLOG_OPT , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
{CONFIG_LOGL_OPT , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
|
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
|
||||||
|
{"telnetclt", NULL, 0, uptr:&start_telnetclt, defstrval:NULL, TYPE_UINT, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CMDLINE_ONLINELOG_IDX 0
|
|
||||||
#define CMDLINE_GLOGLEVEL_IDX 1
|
|
||||||
#define CMDLINE_GLOGVERBO_IDX 2
|
|
||||||
#define CMDLINE_STARTTELN_IDX 3
|
|
||||||
|
|
||||||
/* check function for global log level */
|
/* check function for global log level */
|
||||||
#define CMDLINE_LOGPARAMS_CHECK_DESC { \
|
#define CMDLINE_LOGPARAMS_CHECK_DESC { \
|
||||||
@@ -181,6 +183,7 @@ extern "C"
|
|||||||
{ .s5= {NULL} } , \
|
{ .s5= {NULL} } , \
|
||||||
{ .s5= {NULL} } , \
|
{ .s5= {NULL} } , \
|
||||||
{ .s5= {NULL} } , \
|
{ .s5= {NULL} } , \
|
||||||
|
{ .s5= {NULL} } , \
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************************************************************************/
|
/***************************************************************************************************************************************/
|
||||||
@@ -193,6 +196,7 @@ extern "C"
|
|||||||
#define SOFTMODEM_SIML1_BIT (1<<12)
|
#define SOFTMODEM_SIML1_BIT (1<<12)
|
||||||
#define SOFTMODEM_DOSCOPE_BIT (1<<15)
|
#define SOFTMODEM_DOSCOPE_BIT (1<<15)
|
||||||
#define SOFTMODEM_RECPLAY_BIT (1<<16)
|
#define SOFTMODEM_RECPLAY_BIT (1<<16)
|
||||||
|
#define SOFTMODEM_TELNETCLT_BIT (1<<17)
|
||||||
#define SOFTMODEM_ENB_BIT (1<<20)
|
#define SOFTMODEM_ENB_BIT (1<<20)
|
||||||
#define SOFTMODEM_GNB_BIT (1<<21)
|
#define SOFTMODEM_GNB_BIT (1<<21)
|
||||||
#define SOFTMODEM_4GUE_BIT (1<<22)
|
#define SOFTMODEM_4GUE_BIT (1<<22)
|
||||||
@@ -209,6 +213,7 @@ extern "C"
|
|||||||
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
|
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
|
||||||
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
|
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
|
||||||
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
|
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
|
||||||
|
#define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_BIT)
|
||||||
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
|
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
|
||||||
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
||||||
#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
|
#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "PHY/defs_common.h"
|
#include "PHY/defs_common.h"
|
||||||
|
|
||||||
THREAD_STRUCT thread_struct;
|
extern THREAD_STRUCT thread_struct;
|
||||||
|
|
||||||
static inline void set_parallel_conf(char *parallel_conf) {
|
static inline void set_parallel_conf(char *parallel_conf) {
|
||||||
mapping config[]= {
|
mapping config[]= {
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ extern pthread_mutex_t nfapi_sync_mutex;
|
|||||||
extern int nfapi_sync_var;
|
extern int nfapi_sync_var;
|
||||||
|
|
||||||
extern int sync_var;
|
extern int sync_var;
|
||||||
char uecap_xer_in;
|
|
||||||
|
|
||||||
extern void init_eNB_afterRU(void);
|
extern void init_eNB_afterRU(void);
|
||||||
extern void init_UE_stub(int nb_inst,int,int);
|
extern void init_UE_stub(int nb_inst,int,int);
|
||||||
@@ -2199,7 +2198,7 @@ void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_add
|
|||||||
pnf.phys[0].udp.tx_port = vnf_p7_port;
|
pnf.phys[0].udp.tx_port = vnf_p7_port;
|
||||||
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
|
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
|
||||||
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
|
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
|
||||||
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%d rx:%d]\n",
|
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%u rx:%u]\n",
|
||||||
__FUNCTION__,config->vnf_ip_addr, config->vnf_p5_port,
|
__FUNCTION__,config->vnf_ip_addr, config->vnf_p5_port,
|
||||||
pnf.phys[0].local_addr,
|
pnf.phys[0].local_addr,
|
||||||
pnf.phys[0].udp.tx_addr, pnf.phys[0].udp.tx_port,
|
pnf.phys[0].udp.tx_addr, pnf.phys[0].udp.tx_port,
|
||||||
@@ -2250,7 +2249,7 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
|
|||||||
pnf.phys[0].udp.tx_port = vnf_p7_port;
|
pnf.phys[0].udp.tx_port = vnf_p7_port;
|
||||||
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
|
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
|
||||||
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
|
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
|
||||||
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%d rx:%d]\n",
|
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%u rx:%u]\n",
|
||||||
__FUNCTION__,
|
__FUNCTION__,
|
||||||
config->vnf_ip_addr, config->vnf_p5_port,
|
config->vnf_ip_addr, config->vnf_p5_port,
|
||||||
pnf.phys[0].local_addr,
|
pnf.phys[0].local_addr,
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#if !defined(NFAPI_PNF_H__)
|
#if !defined(NFAPI_PNF_H__)
|
||||||
#define NFAPI_PNF_H__
|
#define NFAPI_PNF_H__
|
||||||
|
extern nfapi_ue_release_request_body_t release_rntis;
|
||||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||||
void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017 Cisco Systems, Inc.
|
* Copyright 2017 Cisco Systems, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#define MAX_MSG_LENGTH 2096
|
#define MAX_MSG_LENGTH 2096
|
||||||
#define TRACE_HEADER_LENGTH 44
|
#define TRACE_HEADER_LENGTH 44
|
||||||
|
|
||||||
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...);
|
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...);
|
||||||
|
|
||||||
// initialize the trace function to 0
|
// initialize the trace function to 0
|
||||||
void (*nfapi_trace_g)(nfapi_trace_level_t level, const char* format, ...) = &nfapi_trace_dbg;
|
void (*nfapi_trace_g)(nfapi_trace_level_t level, const char* format, ...) = &nfapi_trace_dbg;
|
||||||
|
|
||||||
nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_INFO;
|
nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_INFO;
|
||||||
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
|
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
|
||||||
|
|
||||||
void nfapi_set_trace_level(nfapi_trace_level_t new_level)
|
void nfapi_set_trace_level(nfapi_trace_level_t new_level)
|
||||||
{
|
{
|
||||||
nfapi_trace_level_g = new_level;
|
nfapi_trace_level_g = new_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...)
|
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...)
|
||||||
{
|
{
|
||||||
char trace_buff[MAX_MSG_LENGTH + TRACE_HEADER_LENGTH];
|
char trace_buff[MAX_MSG_LENGTH + TRACE_HEADER_LENGTH];
|
||||||
uint32_t num_chars;
|
uint32_t num_chars;
|
||||||
va_list p_args;
|
va_list p_args;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
pthread_t tid = pthread_self();
|
pthread_t tid = pthread_self();
|
||||||
|
|
||||||
(void)gettimeofday(&tv, NULL);
|
(void)gettimeofday(&tv, NULL);
|
||||||
|
|
||||||
num_chars = (uint32_t)snprintf(trace_buff, TRACE_HEADER_LENGTH, "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
|
num_chars = (uint32_t)snprintf(trace_buff, TRACE_HEADER_LENGTH, "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
|
||||||
|
|
||||||
if (num_chars > TRACE_HEADER_LENGTH)
|
if (num_chars > TRACE_HEADER_LENGTH)
|
||||||
{
|
{
|
||||||
printf("trace_dbg: Error, num_chars is too large: %d", num_chars);
|
printf("trace_dbg: Error, num_chars is too large: %u", num_chars);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
va_start(p_args, format);
|
va_start(p_args, format);
|
||||||
if ((num_chars = (uint32_t)vsnprintf(&trace_buff[num_chars], MAX_MSG_LENGTH, format, p_args)))
|
if ((num_chars = (uint32_t)vsnprintf(&trace_buff[num_chars], MAX_MSG_LENGTH, format, p_args)))
|
||||||
{
|
{
|
||||||
if (level <= NFAPI_TRACE_WARN)
|
if (level <= NFAPI_TRACE_WARN)
|
||||||
{
|
{
|
||||||
printf("%s", trace_buff);
|
printf("%s", trace_buff);
|
||||||
}
|
}
|
||||||
printf("%s", trace_buff);
|
printf("%s", trace_buff);
|
||||||
}
|
}
|
||||||
va_end(p_args);
|
va_end(p_args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ typedef struct
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint16_t pm_idx;//Index to precoding matrix (PM) pre-stored at cell configuration. Note: If precoding is not used this parameter should be set to 0. Value: 0->65535.
|
uint16_t pm_idx;//Index to precoding matrix (PM) pre-stored at cell configuration. Note: If precoding is not used this parameter should be set to 0. Value: 0->65535.
|
||||||
nfapi_nr_dig_bf_interface_t dig_bf_interface_list[255];//max dig_bf_interfaces
|
nfapi_nr_dig_bf_interface_t dig_bf_interface_list[1];//max dig_bf_interfaces
|
||||||
|
|
||||||
}nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t;
|
}nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t;
|
||||||
|
|
||||||
@@ -702,7 +702,7 @@ typedef struct
|
|||||||
uint16_t prg_size;//Size in RBs of a precoding resource block group (PRG) – to which same precoding and digital beamforming gets applied. Value: 1->275
|
uint16_t prg_size;//Size in RBs of a precoding resource block group (PRG) – to which same precoding and digital beamforming gets applied. Value: 1->275
|
||||||
//watchout: dig_bf_interfaces here, in table 3-53 it's dig_bf_interface
|
//watchout: dig_bf_interfaces here, in table 3-53 it's dig_bf_interface
|
||||||
uint8_t dig_bf_interfaces;//Number of STD ant ports (parallel streams) feeding into the digBF Value: 0->255
|
uint8_t dig_bf_interfaces;//Number of STD ant ports (parallel streams) feeding into the digBF Value: 0->255
|
||||||
nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t prgs_list[275];//max prg_size
|
nfapi_nr_tx_precoding_and_beamforming_number_of_prgs_t prgs_list[1];//max prg_size
|
||||||
|
|
||||||
}nfapi_nr_tx_precoding_and_beamforming_t;
|
}nfapi_nr_tx_precoding_and_beamforming_t;
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ void *fapi_thread_start(void *ptr) {
|
|||||||
|
|
||||||
if(instance->tick == 1000) {
|
if(instance->tick == 1000) {
|
||||||
if(instance->tx_byte_count > 0) {
|
if(instance->tx_byte_count > 0) {
|
||||||
printf("[FAPI] Tx rate %d bytes/sec\n", instance->tx_byte_count);
|
printf("[FAPI] Tx rate %u bytes/sec\n", instance->tx_byte_count);
|
||||||
instance->tx_byte_count = 0;
|
instance->tx_byte_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ void *fapi_thread_start(void *ptr) {
|
|||||||
millisec = now_ts.tv_nsec / 1e6;
|
millisec = now_ts.tv_nsec / 1e6;
|
||||||
|
|
||||||
if(last_millisec != -1 && ((last_millisec + 1 ) % 1000) != millisec) {
|
if(last_millisec != -1 && ((last_millisec + 1 ) % 1000) != millisec) {
|
||||||
printf("*** missing millisec %d %d\n", last_millisec, millisec);
|
printf("*** missing millisec %u %u\n", last_millisec, millisec);
|
||||||
catchup = millisec - last_millisec - 1;
|
catchup = millisec - last_millisec - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,6 @@
|
|||||||
|
|
||||||
//#define DEBUG_TURBO_ENCODER 1
|
//#define DEBUG_TURBO_ENCODER 1
|
||||||
//#define CALLGRIND 1
|
//#define CALLGRIND 1
|
||||||
unsigned short threegpplte_interleaver_output;
|
|
||||||
unsigned long long threegpplte_interleaver_tmp;
|
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
struct treillis {
|
struct treillis {
|
||||||
|
|||||||
@@ -798,11 +798,11 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
n is the size in bits of the coded block, with the tail */
|
n is the size in bits of the coded block, with the tail */
|
||||||
int n2;
|
int n2;
|
||||||
llr_t y8[3*(n+16)] __attribute__((aligned(16)));
|
llr_t y8[3*(n+16)] __attribute__((aligned(16)));
|
||||||
llr_t systematic0[n+16] __attribute__ ((aligned(16)));
|
llr_t systematic0[n+32] __attribute__ ((aligned(16)));
|
||||||
llr_t systematic1[n+16] __attribute__ ((aligned(16)));
|
llr_t systematic1[n+32] __attribute__ ((aligned(16)));
|
||||||
llr_t systematic2[n+16] __attribute__ ((aligned(16)));
|
llr_t systematic2[n+32] __attribute__ ((aligned(16)));
|
||||||
llr_t yparity1[n+16] __attribute__ ((aligned(16)));
|
llr_t yparity1[n+32] __attribute__ ((aligned(16)));
|
||||||
llr_t yparity2[n+16] __attribute__ ((aligned(16)));
|
llr_t yparity2[n+32] __attribute__ ((aligned(16)));
|
||||||
llr_t ext[n+128] __attribute__((aligned(16)));
|
llr_t ext[n+128] __attribute__((aligned(16)));
|
||||||
llr_t ext2[n+128] __attribute__((aligned(16)));
|
llr_t ext2[n+128] __attribute__((aligned(16)));
|
||||||
llr_t alpha[(n+16)*8] __attribute__ ((aligned(16)));
|
llr_t alpha[(n+16)*8] __attribute__ ((aligned(16)));
|
||||||
@@ -811,7 +811,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
llr_t m10[n+16] __attribute__ ((aligned(16)));
|
llr_t m10[n+16] __attribute__ ((aligned(16)));
|
||||||
// int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
|
// int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
|
||||||
int *pi4_p,*pi5_p,*pi6_p;
|
int *pi4_p,*pi5_p,*pi6_p;
|
||||||
llr_t *s,*s1,*s2,*yp1,*yp2,*yp;
|
llr_t *s1,*s2,*yp1,*yp2,*yp;
|
||||||
unsigned int i,j,iind;//,pi;
|
unsigned int i,j,iind;//,pi;
|
||||||
unsigned char iteration_cnt=0;
|
unsigned char iteration_cnt=0;
|
||||||
unsigned int crc,oldcrc,crc_len;
|
unsigned int crc,oldcrc,crc_len;
|
||||||
@@ -927,7 +927,6 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
|
|
||||||
yp128 = (int8x16_t *)y8;
|
yp128 = (int8x16_t *)y8;
|
||||||
#endif
|
#endif
|
||||||
s = systematic0;
|
|
||||||
s1 = systematic1;
|
s1 = systematic1;
|
||||||
s2 = systematic2;
|
s2 = systematic2;
|
||||||
yp1 = yparity1;
|
yp1 = yparity1;
|
||||||
@@ -938,7 +937,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
for (i=0; i<16 ; i++ )
|
for (i=0; i<16 ; i++ )
|
||||||
for (j=0; j<n2; j+=16) {
|
for (j=0; j<n2; j+=16) {
|
||||||
int k=i+j;
|
int k=i+j;
|
||||||
s[k]=*yp++;
|
systematic0[k]=*yp++;
|
||||||
yp1[k]=*yp++;
|
yp1[k]=*yp++;
|
||||||
yp2[k]=*yp++;
|
yp2[k]=*yp++;
|
||||||
}
|
}
|
||||||
@@ -948,8 +947,8 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
|
|
||||||
if (n2>n) {
|
if (n2>n) {
|
||||||
/*
|
/*
|
||||||
s[n]=0;s[n+1]=0;s[n+2]=0;s[n+3]=0;
|
systematic0[n]=0;systematic0[n+1]=0;systematic0[n+2]=0;systematic0[n+3]=0;
|
||||||
s[n+4]=0;s[n+5]=0;s[n+6]=0;s[n+7]=0;
|
systematic0[n+4]=0;s[n+5]=0;s[n+6]=0;s[n+7]=0;
|
||||||
s1[n]=0;s1[n+1]=0;s1[n+2]=0;s1[n+3]=0;
|
s1[n]=0;s1[n+1]=0;s1[n+2]=0;s1[n+3]=0;
|
||||||
s1[n+4]=0;s1[n+5]=0;s1[n+6]=0;s1[n+7]=0;
|
s1[n+4]=0;s1[n+5]=0;s1[n+6]=0;s1[n+7]=0;
|
||||||
s2[n]=0;s2[n+1]=0;s2[n+2]=0;s2[n+3]=0;
|
s2[n]=0;s2[n+1]=0;s2[n+2]=0;s2[n+3]=0;
|
||||||
@@ -961,26 +960,26 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
|
|||||||
|
|
||||||
// Termination
|
// Termination
|
||||||
for (i=n2; i<n2+3; i++) {
|
for (i=n2; i<n2+3; i++) {
|
||||||
s[i]= *yp;
|
systematic0[i]= *yp;
|
||||||
s1[i] = s[i] ;
|
s1[i] = systematic0[i] ;
|
||||||
s2[i] = s[i];
|
s2[i] = systematic0[i];
|
||||||
yp++;
|
yp++;
|
||||||
yp1[i] = *yp;
|
yp1[i] = *yp;
|
||||||
yp++;
|
yp++;
|
||||||
#ifdef DEBUG_LOGMAP
|
#ifdef DEBUG_LOGMAP
|
||||||
printf("Term 1 (%u): %d %d\n",i,s[i],yp1[i]);
|
printf("Term 1 (%u): %d %d\n",i,systematic0[i],yp1[i]);
|
||||||
#endif //DEBUG_LOGMAP
|
#endif //DEBUG_LOGMAP
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=n2+16; i<n2+19; i++) {
|
for (i=n2+16; i<n2+19; i++) {
|
||||||
s[i]= *yp;
|
systematic0[i]= *yp;
|
||||||
s1[i] = s[i] ;
|
s1[i] = systematic0[i] ;
|
||||||
s2[i] = s[i];
|
s2[i] = systematic0[i];
|
||||||
yp++;
|
yp++;
|
||||||
yp2[i-16] = *yp;
|
yp2[i-16] = *yp;
|
||||||
yp++;
|
yp++;
|
||||||
#ifdef DEBUG_LOGMAP
|
#ifdef DEBUG_LOGMAP
|
||||||
printf("Term 2 (%u): %d %d\n",i-16,s[i],yp2[i-16]);
|
printf("Term 2 (%u): %d %d\n",i-16,systematic0[i],yp2[i-16]);
|
||||||
#endif //DEBUG_LOGMAP
|
#endif //DEBUG_LOGMAP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ int test_ldpc(short No_iteration,
|
|||||||
double sigma;
|
double sigma;
|
||||||
sigma = 1.0/sqrt(2*SNR);
|
sigma = 1.0/sqrt(2*SNR);
|
||||||
opp_enabled=1;
|
opp_enabled=1;
|
||||||
cpu_freq_GHz = get_cpu_freq_GHz();
|
|
||||||
//short test_input[block_length];
|
//short test_input[block_length];
|
||||||
unsigned char *test_input[MAX_NUM_DLSCH_SEGMENTS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};;
|
unsigned char *test_input[MAX_NUM_DLSCH_SEGMENTS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};;
|
||||||
//short *c; //padded codeword
|
//short *c; //padded codeword
|
||||||
@@ -614,7 +613,6 @@ int main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cpu_freq_GHz = get_cpu_freq_GHz();
|
|
||||||
//printf("the decoder supports BG2, Kb=10, Z=128 & 256\n");
|
//printf("the decoder supports BG2, Kb=10, Z=128 & 256\n");
|
||||||
//printf(" range of blocklength: 1201 -> 1280, 2401 -> 2560\n");
|
//printf(" range of blocklength: 1201 -> 1280, 2401 -> 2560\n");
|
||||||
printf("block length %d: \n", block_length);
|
printf("block length %d: \n", block_length);
|
||||||
@@ -704,25 +702,25 @@ int main(int argc, char *argv[])
|
|||||||
printf("SNR %f, Std iterations: %f\n",SNR, dec_iter->n_iter_std);
|
printf("SNR %f, Std iterations: %f\n",SNR, dec_iter->n_iter_std);
|
||||||
printf("SNR %f, Max iterations: %d\n",SNR, dec_iter->n_iter_max);
|
printf("SNR %f, Max iterations: %d\n",SNR, dec_iter->n_iter_max);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Encoding time mean: %15.3f us\n",(double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz);
|
printf("Encoding time mean: %15.3f us\n",(double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz());
|
||||||
printf("Encoding time std: %15.3f us\n",sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,2)));
|
printf("Encoding time std: %15.3f us\n",sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),2)));
|
||||||
printf("Encoding time max: %15.3f us\n",(double)time_optim->max/1000.0/cpu_freq_GHz);
|
printf("Encoding time max: %15.3f us\n",(double)time_optim->max/1000.0/get_cpu_freq_GHz());
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Decoding time mean: %15.3f us\n",(double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz);
|
printf("Decoding time mean: %15.3f us\n",(double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz());
|
||||||
printf("Decoding time std: %15.3f us\n",sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,2)));
|
printf("Decoding time std: %15.3f us\n",sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),2)));
|
||||||
printf("Decoding time max: %15.3f us\n",(double)time_decoder->max/1000.0/cpu_freq_GHz);
|
printf("Decoding time max: %15.3f us\n",(double)time_decoder->max/1000.0/get_cpu_freq_GHz());
|
||||||
|
|
||||||
fprintf(fd,"%f %f %f %f %f %f %f %f %f %f %f %f %d \n",
|
fprintf(fd,"%f %f %f %f %f %f %f %f %f %f %f %f %d \n",
|
||||||
SNR,
|
SNR,
|
||||||
(double)decoded_errors[i]/(double)n_trials ,
|
(double)decoded_errors[i]/(double)n_trials ,
|
||||||
(double)errors_bit/(double)n_trials/(double)block_length/(double)n_segments ,
|
(double)errors_bit/(double)n_trials/(double)block_length/(double)n_segments ,
|
||||||
errors_bit_uncoded/(double)n_trials/(double)n_segments ,
|
errors_bit_uncoded/(double)n_trials/(double)n_segments ,
|
||||||
(double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,
|
(double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),
|
||||||
sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,2)),
|
sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),2)),
|
||||||
(double)time_optim->max/1000.0/cpu_freq_GHz,
|
(double)time_optim->max/1000.0/get_cpu_freq_GHz(),
|
||||||
(double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,
|
(double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),
|
||||||
sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,2)),
|
sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),2)),
|
||||||
(double)time_decoder->max/1000.0/cpu_freq_GHz,
|
(double)time_decoder->max/1000.0/get_cpu_freq_GHz(),
|
||||||
dec_iter->n_iter_mean,
|
dec_iter->n_iter_mean,
|
||||||
dec_iter->n_iter_std,
|
dec_iter->n_iter_std,
|
||||||
dec_iter->n_iter_max
|
dec_iter->n_iter_max
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ int main(int argc, char *argv[])
|
|||||||
//Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.)
|
//Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.)
|
||||||
time_stats_t timeEncoder,timeDecoder;
|
time_stats_t timeEncoder,timeDecoder;
|
||||||
opp_enabled=1;
|
opp_enabled=1;
|
||||||
cpu_freq_GHz = get_cpu_freq_GHz();
|
|
||||||
reset_meas(&timeEncoder);
|
reset_meas(&timeEncoder);
|
||||||
reset_meas(&timeDecoder);
|
reset_meas(&timeDecoder);
|
||||||
randominit(0);
|
randominit(0);
|
||||||
@@ -324,9 +323,9 @@ if (logFlag){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Iteration times are in microseconds.
|
//Iteration times are in microseconds.
|
||||||
timeEncoderCumulative+=(timeEncoder.diff/(cpu_freq_GHz*1000.0));
|
timeEncoderCumulative+=(timeEncoder.diff/(get_cpu_freq_GHz()*1000.0));
|
||||||
timeDecoderCumulative+=(timeDecoder.diff/(cpu_freq_GHz*1000.0));
|
timeDecoderCumulative+=(timeDecoder.diff/(get_cpu_freq_GHz()*1000.0));
|
||||||
if (logFlag) fprintf(logFile,",%f,%d,%u,%f,%f\n", SNR, nBitError, blockErrorState, (timeEncoder.diff/(cpu_freq_GHz*1000.0)), (timeDecoder.diff/(cpu_freq_GHz*1000.0)));
|
if (logFlag) fprintf(logFile,",%f,%d,%u,%f,%f\n", SNR, nBitError, blockErrorState, (timeEncoder.diff/(get_cpu_freq_GHz()*1000.0)), (timeDecoder.diff/(get_cpu_freq_GHz()*1000.0)));
|
||||||
|
|
||||||
if (nBitError<0) {
|
if (nBitError<0) {
|
||||||
blockErrorCumulative++;
|
blockErrorCumulative++;
|
||||||
@@ -348,7 +347,7 @@ if (logFlag){
|
|||||||
printf("[ListSize=%d] SNR=%+8.3f, BLER=%9.6f, BER=%12.9f, t_Encoder=%9.3fus, t_Decoder=%9.3fus\n",
|
printf("[ListSize=%d] SNR=%+8.3f, BLER=%9.6f, BER=%12.9f, t_Encoder=%9.3fus, t_Decoder=%9.3fus\n",
|
||||||
decoderListSize, SNR, ((double)blockErrorCumulative/iterations),
|
decoderListSize, SNR, ((double)blockErrorCumulative/iterations),
|
||||||
((double)bitErrorCumulative / (iterations*testLength)),
|
((double)bitErrorCumulative / (iterations*testLength)),
|
||||||
(double)timeEncoder.diff/timeEncoder.trials/(cpu_freq_GHz*1000.0),(double)timeDecoder.diff/timeDecoder.trials/(cpu_freq_GHz*1000.0));
|
(double)timeEncoder.diff/timeEncoder.trials/(get_cpu_freq_GHz()*1000.0),(double)timeDecoder.diff/timeDecoder.trials/(get_cpu_freq_GHz()*1000.0));
|
||||||
//(timeEncoderCumulative/iterations),timeDecoderCumulative/iterations);
|
//(timeEncoderCumulative/iterations),timeDecoderCumulative/iterations);
|
||||||
|
|
||||||
if (blockErrorCumulative==0 && bitErrorCumulative==0) break;
|
if (blockErrorCumulative==0 && bitErrorCumulative==0) break;
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
time_stats_t timeEncoder,timeDecoder;
|
time_stats_t timeEncoder,timeDecoder;
|
||||||
opp_enabled=1;
|
opp_enabled=1;
|
||||||
cpu_freq_GHz = get_cpu_freq_GHz();
|
|
||||||
reset_meas(&timeEncoder);
|
reset_meas(&timeEncoder);
|
||||||
reset_meas(&timeDecoder);
|
reset_meas(&timeDecoder);
|
||||||
randominit(0);
|
randominit(0);
|
||||||
@@ -141,8 +140,8 @@ int main(int argc, char *argv[])
|
|||||||
SNR,
|
SNR,
|
||||||
((double)bitErrorCumulative / (iterations*messageLength)),
|
((double)bitErrorCumulative / (iterations*messageLength)),
|
||||||
((double)blockErrorCumulative/iterations),
|
((double)blockErrorCumulative/iterations),
|
||||||
((double)timeEncoder.diff/timeEncoder.trials)/(cpu_freq_GHz),
|
((double)timeEncoder.diff/timeEncoder.trials)/(get_cpu_freq_GHz()),
|
||||||
((double)timeDecoder.diff/timeDecoder.trials)/(cpu_freq_GHz*1000.0));
|
((double)timeDecoder.diff/timeDecoder.trials)/(get_cpu_freq_GHz()*1000.0));
|
||||||
|
|
||||||
blockErrorCumulative=0;
|
blockErrorCumulative=0;
|
||||||
bitErrorCumulative=0;
|
bitErrorCumulative=0;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include "nrLDPC_bnProc.h"
|
#include "nrLDPC_bnProc.h"
|
||||||
|
|
||||||
#define NR_LDPC_ENABLE_PARITY_CHECK
|
#define NR_LDPC_ENABLE_PARITY_CHECK
|
||||||
#define NR_LDPC_PROFILER_DETAIL
|
//#define NR_LDPC_PROFILER_DETAIL
|
||||||
|
|
||||||
#ifdef NR_LDPC_DEBUG_MODE
|
#ifdef NR_LDPC_DEBUG_MODE
|
||||||
#include "nrLDPC_tools/nrLDPC_debug.h"
|
#include "nrLDPC_tools/nrLDPC_debug.h"
|
||||||
|
|||||||
@@ -37,266 +37,82 @@
|
|||||||
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
|
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
|
||||||
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
||||||
|
|
||||||
int* sync_corr_ue0 = NULL;
|
static struct complex16 *primary_synch0_time __attribute__((aligned(32)));
|
||||||
int* sync_corr_ue1 = NULL;
|
static struct complex16 *primary_synch1_time __attribute__((aligned(32)));
|
||||||
int* sync_corr_ue2 = NULL;
|
static struct complex16 *primary_synch2_time __attribute__((aligned(32)));
|
||||||
int sync_tmp[2048*4] __attribute__((aligned(32)));
|
|
||||||
short syncF_tmp[2048*2] __attribute__((aligned(32)));
|
|
||||||
|
|
||||||
|
static void doIdft(int size, short *in, short *out) {
|
||||||
|
switch (size) {
|
||||||
|
case 6:
|
||||||
|
idft(IDFT_128,in,out,1);
|
||||||
|
break;
|
||||||
|
|
||||||
int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *common_vars
|
case 25:
|
||||||
{
|
idft(IDFT_512,in,out,1);
|
||||||
int i,k;
|
break;
|
||||||
|
|
||||||
sync_corr_ue0 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
|
case 50:
|
||||||
sync_corr_ue1 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
|
idft(IDFT_1024,in,out,1);
|
||||||
sync_corr_ue2 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
|
break;
|
||||||
|
|
||||||
|
case 75:
|
||||||
|
idft(IDFT_1536,in,out,1);
|
||||||
|
break;
|
||||||
|
|
||||||
if (sync_corr_ue0) {
|
case 100:
|
||||||
#ifdef DEBUG_PHY
|
idft(IDFT_2048,in,out,1);
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p\n", sync_corr_ue0);
|
break;
|
||||||
#endif
|
|
||||||
//common_vars->sync_corr = sync_corr;
|
default:
|
||||||
} else {
|
LOG_E(PHY,"Unsupported N_RB_DL %d\n",size);
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue0 not allocated\n");
|
abort();
|
||||||
return(-1);
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sync_corr_ue1) {
|
static void copyPrimary( struct complex16 *out, struct complex16 *in, int ofdmSize) {
|
||||||
#ifdef DEBUG_PHY
|
int k=ofdmSize-36;
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p\n", sync_corr_ue1);
|
|
||||||
#endif
|
for (int i=0; i<72; i++) {
|
||||||
//common_vars->sync_corr = sync_corr;
|
out[k].r = in[i].r>>1; //we need to shift input to avoid overflow in fft
|
||||||
} else {
|
out[k].i = in[i].i>>1;
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue1 not allocated\n");
|
k++;
|
||||||
return(-1);
|
|
||||||
|
if (k >= ofdmSize) {
|
||||||
|
k++; // skip DC carrier
|
||||||
|
k-=ofdmSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sync_corr_ue2) {
|
int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) { // LTE_UE_COMMON *common_vars
|
||||||
#ifdef DEBUG_PHY
|
struct complex16 syncF_tmp[2048]__attribute__((aligned(32)))= {{0}};
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p\n", sync_corr_ue2);
|
int sz=frame_parms->ofdm_symbol_size*sizeof(*primary_synch0_time);
|
||||||
#endif
|
AssertFatal( NULL != (primary_synch0_time = (struct complex16 *)malloc16(sz)),"");
|
||||||
//common_vars->sync_corr = sync_corr;
|
bzero(primary_synch0_time,sz);
|
||||||
} else {
|
AssertFatal( NULL != (primary_synch1_time = (struct complex16 *)malloc16(sz)),"");
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] sync_corr_ue2 not allocated\n");
|
bzero(primary_synch1_time,sz);
|
||||||
return(-1);
|
AssertFatal( NULL != (primary_synch2_time = (struct complex16 *)malloc16(sz)),"");
|
||||||
}
|
bzero(primary_synch2_time,sz);
|
||||||
|
|
||||||
// primary_synch0_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
primary_synch0_time = (int16_t *)malloc16((frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
|
|
||||||
if (primary_synch0_time) {
|
|
||||||
// bzero(primary_synch0_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
bzero(primary_synch0_time,(frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
#ifdef DEBUG_PHY
|
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] primary_synch0_time allocated at %p\n", primary_synch0_time);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] primary_synch0_time not allocated\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// primary_synch1_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
primary_synch1_time = (int16_t *)malloc16((frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
|
|
||||||
if (primary_synch1_time) {
|
|
||||||
// bzero(primary_synch1_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
bzero(primary_synch1_time,(frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
#ifdef DEBUG_PHY
|
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] primary_synch1_time allocated at %p\n", primary_synch1_time);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] primary_synch1_time not allocated\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// primary_synch2_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
primary_synch2_time = (int16_t *)malloc16((frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
|
|
||||||
if (primary_synch2_time) {
|
|
||||||
// bzero(primary_synch2_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
|
|
||||||
bzero(primary_synch2_time,(frame_parms->ofdm_symbol_size)*sizeof(int16_t)*2);
|
|
||||||
#ifdef DEBUG_PHY
|
|
||||||
LOG_D(PHY,"[openair][LTE_PHY][SYNC] primary_synch2_time allocated at %p\n", primary_synch2_time);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
LOG_E(PHY,"[openair][LTE_PHY][SYNC] primary_synch2_time not allocated\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// generate oversampled sync_time sequences
|
// generate oversampled sync_time sequences
|
||||||
k=frame_parms->ofdm_symbol_size-36;
|
copyPrimary( syncF_tmp, (struct complex16 *) primary_synch0, frame_parms->ofdm_symbol_size);
|
||||||
|
doIdft(frame_parms->N_RB_DL, (short *)syncF_tmp,(short *)primary_synch0_time);
|
||||||
for (i=0; i<72; i++) {
|
copyPrimary( syncF_tmp, (struct complex16 *) primary_synch1, frame_parms->ofdm_symbol_size);
|
||||||
syncF_tmp[2*k] = primary_synch0[2*i]>>2; //we need to shift input to avoid overflow in fft
|
doIdft(frame_parms->N_RB_DL, (short *)syncF_tmp,(short *)primary_synch1_time);
|
||||||
syncF_tmp[2*k+1] = primary_synch0[2*i+1]>>2;
|
copyPrimary( syncF_tmp, (struct complex16 *) primary_synch2, frame_parms->ofdm_symbol_size);
|
||||||
k++;
|
doIdft(frame_parms->N_RB_DL, (short *)syncF_tmp,(short *)primary_synch2_time);
|
||||||
|
|
||||||
if (k >= frame_parms->ofdm_symbol_size) {
|
|
||||||
k++; // skip DC carrier
|
|
||||||
k-=frame_parms->ofdm_symbol_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (frame_parms->N_RB_DL) {
|
|
||||||
case 6:
|
|
||||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 25:
|
|
||||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 50:
|
|
||||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 75:
|
|
||||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp,
|
|
||||||
1); /// complex output
|
|
||||||
break;
|
|
||||||
case 100:
|
|
||||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<frame_parms->ofdm_symbol_size; i++)
|
|
||||||
((int32_t*)primary_synch0_time)[i] = sync_tmp[i];
|
|
||||||
|
|
||||||
k=frame_parms->ofdm_symbol_size-36;
|
|
||||||
|
|
||||||
for (i=0; i<72; i++) {
|
|
||||||
syncF_tmp[2*k] = primary_synch1[2*i]>>2; //we need to shift input to avoid overflow in fft
|
|
||||||
syncF_tmp[2*k+1] = primary_synch1[2*i+1]>>2;
|
|
||||||
k++;
|
|
||||||
|
|
||||||
if (k >= frame_parms->ofdm_symbol_size) {
|
|
||||||
k++; // skip DC carrier
|
|
||||||
k-=frame_parms->ofdm_symbol_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (frame_parms->N_RB_DL) {
|
|
||||||
case 6:
|
|
||||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 25:
|
|
||||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 50:
|
|
||||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 75:
|
|
||||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 100:
|
|
||||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<frame_parms->ofdm_symbol_size; i++)
|
|
||||||
((int32_t*)primary_synch1_time)[i] = sync_tmp[i];
|
|
||||||
|
|
||||||
k=frame_parms->ofdm_symbol_size-36;
|
|
||||||
|
|
||||||
for (i=0; i<72; i++) {
|
|
||||||
syncF_tmp[2*k] = primary_synch2[2*i]>>2; //we need to shift input to avoid overflow in fft
|
|
||||||
syncF_tmp[2*k+1] = primary_synch2[2*i+1]>>2;
|
|
||||||
k++;
|
|
||||||
|
|
||||||
if (k >= frame_parms->ofdm_symbol_size) {
|
|
||||||
k++; // skip DC carrier
|
|
||||||
k-=frame_parms->ofdm_symbol_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (frame_parms->N_RB_DL) {
|
|
||||||
case 6:
|
|
||||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 25:
|
|
||||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 50:
|
|
||||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 75:
|
|
||||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
case 100:
|
|
||||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
|
||||||
(short*)sync_tmp, /// complex output
|
|
||||||
1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<frame_parms->ofdm_symbol_size; i++)
|
|
||||||
((int32_t*)primary_synch2_time)[i] = sync_tmp[i];
|
|
||||||
|
|
||||||
|
|
||||||
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
|
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
|
||||||
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
|
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
|
||||||
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
|
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
|
||||||
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
|
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void lte_sync_time_free(void)
|
void lte_sync_time_free(void) {
|
||||||
{
|
|
||||||
if (sync_corr_ue0) {
|
|
||||||
LOG_D(PHY,"Freeing sync_corr_ue (%p)...\n",sync_corr_ue0);
|
|
||||||
free(sync_corr_ue0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sync_corr_ue1) {
|
|
||||||
LOG_D(PHY,"Freeing sync_corr_ue (%p)...\n",sync_corr_ue1);
|
|
||||||
free(sync_corr_ue1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sync_corr_ue2) {
|
|
||||||
LOG_D(PHY,"Freeing sync_corr_ue (%p)...\n",sync_corr_ue2);
|
|
||||||
free(sync_corr_ue2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (primary_synch0_time) {
|
if (primary_synch0_time) {
|
||||||
LOG_D(PHY,"Freeing primary_sync0_time ...\n");
|
LOG_D(PHY,"Freeing primary_sync0_time ...\n");
|
||||||
free(primary_synch0_time);
|
free(primary_synch0_time);
|
||||||
@@ -312,126 +128,81 @@ void lte_sync_time_free(void)
|
|||||||
free(primary_synch2_time);
|
free(primary_synch2_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_corr_ue0 = NULL;
|
|
||||||
sync_corr_ue1 = NULL;
|
|
||||||
sync_corr_ue2 = NULL;
|
|
||||||
primary_synch0_time = NULL;
|
primary_synch0_time = NULL;
|
||||||
primary_synch1_time = NULL;
|
primary_synch1_time = NULL;
|
||||||
primary_synch2_time = NULL;
|
primary_synch2_time = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int abs32(int x)
|
static inline int abs32(int x) {
|
||||||
{
|
|
||||||
return (((int)((short*)&x)[0])*((int)((short*)&x)[0]) + ((int)((short*)&x)[1])*((int)((short*)&x)[1]));
|
return (((int)((short*)&x)[0])*((int)((short*)&x)[0]) + ((int)((short*)&x)[1])*((int)((short*)&x)[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline double absF(struct complexd x) {
|
||||||
|
return x.r*x.r+x.i*x.i;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define complexNull(c) bzero((void*) &(c), sizeof(c))
|
||||||
|
|
||||||
#define SHIFT 17
|
#define SHIFT 17
|
||||||
|
|
||||||
|
|
||||||
int lte_sync_time(int **rxdata, ///rx data in time domain
|
int lte_sync_time(int **rxdata, ///rx data in time domain
|
||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
int *eNB_id)
|
int *eNB_id) {
|
||||||
{
|
|
||||||
// perform a time domain correlation using the oversampled sync sequence
|
// perform a time domain correlation using the oversampled sync sequence
|
||||||
|
|
||||||
unsigned int n, ar, s, peak_pos, peak_val, sync_source;
|
unsigned int n, ar, s, peak_pos, peak_val, sync_source;
|
||||||
int result,result2;
|
int result,result2;
|
||||||
int sync_out[3] = {0,0,0},sync_out2[3] = {0,0,0};
|
struct complexd sync_out[3]= {{0}}, sync_out2[3]= {{0}};
|
||||||
int tmp[3] = {0,0,0};
|
|
||||||
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti>>1;
|
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti>>1;
|
||||||
|
|
||||||
//LOG_D(PHY,"[SYNC TIME] Calling sync_time.\n");
|
|
||||||
AssertFatal(sync_corr_ue0 != NULL,
|
|
||||||
"sync_corr_ue0 not yet allocated! Exiting.\n");
|
|
||||||
AssertFatal(sync_corr_ue1 != NULL,
|
|
||||||
"sync_corr_ue0 not yet allocated! Exiting.\n");
|
|
||||||
AssertFatal(sync_corr_ue2 != NULL,
|
|
||||||
"sync_corr_ue0 not yet allocated! Exiting.\n");
|
|
||||||
|
|
||||||
peak_val = 0;
|
peak_val = 0;
|
||||||
peak_pos = 0;
|
peak_pos = 0;
|
||||||
sync_source = 0;
|
sync_source = 0;
|
||||||
|
|
||||||
|
|
||||||
for (n=0; n<length; n+=4) {
|
for (n=0; n<length; n+=4) {
|
||||||
|
|
||||||
sync_corr_ue0[n] = 0;
|
|
||||||
sync_corr_ue0[n+length] = 0;
|
|
||||||
sync_corr_ue1[n] = 0;
|
|
||||||
sync_corr_ue1[n+length] = 0;
|
|
||||||
sync_corr_ue2[n] = 0;
|
|
||||||
sync_corr_ue2[n+length] = 0;
|
|
||||||
|
|
||||||
for (s=0; s<3; s++) {
|
for (s=0; s<3; s++) {
|
||||||
sync_out[s]=0;
|
complexNull(sync_out[s]);
|
||||||
sync_out2[s]=0;
|
complexNull(sync_out2[s]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
|
// if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
|
||||||
if (n<(length-frame_parms->ofdm_symbol_size)) {
|
if (n<(length-frame_parms->ofdm_symbol_size)) {
|
||||||
|
|
||||||
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
||||||
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
||||||
|
result = dot_product((short *)primary_synch0_time, (short *) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
result2 = dot_product((short *)primary_synch0_time, (short *) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result2 = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
sync_out[0].r += ((short *) &result)[0];
|
||||||
|
sync_out[0].i += ((short *) &result)[1];
|
||||||
((short*)sync_corr_ue0)[2*n] += ((short*) &result)[0];
|
sync_out2[0].r += ((short *) &result2)[0];
|
||||||
((short*)sync_corr_ue0)[2*n+1] += ((short*) &result)[1];
|
sync_out2[0].i += ((short *) &result2)[1];
|
||||||
((short*)sync_corr_ue0)[2*(length+n)] += ((short*) &result2)[0];
|
|
||||||
((short*)sync_corr_ue0)[(2*(length+n))+1] += ((short*) &result2)[1];
|
|
||||||
((short*)sync_out)[0] += ((short*) &result)[0];
|
|
||||||
((short*)sync_out)[1] += ((short*) &result)[1];
|
|
||||||
((short*)sync_out2)[0] += ((short*) &result2)[0];
|
|
||||||
((short*)sync_out2)[1] += ((short*) &result2)[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
||||||
result = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
result = dot_product((short *)primary_synch1_time, (short *) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result2 = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
result2 = dot_product((short *)primary_synch1_time, (short *) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
((short*)sync_corr_ue1)[2*n] += ((short*) &result)[0];
|
sync_out[1].r += ((short *) &result)[0];
|
||||||
((short*)sync_corr_ue1)[2*n+1] += ((short*) &result)[1];
|
sync_out[1].i += ((short *) &result)[1];
|
||||||
((short*)sync_corr_ue1)[2*(length+n)] += ((short*) &result2)[0];
|
sync_out2[1].r += ((short *) &result2)[0];
|
||||||
((short*)sync_corr_ue1)[(2*(length+n))+1] += ((short*) &result2)[1];
|
sync_out2[1].i += ((short *) &result2)[1];
|
||||||
|
|
||||||
((short*)sync_out)[2] += ((short*) &result)[0];
|
|
||||||
((short*)sync_out)[3] += ((short*) &result)[1];
|
|
||||||
((short*)sync_out2)[2] += ((short*) &result2)[0];
|
|
||||||
((short*)sync_out2)[3] += ((short*) &result2)[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
||||||
|
result = dot_product((short *)primary_synch2_time, (short *) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
result2 = dot_product((short *)primary_synch2_time, (short *) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result2 = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
|
sync_out[2].r += ((short *) &result)[0];
|
||||||
((short*)sync_corr_ue2)[2*n] += ((short*) &result)[0];
|
sync_out[2].i += ((short *) &result)[1];
|
||||||
((short*)sync_corr_ue2)[2*n+1] += ((short*) &result)[1];
|
sync_out2[2].r += ((short *) &result2)[0];
|
||||||
((short*)sync_corr_ue2)[2*(length+n)] += ((short*) &result2)[0];
|
sync_out2[2].i += ((short *) &result2)[1];
|
||||||
((short*)sync_corr_ue2)[(2*(length+n))+1] += ((short*) &result2)[1];
|
|
||||||
((short*)sync_out)[4] += ((short*) &result)[0];
|
|
||||||
((short*)sync_out)[5] += ((short*) &result)[1];
|
|
||||||
((short*)sync_out2)[4] += ((short*) &result2)[0];
|
|
||||||
((short*)sync_out2)[5] += ((short*) &result2)[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate the absolute value of sync_corr[n]
|
// calculate the absolute value of sync_corr[n]
|
||||||
|
|
||||||
sync_corr_ue0[n] = abs32(sync_corr_ue0[n]);
|
|
||||||
sync_corr_ue0[n+length] = abs32(sync_corr_ue0[n+length]);
|
|
||||||
sync_corr_ue1[n] = abs32(sync_corr_ue1[n]);
|
|
||||||
sync_corr_ue1[n+length] = abs32(sync_corr_ue1[n+length]);
|
|
||||||
sync_corr_ue2[n] = abs32(sync_corr_ue2[n]);
|
|
||||||
sync_corr_ue2[n+length] = abs32(sync_corr_ue2[n+length]);
|
|
||||||
|
|
||||||
for (s=0; s<3; s++) {
|
for (s=0; s<3; s++) {
|
||||||
tmp[s] = (abs32(sync_out[s])>>1) + (abs32(sync_out2[s])>>1);
|
double tmp = absF(sync_out[s]) + absF(sync_out2[s]);
|
||||||
|
|
||||||
if (tmp[s]>peak_val) {
|
if (tmp>peak_val) {
|
||||||
peak_val = tmp[s];
|
peak_val = tmp;
|
||||||
peak_pos = n;
|
peak_pos = n;
|
||||||
sync_source = s;
|
sync_source = s;
|
||||||
/*
|
/*
|
||||||
@@ -443,42 +214,22 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
|
|||||||
}
|
}
|
||||||
|
|
||||||
*eNB_id = sync_source;
|
*eNB_id = sync_source;
|
||||||
|
LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val/2,dB_fixed(peak_val/2)/2);
|
||||||
LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2);
|
|
||||||
|
|
||||||
|
|
||||||
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
|
|
||||||
static int debug_cnt;
|
|
||||||
if (debug_cnt == 0) {
|
|
||||||
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
|
|
||||||
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
|
|
||||||
LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
|
|
||||||
LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
|
|
||||||
// exit(-1);
|
|
||||||
} else {
|
|
||||||
debug_cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(peak_pos);
|
return(peak_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
|
int ru_sync_time_init(RU_t *ru) { // LTE_UE_COMMON *common_vars
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
int16_t dmrs[2048];
|
int16_t dmrs[2048];
|
||||||
int16_t *dmrsp[2] = {dmrs,NULL};
|
int16_t *dmrsp[2] = {dmrs,NULL};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int32_t dmrs[ru->frame_parms->ofdm_symbol_size*14] __attribute__((aligned(32)));
|
int32_t dmrs[ru->frame_parms->ofdm_symbol_size*14] __attribute__((aligned(32)));
|
||||||
//int32_t *dmrsp[2] = {&dmrs[(3-ru->frame_parms->Ncp)*ru->frame_parms->ofdm_symbol_size],NULL};
|
//int32_t *dmrsp[2] = {&dmrs[(3-ru->frame_parms->Ncp)*ru->frame_parms->ofdm_symbol_size],NULL};
|
||||||
int32_t *dmrsp[2] = {&dmrs[0],NULL};
|
int32_t *dmrsp[2] = {&dmrs[0],NULL};
|
||||||
|
|
||||||
generate_ul_ref_sigs();
|
generate_ul_ref_sigs();
|
||||||
|
ru->dmrssync = (int16_t *)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
|
||||||
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms->ofdm_symbol_size*2*sizeof(int16_t));
|
ru->dmrs_corr = (uint64_t *)malloc16_clear(ru->frame_parms->samples_per_tti*10*sizeof(uint64_t));
|
||||||
ru->dmrs_corr = (uint64_t*)malloc16_clear(ru->frame_parms->samples_per_tti*10*sizeof(uint64_t));
|
|
||||||
|
|
||||||
generate_drs_pusch(NULL,
|
generate_drs_pusch(NULL,
|
||||||
NULL,
|
NULL,
|
||||||
ru->frame_parms,
|
ru->frame_parms,
|
||||||
@@ -491,35 +242,39 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
|
|||||||
0);
|
0);
|
||||||
|
|
||||||
switch (ru->frame_parms->N_RB_DL) {
|
switch (ru->frame_parms->N_RB_DL) {
|
||||||
case 6:
|
case 6:
|
||||||
idft(IDFT_128,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
idft(IDFT_128,(int16_t *)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||||
ru->dmrssync, /// complex output
|
ru->dmrssync, /// complex output
|
||||||
1);
|
1);
|
||||||
break;
|
break;
|
||||||
case 25:
|
|
||||||
idft(IDFT_512,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
case 25:
|
||||||
ru->dmrssync, /// complex output
|
idft(IDFT_512,(int16_t *)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||||
1);
|
ru->dmrssync, /// complex output
|
||||||
break;
|
1);
|
||||||
case 50:
|
break;
|
||||||
idft(IDFT_1024,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
|
||||||
ru->dmrssync, /// complex output
|
case 50:
|
||||||
1);
|
idft(IDFT_1024,(int16_t *)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||||
break;
|
ru->dmrssync, /// complex output
|
||||||
|
1);
|
||||||
case 75:
|
break;
|
||||||
idft(IDFT_1536,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
|
||||||
ru->dmrssync,
|
case 75:
|
||||||
1); /// complex output
|
idft(IDFT_1536,(int16_t *)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||||
break;
|
ru->dmrssync,
|
||||||
case 100:
|
1); /// complex output
|
||||||
idft(IDFT_2048,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
break;
|
||||||
ru->dmrssync, /// complex output
|
|
||||||
1);
|
case 100:
|
||||||
break;
|
idft(IDFT_2048,(int16_t *)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||||
default:
|
ru->dmrssync, /// complex output
|
||||||
AssertFatal(1==0,"Unsupported N_RB_DL %d\n",ru->frame_parms->N_RB_DL);
|
1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
AssertFatal(1==0,"Unsupported N_RB_DL %d\n",ru->frame_parms->N_RB_DL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
@@ -527,10 +282,11 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
|
|||||||
|
|
||||||
|
|
||||||
void ru_sync_time_free(RU_t *ru) {
|
void ru_sync_time_free(RU_t *ru) {
|
||||||
|
|
||||||
AssertFatal(ru->dmrssync!=NULL,"ru->dmrssync is NULL\n");
|
AssertFatal(ru->dmrssync!=NULL,"ru->dmrssync is NULL\n");
|
||||||
free(ru->dmrssync);
|
free(ru->dmrssync);
|
||||||
if (ru->dmrs_corr) free(ru->dmrs_corr);
|
|
||||||
|
if (ru->dmrs_corr)
|
||||||
|
free(ru->dmrs_corr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define DEBUG_PHY
|
//#define DEBUG_PHY
|
||||||
@@ -539,10 +295,8 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
uint32_t length,
|
uint32_t length,
|
||||||
uint32_t *peak_val_out,
|
uint32_t *peak_val_out,
|
||||||
uint32_t *sync_corr_eNB)
|
uint32_t *sync_corr_eNB) {
|
||||||
{
|
|
||||||
// perform a time domain correlation using the oversampled sync sequence
|
// perform a time domain correlation using the oversampled sync sequence
|
||||||
|
|
||||||
unsigned int n, ar, peak_val, peak_pos;
|
unsigned int n, ar, peak_val, peak_pos;
|
||||||
uint64_t mean_val;
|
uint64_t mean_val;
|
||||||
int result;
|
int result;
|
||||||
@@ -556,21 +310,21 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (eNB_id) {
|
switch (eNB_id) {
|
||||||
case 0:
|
case 0:
|
||||||
primary_synch_time = (short*)primary_synch0_time;
|
primary_synch_time = (short *)primary_synch0_time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
primary_synch_time = (short*)primary_synch1_time;
|
primary_synch_time = (short *)primary_synch1_time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
primary_synch_time = (short*)primary_synch2_time;
|
primary_synch_time = (short *)primary_synch2_time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(PHY,"[SYNC TIME] Illegal eNB_id!\n");
|
LOG_E(PHY,"[SYNC TIME] Illegal eNB_id!\n");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
peak_val = 0;
|
peak_val = 0;
|
||||||
@@ -578,21 +332,16 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
mean_val = 0;
|
mean_val = 0;
|
||||||
|
|
||||||
for (n=0; n<length; n+=4) {
|
for (n=0; n<length; n+=4) {
|
||||||
|
|
||||||
sync_corr_eNB[n] = 0;
|
sync_corr_eNB[n] = 0;
|
||||||
|
|
||||||
if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
|
if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
|
||||||
|
|
||||||
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
||||||
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
|
||||||
|
result = dot_product((short *)primary_synch_time, (short *) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||||
result = dot_product((short*)primary_synch_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
|
||||||
//((short*)sync_corr)[2*n] += ((short*) &result)[0];
|
//((short*)sync_corr)[2*n] += ((short*) &result)[0];
|
||||||
//((short*)sync_corr)[2*n+1] += ((short*) &result)[1];
|
//((short*)sync_corr)[2*n+1] += ((short*) &result)[1];
|
||||||
sync_corr_eNB[n] += abs32(result);
|
sync_corr_eNB[n] += abs32(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -610,7 +359,6 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
}
|
}
|
||||||
|
|
||||||
mean_val/=length;
|
mean_val/=length;
|
||||||
|
|
||||||
*peak_val_out = peak_val;
|
*peak_val_out = peak_val;
|
||||||
|
|
||||||
if (peak_val <= (40*(uint32_t)mean_val)) {
|
if (peak_val <= (40*(uint32_t)mean_val)) {
|
||||||
@@ -620,88 +368,91 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
|
|||||||
LOG_I(PHY,"[SYNC TIME] Peak found at pos %u, val = %u, mean_val = %"PRIu64"\n",peak_pos,peak_val,mean_val);
|
LOG_I(PHY,"[SYNC TIME] Peak found at pos %u, val = %u, mean_val = %"PRIu64"\n",peak_pos,peak_val,mean_val);
|
||||||
return(peak_pos);
|
return(peak_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int64_t abs64(int64_t x)
|
static inline int64_t abs64(int64_t x) {
|
||||||
{
|
return (((int64_t)((int32_t *)&x)[0])*((int64_t)((int32_t *)&x)[0]) + ((int64_t)
|
||||||
return (((int64_t)((int32_t*)&x)[0])*((int64_t)((int32_t*)&x)[0]) + ((int64_t)
|
((int32_t *)&x)[1])*((int64_t)((int32_t *)&x)[1]));
|
||||||
((int32_t*)&x)[1])*((int64_t)((int32_t*)&x)[1]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ru_sync_time(RU_t *ru,
|
int ru_sync_time(RU_t *ru,
|
||||||
int64_t *lev,
|
int64_t *lev,
|
||||||
int64_t *avg)
|
int64_t *avg) {
|
||||||
{
|
|
||||||
LTE_DL_FRAME_PARMS *frame_parms = ru->frame_parms;
|
LTE_DL_FRAME_PARMS *frame_parms = ru->frame_parms;
|
||||||
RU_CALIBRATION *calibration = &ru->calibration;
|
RU_CALIBRATION *calibration = &ru->calibration;
|
||||||
|
|
||||||
// perform a time domain correlation using the oversampled sync sequence
|
// perform a time domain correlation using the oversampled sync sequence
|
||||||
|
|
||||||
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti;
|
int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti;
|
||||||
|
|
||||||
|
|
||||||
// circular copy of beginning to end of rxdata buffer. Note: buffer should be big enough upon calling this function
|
// circular copy of beginning to end of rxdata buffer. Note: buffer should be big enough upon calling this function
|
||||||
for (int ar=0;ar<ru->nb_rx;ar++) memcpy((void*)&ru->common.rxdata[ar][2*length],
|
for (int ar=0; ar<ru->nb_rx; ar++)
|
||||||
(void*)&ru->common.rxdata[ar][0],
|
memcpy((void *)&ru->common.rxdata[ar][2*length],
|
||||||
frame_parms->ofdm_symbol_size);
|
(void *)&ru->common.rxdata[ar][0],
|
||||||
|
frame_parms->ofdm_symbol_size);
|
||||||
|
|
||||||
int32_t maxlev0=0;
|
int32_t maxlev0=0;
|
||||||
int maxpos0=0;
|
int maxpos0=0;
|
||||||
int64_t avg0=0;
|
int64_t avg0=0;
|
||||||
int64_t result;
|
int64_t result;
|
||||||
int64_t dmrs_corr;
|
int64_t dmrs_corr;
|
||||||
|
|
||||||
int maxval=0;
|
int maxval=0;
|
||||||
for (int i=0;i<2*(frame_parms->ofdm_symbol_size);i++) {
|
|
||||||
|
for (int i=0; i<2*(frame_parms->ofdm_symbol_size); i++) {
|
||||||
maxval = max(maxval,ru->dmrssync[i]);
|
maxval = max(maxval,ru->dmrssync[i]);
|
||||||
maxval = max(maxval,-ru->dmrssync[i]);
|
maxval = max(maxval,-ru->dmrssync[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ru->state == RU_CHECK_SYNC) {
|
if (ru->state == RU_CHECK_SYNC) {
|
||||||
for (int i=0;i<2*(frame_parms->ofdm_symbol_size);i++) {
|
for (int i=0; i<2*(frame_parms->ofdm_symbol_size); i++) {
|
||||||
maxval = max(maxval,calibration->drs_ch_estimates_time[0][i]);
|
maxval = max(maxval,calibration->drs_ch_estimates_time[0][i]);
|
||||||
maxval = max(maxval,-calibration->drs_ch_estimates_time[0][i]);
|
maxval = max(maxval,-calibration->drs_ch_estimates_time[0][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int shift = log2_approx(maxval);
|
int shift = log2_approx(maxval);
|
||||||
|
|
||||||
for (int n=0; n<length; n+=4) {
|
for (int n=0; n<length; n+=4) {
|
||||||
|
|
||||||
dmrs_corr = 0;
|
dmrs_corr = 0;
|
||||||
|
|
||||||
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
||||||
for (int ar=0; ar<ru->nb_rx; ar++) {
|
for (int ar=0; ar<ru->nb_rx; ar++) {
|
||||||
|
|
||||||
result = dot_product64(ru->dmrssync,
|
result = dot_product64(ru->dmrssync,
|
||||||
(int16_t*) &ru->common.rxdata[ar][n],
|
(int16_t *) &ru->common.rxdata[ar][n],
|
||||||
frame_parms->ofdm_symbol_size,
|
|
||||||
shift);
|
|
||||||
|
|
||||||
if (ru->state == RU_CHECK_SYNC) {
|
|
||||||
result = dot_product64((int16_t*) &calibration->drs_ch_estimates_time[ar],
|
|
||||||
(int16_t*) &ru->common.rxdata[ar][n],
|
|
||||||
frame_parms->ofdm_symbol_size,
|
frame_parms->ofdm_symbol_size,
|
||||||
shift);
|
shift);
|
||||||
|
|
||||||
|
if (ru->state == RU_CHECK_SYNC) {
|
||||||
|
result = dot_product64((int16_t *) &calibration->drs_ch_estimates_time[ar],
|
||||||
|
(int16_t *) &ru->common.rxdata[ar][n],
|
||||||
|
frame_parms->ofdm_symbol_size,
|
||||||
|
shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
dmrs_corr += abs64(result);
|
dmrs_corr += abs64(result);
|
||||||
}
|
}
|
||||||
if (ru->dmrs_corr != NULL) ru->dmrs_corr[n] = dmrs_corr;
|
|
||||||
|
if (ru->dmrs_corr != NULL)
|
||||||
|
ru->dmrs_corr[n] = dmrs_corr;
|
||||||
|
|
||||||
// tmpi holds <synchi,rx0>+<synci,rx1>+...+<synchi,rx_{nbrx-1}>
|
// tmpi holds <synchi,rx0>+<synci,rx1>+...+<synchi,rx_{nbrx-1}>
|
||||||
|
|
||||||
|
if (dmrs_corr>maxlev0) {
|
||||||
|
maxlev0 = dmrs_corr;
|
||||||
|
maxpos0 = n;
|
||||||
|
}
|
||||||
|
|
||||||
if (dmrs_corr>maxlev0) { maxlev0 = dmrs_corr; maxpos0 = n; }
|
|
||||||
avg0 += dmrs_corr;
|
avg0 += dmrs_corr;
|
||||||
}
|
}
|
||||||
avg0/=(length/4);
|
|
||||||
|
|
||||||
|
avg0/=(length/4);
|
||||||
int dmrsoffset = frame_parms->samples_per_tti + (3*frame_parms->ofdm_symbol_size)+(3*frame_parms->nb_prefix_samples) + frame_parms->nb_prefix_samples0;
|
int dmrsoffset = frame_parms->samples_per_tti + (3*frame_parms->ofdm_symbol_size)+(3*frame_parms->nb_prefix_samples) + frame_parms->nb_prefix_samples0;
|
||||||
|
|
||||||
if ((int64_t)maxlev0 > (10*avg0)) {*lev = maxlev0; *avg=avg0; return((length+maxpos0-dmrsoffset)%length);}
|
if ((int64_t)maxlev0 > (10*avg0)) {
|
||||||
|
*lev = maxlev0;
|
||||||
|
*avg=avg0;
|
||||||
|
return((length+maxpos0-dmrsoffset)%length);
|
||||||
|
}
|
||||||
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14]
|
|||||||
(((1+(Nid_cell<<1))*(1 + (((frame_parms->Ncp==0)?4:3)*l) + (7*(1+ns))))<<10); //cinit
|
(((1+(Nid_cell<<1))*(1 + (((frame_parms->Ncp==0)?4:3)*l) + (7*(1+ns))))<<10); //cinit
|
||||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||||
//n = 0
|
//n = 0
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
|
|
||||||
// skip first 50 double words (1600 bits)
|
// skip first 50 double words (1600 bits)
|
||||||
@@ -103,7 +103,7 @@ void lte_gold_ue_spec(uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_
|
|||||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||||
//n = 0
|
//n = 0
|
||||||
// printf("cinit (ns %d, l %d) => %d\n",ns,l,x2);
|
// printf("cinit (ns %d, l %d) => %d\n",ns,l,x2);
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
|
|
||||||
// skip first 50 double words (1600 bits)
|
// skip first 50 double words (1600 bits)
|
||||||
@@ -143,7 +143,7 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_
|
|||||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||||
//n = 0
|
//n = 0
|
||||||
//printf("cinit (ns %d, l %d) => %d\n",ns,l,x2);
|
//printf("cinit (ns %d, l %d) => %d\n",ns,l,x2);
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
|
|
||||||
//skip first 50 double words (1600 bits)
|
//skip first 50 double words (1600 bits)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
|
|||||||
//n = 0
|
//n = 0
|
||||||
// printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
|
// printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
|
||||||
// Initializing the Sequence
|
// Initializing the Sequence
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
// skip first 50 double words (1600 bits)
|
// skip first 50 double words (1600 bits)
|
||||||
// printf("n=0 : x1 %x, x2 %x\n",x1,x2);
|
// printf("n=0 : x1 %x, x2 %x\n",x1,x2);
|
||||||
@@ -90,7 +90,7 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
|
|||||||
|
|
||||||
for (sfn=0; sfn<10; sfn++) {
|
for (sfn=0; sfn<10; sfn++) {
|
||||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
|
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
|
|
||||||
for (n=1; n<50; n++) {
|
for (n=1; n<50; n++) {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
for (n=0; n<(1+(G>>5)); n++) {
|
for (n=0; n<(1+(G>>5)); n++) {
|
||||||
#ifdef DEBUG_SCRAMBLING
|
#ifdef DEBUG_SCRAMBLING
|
||||||
|
|
||||||
for (int k=0; k<32; k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
|
for (int k=0; k<32; k++) printf("scrambling %d : %x xor %x = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
e[0] = (e[0]) ^ (s&1);
|
e[0] = (e[0]) ^ (s&1);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ extern inline uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t res
|
|||||||
{
|
{
|
||||||
// Init value for x1: x1(0) = 1, x1(n) = 0, n=1,2,...,30
|
// Init value for x1: x1(0) = 1, x1(n) = 0, n=1,2,...,30
|
||||||
// x1(31) = [x1(3) + x1(0)]mod2 = 1
|
// x1(31) = [x1(3) + x1(0)]mod2 = 1
|
||||||
*x1 = 1 + (1<<31);
|
*x1 = 1 + (1U<<31);
|
||||||
// Init value for x2: cinit = sum_{i=0}^30 x2*2^i
|
// Init value for x2: cinit = sum_{i=0}^30 x2*2^i
|
||||||
// x2(31) = [x2(3) + x2(2) + x2(1) + x2(0)]mod2
|
// x2(31) = [x2(3) + x2(2) + x2(1) + x2(0)]mod2
|
||||||
// = (*x2>>3) ^ (*x2>>2) + (*x2>>1) + *x2
|
// = (*x2>>3) ^ (*x2>>2) + (*x2>>1) + *x2
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ static inline unsigned int lte_gold_unscram(unsigned int *x1, unsigned int *x2,
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
*x1 = 1+ (1<<31);
|
*x1 = 1+ (1U<<31);
|
||||||
*x2=*x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
|
*x2=*x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
|
||||||
|
|
||||||
// skip first 50 double words (1600 bits)
|
// skip first 50 double words (1600 bits)
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
Msc_RS = msrsb * 6;
|
Msc_RS = msrsb * 6;
|
||||||
k0 = ( ( (int16_t)(frame_parms->N_RB_UL>>1) - (int16_t)(msrs0>>1) ) * 12 ) + kTC;
|
k0 = ( ( (int16_t)(frame_parms->N_RB_UL>>1) - (int16_t)(msrs0>>1) ) * 12 ) + kTC;
|
||||||
|
AssertFatal(msrsb,"divide by 0");
|
||||||
nb = (4*n_RRC/msrsb)%Nb;
|
nb = (4*n_RRC/msrsb)%Nb;
|
||||||
|
|
||||||
for (b=0; b<=Bsrs; b++) {
|
for (b=0; b<=Bsrs; b++) {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void pseudo_random_sequence_optimised(unsigned int size, uint32_t *c, uint32_t c
|
|||||||
unsigned int n,x1,x2;
|
unsigned int n,x1,x2;
|
||||||
|
|
||||||
/* init of m-sequences */
|
/* init of m-sequences */
|
||||||
x1 = 1+ (1<<31);
|
x1 = 1+ (1U<<31);
|
||||||
x2 = cinit;
|
x2 = cinit;
|
||||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,18 @@
|
|||||||
|
|
||||||
#include "nr_refsig.h"
|
#include "nr_refsig.h"
|
||||||
#include "nr_mod_table.h"
|
#include "nr_mod_table.h"
|
||||||
|
short nr_qpsk_mod_table[8];
|
||||||
|
|
||||||
|
int32_t nr_16qam_mod_table[16];
|
||||||
|
#if defined(__SSE2__)
|
||||||
|
__m128i nr_qpsk_byte_mod_table[2048];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int64_t nr_16qam_byte_mod_table[1024];
|
||||||
|
|
||||||
|
int64_t nr_64qam_mod_table[4096];
|
||||||
|
|
||||||
|
int32_t nr_256qam_mod_table[512];
|
||||||
|
|
||||||
void nr_generate_modulation_table() {
|
void nr_generate_modulation_table() {
|
||||||
float sqrt2 = 0.70711;
|
float sqrt2 = 0.70711;
|
||||||
|
|||||||
@@ -29,16 +29,16 @@
|
|||||||
#define NR_MOD_TABLE_QAM64_OFFSET 23
|
#define NR_MOD_TABLE_QAM64_OFFSET 23
|
||||||
#define NR_MOD_TABLE_QAM256_OFFSET 87
|
#define NR_MOD_TABLE_QAM256_OFFSET 87
|
||||||
|
|
||||||
short nr_qpsk_mod_table[8];
|
extern short nr_qpsk_mod_table[8];
|
||||||
|
|
||||||
int32_t nr_16qam_mod_table[16];
|
extern int32_t nr_16qam_mod_table[16];
|
||||||
#if defined(__SSE2__)
|
#if defined(__SSE2__)
|
||||||
__m128i nr_qpsk_byte_mod_table[2048];
|
extern __m128i nr_qpsk_byte_mod_table[2048];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int64_t nr_16qam_byte_mod_table[1024];
|
extern int64_t nr_16qam_byte_mod_table[1024];
|
||||||
|
|
||||||
int64_t nr_64qam_mod_table[4096];
|
extern int64_t nr_64qam_mod_table[4096];
|
||||||
|
|
||||||
int32_t nr_256qam_mod_table[512];
|
extern int32_t nr_256qam_mod_table[512];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ EXTERN int64_t *pss_corr_ue[NUMBER_PSS_SEQUENCE]
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* profiling structure */
|
/* profiling structure */
|
||||||
EXTERN double cpuf;
|
EXTERN time_stats_t generic_time[TIME_LAST];
|
||||||
time_stats_t generic_time[TIME_LAST];
|
|
||||||
|
|
||||||
#ifndef DEFINE_HEADER_ONLY
|
#ifndef DEFINE_HEADER_ONLY
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
#define INDEX_SB_LESS_32 (4) /* index of dftsizes array for which subcarrier number is less than 36 */
|
#define INDEX_SB_LESS_32 (4) /* index of dftsizes array for which subcarrier number is less than 36 */
|
||||||
|
|
||||||
const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
|
EXTERN const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
|
||||||
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible values of sequence length is */
|
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible values of sequence length is */
|
||||||
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
|
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||||
@@ -82,7 +82,7 @@ m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* table of largest prime number lower than uplink allocated resource elements "ul_allocated_re" */
|
/* table of largest prime number lower than uplink allocated resource elements "ul_allocated_re" */
|
||||||
const uint16_t ref_ul_primes[SRS_SB_CONF]
|
EXTERN const uint16_t ref_ul_primes[SRS_SB_CONF]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||||
= {
|
= {
|
||||||
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, */
|
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, */
|
||||||
@@ -101,10 +101,10 @@ const uint16_t ref_ul_primes[SRS_SB_CONF]
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* Low-PAPR base sequence; see TS 38.211 clause 5.2.2 */
|
/* Low-PAPR base sequence; see TS 38.211 clause 5.2.2 */
|
||||||
int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
|
EXTERN int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
|
||||||
|
|
||||||
/* 38.211 table Table 5.2.2.2-1: Definition of phi(n) for M_ZC = 6 */
|
/* 38.211 table Table 5.2.2.2-1: Definition of phi(n) for M_ZC = 6 */
|
||||||
const char phi_M_ZC_6[6*U_GROUP_NUMBER]
|
EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||||
= {
|
= {
|
||||||
/* 0 1 2 3 4 5 */
|
/* 0 1 2 3 4 5 */
|
||||||
@@ -142,7 +142,7 @@ const char phi_M_ZC_6[6*U_GROUP_NUMBER]
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
|
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
|
||||||
const char phi_M_ZC_12[12*U_GROUP_NUMBER]
|
EXTERN const char phi_M_ZC_12[12*U_GROUP_NUMBER]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||||
= {
|
= {
|
||||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
|
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
|
||||||
@@ -181,7 +181,7 @@ const char phi_M_ZC_12[12*U_GROUP_NUMBER]
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* Table 5.2.2.2-3: Definition of phi (n ) for M_ZC = 18 */
|
/* Table 5.2.2.2-3: Definition of phi (n ) for M_ZC = 18 */
|
||||||
const char phi_M_ZC_18[18*U_GROUP_NUMBER]
|
EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#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 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
|
||||||
@@ -220,7 +220,7 @@ const char phi_M_ZC_18[18*U_GROUP_NUMBER]
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* Table 5.2.2.2-4: Definition of phi (n ) for M_ZC = 24 */
|
/* Table 5.2.2.2-4: Definition of phi (n ) for M_ZC = 24 */
|
||||||
const char phi_M_ZC_24[24*U_GROUP_NUMBER]
|
EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
|
||||||
@@ -260,10 +260,10 @@ const char phi_M_ZC_24[24*U_GROUP_NUMBER]
|
|||||||
/************** FUNCTION ******************************************/
|
/************** FUNCTION ******************************************/
|
||||||
|
|
||||||
|
|
||||||
int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
|
EXTERN int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
|
||||||
|
|
||||||
|
|
||||||
int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
|
EXTERN int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
|
||||||
/*!
|
/*!
|
||||||
\brief This function generate the sounding reference symbol (SRS) for the uplink.
|
\brief This function generate the sounding reference symbol (SRS) for the uplink.
|
||||||
@param tables of srs
|
@param tables of srs
|
||||||
@@ -278,7 +278,7 @@ void free_ul_reference_signal_sequences(void);
|
|||||||
#define MAX_INDEX_DMRS_UL_ALLOCATED_REs 53
|
#define MAX_INDEX_DMRS_UL_ALLOCATED_REs 53
|
||||||
|
|
||||||
|
|
||||||
const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
EXTERN const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
||||||
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
|
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
|
||||||
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
|
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
|
||||||
According to 3GPP spec 38.211 section 6.3.1.4
|
According to 3GPP spec 38.211 section 6.3.1.4
|
||||||
@@ -307,7 +307,7 @@ const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
|||||||
/* Table of largest prime number N_ZC < possible DMRS REs M_ZC, this array has values until 100Mhz
|
/* Table of largest prime number N_ZC < possible DMRS REs M_ZC, this array has values until 100Mhz
|
||||||
According to 3GPP spec 38.211 section 5.2.2.1
|
According to 3GPP spec 38.211 section 5.2.2.1
|
||||||
Table used in calculating DMRS low papr type1 sequence for transform precoding */
|
Table used in calculating DMRS low papr type1 sequence for transform precoding */
|
||||||
const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
EXTERN const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
||||||
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
|
||||||
= {
|
= {
|
||||||
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
|
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
|
||||||
@@ -331,8 +331,8 @@ const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
|
|||||||
;
|
;
|
||||||
|
|
||||||
/// PUSCH DMRS for transform precoding
|
/// PUSCH DMRS for transform precoding
|
||||||
int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
|
EXTERN int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
|
||||||
int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
|
EXTERN int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
|
||||||
int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res);
|
int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res);
|
||||||
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling);
|
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling);
|
||||||
void free_gnb_lowpapr_sequences(void);
|
void free_gnb_lowpapr_sequences(void);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
* set as command line argument, see lte-softmodem.c
|
* set as command line argument, see lte-softmodem.c
|
||||||
* default value: 0
|
* default value: 0
|
||||||
*/
|
*/
|
||||||
int16_t nr_dlsch_demod_shift = 0;
|
int32_t nr_dlsch_demod_shift = 0;
|
||||||
//int16_t interf_unaw_shift = 13;
|
//int16_t interf_unaw_shift = 13;
|
||||||
|
|
||||||
//#define DEBUG_HARQ
|
//#define DEBUG_HARQ
|
||||||
|
|||||||
@@ -0,0 +1,387 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <openair1/PHY/impl_defs_top.h>
|
||||||
|
#include "executables/softmodem-common.h"
|
||||||
|
#include "executables/nr-softmodem-common.h"
|
||||||
|
#include <forms.h>
|
||||||
|
#include <openair1/PHY/TOOLS/calibration_scope.h>
|
||||||
|
|
||||||
|
#define TPUT_WINDOW_LENGTH 100
|
||||||
|
#define ScaleZone 4
|
||||||
|
|
||||||
|
const FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW};
|
||||||
|
const FL_COLOR water_colors[4] = {FL_BLUE,FL_GREEN,FL_YELLOW,FL_RED};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int16_t r;
|
||||||
|
int16_t i;
|
||||||
|
} scopeSample_t;
|
||||||
|
#define SquaredNorm(VaR) ((VaR).r*(VaR).r+(VaR).i*(VaR).i)
|
||||||
|
typedef struct {
|
||||||
|
void ** samplesRx;
|
||||||
|
openair0_device *rfdevice;
|
||||||
|
} calibData_t;
|
||||||
|
|
||||||
|
typedef struct OAIgraph {
|
||||||
|
FL_OBJECT *graph;
|
||||||
|
FL_OBJECT *text;
|
||||||
|
float maxX;
|
||||||
|
float maxY;
|
||||||
|
float minX;
|
||||||
|
float minY;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int w;
|
||||||
|
int h;
|
||||||
|
int waterFallh;
|
||||||
|
double *waterFallAvg;
|
||||||
|
boolean_t initDone;
|
||||||
|
int iteration;
|
||||||
|
void (*funct) (struct OAIgraph *graph, calibData_t *);
|
||||||
|
} OAIgraph_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* Forms and Objects */
|
||||||
|
typedef struct {
|
||||||
|
calibData_t * context;
|
||||||
|
FL_FORM *phy_scope;
|
||||||
|
OAIgraph_t graph[20];
|
||||||
|
FL_OBJECT *button_0;
|
||||||
|
} OAI_phy_scope_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
FL_FORM *stats_form;
|
||||||
|
void *vdata;
|
||||||
|
char *cdata;
|
||||||
|
long ldata;
|
||||||
|
FL_OBJECT *stats_text;
|
||||||
|
FL_OBJECT *stats_button;
|
||||||
|
} FD_stats_form;
|
||||||
|
|
||||||
|
static void drawsymbol(FL_OBJECT *obj, int id,
|
||||||
|
FL_POINT *p, int n, int w, int h) {
|
||||||
|
fl_points( p, n, FL_YELLOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define WATERFALL 10000
|
||||||
|
|
||||||
|
static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) {
|
||||||
|
if (type==WATERFALL) {
|
||||||
|
graph->waterFallh=h-15;
|
||||||
|
graph->waterFallAvg=malloc(sizeof(*graph->waterFallAvg) * graph->waterFallh);
|
||||||
|
|
||||||
|
for (int i=0; i< graph->waterFallh; i++)
|
||||||
|
graph->waterFallAvg[i]=0;
|
||||||
|
|
||||||
|
graph->graph=fl_add_canvas(FL_NORMAL_CANVAS, x, y, w, graph->waterFallh, label);
|
||||||
|
graph->text=fl_add_text(FL_NORMAL_TEXT, x, y+graph->waterFallh, w, 15, label);
|
||||||
|
fl_set_object_lcolor(graph->text,FL_WHITE);
|
||||||
|
fl_set_object_color(graph->text, FL_BLACK, FL_BLACK);
|
||||||
|
fl_set_object_lalign(graph->text, FL_ALIGN_CENTER );
|
||||||
|
} else {
|
||||||
|
graph->graph=fl_add_xyplot(type, x, y, w, h, label);
|
||||||
|
fl_set_object_lcolor(graph->graph, FL_WHITE ); // Label color
|
||||||
|
fl_set_object_color(graph->graph, FL_BLACK, pointColor);
|
||||||
|
|
||||||
|
for (int i=0; i< FL_MAX_XYPLOTOVERLAY; i++)
|
||||||
|
fl_set_xyplot_symbol(graph->graph, i, drawsymbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
graph->x=x;
|
||||||
|
graph->y=y;
|
||||||
|
graph->w=w;
|
||||||
|
graph->h=h;
|
||||||
|
graph->maxX=0;
|
||||||
|
graph->maxY=0;
|
||||||
|
graph->minX=0;
|
||||||
|
graph->minY=0;
|
||||||
|
graph->initDone=false;
|
||||||
|
graph->iteration=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static OAIgraph_t calibrationCommonGraph( void (*funct) (OAIgraph_t *graph, calibData_t *context),
|
||||||
|
int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) {
|
||||||
|
OAIgraph_t graph;
|
||||||
|
commonGraph(&graph, type, x, y, w, h, label, pointColor);
|
||||||
|
graph.funct=funct;
|
||||||
|
return graph;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void setRange(OAIgraph_t *graph, float minX, float maxX, float minY, float maxY) {
|
||||||
|
if ( maxX > graph->maxX || minX < graph->minX ||
|
||||||
|
abs(maxX-graph->maxX)>abs(graph->maxX)/2 ||
|
||||||
|
abs(maxX-graph->maxX)>abs(graph->maxX)/2 ) {
|
||||||
|
graph->maxX/=2;
|
||||||
|
graph->minX/=2;
|
||||||
|
graph->maxX=max(graph->maxX,maxX);
|
||||||
|
graph->minX=min(graph->minX,minX);
|
||||||
|
fl_set_xyplot_xbounds(graph->graph, graph->minX*1.2, graph->maxX*1.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( maxY > graph->maxY || minY < graph->minY ||
|
||||||
|
abs(maxY-graph->maxY)>abs(graph->maxY)/2 ||
|
||||||
|
abs(maxY-graph->maxY)>abs(graph->maxY)/2 ) {
|
||||||
|
graph->maxY/=2;
|
||||||
|
graph->minY/=2;
|
||||||
|
graph->maxY=max(graph->maxY,maxY);
|
||||||
|
graph->minY=min(graph->minY,minY);
|
||||||
|
fl_set_xyplot_ybounds(graph->graph, graph->minY*1.2, graph->maxY*1.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len, int layer) {
|
||||||
|
float *old_x;
|
||||||
|
float *old_y;
|
||||||
|
int old_len=-1;
|
||||||
|
|
||||||
|
if (graph->iteration >1)
|
||||||
|
fl_get_xyplot_data_pointer(graph->graph, layer, &old_x, &old_y, &old_len);
|
||||||
|
|
||||||
|
if (old_len != len) {
|
||||||
|
LOG_W(HW,"allocating graph of %d scope\n", len);
|
||||||
|
float values[len];
|
||||||
|
float time[len];
|
||||||
|
|
||||||
|
// make time in case we will use it
|
||||||
|
for (int i=0; i<len; i++)
|
||||||
|
time[i] = values[i] = i;
|
||||||
|
|
||||||
|
if (layer==0)
|
||||||
|
fl_set_xyplot_data(graph->graph,time,values,len,"","","");
|
||||||
|
else
|
||||||
|
fl_add_xyplot_overlay(graph->graph,layer,time,values,len,rx_antenna_colors[layer]);
|
||||||
|
|
||||||
|
fl_get_xyplot_data_pointer(graph->graph, layer, &old_x, &old_y, &old_len);
|
||||||
|
AssertFatal(old_len==len,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
*x=old_x;
|
||||||
|
*y=old_y;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
|
||||||
|
fl_redraw_object(graph->graph);
|
||||||
|
|
||||||
|
if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
|
||||||
|
float maxX=0, maxY=0, minX=0, minY=0;
|
||||||
|
|
||||||
|
for (int k=0; k<len; k++) {
|
||||||
|
maxX=max(maxX,x[k]);
|
||||||
|
minX=min(minX,x[k]);
|
||||||
|
maxY=max(maxY,y[k]);
|
||||||
|
minY=min(minY,y[k]);
|
||||||
|
}
|
||||||
|
|
||||||
|
setRange(graph, minX-5, maxX+5, minY-5, maxY+5);
|
||||||
|
}
|
||||||
|
|
||||||
|
graph->iteration++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const int datasize, const int divisions, const char *label) {
|
||||||
|
if ( values == NULL )
|
||||||
|
return;
|
||||||
|
fl_winset(FL_ObjWin(graph->graph));
|
||||||
|
const int samplesPerPixel=datasize/graph->w;
|
||||||
|
int displayPart=graph->waterFallh-ScaleZone;
|
||||||
|
int row=graph->iteration%displayPart;
|
||||||
|
double avg=0;
|
||||||
|
|
||||||
|
for (int i=0; i < displayPart; i++)
|
||||||
|
avg+=graph->waterFallAvg[i];
|
||||||
|
|
||||||
|
avg/=displayPart;
|
||||||
|
graph->waterFallAvg[row]=0;
|
||||||
|
|
||||||
|
for (int pix=0; pix<graph->w; pix++) {
|
||||||
|
scopeSample_t *end=values+(pix+1)*samplesPerPixel;
|
||||||
|
end-=2;
|
||||||
|
AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize);
|
||||||
|
double val=0;
|
||||||
|
|
||||||
|
for (scopeSample_t *s=values+(pix)*samplesPerPixel;
|
||||||
|
s <end;
|
||||||
|
s++)
|
||||||
|
val += SquaredNorm(*s);
|
||||||
|
|
||||||
|
val/=samplesPerPixel;
|
||||||
|
graph->waterFallAvg[row]+=val/graph->w;
|
||||||
|
int col=0;
|
||||||
|
|
||||||
|
if (val > avg*2 )
|
||||||
|
col=1;
|
||||||
|
|
||||||
|
if (val > avg*10 )
|
||||||
|
col=2;
|
||||||
|
|
||||||
|
if (val > avg*100 )
|
||||||
|
col=3;
|
||||||
|
|
||||||
|
fl_point(pix, graph->iteration%displayPart, water_colors[col]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graph->initDone==false) {
|
||||||
|
for ( int i=0; i < graph->waterFallh; i++ )
|
||||||
|
for ( int j = 0 ; j < graph->w ; j++ )
|
||||||
|
fl_point(j, i, FL_BLACK);
|
||||||
|
|
||||||
|
for ( int i=1; i<divisions; i++)
|
||||||
|
for (int j= displayPart; j<graph->waterFallh; j++)
|
||||||
|
fl_point(i*(graph->w/divisions),j, FL_WHITE);
|
||||||
|
|
||||||
|
graph->initDone=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
fl_set_object_label_f(graph->text, "%s, avg I/Q pow: %4.1f", label, sqrt(avg));
|
||||||
|
graph->iteration++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const scopeSample_t **data, const int len) {
|
||||||
|
float *values, *time;
|
||||||
|
oai_xygraph_getbuff(graph, &time, &values, len, 0);
|
||||||
|
|
||||||
|
for (int ant=0; ant<nb_ant; ant++) {
|
||||||
|
if (data[ant] != NULL) {
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
values[i] = SquaredNorm(data[ant][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
oai_xygraph(graph,time,values, len, ant, 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void gNBWaterFall (OAIgraph_t *graph, calibData_t *context) {
|
||||||
|
//use 1st antenna
|
||||||
|
genericWaterFall(graph, (scopeSample_t *)context->samplesRx[0],
|
||||||
|
0, 0,
|
||||||
|
"X axis:one frame in time");
|
||||||
|
}
|
||||||
|
static void gNBfreqWaterFall (OAIgraph_t *graph, calibData_t *context) {
|
||||||
|
//use 1st antenna
|
||||||
|
genericWaterFall(graph, (scopeSample_t *)context->samplesRx[0],
|
||||||
|
0, 0,
|
||||||
|
"X axis:one frame in time");
|
||||||
|
}
|
||||||
|
static void timeResponse (OAIgraph_t *graph, calibData_t *context) {
|
||||||
|
#if 0
|
||||||
|
const int len=2*phy_vars_gnb->frame_parms.ofdm_symbol_size;
|
||||||
|
float *values, *time;
|
||||||
|
oai_xygraph_getbuff(graph, &time, &values, len, 0);
|
||||||
|
const int ant=0; // display antenna 0 for each UE
|
||||||
|
|
||||||
|
for (int ue=0; ue<nb_UEs; ue++) {
|
||||||
|
scopeSample_t *data= (scopeSample_t *)phy_vars_gnb->pusch_vars[ue]->ul_ch_estimates_time[ant];
|
||||||
|
|
||||||
|
if (data != NULL) {
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
values[i] = SquaredNorm(data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
oai_xygraph(graph,time,values, len, ue, 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void puschIQ (OAIgraph_t *graph, calibData_t *context) {
|
||||||
|
#if 0
|
||||||
|
NR_DL_FRAME_PARMS *frame_parms=&phy_vars_gnb->frame_parms;
|
||||||
|
int sz=frame_parms->N_RB_UL*12*frame_parms->symbols_per_slot;
|
||||||
|
|
||||||
|
for (int ue=0; ue<nb_UEs; ue++) {
|
||||||
|
scopeSample_t *pusch_comp = (scopeSample_t *) phy_vars_gnb->pusch_vars[ue]->rxdataF_comp[0];
|
||||||
|
float *I, *Q;
|
||||||
|
oai_xygraph_getbuff(graph, &I, &Q, sz, ue);
|
||||||
|
|
||||||
|
if (pusch_comp) {
|
||||||
|
for (int k=0; k<sz; k++ ) {
|
||||||
|
I[k] = pusch_comp[k].r;
|
||||||
|
Q[k] = pusch_comp[k].i;
|
||||||
|
}
|
||||||
|
|
||||||
|
oai_xygraph(graph,I,Q,sz,ue,10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static OAI_phy_scope_t *createScopeCalibration(calibData_t * context) {
|
||||||
|
FL_OBJECT *obj;
|
||||||
|
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
|
||||||
|
fdui->context=context;
|
||||||
|
// Define form
|
||||||
|
fdui->phy_scope = fl_bgn_form( FL_NO_BOX, 800, 800 );
|
||||||
|
// This the whole UI box
|
||||||
|
obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 800, "" );
|
||||||
|
fl_set_object_color( obj, FL_BLACK, FL_WHITE );
|
||||||
|
int curY=0,x,y,w,h;
|
||||||
|
// Received signal
|
||||||
|
fdui->graph[0] = calibrationCommonGraph( gNBWaterFall, WATERFALL, 0, curY, 400, 100,
|
||||||
|
"Received Signal (Time-Domain, one frame)", FL_RED );
|
||||||
|
|
||||||
|
// Time-domain channel response
|
||||||
|
//fdui->graph[1] = calibrationCommonGraph( timeResponse, FL_NORMAL_XYPLOT, 410, curY, 400, 100, "SRS Frequency Response (samples, abs)", FL_RED );
|
||||||
|
fl_get_object_bbox(fdui->graph[0].graph,&x, &y,&w, &h);
|
||||||
|
curY+=h;
|
||||||
|
// Frequency-domain channel response
|
||||||
|
fdui->graph[1] = calibrationCommonGraph( gNBfreqWaterFall, WATERFALL, 0, curY, 800, 100,
|
||||||
|
"Channel Frequency domain (RE, one frame)", FL_RED );
|
||||||
|
fl_get_object_bbox(fdui->graph[1].graph,&x, &y,&w, &h);
|
||||||
|
curY+=h+20;
|
||||||
|
// LLR of PUSCH
|
||||||
|
//fdui->graph[3] = calibrationCommonGraph( puschLLR, FL_POINTS_XYPLOT, 0, curY, 500, 200, "PUSCH Log-Likelihood Ratios (LLR, mag)", FL_YELLOW );
|
||||||
|
// I/Q PUSCH comp
|
||||||
|
fdui->graph[2] = calibrationCommonGraph( puschIQ, FL_POINTS_XYPLOT, 500, curY, 300, 200,
|
||||||
|
"PUSCH I/Q of MF Output", FL_YELLOW );
|
||||||
|
fl_get_object_bbox(fdui->graph[2].graph,&x, &y,&w, &h);
|
||||||
|
curY+=h;
|
||||||
|
//fl_get_object_bbox(fdui->graph[6].graph,&x, &y,&w, &h);
|
||||||
|
curY+=h;
|
||||||
|
fdui->graph[3].graph=NULL;
|
||||||
|
fl_end_form( );
|
||||||
|
fdui->phy_scope->fdui = fdui;
|
||||||
|
fl_show_form (fdui->phy_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, "LTE UL SCOPE gNB");
|
||||||
|
return fdui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void calibrationScope(OAI_phy_scope_t *form) {
|
||||||
|
int i=0;
|
||||||
|
|
||||||
|
while (form->graph[i].graph) {
|
||||||
|
form->graph[i].funct(form->graph+i, form->context);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//fl_check_forms();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *scopeThread(void *arg) {
|
||||||
|
calibData_t * context = (calibData_t *)arg;
|
||||||
|
size_t stksize=0;
|
||||||
|
pthread_attr_t atr;
|
||||||
|
pthread_attr_init(&atr);
|
||||||
|
pthread_attr_getstacksize(&atr, &stksize);
|
||||||
|
pthread_attr_setstacksize(&atr,32*1024*1024 );
|
||||||
|
sleep(3); // no clean interthread barriers
|
||||||
|
int fl_argc=1;
|
||||||
|
char *name="Calibration-scope";
|
||||||
|
fl_initialize (&fl_argc, &name, NULL, 0, 0);
|
||||||
|
OAI_phy_scope_t *form = createScopeCalibration(context);
|
||||||
|
|
||||||
|
while (!oai_exit) {
|
||||||
|
calibrationScope(form);
|
||||||
|
usleep(99*1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalibrationInitScope(void ** samplesRx,openair0_device *rfdevice) {
|
||||||
|
pthread_t forms_thread;
|
||||||
|
calibData_t * tmp=(calibData_t *) malloc(sizeof(*tmp));
|
||||||
|
tmp->samplesRx=samplesRx;
|
||||||
|
tmp->rfdevice=rfdevice;
|
||||||
|
threadCreate(&forms_thread, scopeThread, (void*) tmp, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#ifndef CALIB_SCOPE_H
|
||||||
|
#define CALIB_SCOPE_H
|
||||||
|
|
||||||
|
void CalibrationInitScope(void ** samplesRx,openair0_device *rfdevice);
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,330 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <openair1/PHY/impl_defs_top.h>
|
||||||
|
#include <targets/ARCH/COMMON/common_lib.h>
|
||||||
|
#include <executables/softmodem-common.h>
|
||||||
|
#include <openair1/PHY/TOOLS/calibration_scope.h>
|
||||||
|
|
||||||
|
|
||||||
|
volatile int oai_exit=false;
|
||||||
|
unsigned int mmapped_dma=0;
|
||||||
|
int single_thread_flag;
|
||||||
|
uint32_t timing_advance;
|
||||||
|
int8_t threequarter_fs;
|
||||||
|
int usrp_tx_thread;
|
||||||
|
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||||
|
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||||
|
int opp_enabled;
|
||||||
|
static double snr_dB=20;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
#include <executables/nr-softmodem.h>
|
||||||
|
|
||||||
|
int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_state) {return 0;}
|
||||||
|
void nfapi_setmode(nfapi_mode_t nfapi_mode) {}
|
||||||
|
void set_taus_seed(unsigned int seed_init){};
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
///static configuration for NR at the moment
|
||||||
|
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||||
|
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||||
|
}
|
||||||
|
set_softmodem_sighandler();
|
||||||
|
setvbuf(stdout, NULL, _IONBF, 0);
|
||||||
|
setvbuf(stderr, NULL, _IONBF, 0);
|
||||||
|
logInit();
|
||||||
|
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
|
||||||
|
|
||||||
|
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
||||||
|
get_common_options(SOFTMODEM_GNB_BIT );
|
||||||
|
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||||
|
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||||
|
configure_linux();
|
||||||
|
|
||||||
|
|
||||||
|
int N_RB=50;
|
||||||
|
int subCarrierFreq=30e3;
|
||||||
|
int sampling_rate=30.72e6;
|
||||||
|
int DFT=2048;
|
||||||
|
int TxAdvanceInDFTSize=12;
|
||||||
|
int antennas=1;
|
||||||
|
uint64_t freq=3619.200e6;
|
||||||
|
int rxGain=90;
|
||||||
|
int txGain=90;
|
||||||
|
int filterBand=40e6;
|
||||||
|
char * usrp_addrs="type=b200";
|
||||||
|
|
||||||
|
openair0_config_t openair0_cfg= {
|
||||||
|
//! Module ID for this configuration
|
||||||
|
.Mod_id=0,
|
||||||
|
//! device log level
|
||||||
|
.log_level=0,
|
||||||
|
//! duplexing mode
|
||||||
|
.duplex_mode=0,
|
||||||
|
//! number of downlink resource blocks
|
||||||
|
.num_rb_dl=N_RB,
|
||||||
|
//! number of samples per frame
|
||||||
|
.samples_per_frame=0,
|
||||||
|
//! the sample rate for both transmit and receive.
|
||||||
|
.sample_rate=sampling_rate,
|
||||||
|
//device is doing mmapped DMA transfers
|
||||||
|
.mmapped_dma=0,
|
||||||
|
//! offset in samples between TX and RX paths
|
||||||
|
.tx_sample_advance=0,
|
||||||
|
//! samples per packet on the fronthaul interface
|
||||||
|
.samples_per_packet=1024,
|
||||||
|
//! number of RX channels (=RX antennas)
|
||||||
|
.rx_num_channels=antennas,
|
||||||
|
//! number of TX channels (=TX antennas)
|
||||||
|
.tx_num_channels=antennas,
|
||||||
|
//! \brief Center frequency in Hz for RX.
|
||||||
|
//! index: [0..rx_num_channels[
|
||||||
|
.rx_freq={freq,freq,freq,freq},
|
||||||
|
//! \brief Center frequency in Hz for TX.
|
||||||
|
//! index: [0..rx_num_channels[ !!! see lte-ue.c:427 FIXME iterates over rx_num_channels
|
||||||
|
.tx_freq={freq,freq,freq,freq},
|
||||||
|
//! \brief memory
|
||||||
|
//! \brief Pointer to Calibration table for RX gains
|
||||||
|
.rx_gain_calib_table=NULL,
|
||||||
|
//! mode for rxgain (ExpressMIMO2)
|
||||||
|
.rxg_mode={0},
|
||||||
|
//! \brief Gain for RX in dB.
|
||||||
|
//! index: [0..rx_num_channels]
|
||||||
|
.rx_gain={rxGain,rxGain,rxGain,rxGain},
|
||||||
|
//! \brief Gain offset (for calibration) in dB
|
||||||
|
//! index: [0..rx_num_channels]
|
||||||
|
.rx_gain_offset={0},
|
||||||
|
//! gain for TX in dB
|
||||||
|
.tx_gain={txGain,txGain,txGain,txGain},
|
||||||
|
//! RX bandwidth in Hz
|
||||||
|
.rx_bw=filterBand,
|
||||||
|
//! TX bandwidth in Hz
|
||||||
|
.tx_bw=filterBand,
|
||||||
|
//! clock source
|
||||||
|
.clock_source=external,//internal gpsdo external
|
||||||
|
//! timing_source
|
||||||
|
.time_source=internal, //internal gpsdo external
|
||||||
|
//! Manual SDR IP address
|
||||||
|
//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
|
||||||
|
.sdr_addrs=usrp_addrs,
|
||||||
|
//! Auto calibration flag
|
||||||
|
.autocal={0},
|
||||||
|
//! rf devices work with x bits iqs when oai have its own iq format
|
||||||
|
//! the two following parameters are used to convert iqs
|
||||||
|
.iq_txshift=0,
|
||||||
|
.iq_rxrescale=0,
|
||||||
|
//! Configuration file for LMS7002M
|
||||||
|
.configFilename="",
|
||||||
|
//! remote IP/MAC addr for Ethernet interface
|
||||||
|
.remote_addr="",
|
||||||
|
//! remote port number for Ethernet interface
|
||||||
|
.remote_port=0,
|
||||||
|
//! local IP/MAC addr for Ethernet interface (eNB/BBU, UE)
|
||||||
|
.my_addr=0,
|
||||||
|
//! local port number for Ethernet interface (eNB/BBU, UE)
|
||||||
|
.my_port=0,
|
||||||
|
//! record player configuration, definition in record_player.h
|
||||||
|
.recplay_mode=0,
|
||||||
|
.recplay_conf=NULL,
|
||||||
|
//! number of samples per tti
|
||||||
|
.samples_per_tti=0,
|
||||||
|
//! check for threequarter sampling rate
|
||||||
|
.threequarter_fs=0,
|
||||||
|
};
|
||||||
|
//-----------------------
|
||||||
|
openair0_device rfdevice= {
|
||||||
|
/*!tx write thread*/
|
||||||
|
//.write_thread={0},
|
||||||
|
/*!brief Module ID of this device */
|
||||||
|
.Mod_id=0,
|
||||||
|
/*!brief Component Carrier ID of this device */
|
||||||
|
.CC_id=0,
|
||||||
|
/*!brief Type of this device */
|
||||||
|
.type=NONE_DEV,
|
||||||
|
/*!brief Transport protocol type that the device supports (in case I/Q samples need to be transported) */
|
||||||
|
.transp_type=NONE_TP,
|
||||||
|
/*!brief Type of the device's host (RAU/RRU) */
|
||||||
|
.host_type=MIN_HOST_TYPE,
|
||||||
|
/* !brief RF frontend parameters set by application */
|
||||||
|
.openair0_cfg=NULL, //set by device_init
|
||||||
|
/* !brief ETH params set by application */
|
||||||
|
.eth_params=NULL,
|
||||||
|
//! record player data, definition in record_player.h
|
||||||
|
.recplay_state=NULL,
|
||||||
|
/* !brief Indicates if device already initialized */
|
||||||
|
.is_init=0,
|
||||||
|
/*!brief Can be used by driver to hold internal structure*/
|
||||||
|
.priv=NULL,
|
||||||
|
/* Functions API, which are called by the application*/
|
||||||
|
/*! \brief Called to start the transceiver. Return 0 if OK, < 0 if error
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
*/
|
||||||
|
.trx_start_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Called to configure the device
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
*/
|
||||||
|
.trx_config_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Called to send a request message between RAU-RRU on control port
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
@param msg pointer to the message structure passed between RAU-RRU
|
||||||
|
@param msg_len length of the message
|
||||||
|
*/
|
||||||
|
.trx_ctlsend_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Called to receive a reply message between RAU-RRU on control port
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
@param msg pointer to the message structure passed between RAU-RRU
|
||||||
|
@param msg_len length of the message
|
||||||
|
*/
|
||||||
|
.trx_ctlrecv_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Called to send samples to the RF target
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
@param timestamp The timestamp at whicch the first sample MUST be sent
|
||||||
|
@param buff Buffer which holds the samples (2 dimensional)
|
||||||
|
@param nsamps number of samples to be sent
|
||||||
|
@param number of antennas
|
||||||
|
@param flags flags must be set to TRUE if timestamp parameter needs to be applied
|
||||||
|
*/
|
||||||
|
.trx_write_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Called to send samples to the RF target
|
||||||
|
@param device pointer to the device structure specific to the RF hardware target
|
||||||
|
@param timestamp The timestamp at whicch the first sample MUST be sent
|
||||||
|
@param buff Buffer which holds the samples (1 dimensional)
|
||||||
|
@param nsamps number of samples to be sent
|
||||||
|
@param antenna_id index of the antenna if the device has multiple anteannas
|
||||||
|
@param flags flags must be set to TRUE if timestamp parameter needs to be applied
|
||||||
|
*/
|
||||||
|
.trx_write_func2=NULL,
|
||||||
|
|
||||||
|
/*! \brief Receive samples from hardware.
|
||||||
|
* Read \ref nsamps samples from each channel to buffers. buff[0] is the array for
|
||||||
|
* the first channel. *ptimestamp is the time at which the first sample
|
||||||
|
* was received.
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \param[out] ptimestamp the time at which the first sample was received.
|
||||||
|
* \param[out] buff An array of pointers to buffers for received samples. The buffers must be large enough to hold the number of samples \ref nsamps.
|
||||||
|
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
|
||||||
|
* \param num_antennas number of antennas from which to receive samples
|
||||||
|
* \returns the number of sample read
|
||||||
|
*/
|
||||||
|
|
||||||
|
.trx_read_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Receive samples from hardware, this version provides a single antenna at a time and returns.
|
||||||
|
* Read \ref nsamps samples from each channel to buffers. buff[0] is the array for
|
||||||
|
* the first channel. *ptimestamp is the time at which the first sample
|
||||||
|
* was received.
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \param[out] ptimestamp the time at which the first sample was received.
|
||||||
|
* \param[out] buff A pointers to a buffer for received samples. The buffer must be large enough to hold the number of samples \ref nsamps.
|
||||||
|
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
|
||||||
|
* \param antenna_id Index of antenna from which samples were received
|
||||||
|
* \returns the number of sample read
|
||||||
|
*/
|
||||||
|
.trx_read_func2=NULL,
|
||||||
|
|
||||||
|
/*! \brief print the device statistics
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \returns 0 on success
|
||||||
|
*/
|
||||||
|
/*! \brief print the device statistics
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \returns 0 on success
|
||||||
|
*/
|
||||||
|
.trx_get_stats_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Reset device statistics
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \returns 0 in success
|
||||||
|
*/
|
||||||
|
.trx_reset_stats_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Terminate operation of the transceiver -- free all associated resources
|
||||||
|
* \param device the hardware to use
|
||||||
|
*/
|
||||||
|
.trx_end_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Stop operation of the transceiver
|
||||||
|
*/
|
||||||
|
.trx_stop_func=NULL,
|
||||||
|
|
||||||
|
/* Functions API related to UE*/
|
||||||
|
|
||||||
|
/*! \brief Set RX feaquencies
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \param openair0_cfg RF frontend parameters set by application
|
||||||
|
* \param exmimo_dump_config dump EXMIMO configuration
|
||||||
|
* \returns 0 in success
|
||||||
|
*/
|
||||||
|
.trx_set_freq_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief Set gains
|
||||||
|
* \param device the hardware to use
|
||||||
|
* \param openair0_cfg RF frontend parameters set by application
|
||||||
|
* \returns 0 in success
|
||||||
|
*/
|
||||||
|
.trx_set_gains_func=NULL,
|
||||||
|
|
||||||
|
/*! \brief RRU Configuration callback
|
||||||
|
* \param idx RU index
|
||||||
|
* \param arg pointer to capabilities or configuration
|
||||||
|
*/
|
||||||
|
.configure_rru=NULL,
|
||||||
|
/*! \brief Pointer to generic RRU private information
|
||||||
|
*/
|
||||||
|
.thirdparty_priv=NULL,
|
||||||
|
.thirdparty_init=NULL,
|
||||||
|
/*! \brief Callback for Third-party RRU Cleanup routine
|
||||||
|
\param device the hardware configuration to use
|
||||||
|
*/
|
||||||
|
.thirdparty_cleanup=NULL,
|
||||||
|
|
||||||
|
/*! \brief Callback for Third-party start streaming routine
|
||||||
|
\param device the hardware configuration to use
|
||||||
|
*/
|
||||||
|
.thirdparty_startstreaming=NULL,
|
||||||
|
|
||||||
|
/*! \brief RRU Configuration callback
|
||||||
|
* \param idx RU index
|
||||||
|
* \param arg pointer to capabilities or configuration
|
||||||
|
*/
|
||||||
|
.trx_write_init=NULL,
|
||||||
|
/* \brief Get internal parameter
|
||||||
|
* \param id parameter to get
|
||||||
|
* \return a pointer to the parameter
|
||||||
|
*/
|
||||||
|
.get_internal_parameter=NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
openair0_device_load(&rfdevice,&openair0_cfg);
|
||||||
|
|
||||||
|
void ** samplesRx = (void **)malloc16(antennas* sizeof(struct complex16 *) );
|
||||||
|
void ** samplesTx = (void **)malloc16(antennas* sizeof(struct complex16 *) );
|
||||||
|
|
||||||
|
for (int i=0; i<antennas; i++) {
|
||||||
|
samplesRx[i] = (int32_t *)malloc16_clear( DFT*sizeof(struct complex16) );
|
||||||
|
samplesTx[i] = (int32_t *)malloc16_clear( DFT*sizeof(struct complex16) );
|
||||||
|
}
|
||||||
|
|
||||||
|
CalibrationInitScope(samplesRx, &rfdevice);
|
||||||
|
openair0_timestamp timestamp=0;
|
||||||
|
rfdevice.trx_start_func(&rfdevice);
|
||||||
|
|
||||||
|
while(!oai_exit) {
|
||||||
|
int readBlockSize = rfdevice.trx_read_func(&rfdevice,
|
||||||
|
×tamp,
|
||||||
|
samplesTx,
|
||||||
|
DFT,
|
||||||
|
antennas);
|
||||||
|
int txs = rfdevice.trx_write_func(&rfdevice,
|
||||||
|
timestamp+TxAdvanceInDFTSize*DFT,
|
||||||
|
samplesRx,
|
||||||
|
DFT,
|
||||||
|
antennas,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -44,7 +44,6 @@ FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
|||||||
char title[255];
|
char title[255];
|
||||||
unsigned char scope_enb_num_ue = 2;
|
unsigned char scope_enb_num_ue = 2;
|
||||||
static pthread_t forms_thread; //xforms
|
static pthread_t forms_thread; //xforms
|
||||||
int otg_enabled=0;
|
|
||||||
|
|
||||||
void reset_stats(FL_OBJECT *button, long arg) {
|
void reset_stats(FL_OBJECT *button, long arg) {
|
||||||
int i,j,k;
|
int i,j,k;
|
||||||
@@ -131,7 +130,7 @@ int enbscope_autoinit(void) {
|
|||||||
sprintf (title, "LTE UL SCOPE eNB for CC_id %d, UE %d",CC_id,UE_id);
|
sprintf (title, "LTE UL SCOPE eNB for CC_id %d, UE %d",CC_id,UE_id);
|
||||||
fl_show_form (form_enb[CC_id][UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
fl_show_form (form_enb[CC_id][UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||||
|
|
||||||
if (otg_enabled) {
|
if (0) {
|
||||||
fl_set_button(form_enb[CC_id][UE_id]->button_0,1);
|
fl_set_button(form_enb[CC_id][UE_id]->button_0,1);
|
||||||
fl_set_object_label(form_enb[CC_id][UE_id]->button_0,"DL Traffic ON");
|
fl_set_object_label(form_enb[CC_id][UE_id]->button_0,"DL Traffic ON");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
||||||
|
|
||||||
#define TPUT_WINDOW_LENGTH 100
|
#define TPUT_WINDOW_LENGTH 100
|
||||||
int otg_enabled;
|
|
||||||
|
|
||||||
FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW};
|
FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW};
|
||||||
|
|
||||||
@@ -57,11 +56,9 @@ static void ia_receiver_on_off( FL_OBJECT *button, long arg) {
|
|||||||
static void dl_traffic_on_off( FL_OBJECT *button, long arg) {
|
static void dl_traffic_on_off( FL_OBJECT *button, long arg) {
|
||||||
if (fl_get_button(button)) {
|
if (fl_get_button(button)) {
|
||||||
fl_set_object_label(button, "DL Traffic ON");
|
fl_set_object_label(button, "DL Traffic ON");
|
||||||
otg_enabled = 1;
|
|
||||||
fl_set_object_color(button, FL_GREEN, FL_GREEN);
|
fl_set_object_color(button, FL_GREEN, FL_GREEN);
|
||||||
} else {
|
} else {
|
||||||
fl_set_object_label(button, "DL Traffic OFF");
|
fl_set_object_label(button, "DL Traffic OFF");
|
||||||
otg_enabled = 0;
|
|
||||||
fl_set_object_color(button, FL_RED, FL_RED);
|
fl_set_object_color(button, FL_RED, FL_RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,7 +128,6 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) {
|
|||||||
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" );
|
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" );
|
||||||
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
||||||
fl_set_button(fdui->button_0,0);
|
fl_set_button(fdui->button_0,0);
|
||||||
otg_enabled = 0;
|
|
||||||
fl_set_object_label(fdui->button_0, "DL Traffic OFF");
|
fl_set_object_label(fdui->button_0, "DL Traffic OFF");
|
||||||
fl_set_object_color(fdui->button_0, FL_RED, FL_RED);
|
fl_set_object_color(fdui->button_0, FL_RED, FL_RED);
|
||||||
fl_set_object_callback(fdui->button_0, dl_traffic_on_off, 0 );
|
fl_set_object_callback(fdui->button_0, dl_traffic_on_off, 0 );
|
||||||
@@ -153,7 +149,6 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
|||||||
int16_t **chest_t;
|
int16_t **chest_t;
|
||||||
int16_t **chest_f;
|
int16_t **chest_f;
|
||||||
int16_t *pusch_llr;
|
int16_t *pusch_llr;
|
||||||
int32_t *pusch_comp;
|
|
||||||
int32_t *pucch1_comp;
|
int32_t *pucch1_comp;
|
||||||
int32_t *pucch1_thres;
|
int32_t *pucch1_thres;
|
||||||
int32_t *pucch1ab_comp;
|
int32_t *pucch1ab_comp;
|
||||||
@@ -184,12 +179,11 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
|||||||
chest_f_abs = (float *) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
chest_f_abs = (float *) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
||||||
llr = (float *) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
|
llr = (float *) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
|
||||||
bit = malloc(coded_bits_per_codeword*sizeof(float));
|
bit = malloc(coded_bits_per_codeword*sizeof(float));
|
||||||
|
rxsig_t = (int16_t **) phy_vars_enb->RU_list[0]->common.rxdata;
|
||||||
rxsig_t = (int16_t**) phy_vars_enb->RU_list[0]->common.rxdata;
|
|
||||||
chest_t = (int16_t **) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates;
|
chest_t = (int16_t **) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates;
|
||||||
chest_f = (int16_t **) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates;
|
chest_f = (int16_t **) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates;
|
||||||
pusch_llr = (int16_t *) phy_vars_enb->pusch_vars[UE_id]->llr;
|
pusch_llr = (int16_t *) phy_vars_enb->pusch_vars[UE_id]->llr;
|
||||||
pusch_comp = (int32_t *) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0];
|
int16_t *pusch_comp= (int16_t *) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0];
|
||||||
pucch1_comp = (int32_t *) phy_vars_enb->pucch1_stats[UE_id];
|
pucch1_comp = (int32_t *) phy_vars_enb->pucch1_stats[UE_id];
|
||||||
pucch1_thres = (int32_t *) phy_vars_enb->pucch1_stats_thres[UE_id];
|
pucch1_thres = (int32_t *) phy_vars_enb->pucch1_stats_thres[UE_id];
|
||||||
pucch1ab_comp = (int32_t *) phy_vars_enb->pucch1ab_stats[UE_id];
|
pucch1ab_comp = (int32_t *) phy_vars_enb->pucch1ab_stats[UE_id];
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -240,7 +240,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in
|
|||||||
for (int pix=0; pix<graph->w; pix++) {
|
for (int pix=0; pix<graph->w; pix++) {
|
||||||
scopeSample_t *end=values+(pix+1)*samplesPerPixel;
|
scopeSample_t *end=values+(pix+1)*samplesPerPixel;
|
||||||
end-=2;
|
end-=2;
|
||||||
AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize);
|
AssertFatal(end <= values+datasize,"diff : %u", end-values+datasize);
|
||||||
double val=0;
|
double val=0;
|
||||||
|
|
||||||
for (scopeSample_t *s=values+(pix)*samplesPerPixel;
|
for (scopeSample_t *s=values+(pix)*samplesPerPixel;
|
||||||
@@ -276,7 +276,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in
|
|||||||
graph->initDone=true;
|
graph->initDone=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
fl_set_object_label_f(graph->text, "%s, avg I/Q pow: %4.1f", label, sqrt(avg));
|
fl_set_object_label_f(graph->text, "%s, avg I/Q pow: %4.1f", label, 0/*sqrt(avg)*/);
|
||||||
graph->iteration++;
|
graph->iteration++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +444,6 @@ static void puschThroughtput (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) {
|
|||||||
// fl_set_xyplot_ybounds(form->pusch_tput,0,ymax);
|
// fl_set_xyplot_ybounds(form->pusch_tput,0,ymax);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static OAI_phy_scope_t *create_phy_scope_gnb(void) {
|
static OAI_phy_scope_t *create_phy_scope_gnb(void) {
|
||||||
FL_OBJECT *obj;
|
FL_OBJECT *obj;
|
||||||
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
|
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
|
||||||
@@ -493,7 +492,6 @@ static OAI_phy_scope_t *create_phy_scope_gnb(void) {
|
|||||||
fl_show_form (fdui->phy_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, "LTE UL SCOPE gNB");
|
fl_show_form (fdui->phy_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, "LTE UL SCOPE gNB");
|
||||||
return fdui;
|
return fdui;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int scope_enb_num_ue = 1;
|
static const int scope_enb_num_ue = 1;
|
||||||
void phy_scope_gNB(OAI_phy_scope_t *form,
|
void phy_scope_gNB(OAI_phy_scope_t *form,
|
||||||
scopeData_t *p,
|
scopeData_t *p,
|
||||||
@@ -517,7 +515,6 @@ void phy_scope_gNB(OAI_phy_scope_t *form,
|
|||||||
|
|
||||||
//fl_check_forms();
|
//fl_check_forms();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *scope_thread_gNB(void *arg) {
|
static void *scope_thread_gNB(void *arg) {
|
||||||
scopeData_t *p=(scopeData_t *) arg;
|
scopeData_t *p=(scopeData_t *) arg;
|
||||||
//# ifdef ENABLE_XFORMS_WRITE_STATS
|
//# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||||
@@ -542,7 +539,6 @@ static void *scope_thread_gNB(void *arg) {
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copyRxdataF(int32_t *data, int slot, void *scopeData) {
|
static void copyRxdataF(int32_t *data, int slot, void *scopeData) {
|
||||||
scopeData_t *scope=(scopeData_t *)scopeData;
|
scopeData_t *scope=(scopeData_t *)scopeData;
|
||||||
memcpy(scope->rxdataF + slot*scope->gNB->frame_parms.samples_per_slot_wCP,
|
memcpy(scope->rxdataF + slot*scope->gNB->frame_parms.samples_per_slot_wCP,
|
||||||
@@ -562,7 +558,6 @@ void gNBinitScope(scopeParms_t *p) {
|
|||||||
pthread_t forms_thread;
|
pthread_t forms_thread;
|
||||||
threadCreate(&forms_thread, scope_thread_gNB, p->gNB->scopeData, "scope", -1, OAI_PRIORITY_RT_LOW);
|
threadCreate(&forms_thread, scope_thread_gNB, p->gNB->scopeData, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ueWaterFall (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void ueWaterFall (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// Received signal in time domain of receive antenna 0
|
// Received signal in time domain of receive antenna 0
|
||||||
genericWaterFall(graph,
|
genericWaterFall(graph,
|
||||||
@@ -571,7 +566,6 @@ static void ueWaterFall (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eN
|
|||||||
phy_vars_ue->frame_parms.slots_per_frame,
|
phy_vars_ue->frame_parms.slots_per_frame,
|
||||||
"X axis: one frame time");
|
"X axis: one frame time");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* replaced by waterfall
|
/* replaced by waterfall
|
||||||
static void ueTimeResponse (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void ueTimeResponse (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// Received signal in time domain of receive antenna 0
|
// Received signal in time domain of receive antenna 0
|
||||||
@@ -580,14 +574,12 @@ static void ueTimeResponse (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int
|
|||||||
phy_vars_ue->frame_parms.samples_per_frame);
|
phy_vars_ue->frame_parms.samples_per_frame);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void ueChannelResponse (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void ueChannelResponse (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// Channel Impulse Response
|
// Channel Impulse Response
|
||||||
genericPowerPerAntena(graph, phy_vars_ue->frame_parms.nb_antennas_rx,
|
genericPowerPerAntena(graph, phy_vars_ue->frame_parms.nb_antennas_rx,
|
||||||
(const scopeSample_t **) phy_vars_ue->pbch_vars[eNB_id]->dl_ch_estimates_time,
|
(const scopeSample_t **) phy_vars_ue->pbch_vars[eNB_id]->dl_ch_estimates_time,
|
||||||
phy_vars_ue->frame_parms.ofdm_symbol_size>>3);
|
phy_vars_ue->frame_parms.ofdm_symbol_size>>3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ueFreqWaterFall (OAIgraph_t *graph,PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id ) {
|
static void ueFreqWaterFall (OAIgraph_t *graph,PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id ) {
|
||||||
NR_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->frame_parms;
|
||||||
//use 1st antenna
|
//use 1st antenna
|
||||||
@@ -597,7 +589,6 @@ static void ueFreqWaterFall (OAIgraph_t *graph,PHY_VARS_NR_UE *phy_vars_ue, int
|
|||||||
phy_vars_ue->frame_parms.slots_per_frame,
|
phy_vars_ue->frame_parms.slots_per_frame,
|
||||||
"X axis: one frame frequency" );
|
"X axis: one frame frequency" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static void uePbchFrequencyResp (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePbchFrequencyResp (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// Channel Frequency Response (includes 5 complex sample for filter)
|
// Channel Frequency Response (includes 5 complex sample for filter)
|
||||||
@@ -633,7 +624,6 @@ static void uePbchFrequencyResp (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue
|
|||||||
oai_xygraph(graph,freq,chest_f_abs,frame_parms->ofdm_symbol_size,0,10);
|
oai_xygraph(graph,freq,chest_f_abs,frame_parms->ofdm_symbol_size,0,10);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void uePbchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePbchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PBCH LLRs
|
// PBCH LLRs
|
||||||
if ( !phy_vars_ue->pbch_vars[eNB_id]->llr)
|
if ( !phy_vars_ue->pbch_vars[eNB_id]->llr)
|
||||||
@@ -649,7 +639,6 @@ static void uePbchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_
|
|||||||
|
|
||||||
oai_xygraph(graph,bit_pbch,llr_pbch,864,0,10);
|
oai_xygraph(graph,bit_pbch,llr_pbch,864,0,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePbchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePbchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PBCH I/Q of MF Output
|
// PBCH I/Q of MF Output
|
||||||
if (!phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0])
|
if (!phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0])
|
||||||
@@ -684,15 +673,14 @@ static void uePbchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_i
|
|||||||
AssertFatal(base <= 180*3,"");
|
AssertFatal(base <= 180*3,"");
|
||||||
oai_xygraph(graph,I,Q,base,0, 10);
|
oai_xygraph(graph,I,Q,base,0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePcchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePcchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PDCCH LLRs
|
// PDCCH LLRs
|
||||||
if (!phy_vars_ue->pdcch_vars[0][eNB_id]->llr)
|
if (!phy_vars_ue->pdcch_vars[0][eNB_id]->llr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int num_re = 4*273*12; // 12*frame_parms->N_RB_DL*num_pdcch_symbols
|
//int num_re = 4*273*12; // 12*frame_parms->N_RB_DL*num_pdcch_symbols
|
||||||
int Qm = 2;
|
//int Qm = 2;
|
||||||
int coded_bits_per_codeword = num_re*Qm;
|
int coded_bits_per_codeword = 2*4*100*12; //num_re*Qm;
|
||||||
float *llr, *bit;
|
float *llr, *bit;
|
||||||
oai_xygraph_getbuff(graph, &bit, &llr, coded_bits_per_codeword*RX_NB_TH_MAX, 0);
|
oai_xygraph_getbuff(graph, &bit, &llr, coded_bits_per_codeword*RX_NB_TH_MAX, 0);
|
||||||
int base=0;
|
int base=0;
|
||||||
@@ -710,7 +698,6 @@ static void uePcchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_
|
|||||||
AssertFatal(base <= coded_bits_per_codeword*RX_NB_TH_MAX, "");
|
AssertFatal(base <= coded_bits_per_codeword*RX_NB_TH_MAX, "");
|
||||||
oai_xygraph(graph,bit,llr,base,0,10);
|
oai_xygraph(graph,bit,llr,base,0,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePcchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePcchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PDCCH I/Q of MF Output
|
// PDCCH I/Q of MF Output
|
||||||
if (!phy_vars_ue->pdcch_vars[0][eNB_id]->rxdataF_comp[0])
|
if (!phy_vars_ue->pdcch_vars[0][eNB_id]->rxdataF_comp[0])
|
||||||
@@ -735,7 +722,6 @@ static void uePcchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_i
|
|||||||
AssertFatal(base <= nb*RX_NB_TH_MAX, "");
|
AssertFatal(base <= nb*RX_NB_TH_MAX, "");
|
||||||
oai_xygraph(graph,I,Q,base,0,10);
|
oai_xygraph(graph,I,Q,base,0,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePdschLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePdschLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PDSCH LLRs
|
// PDSCH LLRs
|
||||||
if (!phy_vars_ue->pdsch_vars[0][eNB_id]->llr[0])
|
if (!phy_vars_ue->pdsch_vars[0][eNB_id]->llr[0])
|
||||||
@@ -763,7 +749,6 @@ static void uePdschLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB
|
|||||||
//fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
|
//fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
|
||||||
oai_xygraph(graph,bit,llr,base,0,10);
|
oai_xygraph(graph,bit,llr,base,0,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePdschIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePdschIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
// PDSCH I/Q of MF Output
|
// PDSCH I/Q of MF Output
|
||||||
if (!phy_vars_ue->pdsch_vars[0][eNB_id]->rxdataF_comp0[0])
|
if (!phy_vars_ue->pdsch_vars[0][eNB_id]->rxdataF_comp0[0])
|
||||||
@@ -791,7 +776,6 @@ static void uePdschIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_
|
|||||||
AssertFatal(base <= sz*RX_NB_TH_MAX, "");
|
AssertFatal(base <= sz*RX_NB_TH_MAX, "");
|
||||||
oai_xygraph(graph,I,Q,sz*RX_NB_TH_MAX,0,10);
|
oai_xygraph(graph,I,Q,sz*RX_NB_TH_MAX,0,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uePdschThroughput (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
static void uePdschThroughput (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
|
||||||
/*
|
/*
|
||||||
float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
|
float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
|
||||||
@@ -815,7 +799,6 @@ static void uePdschThroughput (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
fl_set_xyplot_ybounds(form->pdsch_tput,0,tput_ue_max[UE_id]);
|
fl_set_xyplot_ybounds(form->pdsch_tput,0,tput_ue_max[UE_id]);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static OAI_phy_scope_t *create_phy_scope_nrue( int ID ) {
|
static OAI_phy_scope_t *create_phy_scope_nrue( int ID ) {
|
||||||
FL_OBJECT *obj;
|
FL_OBJECT *obj;
|
||||||
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
|
OAI_phy_scope_t *fdui = calloc(( sizeof *fdui ),1);
|
||||||
@@ -885,7 +868,6 @@ static OAI_phy_scope_t *create_phy_scope_nrue( int ID ) {
|
|||||||
fl_show_form (fdui->phy_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, buf);
|
fl_show_form (fdui->phy_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, buf);
|
||||||
return fdui;
|
return fdui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void phy_scope_nrUE(OAI_phy_scope_t *form,
|
void phy_scope_nrUE(OAI_phy_scope_t *form,
|
||||||
PHY_VARS_NR_UE *phy_vars_ue,
|
PHY_VARS_NR_UE *phy_vars_ue,
|
||||||
int eNB_id,
|
int eNB_id,
|
||||||
@@ -909,8 +891,6 @@ void phy_scope_nrUE(OAI_phy_scope_t *form,
|
|||||||
|
|
||||||
//fl_check_forms();
|
//fl_check_forms();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void *nrUEscopeThread(void *arg) {
|
static void *nrUEscopeThread(void *arg) {
|
||||||
PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg;
|
PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg;
|
||||||
size_t stksize;
|
size_t stksize;
|
||||||
@@ -934,13 +914,10 @@ static void *nrUEscopeThread(void *arg) {
|
|||||||
|
|
||||||
pthread_exit((void *)arg);
|
pthread_exit((void *)arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nrUEinitScope(PHY_VARS_NR_UE *ue) {
|
void nrUEinitScope(PHY_VARS_NR_UE *ue) {
|
||||||
pthread_t forms_thread;
|
pthread_t forms_thread;
|
||||||
threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW);
|
threadCreate(&forms_thread, nrUEscopeThread, ue, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nrscope_autoinit(void *dataptr) {
|
void nrscope_autoinit(void *dataptr) {
|
||||||
AssertFatal( (IS_SOFTMODEM_GNB_BIT||IS_SOFTMODEM_5GUE_BIT),"Scope cannot find NRUE or GNB context");
|
AssertFatal( (IS_SOFTMODEM_GNB_BIT||IS_SOFTMODEM_5GUE_BIT),"Scope cannot find NRUE or GNB context");
|
||||||
|
|
||||||
@@ -975,7 +952,6 @@ static void reset_stats_gNB(FL_OBJECT *button,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static FD_stats_form *create_form_stats_form(int ID) {
|
static FD_stats_form *create_form_stats_form(int ID) {
|
||||||
FL_OBJECT *obj;
|
FL_OBJECT *obj;
|
||||||
FD_stats_form *fdui = calloc(( sizeof *fdui ),1);
|
FD_stats_form *fdui = calloc(( sizeof *fdui ),1);
|
||||||
|
|||||||
@@ -26,9 +26,12 @@
|
|||||||
|
|
||||||
// global var for openair performance profiler
|
// global var for openair performance profiler
|
||||||
int opp_enabled = 0;
|
int opp_enabled = 0;
|
||||||
|
double cpu_freq_GHz __attribute__ ((aligned(32)));
|
||||||
|
|
||||||
|
double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0;
|
||||||
double get_cpu_freq_GHz(void)
|
double get_cpu_freq_GHz(void)
|
||||||
{
|
{
|
||||||
|
if (cpu_freq_GHz <1 ) {
|
||||||
time_stats_t ts = {0};
|
time_stats_t ts = {0};
|
||||||
reset_meas(&ts);
|
reset_meas(&ts);
|
||||||
ts.trials++;
|
ts.trials++;
|
||||||
@@ -37,6 +40,7 @@ double get_cpu_freq_GHz(void)
|
|||||||
ts.diff = (rdtsc_oai()-ts.in);
|
ts.diff = (rdtsc_oai()-ts.in);
|
||||||
cpu_freq_GHz = (double)ts.diff/1000000000;
|
cpu_freq_GHz = (double)ts.diff/1000000000;
|
||||||
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
||||||
|
}
|
||||||
return cpu_freq_GHz;
|
return cpu_freq_GHz;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,10 +103,11 @@ void print_meas(time_stats_t *ts,
|
|||||||
if (ts->trials>0) {
|
if (ts->trials>0) {
|
||||||
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
|
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
|
||||||
if ((total_exec_time == NULL) || (sf_exec_time== NULL)) {
|
if ((total_exec_time == NULL) || (sf_exec_time== NULL)) {
|
||||||
fprintf(stderr, "%25s: %15.3f us; %15d;\n",
|
fprintf(stderr, "%25s: %15.3f us; %15d; %15.3f us;\n",
|
||||||
name,
|
name,
|
||||||
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
|
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
|
||||||
ts->trials);
|
ts->trials,
|
||||||
|
ts->max/cpu_freq_GHz/1000.0);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n",
|
fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n",
|
||||||
name,
|
name,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
// global var to enable openair performance profiler
|
// global var to enable openair performance profiler
|
||||||
extern int opp_enabled;
|
extern int opp_enabled;
|
||||||
double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ struct complex {
|
|||||||
double y;
|
double y;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct complexd {
|
||||||
|
double r;
|
||||||
|
double i;
|
||||||
|
};
|
||||||
|
|
||||||
struct complexf {
|
struct complexf {
|
||||||
float r;
|
float r;
|
||||||
float i;
|
float i;
|
||||||
|
|||||||
@@ -858,6 +858,7 @@ typedef struct PHY_VARS_gNB_s {
|
|||||||
time_stats_t dlsch_segmentation_stats;
|
time_stats_t dlsch_segmentation_stats;
|
||||||
|
|
||||||
time_stats_t rx_pusch_stats;
|
time_stats_t rx_pusch_stats;
|
||||||
|
time_stats_t ul_indication_stats;
|
||||||
time_stats_t ulsch_decoding_stats;
|
time_stats_t ulsch_decoding_stats;
|
||||||
time_stats_t ulsch_rate_unmatching_stats;
|
time_stats_t ulsch_rate_unmatching_stats;
|
||||||
time_stats_t ulsch_ldpc_decoding_stats;
|
time_stats_t ulsch_ldpc_decoding_stats;
|
||||||
|
|||||||
@@ -214,10 +214,8 @@ typedef enum {
|
|||||||
|
|
||||||
#define NB_SRS_PERIOD (17)
|
#define NB_SRS_PERIOD (17)
|
||||||
|
|
||||||
const uint16_t srs_period[NB_SRS_PERIOD]
|
static const uint16_t srs_period[NB_SRS_PERIOD]
|
||||||
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
|
|
||||||
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
|
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
|
||||||
#endif
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/// SRS_Resource of SRS_Config information element from 38.331 RRC specifications
|
/// SRS_Resource of SRS_Config information element from 38.331 RRC specifications
|
||||||
@@ -796,7 +794,6 @@ typedef struct {
|
|||||||
uint8_t initial_CS_indexes[MAX_NB_CYCLIC_SHIFT];
|
uint8_t initial_CS_indexes[MAX_NB_CYCLIC_SHIFT];
|
||||||
} initial_pucch_resource_t;
|
} initial_pucch_resource_t;
|
||||||
|
|
||||||
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]; /* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
|
|
||||||
|
|
||||||
/* structure with all possible fields for pucch format from 0 to 4 */
|
/* structure with all possible fields for pucch format from 0 to 4 */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -1051,11 +1048,6 @@ typedef struct {
|
|||||||
|
|
||||||
#define NB_SR_PERIOD (15)
|
#define NB_SR_PERIOD (15)
|
||||||
|
|
||||||
const uint16_t scheduling_request_periodicity[NB_SR_PERIOD]
|
|
||||||
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
|
|
||||||
= { 0, 0, 1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
sr_sym2 = 0,
|
sr_sym2 = 0,
|
||||||
|
|||||||
@@ -48,12 +48,6 @@ extern short primary_synch2[144];
|
|||||||
extern unsigned char primary_synch0_tab[72];
|
extern unsigned char primary_synch0_tab[72];
|
||||||
extern unsigned char primary_synch1_tab[72];
|
extern unsigned char primary_synch1_tab[72];
|
||||||
extern unsigned char primary_synch2_tab[72];
|
extern unsigned char primary_synch2_tab[72];
|
||||||
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int *sync_corr_ue0; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue1; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue2; //!< index [0..10*samples_per_tti[
|
|
||||||
|
|
||||||
extern int flagMag;
|
extern int flagMag;
|
||||||
//extern short **txdataF_rep_tmp;
|
//extern short **txdataF_rep_tmp;
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ extern unsigned char primary_synch2_tab[72];
|
|||||||
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
|
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
|
||||||
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
|
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
|
||||||
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
|
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
|
||||||
extern int *sync_corr_ue0; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue1; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue2; //!< index [0..10*samples_per_tti[
|
|
||||||
|
|
||||||
extern int flagMag;
|
extern int flagMag;
|
||||||
//extern short **txdataF_rep_tmp;
|
//extern short **txdataF_rep_tmp;
|
||||||
|
|||||||
@@ -47,12 +47,6 @@ extern short primary_synch2[144];
|
|||||||
extern unsigned char primary_synch0_tab[72];
|
extern unsigned char primary_synch0_tab[72];
|
||||||
extern unsigned char primary_synch1_tab[72];
|
extern unsigned char primary_synch1_tab[72];
|
||||||
extern unsigned char primary_synch2_tab[72];
|
extern unsigned char primary_synch2_tab[72];
|
||||||
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
|
|
||||||
extern int *sync_corr_ue0; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue1; //!< index [0..10*samples_per_tti[
|
|
||||||
extern int *sync_corr_ue2; //!< index [0..10*samples_per_tti[
|
|
||||||
|
|
||||||
extern int flagMag;
|
extern int flagMag;
|
||||||
//extern short **txdataF_rep_tmp;
|
//extern short **txdataF_rep_tmp;
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ char* namepointer_log2;
|
|||||||
|
|
||||||
|
|
||||||
#include "PHY/LTE_REFSIG/primary_synch.h"
|
#include "PHY/LTE_REFSIG/primary_synch.h"
|
||||||
int16_t *primary_synch0_time;
|
|
||||||
int16_t *primary_synch1_time;
|
|
||||||
int16_t *primary_synch2_time;
|
|
||||||
|
|
||||||
|
|
||||||
#include "PHY/LTE_TRANSPORT/transport_vars.h"
|
#include "PHY/LTE_TRANSPORT/transport_vars.h"
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ char *namepointer_log2;
|
|||||||
|
|
||||||
|
|
||||||
#include "PHY/LTE_REFSIG/primary_synch.h"
|
#include "PHY/LTE_REFSIG/primary_synch.h"
|
||||||
int16_t *primary_synch0_time;
|
|
||||||
int16_t *primary_synch1_time;
|
|
||||||
int16_t *primary_synch2_time;
|
|
||||||
|
|
||||||
PHY_VARS_UE ***PHY_vars_UE_g;
|
PHY_VARS_UE ***PHY_vars_UE_g;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include <common/utils/system.h>
|
#include <common/utils/system.h>
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
|
#include <nfapi/oai_integration/nfapi_pnf.h>
|
||||||
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
@@ -51,7 +52,6 @@
|
|||||||
|
|
||||||
#define MBMS_NFAPI_SCHEDULER
|
#define MBMS_NFAPI_SCHEDULER
|
||||||
|
|
||||||
nfapi_ue_release_request_body_t release_rntis;
|
|
||||||
|
|
||||||
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) {
|
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) {
|
||||||
uint32_t Nre,sumKr,MPR_x100,Kr,r;
|
uint32_t Nre,sumKr,MPR_x100,Kr,r;
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
|||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (do_meas==1) stop_meas(&gNB->phy_proc_tx);
|
||||||
|
|
||||||
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||||
|
|
||||||
//apply the OFDM symbol rotation here
|
//apply the OFDM symbol rotation here
|
||||||
@@ -548,6 +550,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
|||||||
int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset+(47*12)],12*18);
|
int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset+(47*12)],12*18);
|
||||||
LOG_D(PHY,"frame %d, slot %d: UL signal energy %d\n",frame_rx,slot_rx,power_rxF);
|
LOG_D(PHY,"frame %d, slot %d: UL signal energy %d\n",frame_rx,slot_rx,power_rxF);
|
||||||
|
|
||||||
|
start_meas(&gNB->phy_proc_rx);
|
||||||
|
|
||||||
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
|
||||||
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
|
||||||
if (pucch) {
|
if (pucch) {
|
||||||
@@ -653,10 +657,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
|||||||
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
|
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
|
||||||
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
|
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1);
|
||||||
start_meas(&gNB->rx_pusch_stats);
|
start_meas(&gNB->rx_pusch_stats);
|
||||||
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
|
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
|
||||||
nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid);
|
nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid);
|
||||||
}
|
}
|
||||||
int ulsch_power=0,ulsch_noise_power=0;
|
int ulsch_power=0,ulsch_noise_power=0;
|
||||||
for (int aarx=0;aarx<gNB->frame_parms.nb_antennas_rx;aarx++) {
|
for (int aarx=0;aarx<gNB->frame_parms.nb_antennas_rx;aarx++) {
|
||||||
gNB->pusch_vars[ULSCH_id]->ulsch_power[aarx]/=num_dmrs;
|
gNB->pusch_vars[ULSCH_id]->ulsch_power[aarx]/=num_dmrs;
|
||||||
@@ -675,7 +679,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
|||||||
return;
|
return;
|
||||||
} else gNB->pusch_vars[ULSCH_id]->DTX=0;
|
} else gNB->pusch_vars[ULSCH_id]->DTX=0;
|
||||||
|
|
||||||
stop_meas(&gNB->rx_pusch_stats);
|
stop_meas(&gNB->rx_pusch_stats);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
|
||||||
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
|
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
|
||||||
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
|
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
|
||||||
@@ -687,6 +691,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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
|
// figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS
|
||||||
if (pucch_decode_done || pusch_decode_done) {
|
if (pucch_decode_done || pusch_decode_done) {
|
||||||
T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size * 4));
|
T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size * 4));
|
||||||
|
|||||||
@@ -1135,7 +1135,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
|||||||
LOG_D(PHY, "harq_pid: %d, TBS expected dlsch1: %d \n", harq_pid, dlsch1->harq_processes[harq_pid]->TBS);
|
LOG_D(PHY, "harq_pid: %d, TBS expected dlsch1: %d \n", harq_pid, dlsch1->harq_processes[harq_pid]->TBS);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY," ------ end ldpc decoder for AbsSubframe %d.%d ------ \n", frame_rx, nr_slot_rx);
|
LOG_D(PHY," ------ end ldpc decoder for AbsSubframe %d.%d ------ decoded in %d \n", frame_rx, nr_slot_rx, ret);
|
||||||
LOG_D(PHY, "harq_pid: %d, TBS expected dlsch0: %d \n",harq_pid, dlsch0->harq_processes[harq_pid]->TBS);
|
LOG_D(PHY, "harq_pid: %d, TBS expected dlsch0: %d \n",harq_pid, dlsch0->harq_processes[harq_pid]->TBS);
|
||||||
|
|
||||||
if(ret<dlsch0->max_ldpc_iterations+1){
|
if(ret<dlsch0->max_ldpc_iterations+1){
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include <openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h>
|
#include <openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h>
|
||||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||||
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||||
|
#include <openair1/PHY/impl_defs_nr.h>
|
||||||
|
|
||||||
#ifndef NO_RAT_NR
|
#ifndef NO_RAT_NR
|
||||||
|
|
||||||
@@ -54,10 +55,172 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* TS 36.213 Table 9.2.3-3: Mapping of values for one HARQ-ACK bit to sequences */
|
||||||
|
static const int sequence_cyclic_shift_1_harq_ack_bit[2]
|
||||||
|
/* HARQ-ACK Value 0 1 */
|
||||||
|
/* Sequence cyclic shift */ = { 0, 6 }
|
||||||
|
;
|
||||||
|
|
||||||
|
/* TS 36.213 Table 9.2.5-2: Mapping of values for two HARQ-ACK bits and positive SR to sequences */
|
||||||
|
static const int sequence_cyclic_shift_2_harq_ack_bits_positive_sr[4]
|
||||||
|
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
|
||||||
|
/* Sequence cyclic shift */ = { 1, 4, 10, 7 }
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
uint8_t nr_is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
uint8_t nr_is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
||||||
uint8_t nr_is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
uint8_t nr_is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
||||||
|
|
||||||
|
static const uint16_t scheduling_request_periodicity[NB_SR_PERIOD]
|
||||||
|
= { 0, 0, 1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640 }
|
||||||
|
;
|
||||||
|
|
||||||
|
/* TS 38.213 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR and CSI in a PUCCH */
|
||||||
|
/* this is a counter of number of pucch format 4 per subframe */
|
||||||
|
static int nb_pucch_format_4_in_subframes[LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] = { 0 } ;
|
||||||
|
|
||||||
|
/* TS 36.213 Table 9.2.5.2-1: Code rate corresponding to higher layer parameter PUCCH-F2-maximum-coderate, */
|
||||||
|
/* or PUCCH-F3-maximum-coderate, or PUCCH-F4-maximum-coderate */
|
||||||
|
/* add one additional element set to 0 for parsing the array until this end */
|
||||||
|
/* stored values are code rates * 100 */
|
||||||
|
//static const int code_rate_r_time_100[8] = { (0.08 * 100), (0.15 * 100), (0.25*100), (0.35*100), (0.45*100), (0.60*100), (0.80*100), 0 } ;
|
||||||
|
|
||||||
|
/* TS 38.213 Table 9.2.3-4: Mapping of values for two HARQ-ACK bits to sequences */
|
||||||
|
static const int sequence_cyclic_shift_2_harq_ack_bits[4]
|
||||||
|
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
|
||||||
|
/* Sequence cyclic shift */ = { 0, 3, 9, 6 }
|
||||||
|
;
|
||||||
|
|
||||||
|
/* TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4 */
|
||||||
|
static const int nb_symbols_excluding_dmrs[NB_SYMBOL_MINUS_FOUR][2][2]
|
||||||
|
= {
|
||||||
|
/* No additional DMRS Additional DMRS */
|
||||||
|
/* PUCCH length No hopping hopping No hopping hopping */
|
||||||
|
/* index 0 1 0 1 */
|
||||||
|
/* 4 */ {{ 3 , 2 } , { 3 , 2 }},
|
||||||
|
/* 5 */ {{ 3 , 3 } , { 3 , 3 }},
|
||||||
|
/* 6 */ {{ 4 , 4 } , { 4 , 4 }},
|
||||||
|
/* 7 */ {{ 5 , 5 } , { 5 , 5 }},
|
||||||
|
/* 8 */ {{ 6 , 6 } , { 6 , 6 }},
|
||||||
|
/* 9 */ {{ 7 , 7 } , { 7 , 7 }},
|
||||||
|
/* 10 */ {{ 8 , 8 } , { 6 , 6 }},
|
||||||
|
/* 11 */ {{ 9 , 9 } , { 7 , 7 }},
|
||||||
|
/* 12 */ {{ 10 , 10 } , { 8 , 8 }},
|
||||||
|
/* 13 */ {{ 11 , 11 } , { 9 , 9 }},
|
||||||
|
/* 14 */ {{ 12 , 12 } , { 10 , 10 }},
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/* TS 36.213 Table 9.2.5-1: Mapping of values for one HARQ-ACK bit and positive SR to sequences */
|
||||||
|
static const int sequence_cyclic_shift_1_harq_ack_bit_positive_sr[2]
|
||||||
|
/* HARQ-ACK Value 0 1 */
|
||||||
|
/* Sequence cyclic shift */ = { 3, 9 }
|
||||||
|
;
|
||||||
|
|
||||||
|
static float RSRP_meas_mapping_nr[98]
|
||||||
|
= {
|
||||||
|
-140,
|
||||||
|
-139,
|
||||||
|
-138,
|
||||||
|
-137,
|
||||||
|
-136,
|
||||||
|
-135,
|
||||||
|
-134,
|
||||||
|
-133,
|
||||||
|
-132,
|
||||||
|
-131,
|
||||||
|
-130,
|
||||||
|
-129,
|
||||||
|
-128,
|
||||||
|
-127,
|
||||||
|
-126,
|
||||||
|
-125,
|
||||||
|
-124,
|
||||||
|
-123,
|
||||||
|
-122,
|
||||||
|
-121,
|
||||||
|
-120,
|
||||||
|
-119,
|
||||||
|
-118,
|
||||||
|
-117,
|
||||||
|
-116,
|
||||||
|
-115,
|
||||||
|
-114,
|
||||||
|
-113,
|
||||||
|
-112,
|
||||||
|
-111,
|
||||||
|
-110,
|
||||||
|
-109,
|
||||||
|
-108,
|
||||||
|
-107,
|
||||||
|
-106,
|
||||||
|
-105,
|
||||||
|
-104,
|
||||||
|
-103,
|
||||||
|
-102,
|
||||||
|
-101,
|
||||||
|
-100,
|
||||||
|
-99,
|
||||||
|
-98,
|
||||||
|
-97,
|
||||||
|
-96,
|
||||||
|
-95,
|
||||||
|
-94,
|
||||||
|
-93,
|
||||||
|
-92,
|
||||||
|
-91,
|
||||||
|
-90,
|
||||||
|
-89,
|
||||||
|
-88,
|
||||||
|
-87,
|
||||||
|
-86,
|
||||||
|
-85,
|
||||||
|
-84,
|
||||||
|
-83,
|
||||||
|
-82,
|
||||||
|
-81,
|
||||||
|
-80,
|
||||||
|
-79,
|
||||||
|
-78,
|
||||||
|
-77,
|
||||||
|
-76,
|
||||||
|
-75,
|
||||||
|
-74,
|
||||||
|
-73,
|
||||||
|
-72,
|
||||||
|
-71,
|
||||||
|
-70,
|
||||||
|
-69,
|
||||||
|
-68,
|
||||||
|
-67,
|
||||||
|
-66,
|
||||||
|
-65,
|
||||||
|
-64,
|
||||||
|
-63,
|
||||||
|
-62,
|
||||||
|
-61,
|
||||||
|
-60,
|
||||||
|
-59,
|
||||||
|
-58,
|
||||||
|
-57,
|
||||||
|
-56,
|
||||||
|
-55,
|
||||||
|
-54,
|
||||||
|
-53,
|
||||||
|
-52,
|
||||||
|
-51,
|
||||||
|
-50,
|
||||||
|
-49,
|
||||||
|
-48,
|
||||||
|
-47,
|
||||||
|
-46,
|
||||||
|
-45,
|
||||||
|
-44,
|
||||||
|
-43
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
long
|
long
|
||||||
binary_search_float_nr(
|
binary_search_float_nr(
|
||||||
float elements[],
|
float elements[],
|
||||||
@@ -202,6 +365,30 @@ void nr_generate_pucch3_4(int32_t **txdataF,
|
|||||||
*
|
*
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
|
/* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
|
||||||
|
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]
|
||||||
|
=
|
||||||
|
{
|
||||||
|
/* format first symbol Number of symbols PRB offset nb index for set of initial CS */
|
||||||
|
/* 0 */ { pucch_format0_nr, 12, 2, 0, 2, { 0, 3, 0, 0 } },
|
||||||
|
/* 1 */ { pucch_format0_nr, 12, 2, 0, 3, { 0, 4, 8, 0 } },
|
||||||
|
/* 2 */ { pucch_format0_nr, 12, 2, 3, 3, { 0, 4, 8, 0 } },
|
||||||
|
/* 3 */ { pucch_format1_nr, 10, 4, 0, 2, { 0, 6, 0, 0 } },
|
||||||
|
/* 4 */ { pucch_format1_nr, 10, 4, 0, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 5 */ { pucch_format1_nr, 10, 4, 2, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 6 */ { pucch_format1_nr, 10, 4, 4, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 7 */ { pucch_format1_nr, 4, 10, 0, 2, { 0, 6, 0, 0 } },
|
||||||
|
/* 8 */ { pucch_format1_nr, 4, 10, 0, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 9 */ { pucch_format1_nr, 4, 10, 2, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 10 */ { pucch_format1_nr, 4, 10, 4, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 11 */ { pucch_format1_nr, 0, 14, 0, 2, { 0, 6, 0, 0 } },
|
||||||
|
/* 12 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 13 */ { pucch_format1_nr, 0, 14, 2, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 14 */ { pucch_format1_nr, 0, 14, 4, 4, { 0, 3, 6, 9 } },
|
||||||
|
/* 15 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc, bool reset_harq)
|
bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc, bool reset_harq)
|
||||||
{
|
{
|
||||||
uint8_t sr_payload = 0;
|
uint8_t sr_payload = 0;
|
||||||
@@ -863,7 +1050,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t
|
|||||||
LOG_E(PHY,"PUCCH Downlink DAI has an invalid value : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
LOG_E(PHY,"PUCCH Downlink DAI has an invalid value : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||||
}
|
}
|
||||||
else if (harq_status->send_harq_status == 0) {
|
else if (harq_status->send_harq_status == 0) {
|
||||||
LOG_D(PHY,"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
LOG_E(PHY,"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|||||||
@@ -60,214 +60,12 @@
|
|||||||
|
|
||||||
/************** VARIABLES *****************************************/
|
/************** VARIABLES *****************************************/
|
||||||
|
|
||||||
float RSRP_meas_mapping_nr[98]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
= {
|
|
||||||
-140,
|
|
||||||
-139,
|
|
||||||
-138,
|
|
||||||
-137,
|
|
||||||
-136,
|
|
||||||
-135,
|
|
||||||
-134,
|
|
||||||
-133,
|
|
||||||
-132,
|
|
||||||
-131,
|
|
||||||
-130,
|
|
||||||
-129,
|
|
||||||
-128,
|
|
||||||
-127,
|
|
||||||
-126,
|
|
||||||
-125,
|
|
||||||
-124,
|
|
||||||
-123,
|
|
||||||
-122,
|
|
||||||
-121,
|
|
||||||
-120,
|
|
||||||
-119,
|
|
||||||
-118,
|
|
||||||
-117,
|
|
||||||
-116,
|
|
||||||
-115,
|
|
||||||
-114,
|
|
||||||
-113,
|
|
||||||
-112,
|
|
||||||
-111,
|
|
||||||
-110,
|
|
||||||
-109,
|
|
||||||
-108,
|
|
||||||
-107,
|
|
||||||
-106,
|
|
||||||
-105,
|
|
||||||
-104,
|
|
||||||
-103,
|
|
||||||
-102,
|
|
||||||
-101,
|
|
||||||
-100,
|
|
||||||
-99,
|
|
||||||
-98,
|
|
||||||
-97,
|
|
||||||
-96,
|
|
||||||
-95,
|
|
||||||
-94,
|
|
||||||
-93,
|
|
||||||
-92,
|
|
||||||
-91,
|
|
||||||
-90,
|
|
||||||
-89,
|
|
||||||
-88,
|
|
||||||
-87,
|
|
||||||
-86,
|
|
||||||
-85,
|
|
||||||
-84,
|
|
||||||
-83,
|
|
||||||
-82,
|
|
||||||
-81,
|
|
||||||
-80,
|
|
||||||
-79,
|
|
||||||
-78,
|
|
||||||
-77,
|
|
||||||
-76,
|
|
||||||
-75,
|
|
||||||
-74,
|
|
||||||
-73,
|
|
||||||
-72,
|
|
||||||
-71,
|
|
||||||
-70,
|
|
||||||
-69,
|
|
||||||
-68,
|
|
||||||
-67,
|
|
||||||
-66,
|
|
||||||
-65,
|
|
||||||
-64,
|
|
||||||
-63,
|
|
||||||
-62,
|
|
||||||
-61,
|
|
||||||
-60,
|
|
||||||
-59,
|
|
||||||
-58,
|
|
||||||
-57,
|
|
||||||
-56,
|
|
||||||
-55,
|
|
||||||
-54,
|
|
||||||
-53,
|
|
||||||
-52,
|
|
||||||
-51,
|
|
||||||
-50,
|
|
||||||
-49,
|
|
||||||
-48,
|
|
||||||
-47,
|
|
||||||
-46,
|
|
||||||
-45,
|
|
||||||
-44,
|
|
||||||
-43
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
|
|
||||||
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
=
|
|
||||||
{
|
|
||||||
/* format first symbol Number of symbols PRB offset nb index for set of initial CS */
|
|
||||||
/* 0 */ { pucch_format0_nr, 12, 2, 0, 2, { 0, 3, 0, 0 } },
|
|
||||||
/* 1 */ { pucch_format0_nr, 12, 2, 0, 3, { 0, 4, 8, 0 } },
|
|
||||||
/* 2 */ { pucch_format0_nr, 12, 2, 3, 3, { 0, 4, 8, 0 } },
|
|
||||||
/* 3 */ { pucch_format1_nr, 10, 4, 0, 2, { 0, 6, 0, 0 } },
|
|
||||||
/* 4 */ { pucch_format1_nr, 10, 4, 0, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 5 */ { pucch_format1_nr, 10, 4, 2, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 6 */ { pucch_format1_nr, 10, 4, 4, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 7 */ { pucch_format1_nr, 4, 10, 0, 2, { 0, 6, 0, 0 } },
|
|
||||||
/* 8 */ { pucch_format1_nr, 4, 10, 0, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 9 */ { pucch_format1_nr, 4, 10, 2, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 10 */ { pucch_format1_nr, 4, 10, 4, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 11 */ { pucch_format1_nr, 0, 14, 0, 2, { 0, 6, 0, 0 } },
|
|
||||||
/* 12 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 13 */ { pucch_format1_nr, 0, 14, 2, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 14 */ { pucch_format1_nr, 0, 14, 4, 4, { 0, 3, 6, 9 } },
|
|
||||||
/* 15 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 36.213 Table 9.2.3-3: Mapping of values for one HARQ-ACK bit to sequences */
|
|
||||||
const int sequence_cyclic_shift_1_harq_ack_bit[2]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
/* HARQ-ACK Value 0 1 */
|
|
||||||
/* Sequence cyclic shift */ = { 0, 6 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 38.213 Table 9.2.3-4: Mapping of values for two HARQ-ACK bits to sequences */
|
|
||||||
const int sequence_cyclic_shift_2_harq_ack_bits[4]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
|
|
||||||
/* Sequence cyclic shift */ = { 0, 3, 9, 6 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 36.213 Table 9.2.5-1: Mapping of values for one HARQ-ACK bit and positive SR to sequences */
|
|
||||||
const int sequence_cyclic_shift_1_harq_ack_bit_positive_sr[2]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
/* HARQ-ACK Value 0 1 */
|
|
||||||
/* Sequence cyclic shift */ = { 3, 9 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 36.213 Table 9.2.5-2: Mapping of values for two HARQ-ACK bits and positive SR to sequences */
|
|
||||||
const int sequence_cyclic_shift_2_harq_ack_bits_positive_sr[4]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
|
|
||||||
/* Sequence cyclic shift */ = { 1, 4, 10, 7 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 36.213 Table 9.2.5.2-1: Code rate corresponding to higher layer parameter PUCCH-F2-maximum-coderate, */
|
|
||||||
/* or PUCCH-F3-maximum-coderate, or PUCCH-F4-maximum-coderate */
|
|
||||||
/* add one additional element set to 0 for parsing the array until this end */
|
|
||||||
/* stored values are code rates * 100 */
|
|
||||||
const int code_rate_r_time_100[8]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
= { (0.08 * 100), (0.15 * 100), (0.25*100), (0.35*100), (0.45*100), (0.60*100), (0.80*100), 0 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
#define NB_SYMBOL_MINUS_FOUR (11)
|
#define NB_SYMBOL_MINUS_FOUR (11)
|
||||||
#define I_PUCCH_NO_ADDITIONAL_DMRS (0)
|
#define I_PUCCH_NO_ADDITIONAL_DMRS (0)
|
||||||
#define I_PUCCH_ADDITIONAL_DMRS (1)
|
#define I_PUCCH_ADDITIONAL_DMRS (1)
|
||||||
#define I_PUCCH_NO_HOPPING (0)
|
#define I_PUCCH_NO_HOPPING (0)
|
||||||
#define I_PUCCH_HOPING (1)
|
#define I_PUCCH_HOPING (1)
|
||||||
|
|
||||||
/* TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4 */
|
|
||||||
const int nb_symbols_excluding_dmrs[NB_SYMBOL_MINUS_FOUR][2][2]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
= {
|
|
||||||
/* No additional DMRS Additional DMRS */
|
|
||||||
/* PUCCH length No hopping hopping No hopping hopping */
|
|
||||||
/* index 0 1 0 1 */
|
|
||||||
/* 4 */ {{ 3 , 2 } , { 3 , 2 }},
|
|
||||||
/* 5 */ {{ 3 , 3 } , { 3 , 3 }},
|
|
||||||
/* 6 */ {{ 4 , 4 } , { 4 , 4 }},
|
|
||||||
/* 7 */ {{ 5 , 5 } , { 5 , 5 }},
|
|
||||||
/* 8 */ {{ 6 , 6 } , { 6 , 6 }},
|
|
||||||
/* 9 */ {{ 7 , 7 } , { 7 , 7 }},
|
|
||||||
/* 10 */ {{ 8 , 8 } , { 6 , 6 }},
|
|
||||||
/* 11 */ {{ 9 , 9 } , { 7 , 7 }},
|
|
||||||
/* 12 */ {{ 10 , 10 } , { 8 , 8 }},
|
|
||||||
/* 13 */ {{ 11 , 11 } , { 9 , 9 }},
|
|
||||||
/* 14 */ {{ 12 , 12 } , { 10 , 10 }},
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/* TS 38.213 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR and CSI in a PUCCH */
|
|
||||||
/* this is a counter of number of pucch format 4 per subframe */
|
|
||||||
int nb_pucch_format_4_in_subframes[LTE_NUMBER_OF_SUBFRAMES_PER_FRAME]
|
|
||||||
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
|
|
||||||
= { 0 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/*************** FUNCTIONS ****************************************/
|
/*************** FUNCTIONS ****************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastAc
|
|||||||
}
|
}
|
||||||
|
|
||||||
double squareRoot(time_stats_t *ptr) {
|
double squareRoot(time_stats_t *ptr) {
|
||||||
double timeBase=1/(1000*cpu_freq_GHz);
|
double timeBase=1/(1000*get_cpu_freq_GHz());
|
||||||
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
|
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
|
||||||
pow((double)ptr->diff/ptr->trials*timeBase,2));
|
pow((double)ptr->diff/ptr->trials*timeBase,2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
|
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
|
||||||
double timeBase=1/(1000*cpu_freq_GHz);
|
double timeBase=1/(1000*get_cpu_freq_GHz());
|
||||||
printf("%-43s %6.2f us (%d trials)\n",
|
printf("%-43s %6.2f us (%d trials)\n",
|
||||||
txt,
|
txt,
|
||||||
(double)ptr->diff/ptr->trials*timeBase,
|
(double)ptr->diff/ptr->trials*timeBase,
|
||||||
@@ -69,7 +69,7 @@ void printStatIndent(time_stats_t *ptr, char *txt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void printStatIndent2(time_stats_t *ptr, char *txt) {
|
void printStatIndent2(time_stats_t *ptr, char *txt) {
|
||||||
double timeBase=1/(1000*cpu_freq_GHz);
|
double timeBase=1/(1000*get_cpu_freq_GHz());
|
||||||
printf(" |__ %-34s %6.2f us (%3d trials)\n",
|
printf(" |__ %-34s %6.2f us (%3d trials)\n",
|
||||||
txt,
|
txt,
|
||||||
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
|
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
|
||||||
@@ -77,7 +77,7 @@ void printStatIndent2(time_stats_t *ptr, char *txt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void printStatIndent3(time_stats_t *ptr, char *txt) {
|
void printStatIndent3(time_stats_t *ptr, char *txt) {
|
||||||
double timeBase=1/(1000*cpu_freq_GHz);
|
double timeBase=1/(1000*get_cpu_freq_GHz());
|
||||||
printf(" |__ %-30s %6.2f us (%3d trials)\n",
|
printf(" |__ %-30s %6.2f us (%3d trials)\n",
|
||||||
txt,
|
txt,
|
||||||
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
|
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
|
||||||
|
|||||||
@@ -65,11 +65,14 @@ void feptx_ofdm(RU_t *ru, int frame, int subframe);
|
|||||||
void feptx_prec(RU_t *ru, int frame, int subframe);
|
void feptx_prec(RU_t *ru, int frame, int subframe);
|
||||||
|
|
||||||
double cpuf;
|
double cpuf;
|
||||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
|
||||||
//#define MCS_COUNT 23//added for PHY abstraction
|
//#define MCS_COUNT 23//added for PHY abstraction
|
||||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||||
|
|
||||||
int otg_enabled=0;
|
int otg_enabled=0;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
nfapi_ue_release_request_body_t release_rntis;
|
||||||
|
|
||||||
/*the following parameters are used to control the processing times calculations*/
|
/*the following parameters are used to control the processing times calculations*/
|
||||||
double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */
|
double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */
|
||||||
double t_rx_max = -1000000000; /*!< \brief initial max process time for rx */
|
double t_rx_max = -1000000000; /*!< \brief initial max process time for rx */
|
||||||
@@ -1179,7 +1182,7 @@ int main(int argc, char **argv) {
|
|||||||
DS_TDL,
|
DS_TDL,
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
reset_meas(&eNB2UE[0]->random_channel);
|
reset_meas(&eNB2UE[0]->random_channel);
|
||||||
reset_meas(&eNB2UE[0]->interp_time);
|
reset_meas(&eNB2UE[0]->interp_time);
|
||||||
|
|
||||||
@@ -1193,7 +1196,7 @@ int main(int argc, char **argv) {
|
|||||||
DS_TDL,
|
DS_TDL,
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
reset_meas(&eNB2UE[n]->random_channel);
|
reset_meas(&eNB2UE[n]->random_channel);
|
||||||
reset_meas(&eNB2UE[n]->interp_time);
|
reset_meas(&eNB2UE[n]->interp_time);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -988,7 +988,7 @@ int main(int argc, char **argv)
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if(num_rounds>1) {
|
if(num_rounds>1) {
|
||||||
for(n=1; n<8; n++)
|
for(n=1; n<8; n++)
|
||||||
@@ -999,7 +999,7 @@ int main(int argc, char **argv)
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eNB2UE[0]==NULL) {
|
if (eNB2UE[0]==NULL) {
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if(num_rounds>1) {
|
if(num_rounds>1) {
|
||||||
for(n=1; n<4; n++)
|
for(n=1; n<4; n++)
|
||||||
@@ -845,7 +845,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eNB2UE[0]==NULL) {
|
if (eNB2UE[0]==NULL) {
|
||||||
|
|||||||
@@ -1290,7 +1290,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
reset_meas(&eNB2UE[0]->random_channel);
|
reset_meas(&eNB2UE[0]->random_channel);
|
||||||
reset_meas(&eNB2UE[0]->interp_time);
|
reset_meas(&eNB2UE[0]->interp_time);
|
||||||
|
|
||||||
@@ -1303,7 +1303,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
rx_sample_offset,
|
rx_sample_offset,
|
||||||
0);
|
0, 0);
|
||||||
reset_meas(&eNB2UE[n]->random_channel);
|
reset_meas(&eNB2UE[n]->random_channel);
|
||||||
reset_meas(&eNB2UE[n]->interp_time);
|
reset_meas(&eNB2UE[n]->interp_time);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (interf1>-20)
|
if (interf1>-20)
|
||||||
eNB2UE1 = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
|
eNB2UE1 = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
|
||||||
@@ -396,7 +396,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
0,
|
0,
|
||||||
4,
|
4,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (interf2>-20)
|
if (interf2>-20)
|
||||||
eNB2UE2 = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
|
eNB2UE2 = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
|
||||||
@@ -406,7 +406,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
0,
|
0,
|
||||||
8,
|
8,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (eNB2UE==NULL) {
|
if (eNB2UE==NULL) {
|
||||||
msg("Problem generating channel model. Exiting.\n");
|
msg("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_DL),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
L1_rxtx_proc_t *proc_rxtx = (subframe == 0)? &eNB->proc.L1_proc: &eNB->proc.L1_proc_tx;
|
L1_rxtx_proc_t *proc_rxtx = (subframe == 0)? &eNB->proc.L1_proc: &eNB->proc.L1_proc_tx;
|
||||||
eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,N_RB_DL,0);
|
eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,N_RB_DL,0);
|
||||||
UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0);
|
UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0);
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL),
|
||||||
0.0,
|
0.0,
|
||||||
delay,
|
delay,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (UE2eNB==NULL) {
|
if (UE2eNB==NULL) {
|
||||||
msg("Problem generating channel model. Exiting.\n");
|
msg("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL),
|
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL),
|
||||||
0.0,
|
0.0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (UE2eNB==NULL) {
|
if (UE2eNB==NULL) {
|
||||||
printf("Problem generating channel model. Exiting.\n");
|
printf("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ int main(int argc, char **argv) {
|
|||||||
N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
|
N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (eNB2UE==NULL) {
|
if (eNB2UE==NULL) {
|
||||||
msg("Problem generating channel model. Exiting.\n");
|
msg("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ int main(int argc, char **argv) {
|
|||||||
BW,
|
BW,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (interf1>-20)
|
if (interf1>-20)
|
||||||
eNB2UE1 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
|
eNB2UE1 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
|
||||||
@@ -733,7 +733,7 @@ int main(int argc, char **argv) {
|
|||||||
BW,
|
BW,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (interf2>-20)
|
if (interf2>-20)
|
||||||
eNB2UE2 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
|
eNB2UE2 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
|
||||||
@@ -742,7 +742,7 @@ int main(int argc, char **argv) {
|
|||||||
BW,
|
BW,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (eNB2UE==NULL) {
|
if (eNB2UE==NULL) {
|
||||||
msg("Problem generating channel model. Exiting.\n");
|
msg("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
#include "executables/split_headers.h"
|
#include "executables/split_headers.h"
|
||||||
|
|
||||||
double cpuf;
|
double cpuf;
|
||||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
|
||||||
//#define MCS_COUNT 23//added for PHY abstraction
|
//#define MCS_COUNT 23//added for PHY abstraction
|
||||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||||
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
||||||
@@ -70,6 +70,9 @@ node_desc_t *ue_data[NUMBER_OF_UE_MAX];
|
|||||||
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
|
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
|
||||||
//extern char* namepointer_chMag ;
|
//extern char* namepointer_chMag ;
|
||||||
int xforms=0;
|
int xforms=0;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
nfapi_ue_release_request_body_t release_rntis;
|
||||||
|
|
||||||
FD_lte_phy_scope_enb *form_enb;
|
FD_lte_phy_scope_enb *form_enb;
|
||||||
char title[255];
|
char title[255];
|
||||||
|
|
||||||
@@ -734,7 +737,7 @@ int main(int argc, char **argv) {
|
|||||||
30e-9,
|
30e-9,
|
||||||
forgetting_factor,
|
forgetting_factor,
|
||||||
delay,
|
delay,
|
||||||
0);
|
0, 0);
|
||||||
// set Doppler
|
// set Doppler
|
||||||
UE2eNB->max_Doppler = maxDoppler;
|
UE2eNB->max_Doppler = maxDoppler;
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ int main(int argc, char **argv)
|
|||||||
61.44e6, //N_RB2sampling_rate(N_RB_DL),
|
61.44e6, //N_RB2sampling_rate(N_RB_DL),
|
||||||
40e6, //N_RB2channel_bandwidth(N_RB_DL),
|
40e6, //N_RB2channel_bandwidth(N_RB_DL),
|
||||||
DS_TDL,
|
DS_TDL,
|
||||||
0, 0, 0);
|
0, 0, 0, 0);
|
||||||
|
|
||||||
if (gNB2UE == NULL) {
|
if (gNB2UE == NULL) {
|
||||||
printf("Problem generating channel model. Exiting.\n");
|
printf("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
|
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
|
||||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||||
#include "NR_RRCReconfiguration.h"
|
#include "NR_RRCReconfiguration.h"
|
||||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
|
||||||
#include "SIMULATION/LTE_PHY/common_sim.h"
|
#include "SIMULATION/LTE_PHY/common_sim.h"
|
||||||
|
|
||||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||||
@@ -83,6 +83,10 @@ uint16_t sf_ahead=4 ;
|
|||||||
uint16_t sl_ahead=0;
|
uint16_t sl_ahead=0;
|
||||||
//uint8_t nfapi_mode = 0;
|
//uint8_t nfapi_mode = 0;
|
||||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
nfapi_ue_release_request_body_t release_rntis;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
|
||||||
|
|
||||||
// dummy functions
|
// dummy functions
|
||||||
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
|
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
|
||||||
@@ -273,7 +277,7 @@ int main(int argc, char **argv)
|
|||||||
//float psnr;
|
//float psnr;
|
||||||
float eff_tp_check = 0.7;
|
float eff_tp_check = 0.7;
|
||||||
uint8_t snrRun;
|
uint8_t snrRun;
|
||||||
uint32_t TBS;
|
uint32_t TBS = 0;
|
||||||
int **txdata;
|
int **txdata;
|
||||||
double **s_re,**s_im,**r_re,**r_im;
|
double **s_re,**s_im,**r_re,**r_im;
|
||||||
//double iqim = 0.0;
|
//double iqim = 0.0;
|
||||||
@@ -770,7 +774,7 @@ int main(int argc, char **argv)
|
|||||||
30e-9,
|
30e-9,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (gNB2UE==NULL) {
|
if (gNB2UE==NULL) {
|
||||||
printf("Problem generating channel model. Exiting.\n");
|
printf("Problem generating channel model. Exiting.\n");
|
||||||
@@ -991,7 +995,7 @@ int main(int argc, char **argv)
|
|||||||
if (run_initial_sync)
|
if (run_initial_sync)
|
||||||
nr_common_signal_procedures(gNB,frame,slot,gNB->ssb[0].ssb_pdu);
|
nr_common_signal_procedures(gNB,frame,slot,gNB->ssb[0].ssb_pdu);
|
||||||
else
|
else
|
||||||
phy_procedures_gNB_TX(gNB,frame,slot,0);
|
phy_procedures_gNB_TX(gNB,frame,slot,1);
|
||||||
|
|
||||||
int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP;
|
int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP;
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3};
|
|||||||
uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3};
|
uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3};
|
||||||
|
|
||||||
uint64_t get_softmodem_optmask(void) {return 0;}
|
uint64_t get_softmodem_optmask(void) {return 0;}
|
||||||
|
softmodem_params_t *get_softmodem_params(void) {return 0;}
|
||||||
|
|
||||||
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
|
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
|
||||||
|
|
||||||
@@ -479,7 +480,7 @@ int main(int argc, char **argv)
|
|||||||
300e-9,
|
300e-9,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (gNB2UE==NULL) {
|
if (gNB2UE==NULL) {
|
||||||
printf("Problem generating channel model. Exiting.\n");
|
printf("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
@@ -67,10 +67,12 @@ extern uint16_t prach_root_sequence_map0_3[838];
|
|||||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||||
//uint8_t nfapi_mode=0;
|
//uint8_t nfapi_mode=0;
|
||||||
uint16_t sl_ahead = 0;
|
uint16_t sl_ahead = 0;
|
||||||
|
msc_interface_t msc_interface;
|
||||||
|
|
||||||
//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
||||||
|
|
||||||
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
|
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
|
||||||
|
msc_interface_t msc_interface;
|
||||||
uint64_t get_softmodem_optmask(void) {return 0;}
|
uint64_t get_softmodem_optmask(void) {return 0;}
|
||||||
softmodem_params_t *get_softmodem_params(void) {return 0;}
|
softmodem_params_t *get_softmodem_params(void) {return 0;}
|
||||||
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
|
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
|
||||||
@@ -675,7 +677,7 @@ int main(int argc, char **argv){
|
|||||||
DS_TDL,
|
DS_TDL,
|
||||||
0.0,
|
0.0,
|
||||||
delay,
|
delay,
|
||||||
0);
|
0, 0);
|
||||||
|
|
||||||
if (UE2gNB==NULL) {
|
if (UE2gNB==NULL) {
|
||||||
printf("Problem generating channel model. Exiting.\n");
|
printf("Problem generating channel model. Exiting.\n");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user