Merge remote-tracking branch 'origin/develop' into NR_2port_CSIRS
This commit is contained in:
@@ -1,3 +1,24 @@
|
|||||||
|
<h1 align="center">
|
||||||
|
<a href="https://openairinterface.org/"><img src="https://openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png" alt="OAI" width="550"></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
|
||||||
|
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS"></a>
|
||||||
|
<a href="https://www.redhat.com/en/enterprise-linux-8"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-enb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-enb?label=eNB%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-lte-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-lte-ue?label=LTE-UE%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-gnb"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-gnb?label=gNB%20docker%20pulls"></a>
|
||||||
|
<a href="https://hub.docker.com/r/rdefosseoai/oai-nr-ue"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rdefosseoai/oai-nr-ue?label=NR-UE%20docker%20pulls"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
# OpenAirInterface License #
|
# OpenAirInterface License #
|
||||||
|
|
||||||
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ pipeline {
|
|||||||
echo "This is a MERGE event"
|
echo "This is a MERGE event"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
}
|
}
|
||||||
|
echo "Pipeline is SUCCESSFUL"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
@@ -271,6 +272,7 @@ pipeline {
|
|||||||
echo "This is a MERGE event"
|
echo "This is a MERGE event"
|
||||||
addGitLabMRComment comment: message
|
addGitLabMRComment comment: message
|
||||||
}
|
}
|
||||||
|
echo "Pipeline FAILED"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ class Containerize():
|
|||||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||||
imageTag = 'develop'
|
imageTag = 'develop'
|
||||||
sharedTag = 'develop'
|
sharedTag = 'develop'
|
||||||
|
forceSharedImageBuild = False
|
||||||
if (self.ranAllowMerge):
|
if (self.ranAllowMerge):
|
||||||
imageTag = 'ci-temp'
|
imageTag = 'ci-temp'
|
||||||
if self.ranTargetBranch == '':
|
if self.ranTargetBranch == '':
|
||||||
@@ -203,6 +204,13 @@ class Containerize():
|
|||||||
else:
|
else:
|
||||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep -i INDEX', '\$', 5)
|
||||||
|
result = re.search('index', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
forceSharedImageBuild = True
|
||||||
|
sharedTag = 'ci-temp'
|
||||||
|
else:
|
||||||
|
forceSharedImageBuild = True
|
||||||
|
|
||||||
# if asterix, copy the entitlement and subscription manager configurations
|
# if asterix, copy the entitlement and subscription manager configurations
|
||||||
if self.host == 'Red Hat':
|
if self.host == 'Red Hat':
|
||||||
@@ -214,13 +222,14 @@ class Containerize():
|
|||||||
sharedimage = 'ran-build'
|
sharedimage = 'ran-build'
|
||||||
# Let's remove any previous run artifacts if still there
|
# Let's remove any previous run artifacts if still there
|
||||||
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
||||||
if (not self.ranAllowMerge):
|
if forceSharedImageBuild:
|
||||||
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag, '\$', 30)
|
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
|
||||||
for image,pattern in imageNames:
|
for image,pattern in imageNames:
|
||||||
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag, '\$', 30)
|
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
|
||||||
|
|
||||||
# Build the shared image only on Push Events (not on Merge Requests)
|
# Build the shared image only on Push Events (not on Merge Requests)
|
||||||
if (not self.ranAllowMerge):
|
# On when the shared image docker file is being modified.
|
||||||
|
if forceSharedImageBuild:
|
||||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
||||||
# First verify if the shared image was properly created.
|
# First verify if the shared image was properly created.
|
||||||
status = True
|
status = True
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ channelmod = {
|
|||||||
ds_tdl = 0;
|
ds_tdl = 0;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
model_name = "rfsimu_channel_ue1"
|
model_name = "rfsimu_channel_ue0"
|
||||||
type = "AWGN";
|
type = "AWGN";
|
||||||
ploss_dB = 0;
|
ploss_dB = 0;
|
||||||
noise_power_dB = 0;
|
noise_power_dB = 0;
|
||||||
|
|||||||
@@ -0,0 +1,281 @@
|
|||||||
|
Active_eNBs = ( "eNB-Eurecom-B38");
|
||||||
|
# Asn1_verbosity, choice in: none, info, annoying
|
||||||
|
Asn1_verbosity = "none";
|
||||||
|
|
||||||
|
eNBs =
|
||||||
|
(
|
||||||
|
{
|
||||||
|
////////// Identification parameters:
|
||||||
|
eNB_ID = 0xe02;
|
||||||
|
|
||||||
|
cell_type = "CELL_MACRO_ENB";
|
||||||
|
|
||||||
|
eNB_name = "eNB-Eurecom-B38";
|
||||||
|
|
||||||
|
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||||
|
tracking_area_code = 1;
|
||||||
|
plmn_list = ( { mcc = 208; mnc = 97; mnc_length = 2; } );
|
||||||
|
|
||||||
|
tr_s_preference = "local_mac"
|
||||||
|
|
||||||
|
////////// Physical parameters:
|
||||||
|
|
||||||
|
component_carriers = (
|
||||||
|
{
|
||||||
|
node_function = "3GPP_eNODEB";
|
||||||
|
node_timing = "synch_to_ext_device";
|
||||||
|
node_synch_ref = 0;
|
||||||
|
frame_type = "TDD";
|
||||||
|
tdd_config = 1;
|
||||||
|
tdd_config_s = 0;
|
||||||
|
prefix_type = "NORMAL";
|
||||||
|
eutra_band = 38;
|
||||||
|
downlink_frequency = 2605000000L;
|
||||||
|
nr_scg_ssb_freq = 624608;
|
||||||
|
uplink_frequency_offset = 0;
|
||||||
|
Nid_cell = 0;
|
||||||
|
N_RB_DL = 100;
|
||||||
|
Nid_cell_mbsfn = 0;
|
||||||
|
nb_antenna_ports = 1;
|
||||||
|
nb_antennas_tx = 2;
|
||||||
|
nb_antennas_rx = 2;
|
||||||
|
tx_gain = 90;
|
||||||
|
rx_gain = 125;
|
||||||
|
pbch_repetition = "FALSE";
|
||||||
|
prach_root = 0;
|
||||||
|
prach_config_index = 0;
|
||||||
|
prach_high_speed = "DISABLE";
|
||||||
|
prach_zero_correlation = 1;
|
||||||
|
prach_freq_offset = 2;
|
||||||
|
pucch_delta_shift = 1;
|
||||||
|
pucch_nRB_CQI = 0;
|
||||||
|
pucch_nCS_AN = 0;
|
||||||
|
pucch_n1_AN = 0;
|
||||||
|
pdsch_referenceSignalPower = -29;
|
||||||
|
pdsch_p_b = 0;
|
||||||
|
pusch_n_SB = 1;
|
||||||
|
pusch_enable64QAM = "DISABLE";
|
||||||
|
pusch_hoppingMode = "interSubFrame";
|
||||||
|
pusch_hoppingOffset = 0;
|
||||||
|
pusch_groupHoppingEnabled = "ENABLE";
|
||||||
|
pusch_groupAssignment = 0;
|
||||||
|
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||||
|
pusch_nDMRS1 = 1;
|
||||||
|
phich_duration = "NORMAL";
|
||||||
|
phich_resource = "ONESIXTH";
|
||||||
|
srs_enable = "DISABLE";
|
||||||
|
/* srs_BandwidthConfig =;
|
||||||
|
srs_SubframeConfig =;
|
||||||
|
srs_ackNackST =;
|
||||||
|
srs_MaxUpPts =;*/
|
||||||
|
|
||||||
|
pusch_p0_Nominal = -96;
|
||||||
|
pusch_alpha = "AL1";
|
||||||
|
pucch_p0_Nominal = -104;
|
||||||
|
msg3_delta_Preamble = 6;
|
||||||
|
pucch_deltaF_Format1 = "deltaF2";
|
||||||
|
pucch_deltaF_Format1b = "deltaF3";
|
||||||
|
pucch_deltaF_Format2 = "deltaF0";
|
||||||
|
pucch_deltaF_Format2a = "deltaF0";
|
||||||
|
pucch_deltaF_Format2b = "deltaF0";
|
||||||
|
|
||||||
|
rach_numberOfRA_Preambles = 64;
|
||||||
|
rach_preamblesGroupAConfig = "DISABLE";
|
||||||
|
/*
|
||||||
|
rach_sizeOfRA_PreamblesGroupA = ;
|
||||||
|
rach_messageSizeGroupA = ;
|
||||||
|
rach_messagePowerOffsetGroupB = ;
|
||||||
|
*/
|
||||||
|
rach_powerRampingStep = 4;
|
||||||
|
rach_preambleInitialReceivedTargetPower = -108;
|
||||||
|
rach_preambleTransMax = 10;
|
||||||
|
rach_raResponseWindowSize = 10;
|
||||||
|
rach_macContentionResolutionTimer = 48;
|
||||||
|
rach_maxHARQ_Msg3Tx = 4;
|
||||||
|
|
||||||
|
pcch_default_PagingCycle = 128;
|
||||||
|
pcch_nB = "oneT";
|
||||||
|
bcch_modificationPeriodCoeff = 2;
|
||||||
|
ue_TimersAndConstants_t300 = 1000;
|
||||||
|
ue_TimersAndConstants_t301 = 1000;
|
||||||
|
ue_TimersAndConstants_t310 = 1000;
|
||||||
|
ue_TimersAndConstants_t311 = 10000;
|
||||||
|
ue_TimersAndConstants_n310 = 20;
|
||||||
|
ue_TimersAndConstants_n311 = 1;
|
||||||
|
ue_TransmissionMode = 1;
|
||||||
|
|
||||||
|
//Parameters for SIB18
|
||||||
|
rxPool_sc_CP_Len = "normal";
|
||||||
|
rxPool_sc_Period = "sf40";
|
||||||
|
rxPool_data_CP_Len = "normal";
|
||||||
|
rxPool_ResourceConfig_prb_Num = 20;
|
||||||
|
rxPool_ResourceConfig_prb_Start = 5;
|
||||||
|
rxPool_ResourceConfig_prb_End = 44;
|
||||||
|
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||||
|
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||||
|
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||||
|
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||||
|
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||||
|
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||||
|
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||||
|
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||||
|
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||||
|
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||||
|
*/
|
||||||
|
// Parameters for SIB19
|
||||||
|
discRxPool_cp_Len = "normal"
|
||||||
|
discRxPool_discPeriod = "rf32"
|
||||||
|
discRxPool_numRetx = 1;
|
||||||
|
discRxPool_numRepetition = 2;
|
||||||
|
discRxPool_ResourceConfig_prb_Num = 5;
|
||||||
|
discRxPool_ResourceConfig_prb_Start = 3;
|
||||||
|
discRxPool_ResourceConfig_prb_End = 21;
|
||||||
|
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||||
|
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||||
|
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||||
|
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||||
|
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||||
|
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
srb1_parameters :
|
||||||
|
{
|
||||||
|
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||||
|
timer_poll_retransmit = 80;
|
||||||
|
|
||||||
|
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||||
|
timer_reordering = 35;
|
||||||
|
|
||||||
|
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||||
|
timer_status_prohibit = 0;
|
||||||
|
|
||||||
|
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||||
|
poll_pdu = 4;
|
||||||
|
|
||||||
|
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||||
|
poll_byte = 99999;
|
||||||
|
|
||||||
|
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||||
|
max_retx_threshold = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------- 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";
|
||||||
|
active = "yes";
|
||||||
|
preference = "ipv4";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
enable_measurement_reports = "no";
|
||||||
|
|
||||||
|
///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 */
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1_MME = "eno1";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_INTERFACE_NAME_FOR_S1U = "eno1";
|
||||||
|
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
|
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||||
|
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
MACRLCs = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_s_preference = "local_L1";
|
||||||
|
tr_n_preference = "local_RRC";
|
||||||
|
phy_test_mode = 0;
|
||||||
|
scheduler_mode = "fairRR";
|
||||||
|
bler_target_upper = 20.0;
|
||||||
|
bler_target_lower = 10.0;
|
||||||
|
max_ul_rb_index = 27;
|
||||||
|
puSch10xSnr = 200;
|
||||||
|
puCch10xSnr = 150;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
L1s = (
|
||||||
|
{
|
||||||
|
num_cc = 1;
|
||||||
|
tr_n_preference = "local_mac";
|
||||||
|
prach_dtx_threshold = 200;
|
||||||
|
pucch1_dtx_threshold = 5
|
||||||
|
pucch1ab_dtx_threshold =0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RUs = (
|
||||||
|
{
|
||||||
|
local_rf = "yes"
|
||||||
|
nb_tx = 2
|
||||||
|
nb_rx = 2
|
||||||
|
att_tx = 0
|
||||||
|
att_rx = 0;
|
||||||
|
bands = [38];
|
||||||
|
max_pdschReferenceSignalPower = -27;
|
||||||
|
max_rxgain = 75;
|
||||||
|
eNB_instances = [0];
|
||||||
|
sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2";
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
THREAD_STRUCT = (
|
||||||
|
{
|
||||||
|
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||||
|
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||||
|
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||||
|
worker_config = "WORKER_ENABLE";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
NETWORK_CONTROLLER :
|
||||||
|
{
|
||||||
|
FLEXRAN_ENABLED = "no";
|
||||||
|
FLEXRAN_INTERFACE_NAME = "lo";
|
||||||
|
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||||
|
FLEXRAN_PORT = 2210;
|
||||||
|
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||||
|
FLEXRAN_AWAIT_RECONF = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
log_config :
|
||||||
|
{
|
||||||
|
global_log_level ="info";
|
||||||
|
global_log_verbosity ="medium";
|
||||||
|
hw_log_level ="info";
|
||||||
|
hw_log_verbosity ="medium";
|
||||||
|
phy_log_level ="info";
|
||||||
|
phy_log_verbosity ="medium";
|
||||||
|
mac_log_level ="info";
|
||||||
|
mac_log_verbosity ="high";
|
||||||
|
rlc_log_level ="info";
|
||||||
|
rlc_log_verbosity ="medium";
|
||||||
|
pdcp_log_level ="info";
|
||||||
|
pdcp_log_verbosity ="medium";
|
||||||
|
rrc_log_level ="info";
|
||||||
|
rrc_log_verbosity ="medium";
|
||||||
|
};
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ eNBs =
|
|||||||
(
|
(
|
||||||
{
|
{
|
||||||
////////// Identification parameters:
|
////////// Identification parameters:
|
||||||
eNB_ID = 0xe00;
|
eNB_ID = 0xe04;
|
||||||
|
|
||||||
cell_type = "CELL_MACRO_ENB";
|
cell_type = "CELL_MACRO_ENB";
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ MACRLCs = (
|
|||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 150;
|
pucch_TargetSNRx10 = 150;
|
||||||
ulsch_max_slots_inactivity=20;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,6 @@ MACRLCs = (
|
|||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 150;
|
pucch_TargetSNRx10 = 150;
|
||||||
ulsch_max_slots_inactivity=20;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -228,9 +228,8 @@ MACRLCs = (
|
|||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_s_preference = "local_L1";
|
tr_s_preference = "local_L1";
|
||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
ulsch_max_slots_inactivity = 1;
|
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 200;
|
pucch_TargetSNRx10 = 200;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ RUs = (
|
|||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
bf_weights = [0x00007fff, 0x00007fff];
|
bf_weights = [0x00007fff, 0x00007fff];
|
||||||
#clock_src = "external";
|
#clock_src = "external";
|
||||||
|
sf_extension = 0
|
||||||
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -253,8 +253,8 @@ MACRLCs = (
|
|||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_s_preference = "local_L1";
|
tr_s_preference = "local_L1";
|
||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
pusch_TargetSNRx10 = 200;
|
# pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 150;
|
# pucch_TargetSNRx10 = 150;
|
||||||
ulsch_max_slots_inactivity=20;
|
ulsch_max_slots_inactivity=20;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -265,7 +265,7 @@ L1s = (
|
|||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
pusch_proc_threads = 2;
|
pusch_proc_threads = 2;
|
||||||
prach_dtx_threshold = 120;
|
prach_dtx_threshold = 120;
|
||||||
pucch0_dtx_threshold = 150;
|
# pucch0_dtx_threshold = 150;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ RUs = (
|
|||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
sf_extension = 0
|
||||||
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ gNBs =
|
|||||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
||||||
GNB_INTERFACE_NAME_FOR_NGU = "eth0";
|
GNB_INTERFACE_NAME_FOR_NGU = "eth0";
|
||||||
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
||||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
GNB_PORT_FOR_NGU = 2152; # Spec 2152
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,6 @@ MACRLCs = (
|
|||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 150;
|
pucch_TargetSNRx10 = 150;
|
||||||
ulsch_max_slots_inactivity = 10;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ MACRLCs = (
|
|||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_s_preference = "local_L1";
|
tr_s_preference = "local_L1";
|
||||||
tr_n_preference = "local_RRC";
|
tr_n_preference = "local_RRC";
|
||||||
ulsch_max_slots_inactivity = 1;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+67
-11
@@ -66,6 +66,7 @@ class EPCManagement():
|
|||||||
self.containerPrefix = 'prod'
|
self.containerPrefix = 'prod'
|
||||||
self.mmeConfFile = 'mme.conf'
|
self.mmeConfFile = 'mme.conf'
|
||||||
self.yamlPath = ''
|
self.yamlPath = ''
|
||||||
|
self.isMagmaUsed = False
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@@ -164,7 +165,15 @@ class EPCManagement():
|
|||||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||||
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
self.isMagmaUsed = False
|
||||||
|
mySSH.command('docker ps -a', '\$', 5)
|
||||||
|
result = re.search('magma', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
self.isMagmaUsed = True
|
||||||
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-magma-mme', '\$', 5)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
||||||
result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore())
|
result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.MmeIPAddress = result.group('mme_ip_addr')
|
self.MmeIPAddress = result.group('mme_ip_addr')
|
||||||
@@ -289,7 +298,15 @@ class EPCManagement():
|
|||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||||
mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
self.isMagmaUsed = False
|
||||||
|
mySSH.command('docker ps -a', '\$', 5)
|
||||||
|
result = re.search('magma', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
self.isMagmaUsed = True
|
||||||
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker top ' + self.containerPrefix + '-magma-mme', '\$', 5)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
||||||
else:
|
else:
|
||||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
|
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
|
||||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||||
@@ -489,6 +506,12 @@ class EPCManagement():
|
|||||||
HTML.CreateHtmlTabFooter(False)
|
HTML.CreateHtmlTabFooter(False)
|
||||||
sys.exit('docker-compose not installed on ' + self.IPAddress)
|
sys.exit('docker-compose not installed on ' + self.IPAddress)
|
||||||
|
|
||||||
|
# Checking if it is a MAGMA deployment
|
||||||
|
self.isMagmaUsed = False
|
||||||
|
if os.path.isfile('./' + self.yamlPath + '/redis_extern.conf'):
|
||||||
|
self.isMagmaUsed = True
|
||||||
|
logging.debug('MAGMA MME is used!')
|
||||||
|
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
|
mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
|
||||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
|
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||||
@@ -500,10 +523,15 @@ class EPCManagement():
|
|||||||
# - docker-compose config | grep container_name
|
# - docker-compose config | grep container_name
|
||||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||||
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
|
||||||
|
if self.isMagmaUsed:
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme_fd.sprint.conf', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/redis_extern.conf', self.SourceCodePath + '/scripts')
|
||||||
|
mySSH.command('chmod a+x ' + self.SourceCodePath + '/scripts/entrypoint.sh', '\$', 5)
|
||||||
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
|
mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
|
||||||
mySSH.command('docker-compose down', '\$', 60)
|
mySSH.command('docker-compose down', '\$', 60)
|
||||||
mySSH.command('docker-compose up -d db_init', '\$', 60)
|
mySSH.command('docker-compose up -d db_init', '\$', 60)
|
||||||
|
|
||||||
# databases take time...
|
# databases take time...
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
cnt = 0
|
cnt = 0
|
||||||
@@ -525,8 +553,12 @@ class EPCManagement():
|
|||||||
|
|
||||||
# deploying EPC cNFs
|
# deploying EPC cNFs
|
||||||
mySSH.command('docker-compose up -d oai_spgwu', '\$', 60)
|
mySSH.command('docker-compose up -d oai_spgwu', '\$', 60)
|
||||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
if self.isMagmaUsed:
|
||||||
expectedHealthyContainers = 5
|
listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
|
||||||
|
expectedHealthyContainers = 6
|
||||||
|
else:
|
||||||
|
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
||||||
|
expectedHealthyContainers = 5
|
||||||
|
|
||||||
# Checking for additional services
|
# Checking for additional services
|
||||||
mySSH.command('docker-compose config', '\$', 5)
|
mySSH.command('docker-compose config', '\$', 5)
|
||||||
@@ -557,7 +589,10 @@ class EPCManagement():
|
|||||||
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
|
||||||
if healthyNb == expectedHealthyContainers:
|
if healthyNb == expectedHealthyContainers:
|
||||||
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||||
mySSH.command('docker exec -d prod-oai-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker exec -d prod-magma-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker exec -d prod-oai-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||||
mySSH.command('docker exec -d prod-oai-spgwc /bin/bash -c "nohup tshark -i any -f \'port 2123 or port 8805\' -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
mySSH.command('docker exec -d prod-oai-spgwc /bin/bash -c "nohup tshark -i any -f \'port 2123 or port 8805\' -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||||
# on SPGW-U, not capturing on SGI to avoid huge file
|
# on SPGW-U, not capturing on SGI to avoid huge file
|
||||||
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
|
||||||
@@ -575,24 +610,45 @@ class EPCManagement():
|
|||||||
|
|
||||||
mySSH = SSH.SSHConnection()
|
mySSH = SSH.SSHConnection()
|
||||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||||
|
# Checking if it is a MAGMA deployment.
|
||||||
|
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||||
|
mySSH.command('docker-compose ps -a', '\$', 5)
|
||||||
|
self.isMagmaUsed = False
|
||||||
|
result = re.search('magma', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
self.isMagmaUsed = True
|
||||||
|
logging.debug('MAGMA MME is used!')
|
||||||
# Recovering logs and pcap files
|
# Recovering logs and pcap files
|
||||||
mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
|
mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||||
mySSH.command('docker exec -it prod-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
|
mySSH.command('docker exec -it prod-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
|
||||||
mySSH.command('docker exec -it prod-oai-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker exec -it prod-magma-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker exec -it prod-oai-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||||
mySSH.command('docker exec -it prod-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
|
mySSH.command('docker exec -it prod-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
|
||||||
mySSH.command('docker exec -it prod-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
mySSH.command('docker exec -it prod-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
|
||||||
mySSH.command('docker logs prod-oai-hss > hss_' + self.testCase_id + '.log', '\$', 5)
|
mySSH.command('docker logs prod-oai-hss > hss_' + self.testCase_id + '.log', '\$', 5)
|
||||||
mySSH.command('docker logs prod-oai-mme > mme_' + self.testCase_id + '.log', '\$', 5)
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker cp --follow-link prod-magma-mme:/var/log/mme.log mme_' + self.testCase_id + '.log', '\$', 15)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker logs prod-oai-mme > mme_' + self.testCase_id + '.log', '\$', 5)
|
||||||
mySSH.command('docker logs prod-oai-spgwc > spgwc_' + self.testCase_id + '.log', '\$', 5)
|
mySSH.command('docker logs prod-oai-spgwc > spgwc_' + self.testCase_id + '.log', '\$', 5)
|
||||||
mySSH.command('docker logs prod-oai-spgwu-tiny > spgwu_' + self.testCase_id + '.log', '\$', 5)
|
mySSH.command('docker logs prod-oai-spgwu-tiny > spgwu_' + self.testCase_id + '.log', '\$', 5)
|
||||||
mySSH.command('docker cp prod-oai-hss:/tmp/hss_check_run.pcap hss_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-hss:/tmp/hss_check_run.pcap hss_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
if self.isMagmaUsed:
|
||||||
|
mySSH.command('docker cp prod-magma-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
|
else:
|
||||||
|
mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
|
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
|
||||||
# Remove all
|
# Remove all
|
||||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||||
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
if self.isMagmaUsed:
|
||||||
nbContainers = 5
|
listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
|
||||||
|
nbContainers = 6
|
||||||
|
else:
|
||||||
|
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
|
||||||
|
nbContainers = 5
|
||||||
# Checking for additional services
|
# Checking for additional services
|
||||||
mySSH.command('docker-compose config', '\$', 5)
|
mySSH.command('docker-compose config', '\$', 5)
|
||||||
configResponse = mySSH.getBefore()
|
configResponse = mySSH.getBefore()
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<testCase id="030000">
|
<testCase id="030000">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize eNB</desc>
|
<desc>Initialize eNB</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6</Initialize_eNB_args>
|
||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
<air_interface>lte</air_interface>
|
<air_interface>lte</air_interface>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<testCaseList>
|
<testCaseList>
|
||||||
<htmlTabRef>TEST-NSA-FR1-TM2</htmlTabRef>
|
<htmlTabRef>TEST-NSA-FR1-TM2-Tab1</htmlTabRef>
|
||||||
<htmlTabName>NSA 2x2 Ping DL UL with QUECTEL</htmlTabName>
|
<htmlTabName>NSA 2x2 Ping DL UL with QUECTEL</htmlTabName>
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
<repeatCount>1</repeatCount>
|
<repeatCount>5</repeatCount>
|
||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
030000
|
030000
|
||||||
040000
|
040000
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
<testCase id="000001">
|
<testCase id="000001">
|
||||||
<class>IdleSleep</class>
|
<class>IdleSleep</class>
|
||||||
<desc>Sleep</desc>
|
<desc>Sleep</desc>
|
||||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000002">
|
<testCase id="000002">
|
||||||
|
|||||||
@@ -0,0 +1,145 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>TEST-NSA-FR1-TM2-Tab2</htmlTabRef>
|
||||||
|
<htmlTabName>NSA 2x2 Attach-Detach with QUECTEL</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>5</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
031000
|
||||||
|
041000
|
||||||
|
000002
|
||||||
|
010000
|
||||||
|
000001
|
||||||
|
050000
|
||||||
|
000002
|
||||||
|
010004
|
||||||
|
000002
|
||||||
|
010003
|
||||||
|
000001
|
||||||
|
050000
|
||||||
|
000002
|
||||||
|
010004
|
||||||
|
000002
|
||||||
|
010003
|
||||||
|
000001
|
||||||
|
050000
|
||||||
|
000002
|
||||||
|
010002
|
||||||
|
080001
|
||||||
|
080000
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="010000">
|
||||||
|
<class>Initialize_UE</class>
|
||||||
|
<desc>Initialize Quectel</desc>
|
||||||
|
<id>nrmodule2_quectel</id>
|
||||||
|
<UE_Trace>yes</UE_Trace>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="010002">
|
||||||
|
<class>Terminate_UE</class>
|
||||||
|
<desc>Terminate Quectel</desc>
|
||||||
|
<id>nrmodule2_quectel</id>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="010003">
|
||||||
|
<class>Attach_UE</class>
|
||||||
|
<desc>Attach Quectel</desc>
|
||||||
|
<id>nrmodule2_quectel</id>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="010004">
|
||||||
|
<class>Detach_UE</class>
|
||||||
|
<desc>Detach Quectel</desc>
|
||||||
|
<id>nrmodule2_quectel</id>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="031000">
|
||||||
|
<class>Initialize_eNB</class>
|
||||||
|
<desc>Initialize eNB</desc>
|
||||||
|
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6</Initialize_eNB_args>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
<air_interface>lte</air_interface>
|
||||||
|
<eNB_Trace>yes</eNB_Trace>
|
||||||
|
<eNB_Stats>yes</eNB_Stats>
|
||||||
|
<USRP_IPAddress>192.168.18.241</USRP_IPAddress>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="041000">
|
||||||
|
<class>Initialize_eNB</class>
|
||||||
|
<desc>Initialize gNB</desc>
|
||||||
|
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf -q --usrp-tx-thread-config 1 --thread-pool 0,2,4,6</Initialize_eNB_args>
|
||||||
|
<eNB_instance>1</eNB_instance>
|
||||||
|
<eNB_serverId>1</eNB_serverId>
|
||||||
|
<air_interface>nr</air_interface>
|
||||||
|
<eNB_Stats>yes</eNB_Stats>
|
||||||
|
<USRP_IPAddress>192.168.18.240</USRP_IPAddress>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000002">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="050000">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>Ping: 20pings in 20sec</desc>
|
||||||
|
<id>nrmodule2_quectel</id>
|
||||||
|
<ping_args>-c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="080000">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
<air_interface>lte</air_interface>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="080001">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate gNB</desc>
|
||||||
|
<eNB_instance>1</eNB_instance>
|
||||||
|
<eNB_serverId>1</eNB_serverId>
|
||||||
|
<air_interface>nr</air_interface>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<testCase id="000100">
|
<testCase id="000100">
|
||||||
<class>Deploy_EPC</class>
|
<class>Deploy_EPC</class>
|
||||||
<desc>Deploy all EPC containers</desc>
|
<desc>Deploy all EPC containers</desc>
|
||||||
<parameters>yaml_files/fr1_epc_20897</parameters>
|
<parameters>yaml_files/magma_nsa_20897</parameters>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|||||||
@@ -0,0 +1,198 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
cassandra:
|
||||||
|
image: cassandra:2.1
|
||||||
|
container_name: prod-cassandra
|
||||||
|
networks:
|
||||||
|
private_net:
|
||||||
|
ipv4_address: 192.168.68.2
|
||||||
|
environment:
|
||||||
|
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
|
||||||
|
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "nodetool status"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
db_init:
|
||||||
|
image: cassandra:2.1
|
||||||
|
container_name: prod-db-init
|
||||||
|
depends_on: [cassandra]
|
||||||
|
deploy:
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
max_attempts: 10
|
||||||
|
networks:
|
||||||
|
private_net:
|
||||||
|
ipv4_address: 192.168.68.4
|
||||||
|
volumes:
|
||||||
|
- ./oai_db.cql:/home/oai_db.cql
|
||||||
|
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||||
|
|
||||||
|
oai_hss:
|
||||||
|
image: oai-hss:production
|
||||||
|
container_name: prod-oai-hss
|
||||||
|
privileged: true
|
||||||
|
depends_on: [cassandra]
|
||||||
|
networks:
|
||||||
|
private_net:
|
||||||
|
ipv4_address: 192.168.68.3
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.194
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Paris
|
||||||
|
REALM: openairinterface.org
|
||||||
|
HSS_FQDN: hss.openairinterface.org
|
||||||
|
PREFIX: /openair-hss/etc
|
||||||
|
cassandra_Server_IP: 192.168.68.2
|
||||||
|
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||||
|
LTE_K: FEC86BA6EB707ED08905757B1BB44B8F
|
||||||
|
APN1: oai.ipv4
|
||||||
|
APN2: oai2.ipv4
|
||||||
|
FIRST_IMSI: 208970100001127
|
||||||
|
NB_USERS: 10
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "pgrep oai_hss"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:6.0.5
|
||||||
|
container_name: prod-redis
|
||||||
|
privileged: true
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.198
|
||||||
|
volumes:
|
||||||
|
- ./redis_extern.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "redis-cli -h 192.168.61.198 -p 6380 ping"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
magma_mme:
|
||||||
|
image: magma-mme:production
|
||||||
|
container_name: prod-magma-mme
|
||||||
|
hostname: mme
|
||||||
|
privileged: true
|
||||||
|
depends_on: [oai_hss, redis]
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.195
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Paris
|
||||||
|
REALM: openairinterface.org
|
||||||
|
PREFIX: /openair-mme/etc
|
||||||
|
HSS_HOSTNAME: hss
|
||||||
|
HSS_FQDN: hss.openairinterface.org
|
||||||
|
HSS_REALM: openairinterface.org
|
||||||
|
MME_FQDN: mme.openairinterface.org
|
||||||
|
FEATURES: mme_oai
|
||||||
|
volumes:
|
||||||
|
- ./mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
|
||||||
|
- ./mme.conf:/magma-mme/etc/mme.conf
|
||||||
|
- ./entrypoint.sh:/magma-mme/bin/entrypoint.sh
|
||||||
|
entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "pgrep oai_mme"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
oai_spgwc:
|
||||||
|
image: oai-spgwc:production
|
||||||
|
privileged: true
|
||||||
|
depends_on: [magma_mme]
|
||||||
|
container_name: prod-oai-spgwc
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.196
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Paris
|
||||||
|
SGW_INTERFACE_NAME_FOR_S11: eth0
|
||||||
|
PGW_INTERFACE_NAME_FOR_SX: eth0
|
||||||
|
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
|
||||||
|
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||||
|
PUSH_PROTOCOL_OPTION: 'true'
|
||||||
|
APN_NI_1: oai.ipv4
|
||||||
|
APN_NI_2: oai2.ipv4
|
||||||
|
DEFAULT_APN_NI_1: oai.ipv4
|
||||||
|
UE_IP_ADDRESS_POOL_1: '12.1.1.2 - 12.1.1.254'
|
||||||
|
UE_IP_ADDRESS_POOL_2: '12.0.0.2 - 12.0.0.254'
|
||||||
|
MCC: '208'
|
||||||
|
MNC: '97'
|
||||||
|
MNC03: '097'
|
||||||
|
TAC: 1
|
||||||
|
GW_ID: 1
|
||||||
|
REALM: openairinterface.org
|
||||||
|
UE_MTU_IPV4: 1500
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "pgrep oai_spgwc"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
oai_spgwu:
|
||||||
|
image: oai-spgwu-tiny:production
|
||||||
|
privileged: true
|
||||||
|
container_name: prod-oai-spgwu-tiny
|
||||||
|
depends_on: [oai_spgwc]
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.197
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Paris
|
||||||
|
PID_DIRECTORY: /var/run
|
||||||
|
INSTANCE: 1
|
||||||
|
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
|
||||||
|
PGW_INTERFACE_NAME_FOR_SGI: eth0
|
||||||
|
SGW_INTERFACE_NAME_FOR_SX: eth0
|
||||||
|
SPGWC0_IP_ADDRESS: 192.168.61.196
|
||||||
|
NETWORK_UE_IP: '12.1.1.0/24'
|
||||||
|
NETWORK_UE_NAT_OPTION: 'yes'
|
||||||
|
MCC: '208'
|
||||||
|
MNC: '97'
|
||||||
|
MNC03: '097'
|
||||||
|
TAC: 1
|
||||||
|
GW_ID: 1
|
||||||
|
REALM: openairinterface.org
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "pgrep oai_spgwu"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
trf_gen:
|
||||||
|
image: trf-gen:production
|
||||||
|
privileged: true
|
||||||
|
container_name: prod-trf-gen
|
||||||
|
networks:
|
||||||
|
public_net:
|
||||||
|
ipv4_address: 192.168.61.200
|
||||||
|
entrypoint: /bin/bash -c "ip route add 12.1.1.0/24 via 192.168.61.197 dev eth0; sleep infinity"
|
||||||
|
healthcheck:
|
||||||
|
test: /bin/bash -c "ip route | grep '12.1.1.0'"
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
networks:
|
||||||
|
private_net:
|
||||||
|
name: prod-oai-private-net
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 192.168.68.0/26
|
||||||
|
driver_opts:
|
||||||
|
com.docker.network.bridge.name: "oai-priv-net"
|
||||||
|
public_net:
|
||||||
|
name: prod-oai-public-net
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 192.168.61.192/26
|
||||||
|
driver_opts:
|
||||||
|
com.docker.network.bridge.name: "oai-pub-net"
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
INSTANCE=1
|
||||||
|
PREFIX='/magma-mme/etc'
|
||||||
|
MY_REALM='openairinterface.org'
|
||||||
|
|
||||||
|
declare -A MME_CONF
|
||||||
|
|
||||||
|
pushd $PREFIX
|
||||||
|
MME_CONF[@MME_S6A_IP_ADDR@]="192.168.61.195"
|
||||||
|
MME_CONF[@INSTANCE@]=$INSTANCE
|
||||||
|
MME_CONF[@PREFIX@]=$PREFIX
|
||||||
|
MME_CONF[@REALM@]=$MY_REALM
|
||||||
|
MME_CONF[@MME_FQDN@]="mme.${MME_CONF[@REALM@]}"
|
||||||
|
MME_CONF[@HSS_HOSTNAME@]='hss'
|
||||||
|
MME_CONF[@HSS_FQDN@]="${MME_CONF[@HSS_HOSTNAME@]}.${MME_CONF[@REALM@]}"
|
||||||
|
MME_CONF[@HSS_IP_ADDR@]="192.168.61.194"
|
||||||
|
|
||||||
|
cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
|
||||||
|
|
||||||
|
for K in "${!MME_CONF[@]}"; do
|
||||||
|
egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||||
|
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${MME_CONF[$K]}"
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -i -e "s@etc/freeDiameter@etc@" /magma-mme/etc/mme_fd.conf
|
||||||
|
sed -i -e "s@bind: 127.0.0.1@bind: 192.168.61.198@" /etc/magma/redis.yml
|
||||||
|
# Generate freeDiameter certificate
|
||||||
|
popd
|
||||||
|
cd /magma-mme/scripts
|
||||||
|
./check_mme_s6a_certificate $PREFIX mme.${MME_CONF[@REALM@]}
|
||||||
|
|
||||||
|
cd /magma-mme
|
||||||
|
nohup /magma-mme/bin/sctpd > /var/log/sctpd.log 2>&1 &
|
||||||
|
sleep 5
|
||||||
|
/magma-mme/bin/oai_mme -c /magma-mme/etc/mme.conf
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
# generated by generate_mme_config_script.py
|
||||||
|
MME :
|
||||||
|
{
|
||||||
|
REALM = "openairinterface.org"
|
||||||
|
PID_DIRECTORY = "/var/run";
|
||||||
|
MAXENB = 8; # power of 2
|
||||||
|
MAXUE = 16; # power of 2
|
||||||
|
RELATIVE_CAPACITY = 10;
|
||||||
|
|
||||||
|
EMERGENCY_ATTACH_SUPPORTED = "no";
|
||||||
|
UNAUTHENTICATED_IMSI_SUPPORTED = "no";
|
||||||
|
|
||||||
|
# EPS network feature support
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_IMS_VOICE_OVER_PS_SESSION_IN_S1 = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_EMERGENCY_BEARER_SERVICES_IN_S1_MODE = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_LOCATION_SERVICES_VIA_EPC = "no"; # DO NOT CHANGE
|
||||||
|
EPS_NETWORK_FEATURE_SUPPORT_EXTENDED_SERVICE_REQUEST = "no"; # DO NOT CHANGE
|
||||||
|
|
||||||
|
# Display statistics about whole system (expressed in seconds)
|
||||||
|
MME_STATISTIC_TIMER = 10;
|
||||||
|
IP_CAPABILITY = "IPV4"; # UE PDN_TYPE
|
||||||
|
USE_STATELESS = "";
|
||||||
|
|
||||||
|
INTERTASK_INTERFACE :
|
||||||
|
{
|
||||||
|
# max queue size per task
|
||||||
|
ITTI_QUEUE_SIZE = 2000000;
|
||||||
|
};
|
||||||
|
|
||||||
|
S6A :
|
||||||
|
{
|
||||||
|
S6A_CONF = "/magma-mme/etc/mme_fd.conf"; # YOUR MME freeDiameter config file path
|
||||||
|
HSS_HOSTNAME = "hss.openairinterface.org";
|
||||||
|
HSS_REALM = "openairinterface.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ------- SCTP definitions
|
||||||
|
SCTP :
|
||||||
|
{
|
||||||
|
# Number of streams to use in input/output
|
||||||
|
SCTP_INSTREAMS = 8;
|
||||||
|
SCTP_OUTSTREAMS = 8;
|
||||||
|
};
|
||||||
|
|
||||||
|
# ------- S1AP definitions
|
||||||
|
S1AP :
|
||||||
|
{
|
||||||
|
# outcome drop timer value (seconds)
|
||||||
|
S1AP_OUTCOME_TIMER = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
# ------- MME served GUMMEIs
|
||||||
|
GUMMEI_LIST = (
|
||||||
|
{ MCC="208" ; MNC="97"; MME_GID="32768" ; MME_CODE="3"; }
|
||||||
|
);
|
||||||
|
|
||||||
|
# ------- MME served TAIs
|
||||||
|
TAI_LIST = (
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "1"; },
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "2"; },
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "3"; }
|
||||||
|
);
|
||||||
|
|
||||||
|
TAC_LIST = (
|
||||||
|
{MCC="208" ; MNC="97"; TAC = "1"; }
|
||||||
|
);
|
||||||
|
|
||||||
|
CSFB :
|
||||||
|
{
|
||||||
|
NON_EPS_SERVICE_CONTROL = "OFF";
|
||||||
|
CSFB_MCC = "208";
|
||||||
|
CSFB_MNC = "97";
|
||||||
|
LAC = "1";
|
||||||
|
};
|
||||||
|
NAS :
|
||||||
|
{
|
||||||
|
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ];
|
||||||
|
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ];
|
||||||
|
T3402 = 1 # in minutes (default is 12 minutes)
|
||||||
|
T3412 = 54 # in minutes (default is 54 minutes, network dependent)
|
||||||
|
T3422 = 6 # in seconds (default is 6s)
|
||||||
|
T3450 = 6 # in seconds (default is 6s)
|
||||||
|
T3460 = 6 # in seconds (default is 6s)
|
||||||
|
T3470 = 6 # in seconds (default is 6s)
|
||||||
|
T3485 = 8 # UNUSED in seconds (default is 8s)
|
||||||
|
T3486 = 8 # UNUSED in seconds (default is 8s)
|
||||||
|
T3489 = 4 # UNUSED in seconds (default is 4s)
|
||||||
|
T3495 = 8 # UNUSED in seconds (default is 8s)
|
||||||
|
};
|
||||||
|
|
||||||
|
SGS :
|
||||||
|
{
|
||||||
|
TS6_1 = 10 # in seconds (default is 10s)
|
||||||
|
TS8 = 4 # in seconds (default is 4s)
|
||||||
|
TS9 = 2 # in seconds (default is 4s)
|
||||||
|
TS10 = 4 # in seconds (default is 4s)
|
||||||
|
TS13 = 4 # in seconds (default is 4s)
|
||||||
|
};
|
||||||
|
|
||||||
|
NETWORK_INTERFACES :
|
||||||
|
{
|
||||||
|
MME_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||||
|
MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.195/24";
|
||||||
|
MME_INTERFACE_NAME_FOR_S11_MME = "eth0";
|
||||||
|
MME_IPV4_ADDRESS_FOR_S11_MME = "192.168.61.195/24";
|
||||||
|
MME_PORT_FOR_S11_MME = 2123;
|
||||||
|
};
|
||||||
|
|
||||||
|
LOGGING :
|
||||||
|
{
|
||||||
|
OUTPUT = "CONSOLE";
|
||||||
|
THREAD_SAFE = "no";
|
||||||
|
COLOR = "no";
|
||||||
|
|
||||||
|
SCTP_LOG_LEVEL = "ERROR";
|
||||||
|
GTPV1U_LOG_LEVEL = "INFO";
|
||||||
|
SPGW_APP_LOG_LEVEL = "INFO";
|
||||||
|
UDP_LOG_LEVEL = "INFO";
|
||||||
|
S1AP_LOG_LEVEL = "DEBUG";
|
||||||
|
NAS_LOG_LEVEL = "INFO";
|
||||||
|
MME_APP_LOG_LEVEL = "DEBUG";
|
||||||
|
GTPV2C_LOG_LEVEL = "INFO";
|
||||||
|
S11_LOG_LEVEL = "DEBUG";
|
||||||
|
S6A_LOG_LEVEL = "DEBUG";
|
||||||
|
UTIL_LOG_LEVEL = "INFO";
|
||||||
|
MSC_LOG_LEVEL = "ERROR";
|
||||||
|
ITTI_LOG_LEVEL = "ERROR";
|
||||||
|
MME_SCENARIO_PLAYER_LOG_LEVEL = "ERROR";
|
||||||
|
ASN1_VERBOSITY = "INFO";
|
||||||
|
};
|
||||||
|
|
||||||
|
S-GW :
|
||||||
|
{
|
||||||
|
SGW_IPV4_ADDRESS_FOR_S11 = "192.168.61.196";
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# -------- Local ---------
|
||||||
|
|
||||||
|
# Uncomment if the framework cannot resolv it.
|
||||||
|
Identity = "@MME_FQDN@";
|
||||||
|
Realm = "@REALM@";
|
||||||
|
|
||||||
|
# TLS configuration (see previous section)
|
||||||
|
TLS_Cred = "@PREFIX@/freeDiameter/mme.cert.pem",
|
||||||
|
"@PREFIX@/freeDiameter/mme.key.pem";
|
||||||
|
TLS_CA = "@PREFIX@/freeDiameter/mme.cacert.pem";
|
||||||
|
|
||||||
|
# Disable use of TCP protocol (only listen and connect in SCTP)
|
||||||
|
# Default : TCP enabled
|
||||||
|
No_SCTP;
|
||||||
|
|
||||||
|
# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
|
||||||
|
# Prefer TCP instead of SCTP for establishing new connections.
|
||||||
|
# This setting may be overwritten per peer in peer configuration blocs.
|
||||||
|
# Default : SCTP is attempted first.
|
||||||
|
Prefer_TCP;
|
||||||
|
|
||||||
|
|
||||||
|
No_IPv6;
|
||||||
|
|
||||||
|
# Overwrite the number of SCTP streams. This value should be kept low,
|
||||||
|
# especially if you are using TLS over SCTP, because it consumes a lot of
|
||||||
|
# resources in that case. See tickets 19 and 27 for some additional details on
|
||||||
|
# this.
|
||||||
|
# Limit the number of SCTP streams
|
||||||
|
SCTP_streams = 3;
|
||||||
|
|
||||||
|
|
||||||
|
# By default, freeDiameter acts as a Diameter Relay Agent by forwarding all
|
||||||
|
# messages it cannot handle locally. This parameter disables this behavior.
|
||||||
|
NoRelay;
|
||||||
|
|
||||||
|
# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed
|
||||||
|
# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the
|
||||||
|
# CER/CEA exchange on a dedicated secure port.
|
||||||
|
# This parameter only affects outgoing connections.
|
||||||
|
# The setting can be also defined per-peer (see Peers configuration section).
|
||||||
|
# Default: use RFC6733 method with separate port for TLS.
|
||||||
|
|
||||||
|
#TLS_old_method;
|
||||||
|
|
||||||
|
AppServThreads = 4;
|
||||||
|
|
||||||
|
# Specify the addresses on which to bind the listening server. This must be
|
||||||
|
# specified if the framework is unable to auto-detect these addresses, or if the
|
||||||
|
# auto-detected values are incorrect. Note that the list of addresses is sent
|
||||||
|
# in CER or CEA message, so one should pay attention to this parameter if some
|
||||||
|
# adresses should be kept hidden.
|
||||||
|
ListenOn = "@MME_S6A_IP_ADDR@";
|
||||||
|
|
||||||
|
Port = 3870;
|
||||||
|
SecPort = 5870;
|
||||||
|
|
||||||
|
# -------- Extensions ---------
|
||||||
|
|
||||||
|
# Uncomment (and create rtd.conf) to specify routing table for this peer.
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx" : "rtd.conf";
|
||||||
|
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/_sample.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/app_acct.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/app_diameap.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/app_radgw.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/app_redirect.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/app_sip.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_interactive.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_monitor.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_dumps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_timings.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_rt.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_CxDx.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Ro.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_S6mS6n.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_SLh.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sh.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_T4.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Tsp.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_3gpp.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_starent.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_eap.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_legacy_xml.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6a.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6i.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_nas_mipv6.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_nasreq.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_sip.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_busypeers.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_ereg.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_ignore_dh.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_load_balance.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_randomize.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/rt_redirect.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_acct.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_app.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_hss.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_netemul.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_rt_any.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/test_sip.fdx";
|
||||||
|
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rf.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
|
||||||
|
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
|
||||||
|
|
||||||
|
|
||||||
|
# -------- Peers ---------
|
||||||
|
|
||||||
|
# The framework will actively attempt to establish and maintain a connection
|
||||||
|
# with the peers listed here.
|
||||||
|
# For only accepting incoming connections, see the acl_wl.fx extension.
|
||||||
|
|
||||||
|
# ConnectPeer
|
||||||
|
# Declare a remote peer to which this peer must maintain a connection.
|
||||||
|
# In addition, this allows specifying non-default parameters for this peer only
|
||||||
|
# (for example disable SCTP with this peer, or use RFC3588-flavour TLS).
|
||||||
|
# Note that by default, if a peer is not listed as a ConnectPeer entry, an
|
||||||
|
# incoming connection from this peer will be rejected. If you want to accept
|
||||||
|
# incoming connections from other peers, see the acl_wl.fdx? extension which
|
||||||
|
# allows exactly this.
|
||||||
|
|
||||||
|
ConnectPeer= "@HSS_FQDN@" { ConnectTo = "@HSS_IP_ADDR@"; No_SCTP ; No_IPv6; Prefer_TCP; No_TLS; port = 3868;};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2016-present, Facebook, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the BSD-style license found in the
|
||||||
|
# LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
# of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
|
# Jinja template for Redis configuration
|
||||||
|
# See the default config file for options and explanations:
|
||||||
|
# https://github.com/antirez/redis/blob/unstable/redis.conf
|
||||||
|
|
||||||
|
# TODO: make sensible, production-aware config decisions
|
||||||
|
|
||||||
|
bind 192.168.61.198
|
||||||
|
port 6380
|
||||||
|
|
||||||
|
daemonize no
|
||||||
|
loglevel notice
|
||||||
|
|
||||||
|
timeout 0
|
||||||
|
databases 1
|
||||||
|
|
||||||
|
dbfilename redis_dump.rdb
|
||||||
|
dir /data
|
||||||
|
|
||||||
|
# Save the DB on disk
|
||||||
|
|
||||||
|
save 900 1
|
||||||
|
|
||||||
|
save 300 10
|
||||||
|
|
||||||
|
save 60 1000
|
||||||
@@ -309,6 +309,7 @@ endif()
|
|||||||
|
|
||||||
#
|
#
|
||||||
# add autotools definitions that were maybe used!
|
# add autotools definitions that were maybe used!
|
||||||
|
|
||||||
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
|
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
|
||||||
|
|
||||||
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
||||||
@@ -318,11 +319,7 @@ set(CMAKE_C_FLAGS
|
|||||||
set(CMAKE_CXX_FLAGS
|
set(CMAKE_CXX_FLAGS
|
||||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11")
|
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11")
|
||||||
|
|
||||||
# cuda compiler bug (limitation) on complex macro definition
|
|
||||||
if (CUDA_FOUND)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCUDA_FLAG")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_FLAG")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (SANITIZE_ADDRESS)
|
if (SANITIZE_ADDRESS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
|
||||||
@@ -332,11 +329,11 @@ endif ()
|
|||||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ggdb3 -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ggdb2 -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
#########################
|
#########################
|
||||||
# set a flag for changes in the source code
|
# set a flag for changes in the source code
|
||||||
# these changes are related to hardcoded path to include .h files
|
# these changes are related to hardcoded path to include .h files
|
||||||
set(debugOpt "-ggdb3 -DMALLOC_CHECK_=3 -fno-delete-null-pointer-checks")
|
set(debugOpt "-ggdb2 -DMALLOC_CHECK_=3 -fno-delete-null-pointer-checks")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${debugOpt} -O0")
|
set(CMAKE_C_FLAGS_DEBUG "${debugOpt} -O0")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${debugOpt} -O2")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${debugOpt} -O2")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||||
@@ -985,8 +982,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
|||||||
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
|
||||||
|
|
||||||
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||||
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
||||||
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
|
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
|
||||||
@@ -1047,7 +1042,6 @@ add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STR
|
|||||||
##########################
|
##########################
|
||||||
# RLC LAYER OPTIONS
|
# RLC LAYER OPTIONS
|
||||||
##########################
|
##########################
|
||||||
add_boolean_option(OPENAIR2 True "Access Stratum layer 2 built in executable")
|
|
||||||
add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case")
|
add_boolean_option(TRACE_RLC_PAYLOAD False "Fatal assert in this case")
|
||||||
add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case")
|
add_boolean_option(RLC_STOP_ON_LOST_PDU False "Fatal assert in this case")
|
||||||
|
|
||||||
@@ -1075,8 +1069,6 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS False "TRACE for RLC UM, TO BE CHANGE
|
|||||||
##########################
|
##########################
|
||||||
# PDCP LAYER OPTIONS
|
# PDCP LAYER OPTIONS
|
||||||
##########################
|
##########################
|
||||||
#add_boolean_option(PDCP_USE_NETLINK False "For eNB, PDCP communicate with a NETLINK socket if connected to network driver, else could use a RT-FIFO")
|
|
||||||
#add_boolean_option(PDCP_USE_NETLINK_QUEUES False "When PDCP_USE_NETLINK is true, incoming IP packets are stored in queues")
|
|
||||||
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver")
|
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER False "For eNB, PDCP communicate with a IP driver")
|
||||||
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
|
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U True "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
|
||||||
|
|
||||||
@@ -1590,6 +1582,16 @@ set(PHY_LDPC_OPTIM8SEGMULTI_SRC
|
|||||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
|
||||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||||
)
|
)
|
||||||
|
set(PHY_LDPC_CUDA_SRC
|
||||||
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||||
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set(PHY_LDPC_CL_SRC
|
||||||
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c
|
||||||
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||||
|
)
|
||||||
|
|
||||||
set(PHY_NR_CODINGIF
|
set(PHY_NR_CODINGIF
|
||||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c;
|
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c;
|
||||||
)
|
)
|
||||||
@@ -1597,8 +1599,18 @@ set(PHY_NR_CODINGIF
|
|||||||
add_library(ldpc_orig MODULE ${PHY_LDPC_ORIG_SRC} )
|
add_library(ldpc_orig MODULE ${PHY_LDPC_ORIG_SRC} )
|
||||||
add_library(ldpc_optim MODULE ${PHY_LDPC_OPTIM_SRC} )
|
add_library(ldpc_optim MODULE ${PHY_LDPC_OPTIM_SRC} )
|
||||||
add_library(ldpc_optim8seg MODULE ${PHY_LDPC_OPTIM8SEG_SRC} )
|
add_library(ldpc_optim8seg MODULE ${PHY_LDPC_OPTIM8SEG_SRC} )
|
||||||
|
add_library(ldpc_cl MODULE ${PHY_LDPC_CL_SRC} )
|
||||||
|
target_link_libraries(ldpc_cl OpenCL)
|
||||||
|
|
||||||
|
if (CUDA_FOUND)
|
||||||
|
cuda_add_library(ldpc_cuda MODULE ${PHY_LDPC_CUDA_SRC} )
|
||||||
|
set_target_properties(ldpc_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||||
|
# CUDA_ADD_CUFFT_TO_TARGET(ldpc_cuda)
|
||||||
|
endif (CUDA_FOUND)
|
||||||
|
|
||||||
add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
|
add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
|
||||||
|
|
||||||
|
|
||||||
add_library(coding MODULE ${PHY_TURBOSRC} )
|
add_library(coding MODULE ${PHY_TURBOSRC} )
|
||||||
|
|
||||||
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
|
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
|
||||||
@@ -1744,7 +1756,6 @@ set(PHY_SRC_UE
|
|||||||
|
|
||||||
set(PHY_NR_SRC_COMMON
|
set(PHY_NR_SRC_COMMON
|
||||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
|
||||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dci_tools_common.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PHY_NR_SRC
|
set(PHY_NR_SRC
|
||||||
@@ -1983,6 +1994,10 @@ set(NR_PDCP_SRC
|
|||||||
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
|
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(NR_SDAP_SRC
|
||||||
|
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap_gnb.c
|
||||||
|
)
|
||||||
|
|
||||||
set(L2_SRC
|
set(L2_SRC
|
||||||
${PDCP_DIR}/pdcp.c
|
${PDCP_DIR}/pdcp.c
|
||||||
${PDCP_DIR}/pdcp_fifo.c
|
${PDCP_DIR}/pdcp_fifo.c
|
||||||
@@ -2026,6 +2041,7 @@ set(L2_LTE_SRC
|
|||||||
set(L2_NR_SRC
|
set(L2_NR_SRC
|
||||||
${NR_RLC_SRC}
|
${NR_RLC_SRC}
|
||||||
${NR_PDCP_SRC}
|
${NR_PDCP_SRC}
|
||||||
|
${NR_SDAP_SRC}
|
||||||
${NR_RRC_DIR}/rrc_gNB.c
|
${NR_RRC_DIR}/rrc_gNB.c
|
||||||
${NR_RRC_DIR}/nr_rrc_common.c
|
${NR_RRC_DIR}/nr_rrc_common.c
|
||||||
${NR_RRC_DIR}/L2_nr_interface.c
|
${NR_RRC_DIR}/L2_nr_interface.c
|
||||||
@@ -2061,6 +2077,7 @@ set(L2_RRC_SRC_UE
|
|||||||
set(NR_L2_SRC_UE
|
set(NR_L2_SRC_UE
|
||||||
${NR_RLC_SRC}
|
${NR_RLC_SRC}
|
||||||
${NR_PDCP_SRC}
|
${NR_PDCP_SRC}
|
||||||
|
${NR_SDAP_SRC}
|
||||||
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
||||||
${NR_UE_RRC_DIR}/main_ue.c
|
${NR_UE_RRC_DIR}/main_ue.c
|
||||||
${NR_UE_RRC_DIR}/rrc_UE.c
|
${NR_UE_RRC_DIR}/rrc_UE.c
|
||||||
@@ -3113,7 +3130,11 @@ target_link_libraries (nr-uesoftmodem ${LIB_LMS_LIBRARIES})
|
|||||||
target_link_libraries (nr-uesoftmodem ${T_LIB})
|
target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||||
|
|
||||||
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||||
|
if (CUDA_FOUND)
|
||||||
|
add_dependencies( nr-uesoftmodem ldpc_cuda)
|
||||||
|
add_dependencies( nr-softmodem ldpc_cuda)
|
||||||
|
add_dependencies( ocp-gnb ldpc_cuda)
|
||||||
|
endif (CUDA_FOUND)
|
||||||
###################################"
|
###################################"
|
||||||
# Addexecutables for tests
|
# Addexecutables for tests
|
||||||
####################################
|
####################################
|
||||||
@@ -3173,46 +3194,18 @@ target_link_libraries(smallblocktest
|
|||||||
m pthread ${ATLAS_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CUDA_FOUND)
|
|
||||||
###################################################
|
|
||||||
# For CUDA library
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
CUDA_ADD_LIBRARY(LDPC_CU
|
add_executable(ldpctest
|
||||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
${PHY_NR_CODINGIF}
|
||||||
)
|
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||||
CUDA_ADD_CUFFT_TO_TARGET(LDPC_CU)
|
${T_SOURCE}
|
||||||
cuda_add_executable(ldpctest
|
${SHLIB_LOADER_SOURCES}
|
||||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
)
|
||||||
${T_SOURCE}
|
|
||||||
${SHLIB_LOADER_SOURCES}
|
|
||||||
)
|
|
||||||
target_link_libraries(ldpctest -ldl
|
|
||||||
-Wl,--start-group
|
|
||||||
LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB
|
|
||||||
-Wl,--end-group
|
|
||||||
m pthread ${ATLAS_LIBRARIES} dl
|
|
||||||
)
|
|
||||||
|
|
||||||
else (CUDA_FOUND)
|
|
||||||
add_executable(ldpctest
|
|
||||||
${PHY_NR_CODINGIF}
|
|
||||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
|
||||||
${T_SOURCE}
|
|
||||||
${SHLIB_LOADER_SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
# add_executable(ldpctest
|
|
||||||
# ${PHY_NR_CODINGIF}
|
|
||||||
# ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
|
||||||
# ${T_SOURCE}
|
|
||||||
# ${SHLIB_LOADER_SOURCES}
|
|
||||||
# )
|
|
||||||
add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||||
|
if (CUDA_FOUND)
|
||||||
|
add_dependencies( ldpctest ldpc_cuda)
|
||||||
|
endif (CUDA_FOUND)
|
||||||
target_link_libraries(ldpctest
|
target_link_libraries(ldpctest
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} dl
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ function main() {
|
|||||||
if [ "$HW" == "OAI_USRP" ] ; then
|
if [ "$HW" == "OAI_USRP" ] ; then
|
||||||
echo_info "installing packages for USRP support"
|
echo_info "installing packages for USRP support"
|
||||||
check_install_usrp_uhd_driver
|
check_install_usrp_uhd_driver
|
||||||
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||||
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ check_supported_distribution() {
|
|||||||
"rhel8.2") return 0 ;;
|
"rhel8.2") return 0 ;;
|
||||||
"rhel8.3") return 0 ;;
|
"rhel8.3") return 0 ;;
|
||||||
"rhel8.4") return 0 ;;
|
"rhel8.4") return 0 ;;
|
||||||
|
"rhel8.5") return 0 ;;
|
||||||
|
"rhel8.6") return 0 ;;
|
||||||
|
"rhel8.7") return 0 ;;
|
||||||
"centos7") return 0 ;;
|
"centos7") return 0 ;;
|
||||||
esac
|
esac
|
||||||
return 1
|
return 1
|
||||||
@@ -317,19 +320,30 @@ install_usrp_uhd_driver_from_source(){
|
|||||||
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
|
||||||
(
|
(
|
||||||
pushd /tmp
|
pushd /tmp
|
||||||
echo "Downloading UHD driver"
|
echo "Cloning UHD driver repository"
|
||||||
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
|
cd uhd
|
||||||
git checkout tags/v4.0.0.0
|
if [[ -v UHD_VERSION ]]; then
|
||||||
|
git checkout tags/v${UHD_VERSION}
|
||||||
|
else
|
||||||
|
git checkout tags/v4.0.0.0
|
||||||
|
fi
|
||||||
mkdir -p host/build
|
mkdir -p host/build
|
||||||
cd host/build
|
cd host/build || true
|
||||||
$CMAKE ../
|
$CMAKE ../ -GNinja
|
||||||
echo "Compiling UHD"
|
echo "Compiling UHD"
|
||||||
make -j`nproc`
|
ninja
|
||||||
make test
|
$SUDO ninja install
|
||||||
$SUDO make install
|
|
||||||
$SUDO ldconfig -v
|
$SUDO ldconfig -v
|
||||||
|
if [ $IS_CONTAINER -eq 0 ]; then
|
||||||
|
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||||
|
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
|
||||||
|
fi
|
||||||
|
if [[ "$OS_DISTRO" == "rhel" ]]; then
|
||||||
|
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
|
||||||
|
fi
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
rm -rf /tmp/uhd
|
rm -rf /tmp/uhd
|
||||||
) >& $uhd_install_log
|
) >& $uhd_install_log
|
||||||
@@ -338,10 +352,26 @@ install_usrp_uhd_driver_from_source(){
|
|||||||
check_install_usrp_uhd_driver(){
|
check_install_usrp_uhd_driver(){
|
||||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||||
#first we remove old installation
|
#first we remove old installation
|
||||||
$SUDO apt-get remove -y uhd || true
|
$SUDO apt-get remove uhd -y || true
|
||||||
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true
|
$SUDO apt-get remove uhd-host -y || true
|
||||||
|
$SUDO apt-get remove libuhd-dev -y || true
|
||||||
|
$SUDO apt-get remove libuhd003 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.13.1 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.14.0 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.14.1 -y || true
|
||||||
|
$SUDO apt-get remove libuhd3.15.0 -y || true
|
||||||
|
local distribution=$(get_distribution_release)
|
||||||
|
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||||
|
$SUDO apt-get remove libuhd4.0.0 -y || true
|
||||||
|
$SUDO apt-get remove libuhd4.1.0 -y || true
|
||||||
|
fi
|
||||||
v=$(lsb_release -cs)
|
v=$(lsb_release -cs)
|
||||||
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
||||||
|
if [[ -v BUILD_UHD_FROM_SOURCE ]]; then
|
||||||
|
$SUDO apt-get install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-setuptools ninja-build
|
||||||
|
install_usrp_uhd_driver_from_source
|
||||||
|
return
|
||||||
|
fi
|
||||||
# The new USRP repository
|
# The new USRP repository
|
||||||
# Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may
|
# Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may
|
||||||
# timeout due to proxy / network latencies in Eurecom on VM
|
# timeout due to proxy / network latencies in Eurecom on VM
|
||||||
@@ -361,7 +391,12 @@ check_install_usrp_uhd_driver(){
|
|||||||
done
|
done
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
|
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
|
||||||
$SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
|
if [[ "$distribution" == "ubuntu16.04" ]]; then
|
||||||
|
$SUDO apt-get -y install libuhd-dev libuhd3.15.0 uhd-host
|
||||||
|
fi
|
||||||
|
if [[ "$distribution" == "ubuntu18.04" ]]; then
|
||||||
|
$SUDO apt-get -y install libuhd-dev libuhd4.1.0 uhd-host
|
||||||
|
fi
|
||||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||||
if [ $IS_CONTAINER -eq 0 ]
|
if [ $IS_CONTAINER -eq 0 ]
|
||||||
then
|
then
|
||||||
@@ -692,6 +727,7 @@ check_install_oai_software() {
|
|||||||
build-essential \
|
build-essential \
|
||||||
$CMAKE \
|
$CMAKE \
|
||||||
cmake-curses-gui \
|
cmake-curses-gui \
|
||||||
|
curl \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
doxygen \
|
doxygen \
|
||||||
doxygen-gui \
|
doxygen-gui \
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf)
|
|||||||
* If the farray pointer is null, looks for `< modname >_getfarray` symbol, calls the corresponding function when the symbol is found. `< modname >_getfarray` takes one argument, a pointer to a `loader_shlibfunc_t` array, and returns the number of items in this array, as defined by the `getfarrayfunc_t` type. The `loader_shlibfunc_t` array returned by the shared library must be fully filled (both `fname` and `fptr` fields).
|
* If the farray pointer is null, looks for `< modname >_getfarray` symbol, calls the corresponding function when the symbol is found. `< modname >_getfarray` takes one argument, a pointer to a `loader_shlibfunc_t` array, and returns the number of items in this array, as defined by the `getfarrayfunc_t` type. The `loader_shlibfunc_t` array returned by the shared library must be fully filled (both `fname` and `fptr` fields).
|
||||||
* looks for the `numf` function symbols listed in the `farray[i].fname` arguments and set the corresponding `farray[i].fptr`function pointers
|
* looks for the `numf` function symbols listed in the `farray[i].fname` arguments and set the corresponding `farray[i].fptr`function pointers
|
||||||
|
|
||||||
|
```c
|
||||||
|
int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf)
|
||||||
|
```
|
||||||
|
Allows loading a specific library version, as specified by the `version` parameter. When version is not NULL the version that is possibly specified as a config module parameter is ignored. This call has been introduced for phy simulators executables which do not use the config module. It is used, for example, by the ldcp initialization (`load_nrLDPClib` function in [nrLDPC_load.c](../../../../../openair1/PHY/CODING/nrLDPC_load.c) to allow the `ldpctest` simulator to select the cuda accelerated ldcp implementation. `load_module_shlib` is just a define macro to switch to a `load_module_version_shlib` call, adding a NULL pointer for the version parameter.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void * get_shlibmodule_fptr(char *modname, char *fname)
|
void * get_shlibmodule_fptr(char *modname, char *fname)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include"log.h"
|
#include "log.h"
|
||||||
|
|
||||||
extern log_t *g_log;
|
extern log_t *g_log;
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void loader_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* build the full shared lib name from the module name */
|
/* build the full shared lib name from the module name */
|
||||||
char *loader_format_shlibpath(char *modname)
|
char *loader_format_shlibpath(char *modname, char *version)
|
||||||
{
|
{
|
||||||
|
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
@@ -97,7 +97,10 @@ int ret;
|
|||||||
shlibpath = loader_data.shlibpath ;
|
shlibpath = loader_data.shlibpath ;
|
||||||
}
|
}
|
||||||
/* no specific shared lib version */
|
/* no specific shared lib version */
|
||||||
if (shlibversion == NULL) {
|
if (version != NULL) { // version specified as a function parameter
|
||||||
|
shlibversion=version;
|
||||||
|
}
|
||||||
|
if (shlibversion == NULL) { // no specific version specified, neither as a config param or as a function param
|
||||||
shlibversion = "" ;
|
shlibversion = "" ;
|
||||||
}
|
}
|
||||||
/* alloc memory for full module shared lib file name */
|
/* alloc memory for full module shared lib file name */
|
||||||
@@ -118,7 +121,7 @@ int ret;
|
|||||||
return tmpstr;
|
return tmpstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void *autoinit_arg)
|
int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *autoinit_arg)
|
||||||
{
|
{
|
||||||
void *lib_handle = NULL;
|
void *lib_handle = NULL;
|
||||||
initfunc_t fpi;
|
initfunc_t fpi;
|
||||||
@@ -138,7 +141,7 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void *
|
|||||||
loader_init();
|
loader_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
shlib_path = loader_format_shlibpath(modname);
|
shlib_path = loader_format_shlibpath(modname, version);
|
||||||
|
|
||||||
for (int i = 0; i < loader_data.numshlibs; i++) {
|
for (int i = 0; i < loader_data.numshlibs; i++) {
|
||||||
if (strcmp(loader_data.shlibs[i].name, modname) == 0) {
|
if (strcmp(loader_data.shlibs[i].name, modname) == 0) {
|
||||||
|
|||||||
@@ -84,10 +84,11 @@ loader_data_t loader_data;
|
|||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------------------------------------------*/
|
||||||
#else /* LOAD_MODULE_SHLIB_MAIN */
|
#else /* LOAD_MODULE_SHLIB_MAIN */
|
||||||
extern int load_module_shlib(char *modname, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
|
|
||||||
|
extern int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
|
||||||
extern void * get_shlibmodule_fptr(char *modname, char *fname);
|
extern void * get_shlibmodule_fptr(char *modname, char *fname);
|
||||||
extern loader_data_t loader_data;
|
extern loader_data_t loader_data;
|
||||||
#endif /* LOAD_MODULE_SHLIB_MAIN */
|
#endif /* LOAD_MODULE_SHLIB_MAIN */
|
||||||
|
#define load_module_shlib(M, F, N, I) load_module_version_shlib(M, NULL, F, N, I)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+211
-4
@@ -34,6 +34,8 @@
|
|||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "nr_common.h"
|
#include "nr_common.h"
|
||||||
|
|
||||||
|
const char *duplex_mode[]={"FDD","TDD"};
|
||||||
|
|
||||||
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
|
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
|
||||||
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
|
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
|
||||||
// Notes:
|
// Notes:
|
||||||
@@ -63,8 +65,8 @@ nr_bandentry_t nr_bandtable[] = {
|
|||||||
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
||||||
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
||||||
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
|
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
|
||||||
//{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
|
{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
|
||||||
//{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
|
{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
|
||||||
{50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100},
|
{50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100},
|
{51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
|
{53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100},
|
||||||
@@ -88,14 +90,15 @@ nr_bandentry_t nr_bandtable[] = {
|
|||||||
{84, 1920000, 1980000, 000, 000, 20, 384000, 100},
|
{84, 1920000, 1980000, 000, 000, 20, 384000, 100},
|
||||||
{86, 1710000, 1785000, 000, 000, 20, 342000, 100},
|
{86, 1710000, 1785000, 000, 000, 20, 342000, 100},
|
||||||
{89, 824000, 849000, 000, 000, 20, 342000, 100},
|
{89, 824000, 849000, 000, 000, 20, 342000, 100},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
{90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
{90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
||||||
{90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100},
|
{90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100},
|
||||||
{91, 832000, 862000, 1427000, 1432000, 20, 285400, 100},
|
{91, 832000, 862000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{92, 832000, 862000, 1432000, 1517000, 20, 286400, 100},
|
{92, 832000, 862000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{93, 880000, 915000, 1427000, 1432000, 20, 285400, 100},
|
{93, 880000, 915000, 1427000, 1432000, 20, 285400, 100},
|
||||||
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
|
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
|
||||||
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
|
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
|
||||||
|
{96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15},
|
||||||
{257,26500020,29500000,26500020,29500000, 1,2054166, 60},
|
{257,26500020,29500000,26500020,29500000, 1,2054166, 60},
|
||||||
{257,26500080,29500000,26500080,29500000, 2,2054167, 120},
|
{257,26500080,29500000,26500080,29500000, 2,2054167, 120},
|
||||||
{258,24250080,27500000,24250080,27500000, 1,2016667, 60},
|
{258,24250080,27500000,24250080,27500000, 1,2016667, 60},
|
||||||
@@ -230,6 +233,30 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) {
|
||||||
|
|
||||||
|
uint8_t count=0, start=0, start_set=0;
|
||||||
|
|
||||||
|
uint64_t bitmap = (((uint64_t)FreqDomainResource[0])<<37)|
|
||||||
|
(((uint64_t)FreqDomainResource[1])<<29)|
|
||||||
|
(((uint64_t)FreqDomainResource[2])<<21)|
|
||||||
|
(((uint64_t)FreqDomainResource[3])<<13)|
|
||||||
|
(((uint64_t)FreqDomainResource[4])<<5)|
|
||||||
|
(((uint64_t)FreqDomainResource[5])>>3);
|
||||||
|
|
||||||
|
for (int i=0; i<45; i++)
|
||||||
|
if ((bitmap>>(44-i))&1) {
|
||||||
|
count++;
|
||||||
|
if (!start_set) {
|
||||||
|
start = i;
|
||||||
|
start_set = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*rb_offset = 6*start;
|
||||||
|
*n_rb = 6*count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
||||||
|
|
||||||
if (dmrs_ports == 0) return 0; // dci 1_0
|
if (dmrs_ports == 0) return 0; // dci 1_0
|
||||||
@@ -248,6 +275,186 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get_num_dmrs(uint16_t dmrs_mask ) {
|
||||||
|
|
||||||
|
int num_dmrs=0;
|
||||||
|
|
||||||
|
for (int i=0;i<16;i++) num_dmrs+=((dmrs_mask>>i)&1);
|
||||||
|
return(num_dmrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
lte_frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
|
||||||
|
{
|
||||||
|
lte_frame_type_t current_type;
|
||||||
|
int32_t delta_duplex = get_delta_duplex(current_band, scs_index);
|
||||||
|
|
||||||
|
if (delta_duplex == 0)
|
||||||
|
current_type = TDD;
|
||||||
|
else
|
||||||
|
current_type = FDD;
|
||||||
|
|
||||||
|
LOG_I(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
|
||||||
|
|
||||||
|
return current_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Computes the duplex spacing (either positive or negative) in KHz
|
||||||
|
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index)
|
||||||
|
{
|
||||||
|
int nr_table_idx = get_nr_table_idx(nr_bandP, scs_index);
|
||||||
|
|
||||||
|
int32_t delta_duplex = (nr_bandtable[nr_table_idx].ul_min - nr_bandtable[nr_table_idx].dl_min);
|
||||||
|
|
||||||
|
LOG_I(NR_MAC, "NR band duplex spacing is %d KHz (nr_bandtable[%d].band = %d)\n", delta_duplex, nr_table_idx, nr_bandtable[nr_table_idx].band);
|
||||||
|
|
||||||
|
return delta_duplex;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t config_bandwidth(int mu, int nb_rb, int nr_band)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (nr_band < 100) { //FR1
|
||||||
|
switch(mu) {
|
||||||
|
case 0 :
|
||||||
|
if (nb_rb<=25)
|
||||||
|
return 5;
|
||||||
|
if (nb_rb<=52)
|
||||||
|
return 10;
|
||||||
|
if (nb_rb<=79)
|
||||||
|
return 15;
|
||||||
|
if (nb_rb<=106)
|
||||||
|
return 20;
|
||||||
|
if (nb_rb<=133)
|
||||||
|
return 25;
|
||||||
|
if (nb_rb<=160)
|
||||||
|
return 30;
|
||||||
|
if (nb_rb<=216)
|
||||||
|
return 40;
|
||||||
|
if (nb_rb<=270)
|
||||||
|
return 50;
|
||||||
|
AssertFatal(1==0,"Number of DL resource blocks %d undefined for mu %d and band %d\n", nb_rb, mu, nr_band);
|
||||||
|
break;
|
||||||
|
case 1 :
|
||||||
|
if (nb_rb<=11)
|
||||||
|
return 5;
|
||||||
|
if (nb_rb<=24)
|
||||||
|
return 10;
|
||||||
|
if (nb_rb<=38)
|
||||||
|
return 15;
|
||||||
|
if (nb_rb<=51)
|
||||||
|
return 20;
|
||||||
|
if (nb_rb<=65)
|
||||||
|
return 25;
|
||||||
|
if (nb_rb<=78)
|
||||||
|
return 30;
|
||||||
|
if (nb_rb<=106)
|
||||||
|
return 40;
|
||||||
|
if (nb_rb<=133)
|
||||||
|
return 50;
|
||||||
|
if (nb_rb<=162)
|
||||||
|
return 60;
|
||||||
|
if (nb_rb<=189)
|
||||||
|
return 70;
|
||||||
|
if (nb_rb<=217)
|
||||||
|
return 80;
|
||||||
|
if (nb_rb<=245)
|
||||||
|
return 90;
|
||||||
|
if (nb_rb<=273)
|
||||||
|
return 100;
|
||||||
|
AssertFatal(1==0,"Number of DL resource blocks %d undefined for mu %d and band %d\n", nb_rb, mu, nr_band);
|
||||||
|
break;
|
||||||
|
case 2 :
|
||||||
|
if (nb_rb<=11)
|
||||||
|
return 10;
|
||||||
|
if (nb_rb<=18)
|
||||||
|
return 15;
|
||||||
|
if (nb_rb<=24)
|
||||||
|
return 20;
|
||||||
|
if (nb_rb<=31)
|
||||||
|
return 25;
|
||||||
|
if (nb_rb<=38)
|
||||||
|
return 30;
|
||||||
|
if (nb_rb<=51)
|
||||||
|
return 40;
|
||||||
|
if (nb_rb<=65)
|
||||||
|
return 50;
|
||||||
|
if (nb_rb<=79)
|
||||||
|
return 60;
|
||||||
|
if (nb_rb<=93)
|
||||||
|
return 70;
|
||||||
|
if (nb_rb<=107)
|
||||||
|
return 80;
|
||||||
|
if (nb_rb<=121)
|
||||||
|
return 90;
|
||||||
|
if (nb_rb<=135)
|
||||||
|
return 100;
|
||||||
|
AssertFatal(1==0,"Number of DL resource blocks %d undefined for mu %d and band %d\n", nb_rb, mu, nr_band);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
AssertFatal(1==0,"Numerology %d undefined for band %d in FR1\n", mu,nr_band);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch(mu) {
|
||||||
|
case 2 :
|
||||||
|
if (nb_rb<=66)
|
||||||
|
return 50;
|
||||||
|
if (nb_rb<=132)
|
||||||
|
return 100;
|
||||||
|
if (nb_rb<=264)
|
||||||
|
return 200;
|
||||||
|
AssertFatal(1==0,"Number of DL resource blocks %d undefined for mu %d and band %d\n", nb_rb, mu, nr_band);
|
||||||
|
break;
|
||||||
|
case 3 :
|
||||||
|
if (nb_rb<=32)
|
||||||
|
return 50;
|
||||||
|
if (nb_rb<=66)
|
||||||
|
return 100;
|
||||||
|
if (nb_rb<=132)
|
||||||
|
return 200;
|
||||||
|
if (nb_rb<=264)
|
||||||
|
return 400;
|
||||||
|
AssertFatal(1==0,"Number of DL resource blocks %d undefined for mu %d and band %d\n", nb_rb, mu, nr_band);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
AssertFatal(1==0,"Numerology %d undefined for band %d in FR1\n", mu,nr_band);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the corresponding row index of the NR table
|
||||||
|
int get_nr_table_idx(int nr_bandP, uint8_t scs_index) {
|
||||||
|
int i, j;
|
||||||
|
int scs_khz = 15 << scs_index;
|
||||||
|
int supplementary_bands[] = {29,75,76,80,81,82,83,84,86,89,95};
|
||||||
|
size_t s = sizeof(supplementary_bands)/sizeof(supplementary_bands[0]);
|
||||||
|
|
||||||
|
for(j = 0; j < s; j++){
|
||||||
|
if (nr_bandP == supplementary_bands[j])
|
||||||
|
AssertFatal(0 == 1, "Band %d is a supplementary band (%d). This is not supported yet.\n", nr_bandP, supplementary_bands[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band);
|
||||||
|
for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++);
|
||||||
|
|
||||||
|
// In frequency bands with two deltaFRaster,
|
||||||
|
// the higher deltaFRaster applies to channels using only the SCS that is equal to or larger than the higher deltaFRaster
|
||||||
|
// and SSB SCS is equal to the higher deltaFRaster.
|
||||||
|
while(((i+1)<nr_bandtable_size) &&
|
||||||
|
(nr_bandtable[i+1].band == nr_bandtable[i].band) &&
|
||||||
|
(nr_bandtable[i].deltaf_raster != scs_khz)) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
AssertFatal(nr_bandtable[i].band == nr_bandP, "Found band table %d does not correspond to the input one %d\n",nr_bandtable[i].band,nr_bandP);
|
||||||
|
|
||||||
|
|
||||||
|
LOG_D(PHY, "NR band table index %d (Band %d, dl_min %lu, ul_min %lu)\n", i, nr_bandtable[i].band, nr_bandtable[i].dl_min,nr_bandtable[i].ul_min);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int get_subband_size(int NPRB,int size) {
|
int get_subband_size(int NPRB,int size) {
|
||||||
// implements table 5.2.1.4-2 from 36.214
|
// implements table 5.2.1.4-2 from 36.214
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
|
#include "PHY/defs_common.h"
|
||||||
|
|
||||||
typedef struct nr_bandentry_s {
|
typedef struct nr_bandentry_s {
|
||||||
int16_t band;
|
int16_t band;
|
||||||
@@ -50,6 +51,12 @@ typedef struct nr_bandentry_s {
|
|||||||
extern const size_t nr_bandtable_size;
|
extern const size_t nr_bandtable_size;
|
||||||
extern nr_bandentry_t nr_bandtable[];
|
extern nr_bandentry_t nr_bandtable[];
|
||||||
|
|
||||||
|
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
|
||||||
|
int get_num_dmrs(uint16_t dmrs_mask);
|
||||||
|
uint16_t config_bandwidth(int mu, int nb_rb, int nr_band);
|
||||||
|
int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
|
||||||
|
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
|
||||||
|
lte_frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
|
||||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex);
|
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex);
|
||||||
int NRRIV2BW(int locationAndBandwidth,int N_RB);
|
int NRRIV2BW(int locationAndBandwidth,int N_RB);
|
||||||
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
|
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
#include <form.h>
|
||||||
#include "common/utils/load_module_shlib.h"
|
#include "common/utils/load_module_shlib.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
#include "common/utils/threadPool/thread-pool.h"
|
#include "common/utils/threadPool/thread-pool.h"
|
||||||
@@ -62,34 +63,27 @@
|
|||||||
#include "telnetsrv_proccmd.h"
|
#include "telnetsrv_proccmd.h"
|
||||||
static char *telnet_defstatmod[] = {"softmodem","phy","loader","measur"};
|
static char *telnet_defstatmod[] = {"softmodem","phy","loader","measur"};
|
||||||
static telnetsrv_params_t telnetparams;
|
static telnetsrv_params_t telnetparams;
|
||||||
#define TELNETSRV_LISTENADDR 0
|
|
||||||
#define TELNETSRV_LISTENPORT 1
|
#define TELNETSRV_OPTNAME_STATICMOD "staticmod"
|
||||||
#define TELNETSRV_PRIORITY 2
|
#define TELNETSRV_OPTNAME_SHRMOD "shrmod"
|
||||||
#define TELNETSRV_DEBUG 3
|
|
||||||
#define TELNETSRV_LOOPC 4
|
|
||||||
#define TELNETSRV_LOOPD 5
|
|
||||||
#define TELNETSRV_HISFILE 6
|
|
||||||
#define TELNETSRV_HISSIZE 7
|
|
||||||
#define TELNETSRV_PHYBSIZE 8
|
|
||||||
#define TELNETSRV_STATICMOD 9
|
|
||||||
#define TELNETSRV_SHRMOD 10
|
|
||||||
|
|
||||||
paramdef_t telnetoptions[] = {
|
paramdef_t telnetoptions[] = {
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* configuration parameters for telnet utility */
|
/* configuration parameters for telnet utility */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
{"listenaddr", "<listen ip address>\n", 0, uptr:&telnetparams.listenaddr, defstrval:"0.0.0.0", TYPE_IPV4ADDR, 0 },
|
{"listenaddr", "<listen ip address>\n", 0, uptr:&telnetparams.listenaddr, defstrval:"0.0.0.0", TYPE_IPV4ADDR, 0 },
|
||||||
{"listenport", "<local port>\n", 0, uptr:&(telnetparams.listenport), defuintval:9090, TYPE_UINT, 0 },
|
{"listenport", "<local port>\n", 0, uptr:&(telnetparams.listenport), defuintval:9090, TYPE_UINT, 0 },
|
||||||
{"priority", "<scheduling policy (0-99)\n", 0, iptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 },
|
{"listenstdin", "enable input from stdin\n", PARAMFLAG_BOOL, uptr:&(telnetparams.listenstdin), defuintval:0, TYPE_UINT, 0 },
|
||||||
{"debug", "<debug level>\n", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0 },
|
{"priority", "<scheduling policy (0-99)\n", 0, iptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 },
|
||||||
{"loopcount", "<loop command iterations>\n", 0, uptr:&(telnetparams.loopcount), defuintval:10, TYPE_UINT, 0 },
|
{"debug", "<debug level>\n", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0 },
|
||||||
{"loopdelay", "<loop command delay (ms)>\n", 0, uptr:&(telnetparams.loopdelay), defuintval:5000, TYPE_UINT, 0 },
|
{"loopcount", "<loop command iterations>\n", 0, uptr:&(telnetparams.loopcount), defuintval:10, TYPE_UINT, 0 },
|
||||||
{"histfile", "<history file name>\n", PARAMFLAG_NOFREE, strptr:&(telnetparams.histfile), defstrval:"oaitelnet.history", TYPE_STRING, 0 },
|
{"loopdelay", "<loop command delay (ms)>\n", 0, uptr:&(telnetparams.loopdelay), defuintval:5000, TYPE_UINT, 0 },
|
||||||
{"histsize", "<history sizes>\n", 0, iptr:&(telnetparams.histsize), defuintval:50, TYPE_INT, 0 },
|
{"histfile", "<history file name>\n", PARAMFLAG_NOFREE, strptr:&(telnetparams.histfile), defstrval:"oaitelnet.history", TYPE_STRING, 0 },
|
||||||
{"phypbsize", "<phy dump buff size (bytes)>\n",0, uptr:&(telnetparams.phyprntbuff_size),defuintval:65000, TYPE_UINT, 0 },
|
{"histsize", "<history sizes>\n", 0, iptr:&(telnetparams.histsize), defuintval:50, TYPE_INT, 0 },
|
||||||
{"staticmod", "<static modules selection>\n", 0, strlistptr:NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,(sizeof(telnet_defstatmod)/sizeof(char *))},
|
{"phypbsize", "<phy dump buff size (bytes)>\n",0, uptr:&(telnetparams.phyprntbuff_size),defuintval:65000, TYPE_UINT, 0 },
|
||||||
{"shrmod", "<dynamic modules selection>\n", 0, strlistptr:NULL, defstrlistval:NULL,TYPE_STRINGLIST,0 }
|
{TELNETSRV_OPTNAME_STATICMOD, "<static modules selection>\n", 0, strlistptr:NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,(sizeof(telnet_defstatmod)/sizeof(char *))},
|
||||||
|
{TELNETSRV_OPTNAME_SHRMOD, "<dynamic modules selection>\n", 0, strlistptr:NULL, defstrlistval:NULL,TYPE_STRINGLIST,0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int get_phybsize(void) {
|
int get_phybsize(void) {
|
||||||
@@ -682,6 +676,77 @@ void run_telnetsrv(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void run_telnetclt(void) {
|
||||||
|
int sock;
|
||||||
|
struct sockaddr_in name;
|
||||||
|
pthread_setname_np(pthread_self(), "telnetclt");
|
||||||
|
set_sched(pthread_self(),0,telnetparams.priority);
|
||||||
|
char prompt[sizeof(TELNET_PROMPT_PREFIX)+10];
|
||||||
|
sprintf(prompt,"%s_%s> ",TELNET_PROMPT_PREFIX,get_softmodem_function(NULL));
|
||||||
|
name.sin_family = AF_INET;
|
||||||
|
struct in_addr addr;
|
||||||
|
inet_aton("127.0.0.1", &addr) ;
|
||||||
|
name.sin_addr.s_addr = addr.s_addr;
|
||||||
|
name.sin_port = htons((unsigned short)(telnetparams.listenport));
|
||||||
|
while (1) {
|
||||||
|
sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
|
if (sock < 0)
|
||||||
|
fprintf(stderr,"[TELNETSRV] Error %s on socket call\n",strerror(errno));
|
||||||
|
|
||||||
|
if(connect(sock, (void *) &name, sizeof(name)))
|
||||||
|
fprintf(stderr,"[TELNETSRV] Error %s on connect call\n",strerror(errno));
|
||||||
|
|
||||||
|
struct timeval ts;
|
||||||
|
ts.tv_sec = 1; // 1 second
|
||||||
|
ts.tv_usec = 0;
|
||||||
|
while (1) {
|
||||||
|
fd_set fds;
|
||||||
|
FD_ZERO(&fds);
|
||||||
|
FD_SET(sock, &fds);
|
||||||
|
FD_SET(STDIN_FILENO , &fds);
|
||||||
|
// wait for data
|
||||||
|
int nready = select(sock + 1, &fds, (fd_set *) 0, (fd_set *) 0, &ts);
|
||||||
|
if (nready < 0) {
|
||||||
|
perror("select. Error");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (nready == 0) {
|
||||||
|
ts.tv_sec = 1; // 1 second
|
||||||
|
ts.tv_usec = 0;
|
||||||
|
}
|
||||||
|
else if ( FD_ISSET(sock, &fds)) {
|
||||||
|
int rv;
|
||||||
|
char inbuf[TELNET_MAX_MSGLENGTH*2];
|
||||||
|
memset(inbuf,0,sizeof(inbuf));
|
||||||
|
rv = recv(sock , inbuf , sizeof(inbuf)-1 , 0);
|
||||||
|
if (rv > 0) {
|
||||||
|
printf("%s",inbuf);
|
||||||
|
}
|
||||||
|
else if (rv == 0) {
|
||||||
|
printf("Connection closed by the remote end\n\r");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
perror("recv error");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (FD_ISSET(STDIN_FILENO , &fds)) {
|
||||||
|
char *inbuf=NULL;
|
||||||
|
size_t inlen=0;
|
||||||
|
inlen = getline( &inbuf,&inlen, stdin);
|
||||||
|
if ( inlen > 0 ) {
|
||||||
|
if ( send(sock, inbuf,inlen, 0) < 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
free(inbuf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(sock);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} /* run_telnetclt */
|
||||||
|
|
||||||
void poll_telnetcmdq(void *qid, void *arg) {
|
void poll_telnetcmdq(void *qid, void *arg) {
|
||||||
notifiedFIFO_elt_t *msg = pollNotifiedFIFO((notifiedFIFO_t *)qid);
|
notifiedFIFO_elt_t *msg = pollNotifiedFIFO((notifiedFIFO_t *)qid);
|
||||||
|
|
||||||
@@ -720,10 +785,10 @@ void exec_moduleinit(char *modname) {
|
|||||||
|
|
||||||
int add_embeddedmodules(void) {
|
int add_embeddedmodules(void) {
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_STATICMOD);
|
||||||
for(int i=0; i<telnetoptions[TELNETSRV_STATICMOD].numelt; i++) {
|
for(int i=0; i<telnetoptions[pindex].numelt; i++) {
|
||||||
ret++;
|
ret++;
|
||||||
exec_moduleinit(telnetoptions[TELNETSRV_STATICMOD].strlistptr[i]);
|
exec_moduleinit(telnetoptions[pindex].strlistptr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -733,16 +798,16 @@ int add_sharedmodules(void) {
|
|||||||
char initfunc[TELNET_CMD_MAXSIZE+9];
|
char initfunc[TELNET_CMD_MAXSIZE+9];
|
||||||
void (*fptr)(void);
|
void (*fptr)(void);
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_SHRMOD);
|
||||||
for(int i=0; i<telnetoptions[TELNETSRV_SHRMOD].numelt; i++) {
|
for(int i=0; i<telnetoptions[pindex].numelt; i++) {
|
||||||
sprintf(initfunc,"add_%s_cmds",telnetoptions[TELNETSRV_SHRMOD].strlistptr[i]);
|
sprintf(initfunc,"add_%s_cmds",telnetoptions[pindex].strlistptr[i]);
|
||||||
fptr = dlsym(RTLD_DEFAULT,initfunc);
|
fptr = dlsym(RTLD_DEFAULT,initfunc);
|
||||||
|
|
||||||
if ( fptr != NULL) {
|
if ( fptr != NULL) {
|
||||||
fptr();
|
fptr();
|
||||||
ret++;
|
ret++;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,telnetoptions[TELNETSRV_STATICMOD].strlistptr[i]);
|
fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,telnetoptions[pindex].strlistptr[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -767,6 +832,12 @@ int telnetsrv_autoinit(void) {
|
|||||||
|
|
||||||
add_telnetcmd("telnet", telnet_vardef, telnet_cmdarray);
|
add_telnetcmd("telnet", telnet_vardef, telnet_cmdarray);
|
||||||
add_embeddedmodules();
|
add_embeddedmodules();
|
||||||
|
if ( telnetparams.listenstdin ) {
|
||||||
|
if(pthread_create(&telnetparams.telnetclt_pthread,NULL, (void *(*)(void *))run_telnetclt, NULL) != 0) {
|
||||||
|
fprintf(stderr,"[TELNETSRV] Error %s on pthread_create f() run_telnetclt \n",strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -807,7 +878,7 @@ int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmdde
|
|||||||
|
|
||||||
|
|
||||||
/* function which will be called by the shared lib loader, to check shared lib version
|
/* function which will be called by the shared lib loader, to check shared lib version
|
||||||
against main exec version. version mismatch no considered as fatal (interfaces not supposed to change)
|
against main exec version. version mismatch not considered as fatal (interfaces not supposed to change)
|
||||||
*/
|
*/
|
||||||
int telnetsrv_checkbuildver(char *mainexec_buildversion, char **shlib_buildversion) {
|
int telnetsrv_checkbuildver(char *mainexec_buildversion, char **shlib_buildversion) {
|
||||||
#ifndef PACKAGE_VERSION
|
#ifndef PACKAGE_VERSION
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ typedef struct cmdparser {
|
|||||||
/* global variables used by the telnet server */
|
/* global variables used by the telnet server */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pthread_t telnet_pthread; // thread id of the telnet server
|
pthread_t telnet_pthread; // thread id of the telnet server
|
||||||
|
pthread_t telnetclt_pthread; // thread id of the telnet client (used when listenstdin set to true)
|
||||||
int telnetdbg; // debug level of the server
|
int telnetdbg; // debug level of the server
|
||||||
int priority; // server running priority
|
int priority; // server running priority
|
||||||
char *histfile; // command history
|
char *histfile; // command history
|
||||||
@@ -119,6 +120,7 @@ typedef struct {
|
|||||||
char msgbuff[TELNET_MAX_MSGLENGTH]; // internal buffer of the client_printf function which is used to print to the client terminal */
|
char msgbuff[TELNET_MAX_MSGLENGTH]; // internal buffer of the client_printf function which is used to print to the client terminal */
|
||||||
unsigned int listenport; // ip port the telnet server is listening on
|
unsigned int listenport; // ip port the telnet server is listening on
|
||||||
unsigned int listenaddr; // ip address the telnet server is listening on
|
unsigned int listenaddr; // ip address the telnet server is listening on
|
||||||
|
unsigned int listenstdin; // enable command input from stdin
|
||||||
unsigned int loopcount; // loop command param: number of loop iteration
|
unsigned int loopcount; // loop command param: number of loop iteration
|
||||||
unsigned int loopdelay; // loop command param: delay in ms between 2 iterations
|
unsigned int loopdelay; // loop command param: delay in ms between 2 iterations
|
||||||
unsigned int phyprntbuff_size; // for phy module, dump_eNB_stats function buffer size
|
unsigned int phyprntbuff_size; // for phy module, dump_eNB_stats function buffer size
|
||||||
|
|||||||
@@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
* except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file common/utils/telnetsrv/telnetsrv_nrue_measurements.c
|
||||||
|
* \brief: implementation of telnet commands related to nrUE measurments
|
||||||
|
* \author Francois TABURET
|
||||||
|
* \date 2021
|
||||||
|
* \version 0.1
|
||||||
|
* \company NOKIA BellLabs France
|
||||||
|
* \email: francois.taburet@nokia-bell-labs.com
|
||||||
|
* \note
|
||||||
|
* \warning
|
||||||
|
*/
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define TELNETSERVERCODE
|
||||||
|
#include "telnetsrv.h"
|
||||||
|
|
||||||
|
#include "common/utils/LOG/log.h"
|
||||||
|
#include "common/config/config_userapi.h"
|
||||||
|
#include "telnetsrv_measurements.h"
|
||||||
|
#include "telnetsrv_ltemeasur_def.h"
|
||||||
|
#include "telnetsrv_cpumeasur_def.h"
|
||||||
|
#include "openair2/LAYER2/NR_MAC_UE/mac_defs.h"
|
||||||
|
#include "openair1/PHY/phy_extern_nr_ue.h"
|
||||||
|
|
||||||
|
void measurcmd_display_macstats(telnet_printfunc_t prnt);
|
||||||
|
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt);
|
||||||
|
void measurcmd_display_rlcstats(telnet_printfunc_t prnt);
|
||||||
|
void measurcmd_display_phycpu(telnet_printfunc_t prnt);
|
||||||
|
void measurcmd_display_maccpu(telnet_printfunc_t prnt);
|
||||||
|
void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt);
|
||||||
|
|
||||||
|
|
||||||
|
static telnet_measurgroupdef_t nrUEmeasurgroups[] = {
|
||||||
|
// {"ue", GROUP_LTESTATS,0, measurcmd_display_macstats, {NULL}},
|
||||||
|
// {"rlc", GROUP_LTESTATS,0, measurcmd_display_rlcstats, {NULL}},
|
||||||
|
{"phycpu",GROUP_CPUSTATS,0, measurcmd_display_phycpu, {NULL}},
|
||||||
|
// {"maccpu",GROUP_CPUSTATS,0, measurcmd_display_maccpu, {NULL}},
|
||||||
|
// {"pdcpcpu",GROUP_CPUSTATS,0, measurcmd_display_pdcpcpu, {NULL}},
|
||||||
|
};
|
||||||
|
#define TELNET_NUM_NRUEMEASURGROUPS (sizeof(nrUEmeasurgroups)/sizeof(telnet_measurgroupdef_t))
|
||||||
|
|
||||||
|
|
||||||
|
static double cpufreq;
|
||||||
|
|
||||||
|
|
||||||
|
#define HDR "---------------------------------"
|
||||||
|
|
||||||
|
|
||||||
|
int get_measurgroups(telnet_measurgroupdef_t **measurgroups) {
|
||||||
|
*measurgroups = nrUEmeasurgroups;
|
||||||
|
return TELNET_NUM_NRUEMEASURGROUPS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void measurcmd_display_phycpu(telnet_printfunc_t prnt) {
|
||||||
|
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[0][0];
|
||||||
|
telnet_cpumeasurdef_t cpumeasur[]=CPU_PHYNRUE_MEASURE;
|
||||||
|
prnt("%s cpu (%1.1g GHz) measurements: PHY (cpustats %s) %s\n",HDR,cpufreq,
|
||||||
|
PRINT_CPUMEAS_STATE,HDR);
|
||||||
|
measurcmd_display_cpumeasures(prnt, cpumeasur, sizeof(cpumeasur)/sizeof(telnet_cpumeasurdef_t));
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
void measurcmd_display_maccpu(telnet_printfunc_t prnt) {
|
||||||
|
eNB_MAC_INST *macvars = RC.mac[eNB_id];
|
||||||
|
telnet_cpumeasurdef_t cpumeasur[]=CPU_MACENB_MEASURE;
|
||||||
|
prnt("%s cpu (%1.1g GHz) measurements: MAC (cpustats %s) %s\n",HDR,cpufreq,
|
||||||
|
PRINT_CPUMEAS_STATE,HDR);
|
||||||
|
measurcmd_display_cpumeasures(prnt, cpumeasur, sizeof(cpumeasur)/sizeof(telnet_cpumeasurdef_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt) {
|
||||||
|
pdcp_stats_t *pdcpvars = &(eNB_pdcp_stats[eNB_id]);
|
||||||
|
telnet_cpumeasurdef_t cpumeasur[]=CPU_PDCPENB_MEASURE;
|
||||||
|
prnt("%s cpu (%1.1g GHz) measurements: PDCP (cpustats %s) %s \n",HDR,cpufreq,
|
||||||
|
PRINT_CPUMEAS_STATE,HDR);
|
||||||
|
measurcmd_display_cpumeasures(prnt, cpumeasur, sizeof(cpumeasur)/sizeof(telnet_cpumeasurdef_t));
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt) {
|
||||||
|
UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
|
||||||
|
|
||||||
|
for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
|
||||||
|
for (int i=0; i<UE_info->numactiveCCs[UE_id]; i++) {
|
||||||
|
int CC_id = UE_info->ordered_CCids[i][UE_id];
|
||||||
|
prnt("%s UE %i Id %i CCid %i %s\n",HDR,i,UE_id,CC_id,HDR);
|
||||||
|
eNB_UE_STATS *macuestatptr = &(UE_info->eNB_UE_stats[CC_id][UE_id]);
|
||||||
|
telnet_ltemeasurdef_t statsptr[]=LTEMAC_UEMEASURE;
|
||||||
|
measurcmd_display_measures(prnt, statsptr, sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // measurcmd_display_macstats_ue
|
||||||
|
|
||||||
|
void measurcmd_display_macstats(telnet_printfunc_t prnt) {
|
||||||
|
for (int CC_id=0 ; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||||
|
eNB_STATS *macstatptr=&(RC.mac[eNB_id]->eNB_stats[CC_id]);
|
||||||
|
telnet_ltemeasurdef_t statsptr[]=LTEMAC_MEASURE;
|
||||||
|
prnt("%s eNB %i mac stats CC %i frame %u %s\n",
|
||||||
|
HDR, eNB_id, CC_id, RC.mac[eNB_id]->frame,HDR);
|
||||||
|
measurcmd_display_measures(prnt,statsptr,sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t));
|
||||||
|
}
|
||||||
|
} // measurcmd_display_macstats
|
||||||
|
|
||||||
|
|
||||||
|
void measurcmd_display_one_rlcstat(telnet_printfunc_t prnt, int UE_id, telnet_ltemeasurdef_t *statsptr, int num_rlcmeasure, unsigned int *rlcstats,
|
||||||
|
char *rbid_str, protocol_ctxt_t *ctxt, const srb_flag_t srb_flagP, const rb_id_t rb_idP)
|
||||||
|
|
||||||
|
{
|
||||||
|
int rlc_status = rlc_stat_req(ctxt,srb_flagP,rb_idP,
|
||||||
|
rlcstats, rlcstats+1, rlcstats+2, rlcstats+3, rlcstats+4, rlcstats+5,
|
||||||
|
rlcstats+6, rlcstats+7, rlcstats+8, rlcstats+9, rlcstats+10, rlcstats+11,
|
||||||
|
rlcstats+12, rlcstats+13, rlcstats+14, rlcstats+15, rlcstats+16, rlcstats+17,
|
||||||
|
rlcstats+18, rlcstats+19, rlcstats+20, rlcstats+21, rlcstats+22, rlcstats+23,
|
||||||
|
rlcstats+24, rlcstats+25, rlcstats+26, rlcstats+27);
|
||||||
|
|
||||||
|
if (rlc_status == RLC_OP_STATUS_OK) {
|
||||||
|
prnt("%s UE %i RLC %s mode %s %s\n",HDR,UE_id, rbid_str,
|
||||||
|
(rlcstats[0]==RLC_MODE_AM)? "AM": (rlcstats[0]==RLC_MODE_UM)?"UM":"NONE",HDR);
|
||||||
|
measurcmd_display_measures(prnt, statsptr, num_rlcmeasure);
|
||||||
|
}
|
||||||
|
} // status measurcmd_rlc_stat_req
|
||||||
|
|
||||||
|
|
||||||
|
void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
|
||||||
|
telnet_ltemeasurdef_t statsptr[]=LTE_RLCMEASURE;
|
||||||
|
int num_rlcmeasure = sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t );
|
||||||
|
unsigned int *rlcstats = malloc(num_rlcmeasure*sizeof(unsigned int));
|
||||||
|
eNB_MAC_INST *eNB = RC.mac[eNB_id];
|
||||||
|
|
||||||
|
for(int i=0; i <num_rlcmeasure ; i++) {
|
||||||
|
statsptr[i].vptr = rlcstats + i;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
|
||||||
|
#define NB_eNB_INST 1
|
||||||
|
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_info->eNB_UE_stats[0][UE_id].crnti,
|
||||||
|
eNB->frame,eNB->subframe,eNB_id);
|
||||||
|
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DCCH", &ctxt, SRB_FLAG_YES, DCCH);
|
||||||
|
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DTCH", &ctxt, SRB_FLAG_NO, DTCH-2);
|
||||||
|
}
|
||||||
|
} // measurcmd_display_macstats_ue
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@ set(TELNETSRV_SOURCE
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
|
add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
|
||||||
target_link_libraries(telnetsrv PRIVATE history)
|
target_link_libraries(telnetsrv PRIVATE history ncurses form )
|
||||||
|
|
||||||
foreach(TELNETLIB enb gnb 4gUE 5gUE)
|
foreach(TELNETLIB enb gnb 4Gue 5Gue)
|
||||||
set(TELNETLIB_SRCS "")
|
set(TELNETLIB_SRCS "")
|
||||||
foreach(TELNETLIB_ASRC measurements phycmd)
|
foreach(TELNETLIB_ASRC measurements phycmd)
|
||||||
set(TELNETLIB_SRC ${OPENAIR_DIR}/common/utils/telnetsrv/telnetsrv_${TELNETLIB}_${TELNETLIB_ASRC}.c)
|
set(TELNETLIB_SRC ${OPENAIR_DIR}/common/utils/telnetsrv/telnetsrv_${TELNETLIB}_${TELNETLIB_ASRC}.c)
|
||||||
@@ -32,4 +32,4 @@ install(TARGETS telnetsrv DESTINATION bin)
|
|||||||
|
|
||||||
if (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build")
|
if (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build")
|
||||||
install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/ran_build/build)
|
install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/ran_build/build)
|
||||||
endif (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build")
|
endif (EXISTS "${OPENAIR_BUILD_DIR}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/ran_build/build")
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
* \ strucures arrays which are then used by the display functions
|
* \ strucures arrays which are then used by the display functions
|
||||||
* \ in telnetsrv_measurements.c.
|
* \ in telnetsrv_measurements.c.
|
||||||
* \author Francois TABURET
|
* \author Francois TABURET
|
||||||
* \date 2019
|
* \date 2021
|
||||||
* \version 0.1
|
* \version 0.2
|
||||||
* \company NOKIA BellLabs France
|
* \company NOKIA BellLabs France
|
||||||
* \email: francois.taburet@nokia-bell-labs.com
|
* \email: francois.taburet@nokia-bell-labs.com
|
||||||
* \note
|
* \note
|
||||||
@@ -37,67 +37,119 @@
|
|||||||
|
|
||||||
#define CPU_PHYENB_MEASURE \
|
#define CPU_PHYENB_MEASURE \
|
||||||
{ \
|
{ \
|
||||||
{"phy_proc_tx", &(phyvars->phy_proc_tx),0},\
|
{"phy_proc_tx", &(phyvars->phy_proc_tx),0,1},\
|
||||||
{"phy_proc_rx", &(phyvars->phy_proc_rx),0},\
|
{"phy_proc_rx", &(phyvars->phy_proc_rx),0,1},\
|
||||||
{"rx_prach", &(phyvars->rx_prach),0},\
|
{"rx_prach", &(phyvars->rx_prach),0,1},\
|
||||||
{"ofdm_mod", &(phyvars->ofdm_mod_stats),0},\
|
{"ofdm_mod", &(phyvars->ofdm_mod_stats),0,1},\
|
||||||
{"dlsch_common_and_dci", &(phyvars->dlsch_common_and_dci),0},\
|
{"dlsch_common_and_dci", &(phyvars->dlsch_common_and_dci),0,1},\
|
||||||
{"dlsch_ue_specific", &(phyvars->dlsch_ue_specific),0},\
|
{"dlsch_ue_specific", &(phyvars->dlsch_ue_specific),0,1},\
|
||||||
{"dlsch_encoding", &(phyvars->dlsch_encoding_stats),0},\
|
{"dlsch_encoding", &(phyvars->dlsch_encoding_stats),0,1},\
|
||||||
{"dlsch_modulation", &(phyvars->dlsch_modulation_stats),0},\
|
{"dlsch_modulation", &(phyvars->dlsch_modulation_stats),0,1},\
|
||||||
{"dlsch_scrambling", &(phyvars->dlsch_scrambling_stats),0},\
|
{"dlsch_scrambling", &(phyvars->dlsch_scrambling_stats),0,1},\
|
||||||
{"dlsch_rate_matching", &(phyvars->dlsch_rate_matching_stats),0},\
|
{"dlsch_rate_matching", &(phyvars->dlsch_rate_matching_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_prep", &(phyvars->dlsch_turbo_encoding_preperation_stats),0},\
|
{"dlsch_turbo_encod_prep", &(phyvars->dlsch_turbo_encoding_preperation_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_segm", &(phyvars->dlsch_turbo_encoding_segmentation_stats),0},\
|
{"dlsch_turbo_encod_segm", &(phyvars->dlsch_turbo_encoding_segmentation_stats),0,1},\
|
||||||
{"dlsch_turbo_encod", &(phyvars->dlsch_turbo_encoding_stats),0},\
|
{"dlsch_turbo_encod", &(phyvars->dlsch_turbo_encoding_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_waiting", &(phyvars->dlsch_turbo_encoding_waiting_stats),0},\
|
{"dlsch_turbo_encod_waiting", &(phyvars->dlsch_turbo_encoding_waiting_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_signal", &(phyvars->dlsch_turbo_encoding_signal_stats),0},\
|
{"dlsch_turbo_encod_signal", &(phyvars->dlsch_turbo_encoding_signal_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_main", &(phyvars->dlsch_turbo_encoding_main_stats),0},\
|
{"dlsch_turbo_encod_main", &(phyvars->dlsch_turbo_encoding_main_stats),0,1},\
|
||||||
{"dlsch_turbo_encod_wakeup0", &(phyvars->dlsch_turbo_encoding_wakeup_stats0),0},\
|
{"dlsch_turbo_encod_wakeup0", &(phyvars->dlsch_turbo_encoding_wakeup_stats0),0,1},\
|
||||||
{"dlsch_turbo_encod_wakeup1", &(phyvars->dlsch_turbo_encoding_wakeup_stats1),0},\
|
{"dlsch_turbo_encod_wakeup1", &(phyvars->dlsch_turbo_encoding_wakeup_stats1),0,1},\
|
||||||
{"dlsch_interleaving", &(phyvars->dlsch_interleaving_stats),0},\
|
{"dlsch_interleaving", &(phyvars->dlsch_interleaving_stats),0,1},\
|
||||||
{"rx_dft", &(phyvars->rx_dft_stats),0},\
|
{"rx_dft", &(phyvars->rx_dft_stats),0,1},\
|
||||||
{"ulsch_channel_estimation", &(phyvars->ulsch_channel_estimation_stats),0},\
|
{"ulsch_channel_estimation", &(phyvars->ulsch_channel_estimation_stats),0,1},\
|
||||||
{"ulsch_freq_offset_estimation", &(phyvars->ulsch_freq_offset_estimation_stats),0},\
|
{"ulsch_freq_offset_estimation", &(phyvars->ulsch_freq_offset_estimation_stats),0,1},\
|
||||||
{"ulsch_decoding", &(phyvars->ulsch_decoding_stats),0},\
|
{"ulsch_decoding", &(phyvars->ulsch_decoding_stats),0,1},\
|
||||||
{"ulsch_demodulation", &(phyvars->ulsch_demodulation_stats),0},\
|
{"ulsch_demodulation", &(phyvars->ulsch_demodulation_stats),0,1},\
|
||||||
{"ulsch_rate_unmatching", &(phyvars->ulsch_rate_unmatching_stats),0},\
|
{"ulsch_rate_unmatching", &(phyvars->ulsch_rate_unmatching_stats),0,1},\
|
||||||
{"ulsch_turbo_decoding", &(phyvars->ulsch_turbo_decoding_stats),0},\
|
{"ulsch_turbo_decoding", &(phyvars->ulsch_turbo_decoding_stats),0,1},\
|
||||||
{"ulsch_deinterleaving", &(phyvars->ulsch_deinterleaving_stats),0},\
|
{"ulsch_deinterleaving", &(phyvars->ulsch_deinterleaving_stats),0,1},\
|
||||||
{"ulsch_demultiplexing", &(phyvars->ulsch_demultiplexing_stats),0},\
|
{"ulsch_demultiplexing", &(phyvars->ulsch_demultiplexing_stats),0,1},\
|
||||||
{"ulsch_llr", &(phyvars->ulsch_llr_stats),0},\
|
{"ulsch_llr", &(phyvars->ulsch_llr_stats),0,1},\
|
||||||
{"ulsch_tc_init", &(phyvars->ulsch_tc_init_stats),0},\
|
{"ulsch_tc_init", &(phyvars->ulsch_tc_init_stats),0,1},\
|
||||||
{"ulsch_tc_alpha", &(phyvars->ulsch_tc_alpha_stats),0},\
|
{"ulsch_tc_alpha", &(phyvars->ulsch_tc_alpha_stats),0,1},\
|
||||||
{"ulsch_tc_beta", &(phyvars->ulsch_tc_beta_stats),0},\
|
{"ulsch_tc_beta", &(phyvars->ulsch_tc_beta_stats),0,1},\
|
||||||
{"ulsch_tc_gamma", &(phyvars->ulsch_tc_gamma_stats),0},\
|
{"ulsch_tc_gamma", &(phyvars->ulsch_tc_gamma_stats),0,1},\
|
||||||
{"ulsch_tc_ext", &(phyvars->ulsch_tc_ext_stats),0},\
|
{"ulsch_tc_ext", &(phyvars->ulsch_tc_ext_stats),0,1},\
|
||||||
{"ulsch_tc_intl1", &(phyvars->ulsch_tc_intl1_stats),0},\
|
{"ulsch_tc_intl1", &(phyvars->ulsch_tc_intl1_stats),0,1},\
|
||||||
{"ulsch_tc_intl2", &(phyvars->ulsch_tc_intl2_stats),0},\
|
{"ulsch_tc_intl2", &(phyvars->ulsch_tc_intl2_stats),0,1},\
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CPU_MACENB_MEASURE \
|
#define CPU_MACENB_MEASURE \
|
||||||
{ \
|
{ \
|
||||||
{"eNB_scheduler", &(macvars->eNB_scheduler),0},\
|
{"eNB_scheduler", &(macvars->eNB_scheduler),0,1},\
|
||||||
{"schedule_si", &(macvars->schedule_si),0},\
|
{"schedule_si", &(macvars->schedule_si),0,1},\
|
||||||
{"schedule_ra", &(macvars->schedule_ra),0},\
|
{"schedule_ra", &(macvars->schedule_ra),0,1},\
|
||||||
{"schedule_ulsch", &(macvars->schedule_ulsch),0},\
|
{"schedule_ulsch", &(macvars->schedule_ulsch),0,1},\
|
||||||
{"fill_DLSCH_dci", &(macvars->fill_DLSCH_dci),0},\
|
{"fill_DLSCH_dci", &(macvars->fill_DLSCH_dci),0,1},\
|
||||||
{"schedule_dlsch_pre", &(macvars->schedule_dlsch_preprocessor),0},\
|
{"schedule_dlsch_pre", &(macvars->schedule_dlsch_preprocessor),0,1},\
|
||||||
{"schedule_dlsch", &(macvars->schedule_dlsch),0},\
|
{"schedule_dlsch", &(macvars->schedule_dlsch),0,1},\
|
||||||
{"schedule_mch", &(macvars->schedule_mch),0},\
|
{"schedule_mch", &(macvars->schedule_mch),0,1},\
|
||||||
{"rx_ulsch_sdu", &(macvars->rx_ulsch_sdu),0},\
|
{"rx_ulsch_sdu", &(macvars->rx_ulsch_sdu),0,1},\
|
||||||
{"schedule_pch", &(macvars->schedule_pch),0},\
|
{"schedule_pch", &(macvars->schedule_pch),0,1},\
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CPU_PDCPENB_MEASURE \
|
#define CPU_PDCPENB_MEASURE \
|
||||||
{ \
|
{ \
|
||||||
{"pdcp_run", &(pdcpvars->pdcp_run),0},\
|
{"pdcp_run", &(pdcpvars->pdcp_run),0,1},\
|
||||||
{"data_req", &(pdcpvars->data_req),0},\
|
{"data_req", &(pdcpvars->data_req),0,1},\
|
||||||
{"data_ind", &(pdcpvars->data_ind),0},\
|
{"data_ind", &(pdcpvars->data_ind),0,1},\
|
||||||
{"apply_security", &(pdcpvars->apply_security),0},\
|
{"apply_security", &(pdcpvars->apply_security),0,1},\
|
||||||
{"validate_security", &(pdcpvars->validate_security),0},\
|
{"validate_security", &(pdcpvars->validate_security),0,1},\
|
||||||
{"pdcp_ip", &(pdcpvars->pdcp_ip),0},\
|
{"pdcp_ip", &(pdcpvars->pdcp_ip),0,1},\
|
||||||
{"ip_pdcp", &(pdcpvars->ip_pdcp),0},\
|
{"ip_pdcp", &(pdcpvars->ip_pdcp),0,1},\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* from openair1/PHY/defs_nr_UE.h */
|
||||||
|
#define CPU_PHYNRUE_MEASURE \
|
||||||
|
{ \
|
||||||
|
{"phy_proc", &(UE->phy_proc[0]),0,RX_NB_TH},\
|
||||||
|
{"phy_proc_rx", &(UE-> phy_proc_rx[0]),0,RX_NB_TH},\
|
||||||
|
{"phy_proc_tx", &(UE->phy_proc_tx),0,1},\
|
||||||
|
{"ofdm_mod_stats", &(UE->ofdm_mod_stats),0,1},\
|
||||||
|
{"ulsch_encoding_stats", &(UE->ulsch_encoding_stats),0,1},\
|
||||||
|
{"ulsch_modulation_stats", &(UE->ulsch_modulation_stats),0,1},\
|
||||||
|
{"ulsch_segmentation_stats", &(UE->ulsch_segmentation_stats),0,1},\
|
||||||
|
{"ulsch_rate_matching_stats", &(UE->ulsch_rate_matching_stats),0,1},\
|
||||||
|
{"ulsch_turbo_encoding_stats", &(UE->ulsch_turbo_encoding_stats),0,1},\
|
||||||
|
{"ulsch_interleaving_stats", &(UE->ulsch_interleaving_stats),0,1},\
|
||||||
|
{"ulsch_multiplexing_stats", &(UE->ulsch_multiplexing_stats),0,1},\
|
||||||
|
{"generic_stat", &(UE->generic_stat),0,1},\
|
||||||
|
{"generic_stat_bis", &(UE->generic_stat_bis[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||||
|
{"ofdm_demod_stats", &(UE->ofdm_demod_stats),0,1},\
|
||||||
|
{"dlsch_rx_pdcch_stats", &(UE->dlsch_rx_pdcch_stats),0,1},\
|
||||||
|
{"rx_dft_stats", &(UE->rx_dft_stats),0,1},\
|
||||||
|
{"dlsch_c...timation_stats", &(UE->dlsch_channel_estimation_stats),0,1},\
|
||||||
|
{"dlsch_f...timation_stats", &(UE->dlsch_freq_offset_estimation_stats),0,1},\
|
||||||
|
{"dlsch_demodulation_stats", &(UE->dlsch_demodulation_stats),0,1},\
|
||||||
|
{"dlsch_rate_unmatching_stats", &(UE->dlsch_rate_unmatching_stats),0,1},\
|
||||||
|
{"dlsch_turbo_decoding_stats", &(UE->dlsch_turbo_decoding_stats),0,1},\
|
||||||
|
{"dlsch_deinterleaving_stats", &(UE->dlsch_deinterleaving_stats),0,1},\
|
||||||
|
{"dlsch_llr_stats", &(UE->dlsch_llr_stats),0,1},\
|
||||||
|
{"dlsch_unscrambling_stats", &(UE->dlsch_unscrambling_stats),0,1},\
|
||||||
|
{"dlsch_rate_matching_stats", &(UE->dlsch_rate_matching_stats),0,1},\
|
||||||
|
{"dlsch_turbo_encoding_stats", &(UE->dlsch_turbo_encoding_stats),0,1},\
|
||||||
|
{"dlsch_interleaving_stats", &(UE->dlsch_interleaving_stats),0,1},\
|
||||||
|
{"dlsch_tc_init_stats", &(UE->dlsch_tc_init_stats),0,1},\
|
||||||
|
{"dlsch_tc_alpha_stats", &(UE->dlsch_tc_alpha_stats),0,1},\
|
||||||
|
{"dlsch_tc_beta_stats", &(UE->dlsch_tc_beta_stats),0,1},\
|
||||||
|
{"dlsch_tc_gamma_stats", &(UE->dlsch_tc_gamma_stats),0,1},\
|
||||||
|
{"dlsch_tc_ext_stats", &(UE->dlsch_tc_ext_stats),0,1},\
|
||||||
|
{"dlsch_tc_intl1_stats", &(UE->dlsch_tc_intl1_stats),0,1},\
|
||||||
|
{"dlsch_tc_intl2_stats", &(UE->dlsch_tc_intl2_stats),0,1},\
|
||||||
|
{"tx_prach", &(UE->tx_prach),0,1},\
|
||||||
|
{"dlsch_encoding_SIC_stats", &(UE->dlsch_encoding_SIC_stats),0,1},\
|
||||||
|
{"dlsch_scrambling_SIC_stats", &(UE->dlsch_scrambling_SIC_stats),0,1},\
|
||||||
|
{"dlsch_modulation_SIC_stats", &(UE->dlsch_modulation_SIC_stats),0,1},\
|
||||||
|
{"dlsch...ping_unit_SIC_stats", &(UE->dlsch_llr_stripping_unit_SIC_stats),0,1},\
|
||||||
|
{"dlsch_unscrambling_SIC_stats", &(UE->dlsch_unscrambling_SIC_stats),0,1},\
|
||||||
|
{"ue_front_end_stat", &(UE->ue_front_end_stat[0]),0,RX_NB_TH},\
|
||||||
|
{"ue_front_end_per_slot_stat", &(UE->ue_front_end_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||||
|
{"pdcch_procedures_stat", &(UE->pdcch_procedures_stat[0]),0,RX_NB_TH},\
|
||||||
|
{"pdsch_procedures_stat", &(UE->pdsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||||
|
{"pdsch_procedures_per_slot_stat", &(UE->pdsch_procedures_per_slot_stat[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||||
|
{"dlsch_procedures_stat", &(UE->dlsch_procedures_stat[0]),0,RX_NB_TH},\
|
||||||
|
{"dlsch_decoding_stats", &(UE->dlsch_decoding_stats[0]),0,RX_NB_TH},\
|
||||||
|
{"dlsch_llr_stats_para", &(UE->dlsch_llr_stats_parallelization[0][0]),0,RX_NB_TH,LTE_SLOTS_PER_SUBFRAME},\
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ void measurcmd_display_groups(telnet_printfunc_t prnt,telnet_measurgroupdef_t *m
|
|||||||
} /* measurcmd_display_groups */
|
} /* measurcmd_display_groups */
|
||||||
/*----------------------------------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------------------------------*/
|
||||||
/* cpu measurements functions */
|
/* cpu measurements functions */
|
||||||
void measurcmd_display_cpumeasures(telnet_printfunc_t prnt, telnet_cpumeasurdef_t *cpumeasure, int cpumeasure_size) {
|
|
||||||
for (int i=0; i<cpumeasure_size; i++) {
|
|
||||||
prnt("%02d %*s: %15.3f us; %15d %s",i,TELNET_MAXMEASURNAME_LEN-1,(cpumeasure+i)->statname,
|
|
||||||
((cpumeasure+i)->astatptr->trials!=0)?(((cpumeasure+i)->astatptr->diff)/((cpumeasure+i)->astatptr->trials))/cpufreq/1000:0,
|
|
||||||
(cpumeasure+i)->astatptr->trials, ((i%2)==1)?"|\n":" | " );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
static char *stridx(int max,int i, char *buff) {
|
||||||
|
if (max>1)
|
||||||
|
sprintf(buff,"[%d]",i);
|
||||||
|
else
|
||||||
|
sprintf(buff," ");
|
||||||
|
return buff;
|
||||||
|
|
||||||
|
}
|
||||||
|
void measurcmd_display_cpumeasures(telnet_printfunc_t prnt, telnet_cpumeasurdef_t *cpumeasure, int cpumeasure_size) {
|
||||||
|
int p=0;
|
||||||
|
char stridx1[16];
|
||||||
|
char stridx2[16];
|
||||||
|
for (int i=0; i<cpumeasure_size; i++)
|
||||||
|
for (int o1=0;o1<cpumeasure[i].num_occur1;o1++)
|
||||||
|
for (int o2=0;o2<=cpumeasure[i].num_occur2;o2++)
|
||||||
|
{
|
||||||
|
prnt("%02d %*s%s%s: %15.3f us; %15d %s",p,TELNET_MAXMEASURNAME_LEN+7,(cpumeasure+i)->statname,
|
||||||
|
stridx(cpumeasure[i].num_occur1,o1,stridx1),stridx(cpumeasure[i].num_occur2,o2,stridx2),
|
||||||
|
((cpumeasure+i+o1+o2)->astatptr->trials!=0)?(((cpumeasure+i+o1+o2)->astatptr->diff)/((cpumeasure+i+o1+o2)->astatptr->trials))/cpufreq/1000:0,
|
||||||
|
(cpumeasure+i+o1+o2)->astatptr->trials, ((p%2)==1)?"|\n":" | " );
|
||||||
|
p++;
|
||||||
|
}
|
||||||
prnt("\n\n");
|
prnt("\n\n");
|
||||||
} /* measurcmd_display_measures */
|
} /* measurcmd_display_measures */
|
||||||
|
|
||||||
@@ -137,11 +154,17 @@ int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt) {
|
|||||||
}
|
}
|
||||||
telnet_measurgroupdef_t *measurgroups;
|
telnet_measurgroupdef_t *measurgroups;
|
||||||
int num_measurgroups = fptr( &measurgroups);
|
int num_measurgroups = fptr( &measurgroups);
|
||||||
|
|
||||||
int s = sscanf(buf,"%ms %i-%i\n",&subcmd, &idx1,&idx2);
|
int s = sscanf(buf,"%ms %i-%i\n",&subcmd, &idx1,&idx2);
|
||||||
|
|
||||||
if (s>0) {
|
if (s>0) {
|
||||||
if ( strcmp(subcmd,"groups") == 0) {
|
if ( strcmp(subcmd,"inq") == 0) {
|
||||||
|
notifiedFIFO_elt_t *msg =newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
|
||||||
|
time_stats_msg_t *msgdata=NotifiedFifoData(msg);
|
||||||
|
msgdata->msgid = TIMESTAT_MSGID_DISPLAY;
|
||||||
|
msgdata->displayFunc = prnt;
|
||||||
|
pushNotifiedFIFO(&measur_fifo, msg);
|
||||||
|
} else if ( strcmp(subcmd,"groups") == 0){
|
||||||
measurcmd_display_groups(prnt,measurgroups,num_measurgroups);
|
measurcmd_display_groups(prnt,measurgroups,num_measurgroups);
|
||||||
badcmd=0;
|
badcmd=0;
|
||||||
} else {
|
} else {
|
||||||
@@ -182,13 +205,13 @@ int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt) {
|
|||||||
int badcmd=1;
|
int badcmd=1;
|
||||||
|
|
||||||
if (debug > 0)
|
if (debug > 0)
|
||||||
prnt(" measurcmd_show received %s\n",buf);
|
prnt(" measurcmd_cpustats received %s\n",buf);
|
||||||
|
|
||||||
int s = sscanf(buf,"%ms %i-%i\n",&subcmd, &idx1,&idx2);
|
int s = sscanf(buf,"%ms %i-%i\n",&subcmd, &idx1,&idx2);
|
||||||
|
|
||||||
if (s>0) {
|
if (s>0) {
|
||||||
if ( strcmp(subcmd,"enable") == 0) {
|
if ( strcmp(subcmd,"enable") == 0) {
|
||||||
cpumeas(CPUMEAS_ENABLE);
|
|
||||||
badcmd=0;
|
badcmd=0;
|
||||||
} else if ( strcmp(subcmd,"disable") == 0) {
|
} else if ( strcmp(subcmd,"disable") == 0) {
|
||||||
cpumeas(CPUMEAS_DISABLE);
|
cpumeas(CPUMEAS_DISABLE);
|
||||||
@@ -203,6 +226,64 @@ int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt) {
|
|||||||
free(subcmd);
|
free(subcmd);
|
||||||
return CMDSTATUS_FOUND;
|
return CMDSTATUS_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void measurcmd_async_help(telnet_printfunc_t prnt) {
|
||||||
|
}
|
||||||
|
|
||||||
|
int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt) {
|
||||||
|
char *subcmd=NULL;
|
||||||
|
int idx1, idx2;
|
||||||
|
int okcmd=0;
|
||||||
|
|
||||||
|
if (buf == NULL) {
|
||||||
|
measurcmd_async_help(prnt);
|
||||||
|
return CMDSTATUS_FOUND;
|
||||||
|
}
|
||||||
|
if (debug > 0)
|
||||||
|
prnt(" measurcmd_async received %s\n",buf);
|
||||||
|
|
||||||
|
|
||||||
|
int s = sscanf(buf,"%ms %i-%i\n",&subcmd, &idx1,&idx2);
|
||||||
|
|
||||||
|
if (s==1) {
|
||||||
|
if ( strcmp(subcmd,"enable") == 0) {
|
||||||
|
init_meas();
|
||||||
|
okcmd=1;
|
||||||
|
} else if ( strcmp(subcmd,"disable") == 0) {
|
||||||
|
end_meas();
|
||||||
|
okcmd=1;
|
||||||
|
}
|
||||||
|
} else if ( s == 3 ) {
|
||||||
|
int msgid;
|
||||||
|
if ( strcmp(subcmd,"enable") == 0) {
|
||||||
|
msgid = TIMESTAT_MSGID_ENABLE;
|
||||||
|
okcmd=1;
|
||||||
|
} else if ( strcmp(subcmd,"disable") == 0) {
|
||||||
|
msgid = TIMESTAT_MSGID_DISABLE;
|
||||||
|
okcmd=1;
|
||||||
|
} else if ( strcmp(subcmd,"display") == 0) {
|
||||||
|
msgid = TIMESTAT_MSGID_DISPLAY;
|
||||||
|
okcmd=1;
|
||||||
|
}
|
||||||
|
if (okcmd) {
|
||||||
|
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
|
||||||
|
time_stats_msg_t *msg = (time_stats_msg_t *)NotifiedFifoData(nfe);
|
||||||
|
msg->msgid = msgid ;
|
||||||
|
msg->displayFunc = prnt;
|
||||||
|
for(int i=idx1; i<idx2; i++) {
|
||||||
|
msg->timestat_id =i;
|
||||||
|
pushNotifiedFIFO(&measur_fifo, nfe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(okcmd)) {
|
||||||
|
prnt("Unknown command: %s\n",buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(subcmd);
|
||||||
|
return CMDSTATUS_FOUND;
|
||||||
|
}
|
||||||
/*-------------------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/* function called at telnet server init to add the measur command */
|
/* function called at telnet server init to add the measur command */
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ typedef struct cpumeasurdef {
|
|||||||
char statname[TELNET_MAXMEASURNAME_LEN];
|
char statname[TELNET_MAXMEASURNAME_LEN];
|
||||||
time_stats_t *astatptr;
|
time_stats_t *astatptr;
|
||||||
unsigned int statemask;
|
unsigned int statemask;
|
||||||
|
uint8_t num_occur1;
|
||||||
|
uint8_t num_occur2;
|
||||||
|
uint8_t num_occur3;
|
||||||
} telnet_cpumeasurdef_t;
|
} telnet_cpumeasurdef_t;
|
||||||
|
|
||||||
typedef struct ltemeasurdef {
|
typedef struct ltemeasurdef {
|
||||||
@@ -60,6 +63,7 @@ typedef struct ltemeasurdef {
|
|||||||
|
|
||||||
#define GROUP_LTESTATS 0
|
#define GROUP_LTESTATS 0
|
||||||
#define GROUP_CPUSTATS 1
|
#define GROUP_CPUSTATS 1
|
||||||
|
|
||||||
typedef void(*measur_dislayfunc_t)(telnet_printfunc_t prnt);
|
typedef void(*measur_dislayfunc_t)(telnet_printfunc_t prnt);
|
||||||
typedef struct mesurgroupdef {
|
typedef struct mesurgroupdef {
|
||||||
char groupname[TELNET_MAXMEASURNAME_LEN];
|
char groupname[TELNET_MAXMEASURNAME_LEN];
|
||||||
@@ -79,9 +83,11 @@ typedef struct mesurgroupdef {
|
|||||||
#ifdef TELNETSRV_MEASURMENTS_MAIN
|
#ifdef TELNETSRV_MEASURMENTS_MAIN
|
||||||
int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt);
|
int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt);
|
||||||
int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt);
|
int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt);
|
||||||
|
int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt);
|
||||||
telnetshell_cmddef_t measur_cmdarray[] = {
|
telnetshell_cmddef_t measur_cmdarray[] = {
|
||||||
{"show", "groups | <group name>" , measurcmd_show},
|
{"show", "groups | <group name> | inq" , measurcmd_show},
|
||||||
{"cpustats","[enable | disable]",measurcmd_cpustats},
|
{"cpustats","[enable | disable]",measurcmd_cpustats},
|
||||||
|
{"async","[enable | disable]",measurcmd_async},
|
||||||
{"","",NULL}
|
{"","",NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,21 @@ You can build any oai softmodem executable separately, you may not need all of t
|
|||||||
|
|
||||||
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15.
|
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15.
|
||||||
|
|
||||||
|
When installing the pre-requisites, especially the `UHD` driver, you can now specify if you want to install from source or not.
|
||||||
|
|
||||||
|
- For `fedora`-based OS, it was already the case all the time. But now you can specify which version to install.
|
||||||
|
- For `ubuntu` OS, the Ettus PPA currently installs the following versions:
|
||||||
|
* `Ubuntu16.04`: --> version `3.15.0.0`
|
||||||
|
* `Ubuntu18.04`: --> version `4.1.0.0`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export BUILD_UHD_FROM_SOURCE=True
|
||||||
|
export UHD_VERSION=3.15.0.0
|
||||||
|
./build_oai -I -w USRP
|
||||||
|
```
|
||||||
|
|
||||||
|
The `UHD_VERSION` env variable `SHALL` be a valid tag (minus `v`) from the `https://github.com/EttusResearch/uhd.git` repository.
|
||||||
|
|
||||||
## Issue when building `nasmeh` module ##
|
## Issue when building `nasmeh` module ##
|
||||||
|
|
||||||
A lot of users and contributors have faced the issue: `nasmesh` module does not build.
|
A lot of users and contributors have faced the issue: `nasmesh` module does not build.
|
||||||
|
|||||||
+1
-4
@@ -203,10 +203,7 @@ UE on machine 2:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Selecting an alternative ldpc implementation at run time](../openair1/PHY/CODING/DOC/LDPCImplementation.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|
||||||
|
|||||||
@@ -41,17 +41,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum update -y && \
|
RUN yum update -y && \
|
||||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
iproute \
|
iproute \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -78,6 +84,8 @@ COPY --from=enb-build /lib64/libconfig.so.9 /lib64
|
|||||||
COPY --from=enb-build /lib64/libblas.so.3 /lib64
|
COPY --from=enb-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=enb-build /lib64/liblapack.so.3 /lib64
|
COPY --from=enb-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -88,7 +96,14 @@ COPY --from=enb-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=enb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=enb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#
|
#
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
FROM ran-build:latest AS enb-build
|
FROM ran-build:latest AS enb-build
|
||||||
|
|
||||||
RUN rm -Rf /oai-ran
|
RUN rm -Rf /oai-ran
|
||||||
WORKDIR /oai-ran
|
WORKDIR /oai-ran
|
||||||
@@ -42,8 +42,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters
|
|||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM ubuntu:bionic as oai-enb
|
FROM ubuntu:bionic as oai-enb
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
@@ -60,16 +59,12 @@ RUN apt-get update && \
|
|||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
|
||||||
# Install UHD driver from ettus ppa
|
|
||||||
# At time of writing, it is 3.14
|
|
||||||
add-apt-repository ppa:ettusresearch/uhd --yes && \
|
|
||||||
apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
||||||
python \
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
libusb-1.0-0 \
|
libusb-1.0-0 \
|
||||||
libuhd003 \
|
libyaml-0-2 && \
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-enb/bin
|
WORKDIR /opt/oai-enb/bin
|
||||||
@@ -90,6 +85,17 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
|
|||||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||||
|
|
||||||
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum repolist --disablerepo=* && \
|
RUN yum repolist --disablerepo=* && \
|
||||||
yum update -y && \
|
yum update -y && \
|
||||||
@@ -51,9 +52,14 @@ RUN yum repolist --disablerepo=* && \
|
|||||||
atlas \
|
atlas \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -84,6 +90,8 @@ COPY --from=gnb-build /lib64/libforms.so.2 /lib64
|
|||||||
COPY --from=gnb-build /lib64/libblas.so.3 /lib64
|
COPY --from=gnb-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
|
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -94,7 +102,14 @@ COPY --from=gnb-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=gnb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -59,16 +59,12 @@ RUN apt-get update && \
|
|||||||
net-tools \
|
net-tools \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
libyaml-0-2 && \
|
|
||||||
# Install UHD driver from ettus ppa
|
|
||||||
# At time of writing, it is 3.14
|
|
||||||
add-apt-repository ppa:ettusresearch/uhd --yes && \
|
|
||||||
apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
||||||
python \
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
libusb-1.0-0 \
|
libusb-1.0-0 \
|
||||||
libuhd003 \
|
libyaml-0-2 && \
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-gnb/bin
|
WORKDIR /opt/oai-gnb/bin
|
||||||
@@ -93,6 +89,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/
|
|||||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||||
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
# Copy the relevant configuration files for gNB
|
# Copy the relevant configuration files for gNB
|
||||||
|
|||||||
@@ -48,9 +48,13 @@ RUN yum update -y && \
|
|||||||
tzdata \
|
tzdata \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
iproute && \
|
iproute && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -66,11 +70,12 @@ COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
|||||||
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||||
|
|
||||||
# Copying from the ran-build image the USRP needed packages
|
|
||||||
COPY --from=ru-build /lib64/libconfig.so.9 /lib64
|
COPY --from=ru-build /lib64/libconfig.so.9 /lib64
|
||||||
COPY --from=ru-build /lib64/libblas.so.3 /lib64
|
COPY --from=ru-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=ru-build /lib64/liblapack.so.3 /lib64
|
COPY --from=ru-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Copying from the ran-build image the USRP needed packages
|
||||||
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -81,7 +86,14 @@ COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=ru-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=ru-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
||||||
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||||
|
|||||||
@@ -54,17 +54,13 @@ RUN apt-get update && \
|
|||||||
libatlas3-base \
|
libatlas3-base \
|
||||||
libconfig9 \
|
libconfig9 \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 && \
|
iproute2 && \
|
||||||
# Install UHD driver from ettus ppa
|
|
||||||
# At time of writing, it is 3.14
|
|
||||||
add-apt-repository ppa:ettusresearch/uhd --yes && \
|
|
||||||
apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
||||||
python \
|
|
||||||
libusb-1.0-0 \
|
|
||||||
libuhd003 \
|
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-lte-ru/bin
|
WORKDIR /opt/oai-lte-ru/bin
|
||||||
@@ -78,6 +74,19 @@ COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
|||||||
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||||
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
||||||
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||||
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
|
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
|
||||||
|
|||||||
@@ -42,17 +42,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
|
|||||||
|
|
||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
|
||||||
RUN yum update -y && \
|
RUN yum update -y && \
|
||||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||||
lksctp-tools \
|
lksctp-tools \
|
||||||
procps-ng \
|
procps-ng \
|
||||||
nettle \
|
nettle \
|
||||||
|
tzdata \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
iproute \
|
iproute \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -82,6 +88,8 @@ COPY --from=lte-ue-build /lib64/libconfig.so.9 /lib64
|
|||||||
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -92,7 +100,14 @@ COPY --from=lte-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=lte-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet
|
|||||||
#start from scratch for target executable
|
#start from scratch for target executable
|
||||||
FROM ubuntu:bionic as oai-lte-ue
|
FROM ubuntu:bionic as oai-lte-ue
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||||
@@ -58,19 +57,15 @@ RUN apt-get update && \
|
|||||||
libconfig9 \
|
libconfig9 \
|
||||||
openssl \
|
openssl \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
libyaml-0-2 && \
|
||||||
# Install UHD driver from ettus ppa
|
|
||||||
# At time of writing, it is 3.14
|
|
||||||
add-apt-repository ppa:ettusresearch/uhd --yes && \
|
|
||||||
apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
||||||
python \
|
|
||||||
libusb-1.0-0 \
|
|
||||||
libuhd003 \
|
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-lte-ue/bin
|
WORKDIR /opt/oai-lte-ue/bin
|
||||||
@@ -95,6 +90,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
|||||||
|
|
||||||
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
# Copy the relevant configuration files for UE
|
# Copy the relevant configuration files for UE
|
||||||
|
|||||||
@@ -51,9 +51,13 @@ RUN yum update -y && \
|
|||||||
iputils \
|
iputils \
|
||||||
iproute \
|
iproute \
|
||||||
atlas \
|
atlas \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
libXpm \
|
libXpm \
|
||||||
libX11 \
|
libX11 \
|
||||||
libyaml && \
|
libyaml && \
|
||||||
|
pip3 install six && \
|
||||||
|
pip3 install requests && \
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||||
|
|
||||||
@@ -87,6 +91,8 @@ COPY --from=nr-ue-build /lib64/libblas.so.3 /lib64
|
|||||||
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
|
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
|
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
|
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||||
@@ -97,7 +103,15 @@ COPY --from=nr-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
|||||||
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||||
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
|
COPY --from=nr-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||||
|
|
||||||
|
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||||
|
|
||||||
|
WORKDIR /usr/local/share/uhd/rfnoc
|
||||||
|
COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||||
|
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
|
|||||||
@@ -55,19 +55,15 @@ RUN apt-get update && \
|
|||||||
libconfig9 \
|
libconfig9 \
|
||||||
openssl \
|
openssl \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python3-six \
|
||||||
|
python3-requests \
|
||||||
|
libusb-1.0-0 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iperf \
|
iperf \
|
||||||
libyaml-0-2 && \
|
libyaml-0-2 && \
|
||||||
# Install UHD driver from ettus ppa
|
|
||||||
# At time of writing, it is 3.14
|
|
||||||
add-apt-repository ppa:ettusresearch/uhd --yes && \
|
|
||||||
apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
||||||
python \
|
|
||||||
libusb-1.0-0 \
|
|
||||||
libuhd003 \
|
|
||||||
uhd-host && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt/oai-nr-ue/bin
|
WORKDIR /opt/oai-nr-ue/bin
|
||||||
@@ -95,6 +91,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
|
|||||||
|
|
||||||
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||||
|
|
||||||
|
# Now we are copying from builder-image the UHD files.
|
||||||
|
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||||
|
COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||||
|
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||||
|
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||||
|
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
WORKDIR /opt/oai-nr-ue
|
WORKDIR /opt/oai-nr-ue
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
|
|
||||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
||||||
ARG NEEDED_GIT_PROXY
|
ARG NEEDED_GIT_PROXY
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
ENV BUILD_UHD_FROM_SOURCE=True
|
||||||
|
ENV UHD_VERSION=3.15.0.0
|
||||||
|
|
||||||
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
|
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
|
||||||
COPY tmp/entitlement/*.pem /etc/pki/entitlement
|
COPY tmp/entitlement/*.pem /etc/pki/entitlement
|
||||||
|
|||||||
@@ -29,8 +29,9 @@
|
|||||||
FROM ubuntu:bionic AS ran-build
|
FROM ubuntu:bionic AS ran-build
|
||||||
ARG NEEDED_GIT_PROXY
|
ARG NEEDED_GIT_PROXY
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Europe
|
ENV TZ=Europe/Paris
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
ENV BUILD_UHD_FROM_SOURCE=True
|
||||||
|
ENV UHD_VERSION=3.15.0.0
|
||||||
|
|
||||||
#install developers pkg/repo
|
#install developers pkg/repo
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=================================="
|
echo "=================================="
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# in case we have conf file, append
|
# in case we have conf file, append
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ done
|
|||||||
|
|
||||||
# Load the USRP binaries
|
# Load the USRP binaries
|
||||||
if [[ -v USE_B2XX ]]; then
|
if [[ -v USE_B2XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
|
$PREFIX/bin/uhd_images_downloader.py -t b2xx
|
||||||
elif [[ -v USE_X3XX ]]; then
|
elif [[ -v USE_X3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
|
$PREFIX/bin/uhd_images_downloader.py -t x3xx
|
||||||
elif [[ -v USE_N3XX ]]; then
|
elif [[ -v USE_N3XX ]]; then
|
||||||
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
|
$PREFIX/bin/uhd_images_downloader.py -t n3xx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# in case we have conf file, append
|
# in case we have conf file, append
|
||||||
|
|||||||
@@ -76,10 +76,6 @@
|
|||||||
#include "gnb_paramdef.h"
|
#include "gnb_paramdef.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#include <executables/softmodem-common.h>
|
#include <executables/softmodem-common.h>
|
||||||
|
|||||||
+1
-6
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include "common/utils/assertions.h"
|
#include "common/utils/assertions.h"
|
||||||
#include "common/utils/system.h"
|
#include "common/utils/system.h"
|
||||||
|
#include "common/ran_context.h"
|
||||||
|
|
||||||
#include "../../ARCH/COMMON/common_lib.h"
|
#include "../../ARCH/COMMON/common_lib.h"
|
||||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
#include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||||
@@ -47,8 +48,6 @@
|
|||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
|
|
||||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
|
||||||
|
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
|
|
||||||
@@ -71,10 +70,6 @@ static int DEFBFW[] = {0x00007fff};
|
|||||||
#include "GNB_APP/gnb_paramdef.h"
|
#include "GNB_APP/gnb_paramdef.h"
|
||||||
#include "common/config/config_userapi.h"
|
#include "common/config/config_userapi.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
||||||
|
|||||||
@@ -30,12 +30,8 @@
|
|||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
#include <threadPool/thread-pool.h>
|
#include <threadPool/thread-pool.h>
|
||||||
|
|
||||||
#if defined(ENABLE_USE_MME)
|
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#ifdef PDCP_USE_NETLINK
|
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
||||||
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
||||||
|
|||||||
@@ -66,10 +66,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
|
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
//#include "PHY/TOOLS/time_meas.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_vars.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
#include "intertask_interface.h"
|
||||||
|
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
@@ -692,15 +688,10 @@ int main( int argc, char **argv ) {
|
|||||||
// initialize mscgen log after ITTI
|
// initialize mscgen log after ITTI
|
||||||
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
||||||
init_opt();
|
init_opt();
|
||||||
#ifdef PDCP_USE_NETLINK
|
if(PDCP_USE_NETLINK)
|
||||||
|
if(!IS_SOFTMODEM_NOS1)
|
||||||
if(!IS_SOFTMODEM_NOS1)
|
netlink_init();
|
||||||
netlink_init();
|
|
||||||
|
|
||||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
|
||||||
pdcp_netlink_init();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef PACKAGE_VERSION
|
#ifndef PACKAGE_VERSION
|
||||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+9
-7
@@ -19,6 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <openair1/PHY/impl_defs_top.h>
|
||||||
#include "executables/nr-uesoftmodem.h"
|
#include "executables/nr-uesoftmodem.h"
|
||||||
#include "PHY/phy_extern_nr_ue.h"
|
#include "PHY/phy_extern_nr_ue.h"
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
@@ -87,11 +88,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NO_RAT_NR
|
|
||||||
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
|
|
||||||
#else
|
|
||||||
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
|
|
||||||
#endif
|
|
||||||
#define RX_JOB_ID 0x1010
|
#define RX_JOB_ID 0x1010
|
||||||
#define TX_JOB_ID 100
|
#define TX_JOB_ID 100
|
||||||
|
|
||||||
@@ -463,13 +460,18 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
|||||||
// compute TO compensation that should be applied for this frame
|
// compute TO compensation that should be applied for this frame
|
||||||
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
||||||
UE->rx_offset > 0 ) {
|
UE->rx_offset > 0 ) {
|
||||||
//LOG_I(PHY,"!!!adjusting -1 samples!!!\n");
|
LOG_I(PHY,"!!!adjusting -1 samples!!! rx_offset == %d\n", UE->rx_offset);
|
||||||
|
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||||
|
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||||
return -1 ;
|
return -1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
|
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
|
||||||
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
|
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
|
||||||
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n");
|
int rx_offset = UE->rx_offset - UE->frame_parms.samples_per_frame;
|
||||||
|
LOG_I(PHY,"!!!adjusting +1 samples!!! rx_offset == %d\n", rx_offset);
|
||||||
|
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
|
||||||
|
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,10 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
#include "enb_config.h"
|
#include "enb_config.h"
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
//#include "PHY/TOOLS/time_meas.h"
|
||||||
|
|
||||||
#ifndef OPENAIR2
|
|
||||||
#include "UTIL/OTG/otg_vars.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
#include "intertask_interface.h"
|
||||||
|
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
@@ -436,7 +432,7 @@ int main( int argc, char **argv ) {
|
|||||||
itti_init(TASK_MAX, tasks_info);
|
itti_init(TASK_MAX, tasks_info);
|
||||||
|
|
||||||
init_opt() ;
|
init_opt() ;
|
||||||
load_nrLDPClib();
|
load_nrLDPClib(NULL);
|
||||||
|
|
||||||
if (ouput_vcd) {
|
if (ouput_vcd) {
|
||||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64
|
#define FAPI_NR_MAX_RA_OCCASION_PER_CSIRS 64
|
||||||
// Constants Defined in 38.213
|
// Constants Defined in 38.213
|
||||||
#define FAPI_NR_MAX_CORESET_PER_BWP 3
|
#define FAPI_NR_MAX_CORESET_PER_BWP 3
|
||||||
#define FAPI_NR_MAX_SS_PER_CORESET 10
|
#define FAPI_NR_MAX_SS 10
|
||||||
|
|
||||||
|
|
||||||
/// RX_IND
|
/// RX_IND
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#LDPC coder/decoder implementation
|
# LDPC coder/decoder implementation
|
||||||
The LDPC coder and decoder are implemented in a shared library, dynamically loaded at run-time using the [oai shared library loader](file://../../../../common/utils/DOC/loader.md). The code loading the LDPC library is in [nrLDPC_load.c](file://../nrLDPC_load.c), in function `load_nrLDPClib`, which must be called at init time.
|
The LDPC coder and decoder are implemented in a shared library, dynamically loaded at run-time using the [oai shared library loader](file://../../../../common/utils/DOC/loader.md). The code loading the LDPC library is in [nrLDPC_load.c](file://../nrLDPC_load.c), in function `load_nrLDPClib`, which must be called at init time.
|
||||||
|
|
||||||
## Selecting the LDPC library at run time
|
## Selecting the LDPC library at run time
|
||||||
|
|
||||||
By default the function `int load_nrLDPClib(void)` looks for `libldpc.so`, this default behavior can be changed using the oai loader configuration options in the configuration file or from the command line as shown below:
|
By default the function `int load_nrLDPClib(void)` looks for `libldpc.so`, this default behavior can be changed using the oai loader configuration options in the configuration file or from the command line as shown below:
|
||||||
|
|
||||||
>loading `libldpc_optim8seg.so` instead of `libldpc.so`
|
#### Examples of ldpc shared lib selection when running nr softmodem's:
|
||||||
|
|
||||||
|
loading `libldpc_optim8seg.so` instead of `libldpc.so`:
|
||||||
|
|
||||||
```
|
```
|
||||||
./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _optim8seg
|
./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _optim8seg
|
||||||
@@ -18,9 +20,160 @@ By default the function `int load_nrLDPClib(void)` looks for `libldpc.so`, this
|
|||||||
........................
|
........................
|
||||||
```
|
```
|
||||||
|
|
||||||
Today, this mechanism is not available in the `ldpctest` phy simulator which doesn't initialize the [configuration module](file://../../../../common/config/DOC/config.md). loads `libldpc.so` and `libldpc_orig.so` to compare the performance of the two implementations.
|
loading `libldpc_cl.so` instead of `libldpc.so`:
|
||||||
|
|
||||||
###LDPC libraries
|
`make ldpc_cl`
|
||||||
Libraries implementing the LDPC algorithms must be named `libldpc<_version>.so`, they must implement two functions: `nrLDPC_decod` and `nrLDPC_encod`. The prototypes for these functions is defined in [nrLDPC_defs.h](file://nrLDPC_defs.h).
|
|
||||||
|
`cp ../../../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.cl`
|
||||||
|
|
||||||
|
`./nr-softmodem -O libconfig:gnb.band78.sa.fr1.106PRB.usrpb210.conf:dbgl5 --rfsim --rfsimulator.serveraddr server --sa --log_config.gtpu_log_level info --loader.ldpc.shlibversion _cl`
|
||||||
|
|
||||||
|
``` [LOADER] library libldpc_cl.so successfully loaded
|
||||||
|
------------------------------------------------
|
||||||
|
[HW] Platform 0, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 2 = 0x00000002: cpu
|
||||||
|
[HW] Device 0, number of Compute Units: 8
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 8192
|
||||||
|
[New Thread 0x7fffcc258700 (LWP 3945123)]
|
||||||
|
[New Thread 0x7fffc3e57700 (LWP 3945124)]
|
||||||
|
[New Thread 0x7fffcbe57700 (LWP 3945125)]
|
||||||
|
[New Thread 0x7fffcba56700 (LWP 3945126)]
|
||||||
|
[New Thread 0x7fffcb254700 (LWP 3945128)]
|
||||||
|
[New Thread 0x7fffcb655700 (LWP 3945127)]
|
||||||
|
[New Thread 0x7fffcae53700 (LWP 3945129)]
|
||||||
|
[HW] Platform 1, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3
|
||||||
|
[New Thread 0x7fffc965a700 (LWP 3945130)]
|
||||||
|
[Thread 0x7fffc965a700 (LWP 3945130) exited]
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 4 = 0x00000004: gpu
|
||||||
|
[HW] Device 0, number of Compute Units: 20
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 512
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
`./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --nokrnmod --loader.ldpc.shlibversion _cl --log_config.hw_log_level info`
|
||||||
|
|
||||||
|
```[CONFIG] shlibversion set to _cl from command line
|
||||||
|
............................................................
|
||||||
|
[CONFIG] loader.ldpc 1 options set from command line
|
||||||
|
[LOADER] library libldpc_cl.so successfully loaded
|
||||||
|
[HW] Platform 0, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 2 = 0x00000002: cpu
|
||||||
|
[HW] Device 0, number of Compute Units: 8
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 8192
|
||||||
|
[New Thread 0x7fffecccc700 (LWP 3945413)]
|
||||||
|
[New Thread 0x7fffec8cb700 (LWP 3945415)]
|
||||||
|
[New Thread 0x7fffec4ca700 (LWP 3945414)]
|
||||||
|
[New Thread 0x7fffdf7fd700 (LWP 3945417)]
|
||||||
|
[New Thread 0x7fffdfbfe700 (LWP 3945418)]
|
||||||
|
[New Thread 0x7fffdffff700 (LWP 3945416)]
|
||||||
|
[New Thread 0x7fffd73fc700 (LWP 3945419)]
|
||||||
|
[HW] Platform 1, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3
|
||||||
|
[New Thread 0x7fffde105700 (LWP 3945420)]
|
||||||
|
[Thread 0x7fffde105700 (LWP 3945420) exited]
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 4 = 0x00000004: gpu
|
||||||
|
[HW] Device 0, number of Compute Units: 20
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 512
|
||||||
|
------------------------------------------------------------
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
A mechanism to select ldpc implementation is also available in the `ldpctest` phy simulator via the `-v`option, which can be used to specify the version of the ldpc shared library to be used.
|
||||||
|
|
||||||
|
#### Examples of ldpc shared lib selection when running ldpctest:
|
||||||
|
|
||||||
|
Loading libldpc_cuda.so, the cuda implementation of the ldpc decoder:
|
||||||
|
|
||||||
|
```$ ./ldpctest -v _cuda
|
||||||
|
Initializing random number generator, seed 0
|
||||||
|
block length 8448:
|
||||||
|
n_trials 1:
|
||||||
|
SNR0 -2.000000:
|
||||||
|
[CONFIG] get parameters from cmdline , debug flags: 0x00400000
|
||||||
|
[CONFIG] log_config: 2/3 parameters successfully set
|
||||||
|
[CONFIG] log_config: 53/53 parameters successfully set
|
||||||
|
[CONFIG] log_config: 53/53 parameters successfully set
|
||||||
|
[CONFIG] log_config: 16/16 parameters successfully set
|
||||||
|
[CONFIG] log_config: 16/16 parameters successfully set
|
||||||
|
log init done
|
||||||
|
[CONFIG] loader: 2/2 parameters successfully set
|
||||||
|
[CONFIG] loader.ldpc: 1/2 parameters successfully set
|
||||||
|
[LOADER] library libldpc_cuda.so successfully loaded
|
||||||
|
...................................
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading libldpc_cl.so, the opencl implementation of the ldpc decoder:
|
||||||
|
|
||||||
|
`make ldpc_cl`
|
||||||
|
|
||||||
|
`cp ../../../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_kernels_CL.cl`
|
||||||
|
|
||||||
|
`./ldpctest -v _cl`
|
||||||
|
|
||||||
|
```$ ./ldpctest -v _cl
|
||||||
|
Initializing random number generator, seed 0
|
||||||
|
block length 8448:
|
||||||
|
n_trials 1:
|
||||||
|
SNR0 -2.000000:
|
||||||
|
[CONFIG] get parameters from cmdline , debug flags: 0x00400000
|
||||||
|
[CONFIG] log_config: 2/3 parameters successfully set
|
||||||
|
[CONFIG] log_config: 53/53 parameters successfully set
|
||||||
|
[CONFIG] log_config: 53/53 parameters successfully set
|
||||||
|
[CONFIG] log_config: 16/16 parameters successfully set
|
||||||
|
[CONFIG] log_config: 16/16 parameters successfully set
|
||||||
|
log init done
|
||||||
|
[CONFIG] loader: 2/2 parameters successfully set
|
||||||
|
[CONFIG] loader.ldpc: 1/2 parameters successfully set
|
||||||
|
[LOADER] library libldpc_cl.so successfully loaded
|
||||||
|
[HW] Platform 0, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 0, OpenCL version OpenCL 2.1 LINUX
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 2 = 0x00000002: cpu
|
||||||
|
[HW] Device 0, number of Compute Units: 8
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 8192
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 8192
|
||||||
|
[HW] Platform 1, OpenCL profile FULL_PROFILE
|
||||||
|
[HW] Platform 1, OpenCL version OpenCL 2.0 beignet 1.3
|
||||||
|
[HW] Device 0 is available
|
||||||
|
[HW] Device 0, type 4 = 0x00000004: gpu
|
||||||
|
[HW] Device 0, number of Compute Units: 20
|
||||||
|
[HW] Device 0, max Work Items dimension: 3
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 0 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 1 512
|
||||||
|
[HW] Device 0, max Work Items size for dimension: 2 512
|
||||||
|
................................
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### LDPC libraries
|
||||||
|
Libraries implementing the LDPC algorithms must be named `libldpc<_version>.so`, they must implement three functions: `nrLDPC_initcall` `nrLDPC_decod` and `nrLDPC_encod`. The prototypes for these functions is defined in [nrLDPC_defs.h](file://nrLDPC_defs.h).
|
||||||
|
|
||||||
|
`libldpc_cuda.so`has been tested with the `ldpctest` executable, usage from the softmodem's has to be tested.
|
||||||
|
|
||||||
|
`libldpc_cl`is under development.
|
||||||
|
|
||||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ int test_ldpc(short No_iteration,
|
|||||||
unsigned int *crc_misses,
|
unsigned int *crc_misses,
|
||||||
time_stats_t *time_optim,
|
time_stats_t *time_optim,
|
||||||
time_stats_t *time_decoder,
|
time_stats_t *time_decoder,
|
||||||
n_iter_stats_t *dec_iter,
|
n_iter_stats_t *dec_iter
|
||||||
short run_cuda)
|
)
|
||||||
{
|
{
|
||||||
//clock initiate
|
//clock initiate
|
||||||
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
|
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
|
||||||
@@ -393,28 +393,13 @@ int test_ldpc(short No_iteration,
|
|||||||
decParams.R=code_rate_vec[R_ind];//13;
|
decParams.R=code_rate_vec[R_ind];//13;
|
||||||
decParams.numMaxIter=No_iteration;
|
decParams.numMaxIter=No_iteration;
|
||||||
decParams.outMode = nrLDPC_outMode_BIT;
|
decParams.outMode = nrLDPC_outMode_BIT;
|
||||||
|
decParams.block_length=block_length;
|
||||||
//decParams.outMode =nrLDPC_outMode_LLRINT8;
|
//decParams.outMode =nrLDPC_outMode_LLRINT8;
|
||||||
#ifdef CUDA_FLAG
|
nrLDPC_initcall(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j]);
|
||||||
set_compact_BG(Zc,BG);
|
|
||||||
init_LLR_DMA_for_CUDA(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length);
|
|
||||||
#endif
|
|
||||||
for(j=0;j<n_segments;j++) {
|
for(j=0;j<n_segments;j++) {
|
||||||
start_meas(time_decoder);
|
start_meas(time_decoder);
|
||||||
#ifdef CUDA_FLAG
|
|
||||||
if(run_cuda){
|
|
||||||
n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
// decode the sequence
|
|
||||||
// decoder supports BG2, Z=128 & 256
|
|
||||||
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
|
|
||||||
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
|
|
||||||
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
|
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
|
||||||
}
|
stop_meas(time_decoder);
|
||||||
#else
|
|
||||||
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
|
|
||||||
#endif
|
|
||||||
stop_meas(time_decoder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//for (i=(Kb+nrows) * Zc-5;i<(Kb+nrows) * Zc;i++)
|
//for (i=(Kb+nrows) * Zc-5;i<(Kb+nrows) * Zc;i++)
|
||||||
@@ -514,17 +499,14 @@ int test_ldpc(short No_iteration,
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef CUDA_FLAG
|
|
||||||
warmup_for_GPU();
|
|
||||||
#endif
|
|
||||||
unsigned int errors, errors_bit, crc_misses;
|
unsigned int errors, errors_bit, crc_misses;
|
||||||
double errors_bit_uncoded;
|
double errors_bit_uncoded;
|
||||||
short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
|
short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
|
||||||
|
char *ldpc_version=NULL; /* version of the ldpc decoder library to use (XXX suffix to use when loading libldpc_XXX.so */
|
||||||
short No_iteration=5;
|
short No_iteration=5;
|
||||||
int n_segments=1;
|
int n_segments=1;
|
||||||
//double rate=0.333;
|
//double rate=0.333;
|
||||||
short run_cuda = 0;
|
|
||||||
|
|
||||||
int nom_rate=1;
|
int nom_rate=1;
|
||||||
int denom_rate=3;
|
int denom_rate=3;
|
||||||
@@ -544,7 +526,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
short BG=0,Zc,Kb=0;
|
short BG=0,Zc,Kb=0;
|
||||||
|
|
||||||
while ((c = getopt (argc, argv, "q:r:s:S:l:G:n:d:i:t:u:h")) != -1)
|
while ((c = getopt (argc, argv, "q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'q':
|
case 'q':
|
||||||
@@ -564,7 +546,7 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
run_cuda = atoi(optarg);
|
ldpc_version="_cuda";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
@@ -590,9 +572,11 @@ int main(int argc, char *argv[])
|
|||||||
case 'u':
|
case 'u':
|
||||||
test_uncoded = atoi(optarg);
|
test_uncoded = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'v':
|
||||||
|
ldpc_version=strdup(optarg);
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
printf("CURRENTLY SUPPORTED CODE RATES: \n");
|
printf("CURRENTLY SUPPORTED CODE RATES: \n");
|
||||||
printf("BG1 (blocklength > 3840): 1/3, 2/3, 22/25 (8/9) \n");
|
printf("BG1 (blocklength > 3840): 1/3, 2/3, 22/25 (8/9) \n");
|
||||||
printf("BG2 (blocklength <= 3840): 1/5, 1/3, 2/3 \n\n");
|
printf("BG2 (blocklength <= 3840): 1/5, 1/3, 2/3 \n\n");
|
||||||
@@ -609,6 +593,7 @@ int main(int argc, char *argv[])
|
|||||||
printf("-t SNR simulation step, Default: 0.1\n");
|
printf("-t SNR simulation step, Default: 0.1\n");
|
||||||
printf("-i Max decoder iterations, Default: 5\n");
|
printf("-i Max decoder iterations, Default: 5\n");
|
||||||
printf("-u Set SNR per coded bit, Default: 0\n");
|
printf("-u Set SNR per coded bit, Default: 0\n");
|
||||||
|
printf("-v XXX Set ldpc shared library version. libldpc_XXX.so will be used \n");
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -619,7 +604,10 @@ int main(int argc, char *argv[])
|
|||||||
printf("SNR0 %f: \n", SNR0);
|
printf("SNR0 %f: \n", SNR0);
|
||||||
|
|
||||||
|
|
||||||
load_nrLDPClib();
|
if (ldpc_version != NULL)
|
||||||
|
load_nrLDPClib(ldpc_version);
|
||||||
|
else
|
||||||
|
load_nrLDPClib(NULL);
|
||||||
load_nrLDPClib_ref("_orig", &encoder_orig);
|
load_nrLDPClib_ref("_orig", &encoder_orig);
|
||||||
//for (block_length=8;block_length<=MAX_BLOCK_LENGTH;block_length+=8)
|
//for (block_length=8;block_length<=MAX_BLOCK_LENGTH;block_length+=8)
|
||||||
|
|
||||||
@@ -691,8 +679,7 @@ int main(int argc, char *argv[])
|
|||||||
&crc_misses,
|
&crc_misses,
|
||||||
time_optim,
|
time_optim,
|
||||||
time_decoder,
|
time_decoder,
|
||||||
dec_iter,
|
dec_iter);
|
||||||
run_cuda);
|
|
||||||
|
|
||||||
printf("SNR %f, BLER %f (%u/%d)\n", SNR, (float)decoded_errors[i]/(float)n_trials, decoded_errors[i], n_trials);
|
printf("SNR %f, BLER %f (%u/%d)\n", SNR, (float)decoded_errors[i]/(float)n_trials, decoded_errors[i], n_trials);
|
||||||
printf("SNR %f, BER %f (%u/%d)\n", SNR, (float)errors_bit/(float)n_trials/(float)block_length/(double)n_segments, decoded_errors[i], n_trials);
|
printf("SNR %f, BER %f (%u/%d)\n", SNR, (float)errors_bit/(float)n_trials/(float)block_length/(double)n_segments, decoded_errors[i], n_trials);
|
||||||
|
|||||||
@@ -30,14 +30,6 @@
|
|||||||
|
|
||||||
#include <stdint.h> // for uint8/16/32_t
|
#include <stdint.h> // for uint8/16/32_t
|
||||||
|
|
||||||
/* check if this ifndef is required for NB-IoT ?!
|
|
||||||
//#ifndef NO_OPENAIR1
|
|
||||||
//#include "PHY/defs_NB_IoT.h"
|
|
||||||
//#else
|
|
||||||
//#include "PHY/TOOLS/time_meas.h"
|
|
||||||
//#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CRC24_A_NB_IoT 0
|
#define CRC24_A_NB_IoT 0
|
||||||
#define CRC24_B_NB_IoT 1
|
#define CRC24_B_NB_IoT 1
|
||||||
#define CRC16_NB_IoT 2
|
#define CRC16_NB_IoT 2
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, uint32_t numLLR, t_nrLDPC_lut* p_lut, t_nrLDPC_dec_params* p_decParams, t_nrLDPC_time_stats* p_profiler);
|
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, uint32_t numLLR, t_nrLDPC_lut* p_lut, t_nrLDPC_dec_params* p_decParams, t_nrLDPC_time_stats* p_profiler);
|
||||||
|
void nrLDPC_initcall(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out) {
|
||||||
|
}
|
||||||
int32_t nrLDPC_decod(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler)
|
int32_t nrLDPC_decod(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler)
|
||||||
{
|
{
|
||||||
uint32_t numLLR;
|
uint32_t numLLR;
|
||||||
|
|||||||
@@ -0,0 +1,436 @@
|
|||||||
|
/*
|
||||||
|
* 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.0 (the "License"); you may not use this file
|
||||||
|
* except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
/*! \file nrLDPC_decoder_CL.c
|
||||||
|
* \brief ldpc decoder, openCL implementaion
|
||||||
|
* \author Francois TABURET
|
||||||
|
* \date 2021
|
||||||
|
* \version 1.0
|
||||||
|
* \note initial implem - translation of cuda version
|
||||||
|
*/
|
||||||
|
/* uses HW component id for log messages ( --log_config.hw_log_level <warning| info|debug|trace>) */
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <cuda_runtime.h>
|
||||||
|
#include <CL/opencl.h>
|
||||||
|
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||||
|
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
|
||||||
|
#include "assertions.h"
|
||||||
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
|
#define MAX_ITERATION 2
|
||||||
|
#define MC 1
|
||||||
|
|
||||||
|
#define MAX_OCLDEV 10
|
||||||
|
#define MAX_OCLRUNTIME 5
|
||||||
|
|
||||||
|
|
||||||
|
#define CLSETKERNELARG(A,B,C,D) \
|
||||||
|
rt=clSetKernelArg(A,B,C,D) ;\
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d setting kernel argument index %d\n" , (int)rt, B);
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
char x;
|
||||||
|
char y;
|
||||||
|
short value;
|
||||||
|
} h_element;
|
||||||
|
#include "../nrLDPC_decoder_LYC/bgs/BG1_compact_in_C.h"
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
cl_uint max_CU;
|
||||||
|
cl_uint max_WID;
|
||||||
|
size_t *max_WIS;
|
||||||
|
} ocldev_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
cl_kernel cnp_kernel_1st;
|
||||||
|
cl_kernel cnp_kernel;
|
||||||
|
cl_kernel vnp_kernel_normal;
|
||||||
|
cl_kernel pack_decoded_bit;
|
||||||
|
} oclkernels_t;
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
cl_uint num_devices;
|
||||||
|
cl_device_id devices[MAX_OCLDEV];
|
||||||
|
ocldev_t ocldev[MAX_OCLDEV];
|
||||||
|
cl_context context;
|
||||||
|
cl_program program;
|
||||||
|
cl_mem dev_h_compact1;
|
||||||
|
cl_mem dev_h_compact2;
|
||||||
|
cl_mem dev_const_llr;
|
||||||
|
cl_mem dev_llr;
|
||||||
|
cl_mem dev_dt;
|
||||||
|
cl_mem dev_tmp;
|
||||||
|
oclkernels_t kernels[MAX_OCLDEV];
|
||||||
|
cl_command_queue queue[MAX_OCLDEV];
|
||||||
|
} oclruntime_t;
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
oclruntime_t runtime[MAX_OCLRUNTIME];
|
||||||
|
} ocl_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ocl_t ocl;
|
||||||
|
|
||||||
|
|
||||||
|
void set_compact_BG(int Zc,short BG){
|
||||||
|
cl_uint rt;
|
||||||
|
int row,col;
|
||||||
|
if(BG == 1){
|
||||||
|
row = 46;
|
||||||
|
col = 68;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
row = 42;
|
||||||
|
col = 52;
|
||||||
|
}
|
||||||
|
int compact_row = 30;
|
||||||
|
int compact_col = 19;
|
||||||
|
if(BG==2){compact_row = 10, compact_col = 23;}
|
||||||
|
int memorySize_h_compact1 = row * compact_col * sizeof(h_element);
|
||||||
|
int memorySize_h_compact2 = compact_row * col * sizeof(h_element);
|
||||||
|
int lift_index = 0;
|
||||||
|
short lift_set[][9] = {
|
||||||
|
{2,4,8,16,32,64,128,256},
|
||||||
|
{3,6,12,24,48,96,192,384},
|
||||||
|
{5,10,20,40,80,160,320},
|
||||||
|
{7,14,28,56,112,224},
|
||||||
|
{9,18,36,72,144,288},
|
||||||
|
{11,22,44,88,176,352},
|
||||||
|
{13,26,52,104,208},
|
||||||
|
{15,30,60,120,240},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
for(int i = 0; lift_set[i][0] != 0; i++){
|
||||||
|
for(int j = 0; lift_set[i][j] != 0; j++){
|
||||||
|
if(Zc == lift_set[i][j]){
|
||||||
|
lift_index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printf("\nZc = %d BG = %d\n",Zc,BG);
|
||||||
|
ocl.runtime[0].dev_h_compact1 = clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact1, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact1 for platform %i \n" , (int)rt, 0);
|
||||||
|
ocl.runtime[0].dev_h_compact2 = clCreateBuffer(ocl.runtime[0].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, memorySize_h_compact2, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_h_compact2 for platform %i \n" , (int)rt, 0);
|
||||||
|
h_element *h1;
|
||||||
|
h_element *h2;
|
||||||
|
switch(lift_index){
|
||||||
|
case 0:
|
||||||
|
h1 = host_h_compact1_I0;
|
||||||
|
h2 = host_h_compact2_I0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
h1 = host_h_compact1_I1;
|
||||||
|
h2 = host_h_compact2_I1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
h1 = host_h_compact1_I2;
|
||||||
|
h2 = host_h_compact2_I2;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
h1 = host_h_compact1_I3;
|
||||||
|
h2 = host_h_compact2_I3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
h1 = host_h_compact1_I4;
|
||||||
|
h2 = host_h_compact2_I4;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
h1 = host_h_compact1_I5;
|
||||||
|
h2 = host_h_compact2_I5;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
h1 = host_h_compact1_I6;
|
||||||
|
h2 = host_h_compact2_I6;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
h1 = host_h_compact1_I7;
|
||||||
|
h2 = host_h_compact2_I7;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
AssertFatal(0, "Invalid lift_index value %i\n" , lift_index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_h_compact1, CL_TRUE, 0,memorySize_h_compact1, h1, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact1 memory to pltf %i dev %i\n" , (int)rt, 0,0);
|
||||||
|
rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_h_compact2, CL_TRUE, 0,memorySize_h_compact2, h2, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d moving h_compact2 memory to pltf %i dev %i\n" , (int)rt, 0,0);
|
||||||
|
// return 0;
|
||||||
|
}
|
||||||
|
void cl_error_callback(const char* errinfo, const void* private_info, size_t cb, void* user_data) {
|
||||||
|
oclruntime_t *runtime = (oclruntime_t *)user_data;
|
||||||
|
LOG_E(HW,"OpenCL accelerator error %s\n", errinfo );
|
||||||
|
}
|
||||||
|
|
||||||
|
char *clutil_getstrdev(int intdev) {
|
||||||
|
static char retstring[255]="";
|
||||||
|
char *retptr=retstring;
|
||||||
|
retptr+=sprintf(retptr,"0x%08x: ",(uint32_t)intdev);
|
||||||
|
if (intdev & CL_DEVICE_TYPE_CPU)
|
||||||
|
retptr+=sprintf(retptr,"%s","cpu ");
|
||||||
|
if (intdev & CL_DEVICE_TYPE_GPU)
|
||||||
|
retptr+=sprintf(retptr,"%s","gpu ");
|
||||||
|
if (intdev & CL_DEVICE_TYPE_ACCELERATOR)
|
||||||
|
retptr+=sprintf(retptr,"%s","acc ");
|
||||||
|
return retstring;
|
||||||
|
}
|
||||||
|
|
||||||
|
void get_CompilErr(cl_program program, int pltf) {
|
||||||
|
|
||||||
|
// Determine the size of the log
|
||||||
|
size_t log_size;
|
||||||
|
for(int i=0; i<ocl.runtime[pltf].num_devices;i++) {
|
||||||
|
clGetProgramBuildInfo(program, ocl.runtime[pltf].devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
|
||||||
|
// Allocate memory for the log
|
||||||
|
char *log = (char *) malloc(log_size);
|
||||||
|
// Get the log
|
||||||
|
clGetProgramBuildInfo(program, ocl.runtime[pltf].devices[i], CL_PROGRAM_BUILD_LOG, log_size, log, NULL);
|
||||||
|
// Print the log
|
||||||
|
printf("%s\n", log);
|
||||||
|
free(log);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t load_source(char **source_str) {
|
||||||
|
int MAX_SOURCE_SIZE=(500*132);
|
||||||
|
FILE *fp;
|
||||||
|
size_t source_size;
|
||||||
|
|
||||||
|
fp = fopen("nrLDPC_decoder_kernels_CL.cl", "r");
|
||||||
|
AssertFatal(fp,"failed to open cl source: %s\n",strerror(errno));
|
||||||
|
|
||||||
|
*source_str = (char*)malloc(MAX_SOURCE_SIZE);
|
||||||
|
source_size = fread( *source_str, 1, MAX_SOURCE_SIZE, fp);
|
||||||
|
fclose( fp );
|
||||||
|
return source_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* from here: entry points in decoder shared lib */
|
||||||
|
int ldpc_autoinit(void) { // called by the library loader
|
||||||
|
cl_platform_id platforms[10];
|
||||||
|
cl_uint num_platforms_found;
|
||||||
|
int context_ok=0;
|
||||||
|
cl_uint rt = clGetPlatformIDs( sizeof(platforms)/sizeof(cl_platform_id), platforms, &num_platforms_found );
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetPlatformIDs error %d\n" , (int)rt);
|
||||||
|
AssertFatal( num_platforms_found>0 , "clGetPlatformIDs: no cl compatible platform found\n");
|
||||||
|
for (int i=0 ; i<(int)num_platforms_found ; i++) {
|
||||||
|
char stringval[255];
|
||||||
|
rt = clGetPlatformInfo(platforms[i],CL_PLATFORM_PROFILE, sizeof(stringval),stringval,NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo PROFILE error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Platform %i, OpenCL profile %s\n", i,stringval );
|
||||||
|
rt = clGetPlatformInfo(platforms[i],CL_PLATFORM_VERSION, sizeof(stringval),stringval,NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetPlatformInfo VERSION error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Platform %i, OpenCL version %s\n", i,stringval );
|
||||||
|
rt = clGetDeviceIDs(platforms[i],CL_DEVICE_TYPE_ALL, sizeof(ocl.runtime[i].devices)/sizeof(cl_device_id),ocl.runtime[i].devices,&(ocl.runtime[i].num_devices));
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceIDs error %d\n" , (int)rt);
|
||||||
|
int devok=0;
|
||||||
|
for (int j=0; j<ocl.runtime[i].num_devices; j++) {
|
||||||
|
cl_bool abool;
|
||||||
|
rt = clGetDeviceInfo(ocl.runtime[i].devices[j],CL_DEVICE_AVAILABLE, sizeof(abool),&abool,NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_AVAILABLE error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Device %i is %s available\n", j, (abool==CL_TRUE?"":"not"));
|
||||||
|
cl_device_type devtype;
|
||||||
|
rt = clGetDeviceInfo(ocl.runtime[i].devices[j],CL_DEVICE_TYPE, sizeof(cl_device_type),&devtype,NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo DEVICE_TYPE error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Device %i, type %d = %s\n", j,(int)devtype, clutil_getstrdev(devtype));
|
||||||
|
rt = clGetDeviceInfo(ocl.runtime[i].devices[j],CL_DEVICE_MAX_COMPUTE_UNITS,sizeof(ocl.runtime[i].ocldev[j].max_CU),&(ocl.runtime[i].ocldev[j].max_CU),NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_COMPUTE_UNITS error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Device %i, number of Compute Units: %d\n", j,ocl.runtime[i].ocldev[j].max_CU);
|
||||||
|
rt = clGetDeviceInfo(ocl.runtime[i].devices[j],CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS,sizeof(ocl.runtime[i].ocldev[j].max_WID),&(ocl.runtime[i].ocldev[j].max_WID),NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_DIMENSIONS error %d\n" , (int)rt);
|
||||||
|
LOG_I(HW,"Device %i, max Work Items dimension: %d\n", j,ocl.runtime[i].ocldev[j].max_WID);
|
||||||
|
ocl.runtime[i].ocldev[j].max_WIS = (size_t *)malloc(ocl.runtime[i].ocldev[j].max_WID * sizeof(size_t));
|
||||||
|
rt = clGetDeviceInfo(ocl.runtime[i].devices[j],CL_DEVICE_MAX_WORK_ITEM_SIZES,sizeof(ocl.runtime[i].ocldev[j].max_WID)*sizeof(size_t),ocl.runtime[i].ocldev[j].max_WIS,NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "clGetDeviceInfo MAX_WORK_ITEM_SIZES error %d\n" , (int)rt);
|
||||||
|
for(int k=0; k<ocl.runtime[i].ocldev[j].max_WID;k++)
|
||||||
|
LOG_I(HW,"Device %i, max Work Items size for dimension: %d %u\n", j,k,(uint32_t)ocl.runtime[i].ocldev[j].max_WIS[k]);
|
||||||
|
devok++;
|
||||||
|
}
|
||||||
|
if (devok >0) {
|
||||||
|
ocl.runtime[i].context = clCreateContext(NULL, ocl.runtime[i].num_devices, ocl.runtime[i].devices, cl_error_callback, &(ocl.runtime[i]), (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating context for platform %i\n" , (int)rt, i);
|
||||||
|
for(int dev=0; dev<ocl.runtime[i].num_devices; dev++) {
|
||||||
|
ocl.runtime[i].queue[dev] = clCreateCommandQueueWithProperties(ocl.runtime[i].context,ocl.runtime[i].devices[dev] , 0, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating command queue for platform %i device %i\n" , (int)rt, i,dev);
|
||||||
|
}
|
||||||
|
ocl.runtime[i].dev_const_llr = clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, 68*384, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_const_llr for platform %i \n" , (int)rt, i);
|
||||||
|
ocl.runtime[i].dev_llr = clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_WRITE|CL_MEM_HOST_WRITE_ONLY, 68*384, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_llr for platform %i \n" , (int)rt, i);
|
||||||
|
ocl.runtime[i].dev_dt = clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_WRITE|CL_MEM_HOST_NO_ACCESS, 46*68*384, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_dt for platform %i \n" , (int)rt, i);
|
||||||
|
ocl.runtime[i].dev_tmp = clCreateBuffer(ocl.runtime[i].context, CL_MEM_READ_ONLY|CL_MEM_HOST_WRITE_ONLY, 68*384, NULL, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating buffer dev_tmp for platform %i \n" , (int)rt, i);
|
||||||
|
char *source_str;
|
||||||
|
size_t source_size=load_source(&source_str);
|
||||||
|
cl_program program = clCreateProgramWithSource(ocl.runtime[i].context, 1,
|
||||||
|
(const char **)&source_str, (const size_t *)&source_size, (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating program for platform %i \n" , (int)rt, i);
|
||||||
|
rt = clBuildProgram(program, ocl.runtime[i].num_devices,ocl.runtime[i].devices, NULL, NULL, NULL);
|
||||||
|
if (rt == CL_BUILD_PROGRAM_FAILURE) {
|
||||||
|
get_CompilErr(program,i);
|
||||||
|
}
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d buildding program for platform %i \n" , rt, i);
|
||||||
|
|
||||||
|
for(int dev=0; dev<ocl.runtime[i].num_devices; dev++) {
|
||||||
|
ocl.runtime[i].kernels[dev].cnp_kernel_1st = clCreateKernel(program, "ldpc_cnp_kernel_1st_iter", (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n" , (int)rt,"ldpc_cnp_kernel_1st_iter", i,dev);
|
||||||
|
ocl.runtime[i].kernels[dev].cnp_kernel = clCreateKernel(program, "ldpc_cnp_kernel", (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n" , (int)rt,"ldpc_cnp_kernel", i,dev);
|
||||||
|
ocl.runtime[i].kernels[dev].vnp_kernel_normal = clCreateKernel(program, "ldpc_vnp_kernel_normal", (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n" , (int)rt,"ldpc_vnp_kernel_normal", i,dev);
|
||||||
|
ocl.runtime[i].kernels[dev].pack_decoded_bit = clCreateKernel(program, "pack_decoded_bit", (cl_int *)&rt);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d creating kernel %s platform %i, dev %i\n" , (int)rt,"pack_decoded_bit", i,dev);
|
||||||
|
}
|
||||||
|
context_ok++;
|
||||||
|
}
|
||||||
|
devok=0;
|
||||||
|
}
|
||||||
|
AssertFatal(context_ok>0, "No openCL device available to accelerate ldpc\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void nrLDPC_initcall(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out) {
|
||||||
|
set_compact_BG(p_decParams->Z,p_decParams->BG);
|
||||||
|
// init_LLR_DMA(p_decParams, p_llr, p_out);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int32_t nrLDPC_decod(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out,t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats *time_decoder)
|
||||||
|
{
|
||||||
|
uint16_t Zc = p_decParams->Z;
|
||||||
|
uint8_t BG = p_decParams->BG;
|
||||||
|
// uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||||
|
int block_length = p_decParams->block_length;
|
||||||
|
// e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||||
|
uint8_t row,col;
|
||||||
|
if(BG == 1){
|
||||||
|
row = 46;
|
||||||
|
col = 68;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
row = 42;
|
||||||
|
col = 52;
|
||||||
|
}
|
||||||
|
|
||||||
|
// alloc memory
|
||||||
|
// unsigned char *hard_decision = (unsigned char*)p_out;
|
||||||
|
// gpu
|
||||||
|
int memorySize_llr = col * Zc * sizeof(char) * MC;
|
||||||
|
// cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) );
|
||||||
|
// cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) );
|
||||||
|
int rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_const_llr, CL_TRUE, 0,
|
||||||
|
memorySize_llr, p_llr, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read only memory in pltf %i dev %i\n" , (int)rt, 0,0);
|
||||||
|
rt = clEnqueueWriteBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_llr, CL_TRUE, 0,
|
||||||
|
memorySize_llr, p_llr, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to read-write memory in pltf %i dev %i\n" , (int)rt, 0,0);
|
||||||
|
// Define CUDA kernel dimension
|
||||||
|
// int blockSizeX = Zc;
|
||||||
|
// dim3 dimGridKernel1(row, MC, 1); // dim of the thread blocks
|
||||||
|
// dim3 dimBlockKernel1(blockSizeX, 1, 1);
|
||||||
|
|
||||||
|
// dim3 dimGridKernel2(col, MC, 1);
|
||||||
|
// dim3 dimBlockKernel2(blockSizeX, 1, 1);
|
||||||
|
// cudaDeviceSynchronize();
|
||||||
|
|
||||||
|
// lauch kernel
|
||||||
|
size_t global_item_sizek0[2] = {row*Zc,MC}; // Process the entire lists
|
||||||
|
size_t global_item_sizek1[2] = {col*Zc,MC}; // Process the entire lists
|
||||||
|
size_t local_item_sizek[2] = {128,1}; // Divide work items into groups of 128
|
||||||
|
|
||||||
|
for(int ii = 0; ii < MAX_ITERATION; ii++){
|
||||||
|
// first kernel
|
||||||
|
if(ii == 0){
|
||||||
|
// ldpc_cnp_kernel_1st_iter
|
||||||
|
// <<<dimGridKernel1, dimBlockKernel1>>>
|
||||||
|
// ( BG, row, col, Zc);
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 3, sizeof(int), (void *)&(BG));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 4, sizeof(int), (void *)&(row));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 5, sizeof(int), (void *)&(col));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel_1st, 6, sizeof(int), (void *)&(Zc));
|
||||||
|
rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].cnp_kernel_1st, 2, NULL,
|
||||||
|
global_item_sizek0, local_item_sizek, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel_1st \n" , (int)rt);
|
||||||
|
}else{
|
||||||
|
// ldpc_cnp_kernel
|
||||||
|
// <<<dimGridKernel1, dimBlockKernel1>>>
|
||||||
|
// ( BG, row, col, Zc);
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact1));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 3, sizeof(int), (void *)&(BG));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 4, sizeof(int), (void *)&(row));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 5, sizeof(int), (void *)&(col));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].cnp_kernel, 6, sizeof(int), (void *)&(Zc));
|
||||||
|
rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].cnp_kernel, 2, NULL,
|
||||||
|
global_item_sizek0, local_item_sizek, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d enqueing cnp_kernel\n" , (int)rt);
|
||||||
|
}
|
||||||
|
// second kernel
|
||||||
|
// ldpc_vnp_kernel_normal
|
||||||
|
// <<<dimGridKernel2, dimBlockKernel2>>>
|
||||||
|
// // (dev_llr, dev_const_llr,BG, row, col, Zc);
|
||||||
|
// (BG, row, col, Zc);
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_dt));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_const_llr));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 3, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_h_compact2));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 4, sizeof(int), (void *)&(BG));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 5, sizeof(int), (void *)&(row));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 6, sizeof(int), (void *)&(col));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].vnp_kernel_normal, 7, sizeof(int), (void *)&(Zc));
|
||||||
|
rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].vnp_kernel_normal, 2, NULL,
|
||||||
|
global_item_sizek1, local_item_sizek, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d enqueing vnp_kernel_normal \n" , (int)rt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// int pack = (block_length/128)+1;
|
||||||
|
// dim3 pack_block(pack, MC, 1);
|
||||||
|
// pack_decoded_bit<<<pack_block,128>>>( col, Zc);
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 0, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_llr));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 1, sizeof(cl_mem), (void *)&(ocl.runtime[0].dev_tmp));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 2, sizeof(int), (void *)&(col));
|
||||||
|
CLSETKERNELARG(ocl.runtime[0].kernels[0].pack_decoded_bit, 3, sizeof(int), (void *)&(Zc));
|
||||||
|
|
||||||
|
// Execute the OpenCL kernel on the list
|
||||||
|
size_t global_item_size[2] = {block_length,MC}; // Process the entire lists
|
||||||
|
size_t local_item_size[2] = {128,1}; // Divide work items into groups of 128
|
||||||
|
rt = clEnqueueNDRangeKernel(ocl.runtime[0].queue[0], ocl.runtime[0].kernels[0].pack_decoded_bit, 2, NULL,
|
||||||
|
global_item_size, local_item_size, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d enqueing pack_decoded_bit \n" , (int)rt);
|
||||||
|
// cudaCheck( cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char)) );
|
||||||
|
// cudaDeviceSynchronize();
|
||||||
|
|
||||||
|
rt = clEnqueueReadBuffer(ocl.runtime[0].queue[0], ocl.runtime[0].dev_tmp, CL_TRUE, 0,
|
||||||
|
(block_length/8)*sizeof(unsigned char) , p_llr, 0, NULL, NULL);
|
||||||
|
AssertFatal(rt == CL_SUCCESS, "Error %d moving p_llr data to pltf %i dev %i\n" , (int)rt, 0,0);
|
||||||
|
return MAX_ITERATION;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,302 @@
|
|||||||
|
/*
|
||||||
|
* 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.0 (the "License"); you may not use this file
|
||||||
|
* except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file PHY/CODING/nrLDPC_decoder_kernels_CL.cl
|
||||||
|
* \brief kernel functions for ldpc decoder accelerated via openCL
|
||||||
|
* \author Francois TABURET
|
||||||
|
* \date 2021
|
||||||
|
* \version 1.0
|
||||||
|
* \company Nokia BellLabs France
|
||||||
|
* \email: francois.taburet@nokia-bell-labs.com
|
||||||
|
* \note initial implem - translation of cuda version
|
||||||
|
* \warning
|
||||||
|
*/
|
||||||
|
#define define MAX_ITERATION 2
|
||||||
|
#define MC 1
|
||||||
|
|
||||||
|
#define INT32_MAX 2147483647
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
char x;
|
||||||
|
char y;
|
||||||
|
short value;
|
||||||
|
} h_element;
|
||||||
|
|
||||||
|
//__global char dev_dt [46*68*384];
|
||||||
|
//__local char *dev_t;
|
||||||
|
//__global char dev_llr[68*384];
|
||||||
|
//__global unsigned char dev_tmp[68*384];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//__constant h_element dev_h_compact1[46*19] = {}; // used in kernel 1
|
||||||
|
//__constant h_element dev_h_compact2[68*30] = {}; // used in kernel 2
|
||||||
|
|
||||||
|
// __device__ __constantant__ h_element dev_h_compact1[46*19]; // used in kernel 1
|
||||||
|
// __device__ __constantant__ h_element dev_h_compact2[68*30]; // used in kernel 2
|
||||||
|
|
||||||
|
// row and col element count
|
||||||
|
__constant char h_ele_row_bg1_count[46] = {
|
||||||
|
19, 19, 19, 19, 3, 8, 9, 7, 10, 9,
|
||||||
|
7, 8, 7, 6, 7, 7, 6, 6, 6, 6,
|
||||||
|
6, 6, 5, 5, 6, 5, 5, 4, 5, 5,
|
||||||
|
5, 5, 5, 5, 5, 5, 5, 4, 5, 5,
|
||||||
|
4, 5, 4, 5, 5, 4};
|
||||||
|
__constant char h_ele_col_bg1_count[68] = {
|
||||||
|
30, 28, 7, 11, 9, 4, 8, 12, 8, 7,
|
||||||
|
12, 10, 12, 11, 10, 7, 10, 10, 13, 7,
|
||||||
|
8, 11, 12, 5, 6, 6, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1};
|
||||||
|
__constant char h_ele_row_bg2_count[42] = {
|
||||||
|
8, 10, 8, 10, 4, 6, 6, 6, 4, 5,
|
||||||
|
5, 5, 4, 5, 5, 4, 5, 5, 4, 4,
|
||||||
|
4, 4, 3, 4, 4, 3, 5, 3, 4, 3,
|
||||||
|
5, 3, 4, 4, 4, 4, 4, 3, 4, 4,
|
||||||
|
4, 4};
|
||||||
|
__constant char h_ele_col_bg2_count[52] = {
|
||||||
|
22, 23, 10, 5, 5, 14, 7, 13, 6, 8,
|
||||||
|
9, 16, 9, 12, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Kernel 1
|
||||||
|
__kernel void ldpc_cnp_kernel_1st_iter( __global char * dev_llr, __global char * dev_dt, __local h_element *dev_h_compact1, int BG, int row, int col, int Zc)
|
||||||
|
{
|
||||||
|
// int iMCW = blockIdx.y; // codeword id
|
||||||
|
// int iBlkRow = blockIdx.x; // block row in h_base
|
||||||
|
// int iSubRow = threadIdx.x; // row index in sub_block of h_base
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp %d\n", threadIdx.x);
|
||||||
|
int iMCW = get_group_id(1); // codeword id
|
||||||
|
int iBlkRow = get_group_id(0); // block row in h_base
|
||||||
|
int iBlkCol; // block col in h_base
|
||||||
|
int iSubRow = get_local_id(0);; // row index in sub_block of h_base
|
||||||
|
int iCol; // overall col index in h_base
|
||||||
|
int offsetR;
|
||||||
|
int shift_t;
|
||||||
|
|
||||||
|
// For 2-min algorithm.
|
||||||
|
int Q_sign = 0;
|
||||||
|
int sq;
|
||||||
|
int Q, Q_abs;
|
||||||
|
int R_temp;
|
||||||
|
|
||||||
|
int sign = 1;
|
||||||
|
int rmin1 = INT32_MAX;
|
||||||
|
int rmin2 = INT32_MAX;
|
||||||
|
char idx_min = 0;
|
||||||
|
|
||||||
|
h_element h_element_t;
|
||||||
|
int s = (BG==1)? h_ele_row_bg1_count[iBlkRow]:h_ele_row_bg2_count[iBlkRow];
|
||||||
|
offsetR = (iMCW * row*col*Zc) + iBlkRow * Zc + iSubRow; // row*col*Zc = size of dev_dt
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("s: %d, offset %d\n", s, offsetR);
|
||||||
|
// The 1st recursion
|
||||||
|
for(int i = 0; i < s; i++) // loop through all the ZxZ sub-blocks in a row
|
||||||
|
{
|
||||||
|
h_element_t = dev_h_compact1[i*row+iBlkRow]; // compact_col == row
|
||||||
|
|
||||||
|
iBlkCol = h_element_t.y;
|
||||||
|
shift_t = h_element_t.value;
|
||||||
|
|
||||||
|
shift_t = (iSubRow + shift_t) % Zc;
|
||||||
|
iCol = (iMCW * col*Zc) + iBlkCol * Zc + shift_t; // col*Zc = size of llr
|
||||||
|
Q = dev_llr[iCol];
|
||||||
|
Q_abs = (Q>0)? Q : -Q;
|
||||||
|
sq = Q < 0;
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("i %d, icol %d, Q: %d\n", i, iCol, Q);
|
||||||
|
// quick version
|
||||||
|
sign = sign * (1 - sq * 2);
|
||||||
|
Q_sign |= sq << i;
|
||||||
|
|
||||||
|
if (Q_abs < rmin1){
|
||||||
|
rmin2 = rmin1;
|
||||||
|
rmin1 = Q_abs;
|
||||||
|
idx_min = i;
|
||||||
|
} else if (Q_abs < rmin2){
|
||||||
|
rmin2 = Q_abs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1)printf("min1 %d, min2 %d, min1_idx %d\n", rmin1, rmin2, idx_min);
|
||||||
|
|
||||||
|
// The 2nd recursion
|
||||||
|
for(int i = 0; i < s; i++){
|
||||||
|
// v0: Best performance so far. 0.75f is the value of alpha.
|
||||||
|
sq = 1 - 2 * ((Q_sign >> i) & 0x01);
|
||||||
|
R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||||
|
// write results to global memory
|
||||||
|
h_element_t = dev_h_compact1[i*row+iBlkRow];
|
||||||
|
int addr_temp = offsetR + h_element_t.y * row * Zc;
|
||||||
|
dev_dt[addr_temp] = R_temp;
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1)printf("R_temp %d, temp_addr %d\n", R_temp, addr_temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kernel_1
|
||||||
|
__kernel void ldpc_cnp_kernel( __global char * dev_llr, __global char * dev_dt, __local h_element *dev_h_compact1, int BG, int row, int col, int Zc)
|
||||||
|
{
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp\n");
|
||||||
|
// int iMCW = blockIdx.y;
|
||||||
|
// int iBlkRow = blockIdx.x; // block row in h_base // block col in h_base
|
||||||
|
// int iSubRow = threadIdx.x; // row index in sub_block of h_base
|
||||||
|
int iMCW = get_group_id(1);
|
||||||
|
int iBlkRow = get_group_id(0); // block row in h_base
|
||||||
|
int iBlkCol; // block col in h_base
|
||||||
|
int iSubRow = get_local_id(0);; // row index in sub_block of h_base
|
||||||
|
int iCol; // overall col index in h_base
|
||||||
|
int offsetR;
|
||||||
|
int shift_t;
|
||||||
|
|
||||||
|
// For 2-min algorithm.
|
||||||
|
int Q_sign = 0;
|
||||||
|
int sq;
|
||||||
|
int Q, Q_abs;
|
||||||
|
int R_temp;
|
||||||
|
|
||||||
|
int sign = 1;
|
||||||
|
int rmin1 = INT32_MAX;
|
||||||
|
int rmin2 = INT32_MAX;
|
||||||
|
char idx_min = 0;
|
||||||
|
|
||||||
|
h_element h_element_t;
|
||||||
|
int s = (BG==1)? h_ele_row_bg1_count[iBlkRow]: h_ele_row_bg2_count[iBlkRow];
|
||||||
|
offsetR = (iMCW *row*col*Zc) + iBlkRow * Zc + iSubRow; // row * col * Zc = size of dev_dt
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("s: %d, offset %d\n", s, offsetR);
|
||||||
|
// The 1st recursion
|
||||||
|
for(int i = 0; i < s; i++) // loop through all the ZxZ sub-blocks in a row
|
||||||
|
{
|
||||||
|
h_element_t = dev_h_compact1[i*row+iBlkRow];
|
||||||
|
|
||||||
|
iBlkCol = h_element_t.y;
|
||||||
|
shift_t = h_element_t.value;
|
||||||
|
shift_t = (iSubRow + shift_t) % Zc;
|
||||||
|
iCol = iBlkCol * Zc + shift_t;
|
||||||
|
|
||||||
|
R_temp = dev_dt[offsetR + iBlkCol * row * Zc];
|
||||||
|
|
||||||
|
Q = dev_llr[iMCW * (col*Zc) + iCol] - R_temp;
|
||||||
|
Q_abs = (Q>0)? Q : -Q;
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("i %d, icol %d, Q: %d\n", i, iCol, Q);
|
||||||
|
sq = Q < 0;
|
||||||
|
sign = sign * (1 - sq * 2);
|
||||||
|
Q_sign |= sq << i;
|
||||||
|
|
||||||
|
if (Q_abs < rmin1){
|
||||||
|
rmin2 = rmin1;
|
||||||
|
rmin1 = Q_abs;
|
||||||
|
idx_min = i;
|
||||||
|
} else if (Q_abs < rmin2){
|
||||||
|
rmin2 = Q_abs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1)printf("min1 %d, min2 %d, min1_idx %d\n", rmin1, rmin2, idx_min);
|
||||||
|
|
||||||
|
// The 2nd recursion
|
||||||
|
for(int i = 0; i < s; i ++){
|
||||||
|
sq = 1 - 2 * ((Q_sign >> i) & 0x01);
|
||||||
|
R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||||
|
|
||||||
|
|
||||||
|
// write results to global memory
|
||||||
|
h_element_t = dev_h_compact1[i*row+iBlkRow];
|
||||||
|
int addr_temp = h_element_t.y * row * Zc + offsetR;
|
||||||
|
dev_dt[addr_temp] = R_temp;
|
||||||
|
// if(blockIdx.x == 0 && threadIdx.x == 1)printf("R_temp %d, temp_addr %d\n", R_temp, addr_temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kernel 2: VNP processing
|
||||||
|
__kernel void
|
||||||
|
ldpc_vnp_kernel_normal(__global char * dev_llr, __global char * dev_dt, __global char * dev_const_llr, __local h_element *dev_h_compact2, int BG, int row, int col, int Zc)
|
||||||
|
{
|
||||||
|
// int iMCW = blockIdx.y;
|
||||||
|
// int iBlkCol = blockIdx.x;
|
||||||
|
// int iSubCol = threadIdx.x;
|
||||||
|
int iMCW = get_group_id(1);
|
||||||
|
int iBlkCol = get_group_id(0);
|
||||||
|
int iBlkRow;
|
||||||
|
int iSubCol = get_local_id(0);
|
||||||
|
int iRow;
|
||||||
|
int iCol;
|
||||||
|
|
||||||
|
int shift_t, sf;
|
||||||
|
int APP;
|
||||||
|
|
||||||
|
h_element h_element_t;
|
||||||
|
|
||||||
|
// update all the llr values
|
||||||
|
iCol = iBlkCol * Zc + iSubCol;
|
||||||
|
APP = dev_const_llr[iMCW *col*Zc + iCol];
|
||||||
|
int offsetDt = iMCW *row*col*Zc + iBlkCol * row * Zc;
|
||||||
|
int s = (BG==1)? h_ele_col_bg1_count[iBlkCol]:h_ele_col_bg2_count[iBlkCol];
|
||||||
|
|
||||||
|
for(int i = 0; i < s; i++)
|
||||||
|
{
|
||||||
|
h_element_t = dev_h_compact2[i*col+iBlkCol];
|
||||||
|
|
||||||
|
shift_t = h_element_t.value%Zc;
|
||||||
|
iBlkRow = h_element_t.x;
|
||||||
|
|
||||||
|
sf = iSubCol - shift_t;
|
||||||
|
sf = (sf + Zc) % Zc;
|
||||||
|
|
||||||
|
iRow = iBlkRow * Zc + sf;
|
||||||
|
APP = APP + dev_dt[offsetDt + iRow];
|
||||||
|
}
|
||||||
|
if(APP > SCHAR_MAX) APP = SCHAR_MAX;
|
||||||
|
if(APP < SCHAR_MIN) APP = SCHAR_MIN;
|
||||||
|
// write back to device global memory
|
||||||
|
dev_llr[iMCW *col*Zc + iCol] = APP;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__kernel void pack_decoded_bit(__global unsigned char * dev_llr, __global unsigned char * dev_tmp, int col, int Zc)
|
||||||
|
{
|
||||||
|
// int iMCW = blockIdx.y;
|
||||||
|
// int btid = threadIdx.x;
|
||||||
|
unsigned char tmp[128];
|
||||||
|
int iMCW = get_group_id(1);
|
||||||
|
int btid = get_local_id(0);
|
||||||
|
int tid = iMCW * col*Zc + get_group_id(0)*128 + btid;
|
||||||
|
tmp[btid] = 0;
|
||||||
|
|
||||||
|
if(dev_llr[tid] < 0){
|
||||||
|
tmp[btid] = 1 << (7-(btid&7));
|
||||||
|
}
|
||||||
|
// __syncthreads();
|
||||||
|
|
||||||
|
if(btid < 16){
|
||||||
|
dev_tmp[iMCW * col*Zc + get_group_id(0)*16+btid] = 0;
|
||||||
|
for(int i = 0; i < 8; i++){
|
||||||
|
dev_tmp[iMCW * col*Zc + get_group_id(0)*16+btid] += tmp[btid*8+i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "nrLDPC_types.h"
|
#include "nrLDPC_types.h"
|
||||||
|
|
||||||
#ifndef malloc32_clear
|
|
||||||
/**
|
/**
|
||||||
\brief Allocates 32 byte aligned memory and initializes to zero
|
\brief Allocates 32 byte aligned memory and initializes to zero
|
||||||
\param size Input size in bytes
|
\param size Input size in bytes
|
||||||
@@ -46,7 +45,6 @@ static inline void* malloc32_clear(size_t size)
|
|||||||
memset(ptr, 0, size);
|
memset(ptr, 0, size);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Allocates and initializes the internal decoder processing buffers
|
\brief Allocates and initializes the internal decoder processing buffers
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ typedef struct nrLDPC_dec_params {
|
|||||||
uint16_t Z; /**< Lifting size */
|
uint16_t Z; /**< Lifting size */
|
||||||
uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
|
uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
|
||||||
uint8_t numMaxIter; /**< Maximum number of iterations */
|
uint8_t numMaxIter; /**< Maximum number of iterations */
|
||||||
|
int block_length;
|
||||||
e_nrLDPC_outMode outMode; /**< Output format */
|
e_nrLDPC_outMode outMode; /**< Output format */
|
||||||
} t_nrLDPC_dec_params;
|
} t_nrLDPC_dec_params;
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
* \note
|
* \note
|
||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
|
#include <iostream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
#include <cuda.h>
|
#include <cuda.h>
|
||||||
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||||
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
|
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
|
||||||
|
#include "assertions.h"
|
||||||
#include "bgs/BG1_I0"
|
#include "bgs/BG1_I0"
|
||||||
#include "bgs/BG1_I1"
|
#include "bgs/BG1_I1"
|
||||||
#include "bgs/BG1_I2"
|
#include "bgs/BG1_I2"
|
||||||
@@ -462,10 +462,11 @@ void read_BG(int BG, int *h, int row, int col)
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void init_LLR_DMA_for_CUDA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length){
|
void init_LLR_DMA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out){
|
||||||
|
|
||||||
uint16_t Zc = p_decParams->Z;
|
uint16_t Zc = p_decParams->Z;
|
||||||
uint8_t BG = p_decParams->BG;
|
uint8_t BG = p_decParams->BG;
|
||||||
|
int block_length = p_decParams->block_length;
|
||||||
uint8_t row,col;
|
uint8_t row,col;
|
||||||
if(BG == 1){
|
if(BG == 1){
|
||||||
row = 46;
|
row = 46;
|
||||||
@@ -483,14 +484,60 @@ void init_LLR_DMA_for_CUDA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using namespace std ;
|
||||||
|
|
||||||
|
/* from here: entry points in decoder shared lib */
|
||||||
extern "C"
|
extern "C"
|
||||||
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder)
|
int ldpc_autoinit(void) { // called by the library loader
|
||||||
|
/*int devices = 0;
|
||||||
|
|
||||||
|
cudaError_t err = cudaGetDeviceCount(&devices);
|
||||||
|
AssertFatal(devices>0,"\nNo cuda GPU found\n\n");
|
||||||
|
|
||||||
|
const int kb = 1024;
|
||||||
|
const int mb = kb * kb;
|
||||||
|
wcout << "NBody.GPU" << endl << "=========" << endl << endl;
|
||||||
|
|
||||||
|
wcout << "CUDA version: v" << CUDART_VERSION << endl;
|
||||||
|
|
||||||
|
|
||||||
|
wcout << "CUDA Devices: " << endl << endl;
|
||||||
|
|
||||||
|
for(int i = 0; i < devices; ++i)
|
||||||
|
{
|
||||||
|
cudaDeviceProp props;
|
||||||
|
cudaGetDeviceProperties(&props, i);
|
||||||
|
wcout << i << ": " << props.name << ": " << props.major << "." << props.minor << endl;
|
||||||
|
wcout << " Global memory: " << props.totalGlobalMem / mb << "mb" << endl;
|
||||||
|
wcout << " Shared memory: " << props.sharedMemPerBlock / kb << "kb" << endl;
|
||||||
|
wcout << " Constant memory: " << props.totalConstMem / kb << "kb" << endl;
|
||||||
|
wcout << " Block registers: " << props.regsPerBlock << endl << endl;
|
||||||
|
|
||||||
|
wcout << " Warp size: " << props.warpSize << endl;
|
||||||
|
wcout << " Threads per block: " << props.maxThreadsPerBlock << endl;
|
||||||
|
wcout << " Max block dimensions: [ " << props.maxThreadsDim[0] << ", " << props.maxThreadsDim[1] << ", " << props.maxThreadsDim[2] << " ]" << endl;
|
||||||
|
wcout << " Max grid dimensions: [ " << props.maxGridSize[0] << ", " << props.maxGridSize[1] << ", " << props.maxGridSize[2] << " ]" << endl;
|
||||||
|
wcout << endl;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
warmup_for_GPU();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
void nrLDPC_initcall(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out) {
|
||||||
|
set_compact_BG(p_decParams->Z,p_decParams->BG);
|
||||||
|
init_LLR_DMA(p_decParams, p_llr, p_out);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
int32_t nrLDPC_decod(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out,t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats *time_decoder)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
uint16_t Zc = p_decParams->Z;
|
uint16_t Zc = p_decParams->Z;
|
||||||
uint8_t BG = p_decParams->BG;
|
uint8_t BG = p_decParams->BG;
|
||||||
uint8_t numMaxIter = p_decParams->numMaxIter;
|
uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||||
|
int block_length = p_decParams->block_length;
|
||||||
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||||
cudaError_t cudaStatus;
|
cudaError_t cudaStatus;
|
||||||
uint8_t row,col;
|
uint8_t row,col;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ typedef struct {
|
|||||||
time_stats_t *toutput;
|
time_stats_t *toutput;
|
||||||
}encoder_implemparams_t;
|
}encoder_implemparams_t;
|
||||||
#define INIT0_LDPCIMPLEMPARAMS {0,0,0,NULL,NULL,NULL,NULL}
|
#define INIT0_LDPCIMPLEMPARAMS {0,0,0,NULL,NULL,NULL,NULL}
|
||||||
|
typedef void(*nrLDPC_initcallfunc_t)(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out);
|
||||||
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t*);
|
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t*);
|
||||||
//============================================================================================================================
|
//============================================================================================================================
|
||||||
// decoder interface
|
// decoder interface
|
||||||
@@ -56,4 +57,4 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
|
|||||||
\param p_profiler LDPC profiler statistics
|
\param p_profiler LDPC profiler statistics
|
||||||
*/
|
*/
|
||||||
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_procBuf* , t_nrLDPC_time_stats* );
|
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_procBuf* , t_nrLDPC_time_stats* );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -23,13 +23,16 @@
|
|||||||
#ifdef LDPC_LOADER
|
#ifdef LDPC_LOADER
|
||||||
nrLDPC_decoderfunc_t nrLDPC_decoder;
|
nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||||
nrLDPC_encoderfunc_t nrLDPC_encoder;
|
nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||||
|
nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||||
#else
|
#else
|
||||||
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
||||||
extern int load_nrLDPClib(void) ;
|
extern int load_nrLDPClib(char *version) ;
|
||||||
extern int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr); // for ldpctest
|
extern int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr); // for ldpctest
|
||||||
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
|
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
|
||||||
|
extern nrLDPC_initcallfunc_t nrLDPC_initcall;
|
||||||
|
|
||||||
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
|
extern nrLDPC_decoderfunc_t nrLDPC_decoder;
|
||||||
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
|
extern nrLDPC_encoderfunc_t nrLDPC_encoder;
|
||||||
// inline functions:
|
// inline functions:
|
||||||
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
|
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -42,22 +42,32 @@
|
|||||||
|
|
||||||
|
|
||||||
/* function description array, to be used when loading the encoding/decoding shared lib */
|
/* function description array, to be used when loading the encoding/decoding shared lib */
|
||||||
static loader_shlibfunc_t shlib_fdesc[2];
|
static loader_shlibfunc_t shlib_fdesc[3];
|
||||||
|
|
||||||
char *arg[64]={"ldpctest","-O","cmdlineonly::dbgl0"};
|
/* arguments used when called from phy simulators exec's which do not use the config module */
|
||||||
|
/* arg is used to initialize the config module so that the loader works as expected */
|
||||||
|
char *arg[64]={"ldpctest","-O","cmdlineonly::dbgl0",NULL,NULL};
|
||||||
|
|
||||||
int load_nrLDPClib(void) {
|
int load_nrLDPClib(char *version) {
|
||||||
char *ptr = (char*)config_get_if();
|
char *ptr = (char*)config_get_if();
|
||||||
|
char libname[64]="ldpc";
|
||||||
|
|
||||||
if ( ptr==NULL ) {// phy simulators, config module possibly not loaded
|
if ( ptr==NULL ) {// phy simulators, config module possibly not loaded
|
||||||
load_configmodule(3,(char **)arg,CONFIG_ENABLECMDLINEONLY) ;
|
load_configmodule(0,(char **)NULL,CONFIG_ENABLECMDLINEONLY) ;
|
||||||
logInit();
|
logInit();
|
||||||
}
|
}
|
||||||
shlib_fdesc[0].fname = "nrLDPC_decod";
|
shlib_fdesc[0].fname = "nrLDPC_decod";
|
||||||
shlib_fdesc[1].fname = "nrLDPC_encod";
|
shlib_fdesc[1].fname = "nrLDPC_encod";
|
||||||
int ret=load_module_shlib("ldpc",shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL);
|
shlib_fdesc[2].fname = "nrLDPC_initcall";
|
||||||
|
int ret;
|
||||||
|
if (version)
|
||||||
|
ret=load_module_version_shlib(libname,version,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL);
|
||||||
|
else
|
||||||
|
ret=load_module_shlib(libname,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL);
|
||||||
AssertFatal( (ret >= 0),"Error loading ldpc decoder");
|
AssertFatal( (ret >= 0),"Error loading ldpc decoder");
|
||||||
nrLDPC_decoder = (nrLDPC_decoderfunc_t)shlib_fdesc[0].fptr;
|
nrLDPC_decoder = (nrLDPC_decoderfunc_t)shlib_fdesc[0].fptr;
|
||||||
nrLDPC_encoder = (nrLDPC_encoderfunc_t)shlib_fdesc[1].fptr;
|
nrLDPC_encoder = (nrLDPC_encoderfunc_t)shlib_fdesc[1].fptr;
|
||||||
|
nrLDPC_initcall = (nrLDPC_initcallfunc_t)shlib_fdesc[2].fptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,10 +75,8 @@ int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_p
|
|||||||
loader_shlibfunc_t shlib_encoder_fdesc;
|
loader_shlibfunc_t shlib_encoder_fdesc;
|
||||||
|
|
||||||
shlib_encoder_fdesc.fname = "nrLDPC_encod";
|
shlib_encoder_fdesc.fname = "nrLDPC_encod";
|
||||||
char libpath[64];
|
int ret=load_module_version_shlib("ldpc",libversion,&shlib_encoder_fdesc,1,NULL);
|
||||||
sprintf(libpath,"ldpc%s",libversion);
|
AssertFatal( (ret >= 0),"Error loading ldpc encoder %s\n",(libversion==NULL)?"":libversion);
|
||||||
int ret=load_module_shlib(libpath,&shlib_encoder_fdesc,1,NULL);
|
|
||||||
AssertFatal( (ret >= 0),"Error loading ldpc encoder %s\n",libpath);
|
|
||||||
*nrLDPC_encoder_ptr = (nrLDPC_encoderfunc_t)shlib_encoder_fdesc.fptr;
|
*nrLDPC_encoder_ptr = (nrLDPC_encoderfunc_t)shlib_encoder_fdesc.fptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "executables/nr-softmodem-common.h"
|
#include "executables/nr-softmodem-common.h"
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
#include "common/ran_context.h"
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
#include "PHY/phy_extern.h"
|
#include "PHY/phy_extern.h"
|
||||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||||
@@ -35,7 +36,6 @@
|
|||||||
#include "MBSFN-SubframeConfigList.h"*/
|
#include "MBSFN-SubframeConfigList.h"*/
|
||||||
#include "openair1/PHY/defs_RU.h"
|
#include "openair1/PHY/defs_RU.h"
|
||||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
|||||||
crcTableInit();
|
crcTableInit();
|
||||||
init_scrambling_luts();
|
init_scrambling_luts();
|
||||||
init_pucch2_luts();
|
init_pucch2_luts();
|
||||||
load_nrLDPClib();
|
load_nrLDPClib(NULL);
|
||||||
// PBCH DMRS gold sequences generation
|
// PBCH DMRS gold sequences generation
|
||||||
nr_init_pbch_dmrs(gNB);
|
nr_init_pbch_dmrs(gNB);
|
||||||
//PDCCH DMRS init
|
//PDCCH DMRS init
|
||||||
|
|||||||
@@ -22,12 +22,63 @@
|
|||||||
#include "phy_init.h"
|
#include "phy_init.h"
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
|
|
||||||
/// Subcarrier spacings in Hz indexed by numerology index
|
/// Subcarrier spacings in Hz indexed by numerology index
|
||||||
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
||||||
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
|
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
|
||||||
|
|
||||||
|
// Table 5.4.3.3-1 38-101
|
||||||
|
int nr_ssb_table[48][3] = {
|
||||||
|
{1, 15, nr_ssb_type_A},
|
||||||
|
{2, 15, nr_ssb_type_A},
|
||||||
|
{3, 15, nr_ssb_type_A},
|
||||||
|
{5, 15, nr_ssb_type_A},
|
||||||
|
{5, 30, nr_ssb_type_B},
|
||||||
|
{7, 15, nr_ssb_type_A},
|
||||||
|
{8, 15, nr_ssb_type_A},
|
||||||
|
{12, 15, nr_ssb_type_A},
|
||||||
|
{14, 15, nr_ssb_type_A},
|
||||||
|
{18, 15, nr_ssb_type_A},
|
||||||
|
{20, 15, nr_ssb_type_A},
|
||||||
|
{25, 15, nr_ssb_type_A},
|
||||||
|
{26, 15, nr_ssb_type_A},
|
||||||
|
{28, 15, nr_ssb_type_A},
|
||||||
|
{29, 15, nr_ssb_type_A},
|
||||||
|
{30, 15, nr_ssb_type_A},
|
||||||
|
{34, 15, nr_ssb_type_A},
|
||||||
|
{34, 30, nr_ssb_type_C},
|
||||||
|
{38, 15, nr_ssb_type_A},
|
||||||
|
{38, 30, nr_ssb_type_C},
|
||||||
|
{39, 15, nr_ssb_type_A},
|
||||||
|
{39, 30, nr_ssb_type_C},
|
||||||
|
{40, 30, nr_ssb_type_C},
|
||||||
|
{41, 15, nr_ssb_type_A},
|
||||||
|
{41, 30, nr_ssb_type_C},
|
||||||
|
{46, 30, nr_ssb_type_C},
|
||||||
|
{48, 30, nr_ssb_type_C},
|
||||||
|
{50, 30, nr_ssb_type_C},
|
||||||
|
{51, 15, nr_ssb_type_A},
|
||||||
|
{53, 15, nr_ssb_type_A},
|
||||||
|
{65, 15, nr_ssb_type_A},
|
||||||
|
{66, 15, nr_ssb_type_A},
|
||||||
|
{66, 30, nr_ssb_type_B},
|
||||||
|
{70, 15, nr_ssb_type_A},
|
||||||
|
{71, 15, nr_ssb_type_A},
|
||||||
|
{74, 15, nr_ssb_type_A},
|
||||||
|
{75, 15, nr_ssb_type_A},
|
||||||
|
{76, 15, nr_ssb_type_A},
|
||||||
|
{77, 30, nr_ssb_type_C},
|
||||||
|
{78, 30, nr_ssb_type_C},
|
||||||
|
{79, 30, nr_ssb_type_C},
|
||||||
|
{90, 15, nr_ssb_type_A},
|
||||||
|
{90, 30, nr_ssb_type_C},
|
||||||
|
{91, 15, nr_ssb_type_A},
|
||||||
|
{92, 15, nr_ssb_type_A},
|
||||||
|
{93, 15, nr_ssb_type_A},
|
||||||
|
{94, 15, nr_ssb_type_A},
|
||||||
|
{96, 30, nr_ssb_type_C}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
|
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
|
||||||
// definition of Lmax according to ts 38.213 section 4.1
|
// definition of Lmax according to ts 38.213 section 4.1
|
||||||
@@ -86,27 +137,28 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb) {
|
|||||||
|
|
||||||
void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
||||||
{
|
{
|
||||||
|
int idx = 0;
|
||||||
switch(mu) {
|
switch(mu) {
|
||||||
|
|
||||||
case NR_MU_0: //15kHz scs
|
case NR_MU_0: //15kHz scs
|
||||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
|
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
|
||||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
|
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
|
||||||
fp->ssb_type = nr_ssb_type_A;
|
fp->ssb_type = nr_ssb_type_A;
|
||||||
|
while(nr_ssb_table[idx][0]!=fp->nr_band)
|
||||||
|
idx++;
|
||||||
|
AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n",
|
||||||
|
fp->subcarrier_spacing,fp->nr_band);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_MU_1: //30kHz scs
|
case NR_MU_1: //30kHz scs
|
||||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
|
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
|
||||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
|
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
|
||||||
|
while(nr_ssb_table[idx][0]!=fp->nr_band ||
|
||||||
// selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz
|
nr_ssb_table[idx][1]!=30) {
|
||||||
if (fp->nr_band == 5 || fp->nr_band == 66)
|
AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n",
|
||||||
fp->ssb_type = nr_ssb_type_B;
|
fp->subcarrier_spacing,fp->nr_band);
|
||||||
else{
|
idx++;
|
||||||
if (fp->nr_band == 41 || fp->nr_band == 38 || ( fp->nr_band > 76 && fp->nr_band < 80) )
|
|
||||||
fp->ssb_type = nr_ssb_type_C;
|
|
||||||
else
|
|
||||||
AssertFatal(1==0,"NR Operating Band n%d not available for SS block SCS with mu=%d\n", fp->nr_band, mu);
|
|
||||||
}
|
}
|
||||||
|
fp->ssb_type = nr_ssb_table[idx][2];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_MU_2: //60kHz scs
|
case NR_MU_2: //60kHz scs
|
||||||
|
|||||||
@@ -50,8 +50,6 @@
|
|||||||
//#define DEBUG_DCI_DECODING 1
|
//#define DEBUG_DCI_DECODING 1
|
||||||
//#define DEBUG_PHY
|
//#define DEBUG_PHY
|
||||||
|
|
||||||
//#undef ALL_AGGREGATION
|
|
||||||
|
|
||||||
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
|
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
|
||||||
//extern uint16_t pcfich_reg[4];
|
//extern uint16_t pcfich_reg[4];
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,8 @@
|
|||||||
#ifndef __DCI_NB_IOT_H__
|
#ifndef __DCI_NB_IOT_H__
|
||||||
#define __DCI_NB_IOT_H__
|
#define __DCI_NB_IOT_H__
|
||||||
|
|
||||||
//#ifndef USER_MODE
|
|
||||||
//#include "PHY/types.h"
|
|
||||||
//#else
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
//#endif
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,10 +36,8 @@
|
|||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "SCHED/extern.h"
|
#include "SCHED/extern.h"
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
#include "openair2/LAYER2/MAC/proto.h"
|
#include "openair2/LAYER2/MAC/proto.h"
|
||||||
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
|
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
|
||||||
|
|
||||||
@@ -434,10 +432,8 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
|
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
|
||||||
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
|
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
|
||||||
#endif
|
|
||||||
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
|
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
|
||||||
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
|
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
|
||||||
ue->pbch_vars[eNB]->pdu_errors_conseq,
|
ue->pbch_vars[eNB]->pdu_errors_conseq,
|
||||||
|
|||||||
@@ -321,4 +321,4 @@ HLC_subband_cqi_mcs_CBA_20MHz_NB_IoT;
|
|||||||
#define MAX_ACK_PAYLOAD_NB_IoT 18
|
#define MAX_ACK_PAYLOAD_NB_IoT 18
|
||||||
#define MAX_RI_PAYLOAD_NB_IoT 6
|
#define MAX_RI_PAYLOAD_NB_IoT 6
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -50,9 +50,6 @@
|
|||||||
//#define DEBUG_DCI_DECODING 1
|
//#define DEBUG_DCI_DECODING 1
|
||||||
//#define DEBUG_PHY
|
//#define DEBUG_PHY
|
||||||
|
|
||||||
//#undef ALL_AGGREGATION
|
|
||||||
|
|
||||||
|
|
||||||
uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
|
uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -2802,7 +2799,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 1 search spaces at aggregation 8
|
// Now check UE_SPEC format 1 search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
dci_decoding_procedure0(pdcch_vars,0,mode,subframe,
|
dci_decoding_procedure0(pdcch_vars,0,mode,subframe,
|
||||||
@@ -2836,7 +2832,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#endif //ALL_AGGREGATION
|
|
||||||
} else if (tmode == 3) {
|
} else if (tmode == 3) {
|
||||||
|
|
||||||
|
|
||||||
@@ -2946,7 +2941,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
||||||
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes);
|
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes);
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
@@ -3082,7 +3076,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
// Now check UE_SPEC format 2_2A search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
dci_decoding_procedure0(pdcch_vars,0,mode,
|
dci_decoding_procedure0(pdcch_vars,0,mode,
|
||||||
@@ -3214,7 +3207,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#ifdef ALL_AGGREGATION
|
|
||||||
|
|
||||||
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
|
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
|
||||||
old_dci_cnt=dci_cnt;
|
old_dci_cnt=dci_cnt;
|
||||||
@@ -3249,7 +3241,6 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
|
|||||||
if (dci_cnt>old_dci_cnt)
|
if (dci_cnt>old_dci_cnt)
|
||||||
return(dci_cnt);
|
return(dci_cnt);
|
||||||
|
|
||||||
//#endif //ALL_AGGREGATION
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
#include <cblas.h>
|
#include <cblas.h>
|
||||||
#include "linear_preprocessing_rec.h"
|
#include "linear_preprocessing_rec.h"
|
||||||
|
|
||||||
#define NOCYGWIN_STATIC
|
|
||||||
//#define DEBUG_MMSE
|
//#define DEBUG_MMSE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
//#define DEBUG_ULSCH_MODULATION
|
//#define DEBUG_ULSCH_MODULATION
|
||||||
|
|
||||||
#ifndef OFDMA_ULSCH
|
|
||||||
void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -371,7 +370,6 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
|||||||
// printf("\n");
|
// printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
void ulsch_modulation(int32_t **txdataF,
|
void ulsch_modulation(int32_t **txdataF,
|
||||||
short amp,
|
short amp,
|
||||||
uint32_t frame,
|
uint32_t frame,
|
||||||
@@ -690,57 +688,10 @@ void ulsch_modulation(int32_t **txdataF,
|
|||||||
|
|
||||||
// Transform Precoding
|
// Transform Precoding
|
||||||
|
|
||||||
#ifdef OFDMA_ULSCH
|
|
||||||
|
|
||||||
for (i=0; i<ulsch_Msymb; i++) {
|
|
||||||
ulsch->z[i] = ulsch->d[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch);
|
dft_lte(ulsch->z,ulsch->d,Msc_PUSCH,ulsch->Nsymb_pusch);
|
||||||
#endif
|
|
||||||
|
|
||||||
DevAssert(txdataF);
|
DevAssert(txdataF);
|
||||||
|
|
||||||
#ifdef OFDMA_ULSCH
|
|
||||||
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
|
||||||
|
|
||||||
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
|
||||||
re_offset0 -= frame_parms->ofdm_symbol_size;
|
|
||||||
// re_offset0++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// printf("re_offset0 %d\n",re_offset0);
|
|
||||||
|
|
||||||
|
|
||||||
for (j=0,l=0; l<(nsymb-ulsch->srs_active); l++) {
|
|
||||||
re_offset = re_offset0;
|
|
||||||
symbol_offset = (int)frame_parms->ofdm_symbol_size*(l+(subframe*nsymb));
|
|
||||||
#ifdef DEBUG_ULSCH_MODULATION
|
|
||||||
printf("symbol %d (subframe %d): symbol_offset %d\n",l,subframe,symbol_offset);
|
|
||||||
#endif
|
|
||||||
txptr = &txdataF[0][symbol_offset];
|
|
||||||
|
|
||||||
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))||
|
|
||||||
((frame_parms->Ncp == 1) && ((l==2) || (l==8)))) {
|
|
||||||
}
|
|
||||||
// Skip reference symbols
|
|
||||||
else {
|
|
||||||
|
|
||||||
// printf("copying %d REs\n",Msc_PUSCH);
|
|
||||||
for (i=0; i<Msc_PUSCH; i++,j++) {
|
|
||||||
#ifdef DEBUG_ULSCH_MODULATION
|
|
||||||
printf("re_offset %d (%p): %d,%d\n", re_offset,&ulsch->z[j],((int16_t*)&ulsch->z[j])[0],((int16_t*)&ulsch->z[j])[1]);
|
|
||||||
#endif
|
|
||||||
txptr[re_offset++] = ulsch->z[j];
|
|
||||||
|
|
||||||
if (re_offset==frame_parms->ofdm_symbol_size)
|
|
||||||
re_offset = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# else // OFDMA_ULSCH = 0
|
|
||||||
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
re_offset0 = frame_parms->first_carrier_offset + (ulsch->harq_processes[harq_pid]->first_rb*12);
|
||||||
|
|
||||||
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
if (re_offset0>frame_parms->ofdm_symbol_size) {
|
||||||
@@ -777,8 +728,5 @@ void ulsch_modulation(int32_t **txdataF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION, VCD_FUNCTION_OUT);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,18 +129,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
|||||||
rxdata_ptr = (int16_t *)tmp_dft_in;
|
rxdata_ptr = (int16_t *)tmp_dft_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
start_meas(&ue->rx_dft_stats);
|
start_meas(&ue->rx_dft_stats);
|
||||||
#endif
|
|
||||||
|
|
||||||
dft(dftsize,
|
dft(dftsize,
|
||||||
rxdata_ptr,
|
rxdata_ptr,
|
||||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||||
1);
|
1);
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
stop_meas(&ue->rx_dft_stats);
|
stop_meas(&ue->rx_dft_stats);
|
||||||
#endif
|
|
||||||
|
|
||||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol+symb_offset];
|
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol+symb_offset];
|
||||||
@@ -249,18 +245,14 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
start_meas(&ue->rx_dft_stats);
|
start_meas(&ue->rx_dft_stats);
|
||||||
#endif
|
|
||||||
|
|
||||||
dft(dftsize,
|
dft(dftsize,
|
||||||
rxdata_ptr,
|
rxdata_ptr,
|
||||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||||
1);
|
1);
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
stop_meas(&ue->rx_dft_stats);
|
stop_meas(&ue->rx_dft_stats);
|
||||||
#endif
|
|
||||||
|
|
||||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol + symb_offset];
|
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol + symb_offset];
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "nr_dlsch.h"
|
#include "nr_dlsch.h"
|
||||||
#include "nr_sch_dmrs.h"
|
#include "nr_sch_dmrs.h"
|
||||||
#include "PHY/MODULATION/nr_modulation.h"
|
#include "PHY/MODULATION/nr_modulation.h"
|
||||||
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
|
||||||
//#define DEBUG_PDCCH_DMRS
|
//#define DEBUG_PDCCH_DMRS
|
||||||
//#define DEBUG_DCI
|
//#define DEBUG_DCI
|
||||||
|
|||||||
@@ -59,6 +59,4 @@ void nr_fill_ul_dci(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m,nfapi_nr_dl_tti_pdcch_pdu_rel15_t *);
|
void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m,nfapi_nr_dl_tti_pdcch_pdu_rel15_t *);
|
||||||
|
|
||||||
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
|
|
||||||
|
|
||||||
#endif //__PHY_NR_TRANSPORT_DCI__H
|
#endif //__PHY_NR_TRANSPORT_DCI__H
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nr_dci.h"
|
#include "nr_dci.h"
|
||||||
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
|
||||||
//#define DEBUG_FILL_DCI
|
//#define DEBUG_FILL_DCI
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
|
||||||
//#define DEBUG_DLSCH
|
//#define DEBUG_DLSCH
|
||||||
|
|||||||
@@ -39,10 +39,10 @@
|
|||||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
#include "common/utils/nr/nr_common.h"
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#include <openair2/UTIL/OPT/opt.h>
|
#include <openair2/UTIL/OPT/opt.h>
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
|
||||||
|
|
||||||
#define NR_PBCH_PDU_BITS 24
|
#define NR_PBCH_PDU_BITS 24
|
||||||
|
|
||||||
@@ -315,6 +314,7 @@ int nr_find_pucch(uint16_t rnti,
|
|||||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||||
void init_prach_ru_list(RU_t *ru);
|
void init_prach_ru_list(RU_t *ru);
|
||||||
void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
|
void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
|
||||||
|
uint8_t get_nr_prach_duration(uint8_t prach_format);
|
||||||
|
|
||||||
void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
|
void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
|
||||||
int16_t amp,
|
int16_t amp,
|
||||||
|
|||||||
@@ -206,7 +206,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
nr_sequences=8>>(1-pucch_pdu->sr_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",
|
||||||
|
pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,
|
||||||
|
pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift);
|
||||||
|
|
||||||
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
|
||||||
/*
|
/*
|
||||||
@@ -238,7 +240,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
// x_n contains the sequence r_u_v_alpha_delta(n)
|
// x_n contains the sequence r_u_v_alpha_delta(n)
|
||||||
|
|
||||||
int n,i,l;
|
int n,i;
|
||||||
int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
|
int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
|
||||||
|
|
||||||
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
|
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
|
||||||
@@ -266,14 +268,14 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
int64_t xrtmag=0,xrtmag_next=0;
|
int64_t xrtmag=0,xrtmag_next=0;
|
||||||
uint8_t maxpos=0;
|
uint8_t maxpos=0;
|
||||||
uint8_t index=0;
|
uint8_t index=0;
|
||||||
for (l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||||
for (int aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
|
for (int aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
|
||||||
memset((void*)xr[aarx][l],0,24*sizeof(int16_t));
|
memset((void*)xr[aarx][l],0,24*sizeof(int16_t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int n2;
|
int n2;
|
||||||
|
|
||||||
for (l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
for (int l=0; l<pucch_pdu->nr_of_symbols; l++) {
|
||||||
l2 = l+pucch_pdu->start_symbol_index;
|
l2 = l+pucch_pdu->start_symbol_index;
|
||||||
re_offset[l] = (12*prb_offset[l]) + frame_parms->first_carrier_offset;
|
re_offset[l] = (12*prb_offset[l]) + frame_parms->first_carrier_offset;
|
||||||
if (re_offset[l]>= frame_parms->ofdm_symbol_size)
|
if (re_offset[l]>= frame_parms->ofdm_symbol_size)
|
||||||
@@ -300,11 +302,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
//int32_t no_corr = 0;
|
//int32_t no_corr = 0;
|
||||||
int seq_index;
|
int seq_index;
|
||||||
int64_t temp;
|
int64_t temp;
|
||||||
int64_t av_corr=0;
|
|
||||||
|
|
||||||
for(i=0;i<nr_sequences;i++){
|
for(i=0;i<nr_sequences;i++){
|
||||||
|
|
||||||
for (l=0;l<pucch_pdu->nr_of_symbols;l++) {
|
for (int l=0;l<pucch_pdu->nr_of_symbols;l++) {
|
||||||
seq_index = (pucch_pdu->initial_cyclic_shift+
|
seq_index = (pucch_pdu->initial_cyclic_shift+
|
||||||
mcs[i]+
|
mcs[i]+
|
||||||
gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index])%12;
|
gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index])%12;
|
||||||
@@ -322,26 +323,30 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(PHY,"PUCCH IDFT[%d/%d] = (%d,%d)=>%f\n",mcs[i],seq_index,corr_re[0][0],corr_im[0][0],10*log10((double)corr_re[0][0]*corr_re[0][0] + (double)corr_im[0][0]*corr_im[0][0]));
|
LOG_D(PHY,"PUCCH IDFT[%d/%d] = (%d,%d)=>%f\n",
|
||||||
if (l>1) LOG_D(PHY,"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f\n",mcs[i],seq_index,corr_re[0][1],corr_im[0][1],10*log10((double)corr_re[0][1]*corr_re[0][1] + (double)corr_im[0][1]*corr_im[0][1]));
|
mcs[i],seq_index,corr_re[0][0],corr_im[0][0],
|
||||||
if (pucch_pdu->freq_hop_flag == 0 && l==1) {// non-coherent correlation
|
10*log10((double)corr_re[0][0]*corr_re[0][0] + (double)corr_im[0][0]*corr_im[0][0]));
|
||||||
temp=0;
|
if (pucch_pdu->nr_of_symbols==2)
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++)
|
LOG_D(PHY,"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f\n",
|
||||||
temp+=(int64_t)corr_re[aa][0]*corr_re[aa][0] + (int64_t)corr_im[aa][0]*corr_im[aa][0];
|
mcs[i],seq_index,corr_re[0][1],corr_im[0][1],
|
||||||
}
|
10*log10((double)corr_re[0][1]*corr_re[0][1] + (double)corr_im[0][1]*corr_im[0][1]));
|
||||||
|
if (pucch_pdu->freq_hop_flag == 0) {
|
||||||
else if (pucch_pdu->freq_hop_flag == 0 && l==2) {
|
if (pucch_pdu->nr_of_symbols==1) {// non-coherent correlation
|
||||||
int64_t corr_re2=0;
|
temp=0;
|
||||||
int64_t corr_im2=0;
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++)
|
||||||
temp=0;
|
temp+=(int64_t)corr_re[aa][0]*corr_re[aa][0] + (int64_t)corr_im[aa][0]*corr_im[aa][0];
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
} else {
|
||||||
corr_re2 = (int64_t)corr_re[aa][0]+corr_re[aa][1];
|
int64_t corr_re2=0;
|
||||||
corr_im2 = (int64_t)corr_im[aa][0]+corr_im[aa][1];
|
int64_t corr_im2=0;
|
||||||
// coherent combining of 2 symbols and then complex modulus for single-frequency case
|
temp=0;
|
||||||
temp+=corr_re2*corr_re2 + corr_im2*corr_im2;
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
||||||
}
|
corr_re2 = (int64_t)corr_re[aa][0]+corr_re[aa][1];
|
||||||
}
|
corr_im2 = (int64_t)corr_im[aa][0]+corr_im[aa][1];
|
||||||
else if (pucch_pdu->freq_hop_flag == 1) {
|
// coherent combining of 2 symbols and then complex modulus for single-frequency case
|
||||||
|
temp+=corr_re2*corr_re2 + corr_im2*corr_im2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (pucch_pdu->freq_hop_flag == 1) {
|
||||||
// full non-coherent combining of 2 symbols for frequency-hopping case
|
// full non-coherent combining of 2 symbols for frequency-hopping case
|
||||||
temp=0;
|
temp=0;
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++)
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++)
|
||||||
@@ -349,7 +354,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
}
|
}
|
||||||
else AssertFatal(1==0,"shouldn't happen\n");
|
else AssertFatal(1==0,"shouldn't happen\n");
|
||||||
|
|
||||||
av_corr+=temp;
|
|
||||||
if (temp>xrtmag) {
|
if (temp>xrtmag) {
|
||||||
xrtmag_next = xrtmag;
|
xrtmag_next = xrtmag;
|
||||||
xrtmag=temp;
|
xrtmag=temp;
|
||||||
@@ -359,19 +363,19 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
|||||||
int64_t temp2=0,temp3=0;;
|
int64_t temp2=0,temp3=0;;
|
||||||
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
for (int aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
|
||||||
temp2 += ((int64_t)corr_re[aa][0]*corr_re[aa][0] + (int64_t)corr_im[aa][0]*corr_im[aa][0]);
|
temp2 += ((int64_t)corr_re[aa][0]*corr_re[aa][0] + (int64_t)corr_im[aa][0]*corr_im[aa][0]);
|
||||||
if (l==2) temp3 += ((int64_t)corr_re[aa][1]*corr_re[aa][1] + (int64_t)corr_im[aa][1]*corr_im[aa][1]);
|
if (pucch_pdu->nr_of_symbols==2)
|
||||||
|
temp3 += ((int64_t)corr_re[aa][1]*corr_re[aa][1] + (int64_t)corr_im[aa][1]*corr_im[aa][1]);
|
||||||
}
|
}
|
||||||
uci_stats->current_pucch0_stat0= dB_fixed64(temp2);
|
uci_stats->current_pucch0_stat0= dB_fixed64(temp2);
|
||||||
if (l==2) uci_stats->current_pucch0_stat1= dB_fixed64(temp3);
|
if ( pucch_pdu->nr_of_symbols==2)
|
||||||
|
uci_stats->current_pucch0_stat1= dB_fixed64(temp3);
|
||||||
}
|
}
|
||||||
else if (temp>xrtmag_next)
|
else if (temp>xrtmag_next)
|
||||||
xrtmag_next = temp;
|
xrtmag_next = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
av_corr/=nr_sequences/l;
|
int xrtmag_dBtimes10 = 10*(int)dB_fixed64(xrtmag/(12*pucch_pdu->nr_of_symbols));
|
||||||
|
int xrtmag_next_dBtimes10 = 10*(int)dB_fixed64(xrtmag_next/(12*pucch_pdu->nr_of_symbols));
|
||||||
int xrtmag_dBtimes10 = 10*(int)dB_fixed64(xrtmag/(12*l));
|
|
||||||
int xrtmag_next_dBtimes10 = 10*(int)dB_fixed64(xrtmag_next/(12*l));
|
|
||||||
#ifdef DEBUG_NR_PUCCH_RX
|
#ifdef DEBUG_NR_PUCCH_RX
|
||||||
printf("PUCCH 0 : maxpos %d\n",maxpos);
|
printf("PUCCH 0 : maxpos %d\n",maxpos);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
short coef)
|
short coef)
|
||||||
{
|
{
|
||||||
|
|
||||||
static int max_pos_fil = 0;
|
|
||||||
static int count_max_pos_ok = 0;
|
static int count_max_pos_ok = 0;
|
||||||
static int first_time = 1;
|
static int first_time = 1;
|
||||||
int max_val = 0, max_pos = 0;
|
int max_val = 0, max_pos = 0;
|
||||||
@@ -55,13 +54,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset);
|
LOG_D(PHY,"AbsSubframe %d: rx_offset (before) = %d\n",subframe,ue->rx_offset);
|
||||||
|
|
||||||
// we only use channel estimates from tx antenna 0 here
|
// search for maximum position within the cyclic prefix
|
||||||
for (int i = 0; i < frame_parms->nb_prefix_samples; i++) {
|
for (int i = -frame_parms->nb_prefix_samples/2; i < frame_parms->nb_prefix_samples/2; i++) {
|
||||||
int temp = 0;
|
int temp = 0;
|
||||||
|
|
||||||
|
int j = (i < 0) ? (i + frame_parms->ofdm_symbol_size) : i;
|
||||||
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
||||||
int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(i<<1)];
|
int Re = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[(j<<1)];
|
||||||
int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(i<<1)];
|
int Im = ((int16_t*)ue->pbch_vars[gNB_id]->dl_ch_estimates_time[aa])[1+(j<<1)];
|
||||||
temp += (Re*Re/2) + (Im*Im/2);
|
temp += (Re*Re/2) + (Im*Im/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,19 +71,16 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_pos > frame_parms->ofdm_symbol_size/2)
|
|
||||||
max_pos = max_pos - frame_parms->ofdm_symbol_size;
|
|
||||||
|
|
||||||
// filter position to reduce jitter
|
// filter position to reduce jitter
|
||||||
if (clear == 1)
|
if (clear == 1)
|
||||||
max_pos_fil = max_pos;
|
ue->max_pos_fil = max_pos;
|
||||||
else
|
else
|
||||||
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
|
ue->max_pos_fil = ((ue->max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
|
||||||
|
|
||||||
// do not filter to have proactive timing adjustment
|
// do not filter to have proactive timing adjustment
|
||||||
//max_pos_fil = max_pos;
|
//ue->max_pos_fil = max_pos;
|
||||||
|
|
||||||
int diff = max_pos_fil - sync_pos;
|
int diff = ue->max_pos_fil - sync_pos;
|
||||||
|
|
||||||
if (frame_parms->freq_range==nr_FR2)
|
if (frame_parms->freq_range==nr_FR2)
|
||||||
sync_offset = 2;
|
sync_offset = 2;
|
||||||
@@ -131,7 +128,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
ue->rx_offset,
|
ue->rx_offset,
|
||||||
clear,
|
clear,
|
||||||
max_pos,
|
max_pos,
|
||||||
max_pos_fil,
|
ue->max_pos_fil,
|
||||||
max_val,
|
max_val,
|
||||||
sync_pos);
|
sync_pos);
|
||||||
#endif //DEBUG_PHY
|
#endif //DEBUG_PHY
|
||||||
|
|||||||
@@ -485,8 +485,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_PDCCH
|
#ifdef DEBUG_PDCCH
|
||||||
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size,
|
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, symbol %d\n",
|
||||||
ue->frame_parms.Ncp,Ns,k, symbol);
|
proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size,ue->frame_parms.Ncp,Ns,symbol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fl = filt16a_l1;
|
fl = filt16a_l1;
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
#include "PHY/phy_extern_nr_ue.h"
|
#include "PHY/phy_extern_nr_ue.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "PHY/sse_intrin.h"
|
#include "PHY/sse_intrin.h"
|
||||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
|
||||||
|
|
||||||
//#define k1 1000
|
//#define k1 1000
|
||||||
#define k1 ((long long int) 1000)
|
#define k1 ((long long int) 1000)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -33,13 +33,7 @@
|
|||||||
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||||
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include "PHY/types.h"
|
|
||||||
#else
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_DCI_SIZE_BITS 45
|
#define MAX_DCI_SIZE_BITS 45
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user