Commit c8aceea4 authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'integration_2023_wk06' into 'develop'

integration_2023_wk06

See merge request oai/openairinterface5g!1943

!1855 Cleanup of external dependencies install script
!1876 NR refactor PHY vector sizes for multi UE
!1933 bugfix: try to handle USRP devices correctly to avoid crashes
!1937 CI: clean unused files, drop old cluster images
!1629 E1 procedure
!1738 Replace Nettle with OpenSSL
!1896 Remove CSET0 rom configuration if not in configuration file
parents f984f493 d656022e
This diff is collapsed.
......@@ -376,19 +376,6 @@ pipeline {
}
}
}
stage ("Result Update"){
when {
expression { params.DataBaseHost != "none" }
}
agent {label DataBaseHost}
steps {
script {
dir ('ci-scripts/ran_dashboard') {
sh "python3 Hdashboard.py testevent ${params.eNB_MR} "
}
}
}
}
}
}
}
......
......@@ -230,6 +230,14 @@ class Cluster:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
return False
# delete old images by Sagar Arora <sagar.arora@openairinterface.org>:
# 1. retrieve all images and their timestamp
# 2. awk retrieves those whose timestamp is older than 4 weeks
# 3. issue delete command on corresponding istags (the images are dangling and will be cleaned by the registry)
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-4weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
response = self.cmd.run(delete_cmd)
logging.debug(f"deleted images:\n{response.stdout}")
self._recreate_entitlements()
status = True # flag to abandon compiling if any image fails
......
......@@ -360,6 +360,7 @@ class Containerize():
if result is not None:
imageNames.append(('oai-enb', 'eNB'))
imageNames.append(('oai-gnb', 'gNB'))
imageNames.append(('oai-nr-cuup', 'nr-cuup'))
imageNames.append(('oai-lte-ue', 'lteUE'))
imageNames.append(('oai-nr-ue', 'nrUE'))
if self.host == 'Red Hat':
......@@ -680,7 +681,7 @@ class Containerize():
orgTag = 'develop'
if self.ranAllowMerge:
orgTag = 'ci-temp'
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames:
tagToUse = self.ImageTagToUse(image)
mySSH.command(f'docker image tag {image}:{orgTag} {tagToUse}', '\$', 5)
......@@ -814,7 +815,7 @@ class Containerize():
else:
logging.debug('Removing test images locally')
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames:
cmd = f'docker rmi {self.ImageTagToUse(image)} || true'
if lIpAddr != 'none':
......@@ -856,7 +857,7 @@ class Containerize():
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
imagesList = ['oai-enb', 'oai-gnb']
imagesList = ['oai-enb', 'oai-gnb', 'oai-nr-cuup']
for image in imagesList:
imageToUse = self.ImageTagToUse(image)
mySSH.command(f'sed -i -e "s#image: {image}:latest#image: {imageToUse}#" ci-docker-compose.yml', '\$', 2)
......@@ -1066,7 +1067,7 @@ class Containerize():
cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
subprocess.run(cmd, shell=True)
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames:
tagToUse = self.ImageTagToUse(image)
cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
......@@ -1160,18 +1161,9 @@ class Containerize():
def CaptureOnDockerNetworks(self):
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
if re.search('4g.*rfsimulator', self.yamlPath[0]) is not None:
# Excluding any traffic from LTE-UE container (192.168.61.30)
# From the trf-gen, keeping only PING traffic
cmd = 'sudo nohup tshark -f "(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)"'
elif re.search('5g.*rfsimulator', self.yamlPath[0]) is not None:
# Excluding any traffic from NR-UE containers (192.168.71.150 and 192.168.71.151)
# From the ext-dn, keeping only PING traffic
cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not host 192.168.71.151 and not arp and not port 53 and not port 2152 and not port 2153)"'
elif re.search('5g_l2sim', self.yamlPath[0]) is not None:
cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)"'
else:
return
# Allow only: control plane RAN (SCTP), HTTP of control in CN (port 80), PFCP traffic (port 8805), MySQL (port 3306)
cmd = 'sudo nohup tshark -f "sctp or port 80 or port 8805 or icmp or port 3306"'
for name in networkNames.split('\n'):
if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None:
cmd += ' -i ' + name
......@@ -1190,7 +1182,7 @@ class Containerize():
cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
logging.info(cmd)
subprocess.run(cmd, shell=True)
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames:
tagToUse = self.ImageTagToUse(image)
cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
......
......@@ -23,12 +23,6 @@ gNBs =
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -21,12 +21,6 @@ gNBs =
pusch_AntennaPorts = 2;
do_CSIRS = 1;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
......
......@@ -19,13 +19,6 @@ gNBs =
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -32,13 +32,6 @@ gNBs =
remote_s_portd = 2152;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -24,13 +24,6 @@ gNBs =
min_rxtxtime = 6;
force_256qam_off = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -26,13 +26,6 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -27,13 +27,6 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 10;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
Num_Threads_PUSCH = 8;
sa = 1;
gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
nr_cellid = 12345678L;
force_256qam_off = 1;
tr_s_preference = "f1";
local_s_if_name = "lo";
local_s_address = "192.168.72.140";
remote_s_address = "192.168.72.143";
local_s_portc = 501;
local_s_portd = 2152;
remote_s_portc = 500;
remote_s_portd = 2152;
ssb_SubcarrierOffset = 0;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.71.132";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
E1_INTERFACE =
(
{
type = "cp";
ipv4_cucp = "192.168.72.140";
port_cucp = 38462;
ipv4_cuup = "192.168.72.141";
port_cuup = 38462;
}
)
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/24";
};
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="debug";
pdcp_log_level ="info";
rrc_log_level ="info";
f1ap_log_level ="debug";
ngap_log_level ="debug";
};
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
sa = 1;
gNBs =
(
{
////////// Identification parameters:
gNB_CU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
tr_s_preference = "f1";
local_s_if_name = "lo";
local_s_address = "192.168.72.141";
remote_s_address = "192.168.72.142";
local_s_portc = 501;
local_s_portd = 2152;
remote_s_portc = 500;
remote_s_portd = 2152;
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
E1_INTERFACE =
(
{
type = "up";
ipv4_cucp = "192.168.72.140";
ipv4_cuup = "192.168.72.141";
}
)
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.141/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.141/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="debug";
pdcp_log_level ="info";
rrc_log_level ="info";
f1ap_log_level ="debug";
ngap_log_level ="debug";
};
Active_gNBs = ( "du-rfsim");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
gNB_name = "du-rfsim";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
nr_cellid = 12345678L;
////////// Physical parameters:
min_rxtxtime = 6;
force_256qam_off = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_if_name = "eth0";
local_n_address = "192.168.72.142";
remote_n_address = "192.168.72.140";
local_n_portc = 500;
local_n_portd = 2152;
remote_n_portc = 501;
remote_n_portd = 2152;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator: {
serveraddr = "server";
serverport = "4043";
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs"
}
log_config :
{
global_log_level = "info";
hw_log_level = "info";
nr_phy_log_level = "info";
nr_mac_log_level = "info";
rlc_log_level = "info";
pdcp_log_level = "info";
rrc_log_level = "info";
f1ap_log_level = "debug";
ngap_log_level = "debug";
};
......@@ -29,13 +29,6 @@ gNBs =
do_SRS = 0;
do_CSIRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -27,13 +27,6 @@ gNBs =
pusch_AntennaPorts = 2;
do_SRS = 0;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -27,13 +27,6 @@ gNBs =
ul_prbblacklist = "51,52,53,54"
do_SRS = 0;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -29,13 +29,6 @@ gNBs =
min_rxtxtime = 6;
do_SRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -30,13 +30,6 @@ gNBs =
ul_prbblacklist = "79,80,81,82"
do_SRS = 0;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 11;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -46,9 +46,6 @@ gNBs =
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 0;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
......
......@@ -20,13 +20,6 @@ gNBs =
min_rxtxtime = 6;
enable_sdap = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -20,13 +20,6 @@ gNBs =
sib1_tda = 15;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 2;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
......@@ -20,13 +20,6 @@ gNBs =
do_CSIRS = 0;
do_SRS = 0;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
......
This diff is collapsed.
body {
font-family: 'lato', sans-serif;
}
.Main {
text-align:left;
font-size: 30px;
font-weight: bold;
}
.DashLink {
text-align:left;
font-size: 16px;
}
.DashLink:hover {
font-weight: bold;
}
.Date {
text-align:left;
font-size: 16px;
font-weight: bold;
}
a { text-decoration: none; }
a:visited { text-decoration: none; color:blue}
a:hover { text-decoration: none; font-weight: bold; color:blue}
.MR_Table {
border-collapse: collapse;
}
.MR_Table tr {
font-size: 12px;
text-align:center;
}
.MR_Table tr:hover {
background-color:lightgray;
}
.MR_Table td {
border: 1px solid black;
padding : 5px;
}
.MR_Table td:hover {
font-weight : bold;
}
.MR_Table th {
font-size: 14px;
text-align:center;
padding : 5px;
}
.title_cell {
text-align:left;
}
.MR {
table-layout: fixed;
width: 50px;
background-color: rgb(143, 154, 216);
}
.CREATED_AT {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.AUTHOR {
table-layout: fixed;
width: 150px;
background-color: rgb(143, 154, 216);
}
.TITLE {
table-layout: fixed;
width: 500px;
background-color: rgb(143, 154, 216);
}
.ASSIGNEE {
table-layout: fixed;
width: 150px;
background-color: rgb(143, 154, 216);
}
.REVIEWER {
table-layout: fixed;
width: 150px;
background-color: rgb(143, 154, 216);
}
.CAN_START {
background-color: orange;
table-layout: fixed;
width: 150px;
}
.IN_PROGRESS {
background-color: yellow;
table-layout: fixed;
width: 150px;
}
.COMPLETED {
background-color: rgb(144, 221, 231);
table-layout: fixed;
width: 150px;
}
.REVIEW_FORM {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.OK_MERGE {
background-color: rgb(58, 236, 58);
table-layout: fixed;
width: 150px;
}
.MERGE_CONFLICTS {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
This diff is collapsed.
LTE-2x2 : #short name used in the dashboard
job : 'RAN-LTE-2x2-Module-OAIEPC' #job name from Jenkins, used in the database
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-LTE-2x2-Module-OAIEPC'
bench : 'Obelix-N310-OAIEPC-Quectel(nrmodule2)'
test : 'TM1 + TM2, TDD, 40MHz, MCS9, 26Mb DL, 7Mb UL'
NSA-B200 :
job : 'RAN-NSA-B200-Module-LTEBOX'
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-NSA-B200-Module-LTEBOX'
bench : 'Nepes-B200-Obelix-B200-LTEBOX-Quectel(idefix)'
test : '20MHz, 60Mb DL, 3Mb UL'
NSA-2x2 :
job : 'RAN-NSA-2x2-Module-OAIEPC'
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-NSA-2x2-Module-OAIEPC'
bench : 'Asterix-N310-Obelix-N310-OAIEPC-Quectel(nrmodule2)'
test : 'TDD, 40MHz, 60Mb DL, 3Mb UL'
SA-N310 :
job : 'RAN-SA-Module-CN5G'
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-Module-CN5G'
bench : 'Asterix-N310-OAICN5G-Quectel(nrmodule2)'
test : 'TDD, 40MHz, 60Mb DL, 3Mb UL'
SA-OAIUE-N310-X300 :
job : 'RAN-SA-OAIUE-N310-X300-CN5G'
link : 'https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-OAIUE-N310-X300-CN5G/'
bench : 'Asterix-N310-OAICN5G-OAIUE-N310'
test : 'TDD, 40MHz, Ping, (to be implemented : iperf)'
The code ran_dashboard.py was initially developped to bring MR status and test resuts to a google sheet, using google sheets API.
This method is now deprecated, and replaced by Hdashboard.py that builds the results as HTML page and loads it to AWS S3.
ran_dashboard_cfg.yaml is still used by Hdashboard.py as tests config file.
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Merge Requests Dashboard for RAN on googleSheet
#
# Required Python Version
# Python 3.x
#
#---------------------------------------------------------------------
#author Remi
import pymysql
import sys
from datetime import datetime
import pickle
#This is the script/package used by the dashboard to retrieve the MR test results from the database
class SQLConnect:
def __init__(self):
self.connection = pymysql.connect(
host='172.22.0.2',
user='root',
password = 'ucZBc2XRYdvEm59F',
db='oaicicd_tests',
port=3306
)
self.data={}
#retrieve data from mysql database and organize it in a dictionary (per MR passed as argument)
def get(self,MR):
self.data[MR]={}
cur=self.connection.cursor()
#get counters per test
sql = "select TEST,STATUS, count(*) AS COUNT from test_results where MR=(%s) group by TEST, STATUS;"
cur.execute(sql,MR)
response=cur.fetchall()
if len(response)==0:#no test results yet
self.data[MR]['PASS']=''
self.data[MR]['FAIL']=''
else:
for i in range(0,len(response)):
test=response[i][0]
status=response[i][1]
count=response[i][2]
if test in self.data[MR]:
self.data[MR][test][status]=count
else:
self.data[MR][test]={}
self.data[MR][test][status]=count
#get last failing build and link
sql = "select TEST,BUILD, BUILD_LINK from test_results where MR=(%s) and STATUS='FAIL' order by DATE DESC;"
cur.execute(sql,MR)
response=cur.fetchall()
if len(response)!=0:
for i in range(0,len(response)):
test=response[i][0]
build=response[i][1]
link=response[i][2]
if 'last_fail' not in self.data[MR][test]:
self.data[MR][test]['last_fail']=[]
self.data[MR][test]['last_fail'].append(build)
self.data[MR][test]['last_fail'].append(link)
#get last passing build and link
sql = "select TEST,BUILD, BUILD_LINK from test_results where MR=(%s) and STATUS='PASS' order by DATE DESC;"
cur.execute(sql,MR)
response=cur.fetchall()
if len(response)!=0:
for i in range(0,len(response)):
test=response[i][0]
build=response[i][1]
link=response[i][2]
if 'last_pass' not in self.data[MR][test]:
self.data[MR][test]['last_pass']=[]
self.data[MR][test]['last_pass'].append(build)
self.data[MR][test]['last_pass'].append(link)
#close database connection
def close_connection(self):
self.connection.close()
body {
font-family: 'lato', sans-serif;
}
.Main {
text-align: left;
font-size: 30px;
font-weight: bold;
}
.DashLink {
text-align:left;
font-size: 16px;
}
.DashLink:hover {
font-weight: bold;
}
.Date {
text-align: left;
font-size: 16px;
font-weight: bold;
}
h3 {
font-size: 16px;
}
a { text-decoration: none; }
a:visited { text-decoration: none; color:blue}
a:hover { text-decoration: none; font-weight: bold; color:blue}
.Test_Table {
border-collapse: collapse;
}
.Test_Table tr {
font-size: 12px;
text-align:center;
}
.Test_Table tr:hover {
background-color:lightgray;
}
.Test_Table td {
border: 1px solid black;
padding : 5px;
}
.Test_Table td:hover {
font-weight : bold;
}
.Test_Table th {
font-size: 14px;
text-align:center;
padding : 5px;
}
.Test_Name {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.Test_Descr {
table-layout: fixed;
width: 400px;
background-color: rgb(143, 154, 216);
}
.Pass {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.Fail {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.Last_Pass {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
.Last_Fail {
table-layout: fixed;
width: 100px;
background-color: rgb(143, 154, 216);
}
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
<!-- main body -->
<xsl:template match="/">
<html>
<body>
<h3>TEMPLATE Results Summary</h3>
<table border="1">
<tr bgcolor="lightcyan">
<!--Header only so select first row to get headers-->
<th>Hostname</th>
<th>Nb Tests</th>
<th>Failures</th>
<th>Timestamp</th>
</tr>
<!--Get all the other rows-->
<xsl:for-each select="testsuites/testsuite">
<tr>
<td>
<xsl:value-of select="@hostname"/>
</td>
<td>
<xsl:value-of select="@tests"/>
</td>
<td>
<xsl:value-of select="@failures"/>
</td>
<td>
<xsl:value-of select="@timestamp"/>
</td>
</tr>
</xsl:for-each>
</table>
<h4>Details</h4>
<table border="1">
<tr bgcolor="lightcyan">
<!--Header only so select first row to get headers-->
<th>Test Name</th>
<th>Result</th>
<th>Time</th>
<th>Description</th>
</tr>
<!--Get all the other rows-->
<xsl:for-each select="testsuites/testsuite/testcase">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@RESULT"/>
</td>
<td>
<xsl:value-of select="@time"/>
</td>
<td>
<xsl:value-of select="@description"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-e1</htmlTabRef>
<htmlTabName>CUCP-CUUP-DU E1+F1 split</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
111111
100021
000020
000021
000022
000023
000024
020021
020022
030021
100021
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-cuup oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000020">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000021">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy>
</testCase>
<testCase id="000022">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CU-CP RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-cucp</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000023">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G CU-UP and DU RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-cuup oai-du</services>
<nb_healthy>9</nb_healthy>
</testCase>
<testCase id="000024">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>10</nb_healthy>
</testCase>
<testCase id="020021">
<class>PingFromContainer</class>
<desc>Ping ext-dn from NR-UE</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 192.168.73.135</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="020022">
<class>PingFromContainer</class>
<desc>Ping NR-UE from ext-dn</desc>
<container_name>rfsim5g-oai-ext-dn</container_name>
<options>-c 20 12.1.1.2</options>
<loss_threshold>5</loss_threshold>
</testCase>
<testCase id="030021">
<class>IperfFromContainer</class>
<desc>Iperf UDP Downlink</desc>
<server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_container_name>
<server_options>-B 12.1.1.2 -u -i 1 -s</server_options>
<client_options>-c 12.1.1.2 -u -i 1 -t 30 -b 3M</client_options>
</testCase>
<testCase id="030022">
<class>IperfFromContainer</class>
<desc>Iperf UDP Uplink</desc>
<server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.73.135 -u -i 1 -t 30 -b 1M</client_options>
</testCase>
<testCase id="100021">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<d_retx_th>1,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down-e1</htmlTabRef>
<htmlTabName>CleanUp CUCP-CUUP-DU E1+F1 split</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100022
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100022">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>
This diff is collapsed.
......@@ -86,49 +86,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototype
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb -DMALLOC_CHECK_=3 -O2")
##This is to detect nettle version changes between Ubuntu 14.04/16.04
#set ( nettle_cmd "nettle-hash" )
#set ( nettle_arg "-V" )
#execute_process(COMMAND ${nettle_cmd} ${nettle_arg} RESULT_VARIABLE rv OUTPUT_VARIABLE ov ERROR_VARIABLE ev)
#
#string(REGEX MATCH "[+-]?[0-9]+([.][0-9]+)?" nv ${ov})
#
#message("NETTLE_VERSION = ${nv}")
#
## we need to remove decimal as floating point arithematic does not work properly with C preprocessor
#STRING(REGEX REPLACE "[.]" "" nv ${nv})
#
#if ("${nv}" STREQUAL "")
# message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
#endif()
#
#set (NETTLE_VERSION "${nv}")
#add_definitions("-DNETTLE_VERSION=${NETTLE_VERSION}")
include(FindPkgConfig)
pkg_search_module(NETTLE nettle)
if(NOT ${NETTLE_FOUND})
message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
else()
include_directories(${NETTLE_INCLUDE_DIRS})
endif()
message ("NETTLE VERSION_INSTALLED = ${NETTLE_VERSION}")
string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")
if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
endif()
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})
......@@ -159,6 +118,9 @@ add_boolean_option(NAS_MME False "NAS_UE and NAS_MME are incompa
# SECU LIB
################################################################################
set(secu_cn_SRC
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
${OPENAIR3_DIR}/SECU/sha_256_hmac.c
${OPENAIR3_DIR}/SECU/kdf.c
${OPENAIR3_DIR}/SECU/rijndael.c
${OPENAIR3_DIR}/SECU/snow3g.c
......@@ -719,7 +681,6 @@ target_link_libraries (at_nas_ue
-Wl,-whole-archive
api_network api_user api_usim emm esm ies util secu_cn
-Wl,-no-whole-archive
${NETTLE_LIBRARIES}
${OPENSSL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT} m )
......
......@@ -285,6 +285,10 @@ function main() {
--UE-gen-nvram)
gen_nvram_path=$(readlink -f "$2")
shift 2;;
--UE-ip)
UE_ip=1
echo_info "Will compile UE"
shift;;
-w | --hardware)
# Use OAI_USRP as the key word USRP is used inside UHD driver
case "$2" in
......@@ -531,7 +535,7 @@ function main() {
execlist="$execlist ocp-enb"
fi
if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem"
execlist="$execlist nr-softmodem nr-cuup"
fi
if [ "$RU" = "1" ] ; then
execlist="$execlist oairu"
......@@ -588,7 +592,7 @@ function main() {
echo_info "Compiling UE specific part"
if [ $IS_CONTAINER -eq 0 ]
if [ $UE_ip -eq 1 ]
then
echo_info "Building ue_ip module"
compilations $BUILD_DIR ue_ip
......
# Find the native Nettle includes, library, and flags
#
# NETTLE_INCLUDE_DIR - where to find nettle.h, etc.
# NETTLE_LIBRARIES - List of libraries when using Nettle.
# NETTLE_FOUND - True if Nettle found.
IF (NETTLE_INCLUDE_DIR)
# Already in cache, be silent
SET(NETTLE_FIND_QUIETLY TRUE)
ENDIF (NETTLE_INCLUDE_DIR)
FIND_PATH(NETTLE_INCLUDE_DIR nettle/nettle-meta.h)
SET(NETTLE_NAMES nettle)
FIND_LIBRARY(NETTLE_LIBRARY NAMES ${NETTLE_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set NETTLE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETTLE DEFAULT_MSG NETTLE_LIBRARY NETTLE_INCLUDE_DIR)
IF(NETTLE_FOUND)
SET(NETTLE_LIBRARIES ${NETTLE_LIBRARY})
ELSE(NETTLE_FOUND)
SET(NETTLE_LIBRARIES )
ENDIF(NETTLE_FOUND)
MARK_AS_ADVANCED(NETTLE_LIBRARY NETTLE_INCLUDE_DIR)
This diff is collapsed.
add_subdirectory(utils)
......@@ -42,12 +42,16 @@ typedef enum {
ngran_gNB_CU = 5,
ngran_eNB_DU = 6,
ngran_gNB_DU = 7,
ngran_eNB_MBMS_STA = 8
ngran_eNB_MBMS_STA = 8,
ngran_gNB_CUCP = 9,
ngran_gNB_CUUP = 10
} ngran_node_t;
typedef enum { CPtype = 0, UPtype } E1_t;
#define NODE_IS_MONOLITHIC(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB || (nOdE_TyPe) == ngran_ng_eNB || (nOdE_TyPe) == ngran_gNB)
#define NODE_IS_CU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_CU || (nOdE_TyPe) == ngran_ng_eNB_CU || (nOdE_TyPe) == ngran_gNB_CU)
#define NODE_IS_CU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_CU || (nOdE_TyPe) == ngran_ng_eNB_CU || (nOdE_TyPe) == ngran_gNB_CU || (nOdE_TyPe) == ngran_gNB_CUCP || (nOdE_TyPe) == ngran_gNB_CUUP)
#define NODE_IS_DU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_DU || (nOdE_TyPe) == ngran_gNB_DU)
#define NODE_IS_MBMS(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_MBMS_STA)
#define GTPV1_U_PORT_NUMBER (2152)
#endif
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
# define MAX_MOBILES_PER_GNB 16
# define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_gNB_MAX 1
# define NUMBER_OF_RU_MAX 2
......@@ -9,17 +10,10 @@
# define NUMBER_OF_ULSCH_MAX 8
# define NUMBER_OF_DLSCH_MAX 8
# define NUMBER_OF_SRS_MAX 16
# define NUMBER_OF_NR_ULSCH_MAX 8
# define NUMBER_OF_NR_DLSCH_MAX 8
# define NUMBER_OF_NR_UCI_MAX 16
# define NUMBER_OF_NR_SRS_MAX 16
# define NUMBER_OF_NR_CSIRS_MAX 16
# define NUMBER_OF_NR_ULSCH_MAX MAX_MOBILES_PER_GNB
# define NUMBER_OF_NR_DLSCH_MAX MAX_MOBILES_PER_GNB
# define NUMBER_OF_SCH_STATS_MAX 16
# define NUMBER_OF_NR_SCH_STATS_MAX 16
# define NUMBER_OF_NR_PUCCH_MAX 16
# define NUMBER_OF_NR_PDCCH_MAX 16
# define NUMBER_OF_NR_SCH_STATS_MAX MAX_MOBILES_PER_GNB
#define MAX_MANAGED_ENB_PER_MOBILE 2
#define MAX_MANAGED_GNB_PER_MOBILE 2
......
......@@ -69,20 +69,17 @@
#ifdef LARGE_SCALE
#define MAX_MOBILES_PER_ENB 128
#define MAX_MOBILES_PER_ENB_NB_IoT 128
#define MAX_MOBILES_PER_GNB 128
#define MAX_eNB 2
#define MAX_gNB 2
#else
#define MAX_MOBILES_PER_ENB 40
#define MAX_MOBILES_PER_ENB_NB_IoT 40
#define MAX_MOBILES_PER_GNB 16
#define MAX_eNB 2
#define MAX_gNB 2
#endif
#else
#define MAX_MOBILES_PER_ENB 256
#define MAX_MOBILES_PER_ENB_NB_IoT 256
#define MAX_MOBILES_PER_GNB 256
#define MAX_eNB 2
#define MAX_gNB 2
#endif
......
add_subdirectory(ds)
......@@ -483,6 +483,7 @@ int logInit (void)
register_log_component("SDAP","",SDAP);
register_log_component("S1AP","",S1AP);
register_log_component("F1AP","",F1AP);
register_log_component("E1AP","",E1AP);
register_log_component("M2AP","",M2AP);
register_log_component("M3AP","",M3AP);
register_log_component("SCTP","",SCTP);
......
add_library(ds OBJECT
byte_array.c
)
target_include_directories(ds PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
......@@ -20,29 +19,40 @@
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
pipeline {
agent {
label pythonExecutor
}
stages {
stage ("gDashboard") {
steps {
script {
dir ("ci-scripts/ran_dashboard") {
//retrieve MR data from gitlab / mySQL db, build HTML pages and load them to AWS S3 bucket (configured as static web page hosting)
//deprecated method : sh returnStdout: true, script: 'python3 ran_dashboard.py'
sh returnStdout: true, script: 'python3 Hdashboard.py'
}
}
}
}
}
#include "byte_array.h"
#include "common/utils/assertions.h"
#include <string.h>
byte_array_t copy_byte_array(byte_array_t src)
{
byte_array_t dst = {0};
dst.buf = malloc(src.len);
DevAssert(dst.buf != NULL && "Memory exhausted");
memcpy(dst.buf, src.buf, src.len);
dst.len = src.len;
return dst;
}
void free_byte_array(byte_array_t ba)
{
free(ba.buf);
}
bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1)
{
if (m0 == m1)
return true;
if (m0 == NULL || m1 == NULL)
return false;
if (m0->len != m1->len)
return false;
const int rc = memcmp(m0->buf, m1->buf, m0->len);
if (rc != 0)
return false;
return true;
}
/*
* 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
*/
#ifndef BYTE_ARRAY_H_OAI
#define BYTE_ARRAY_H_OAI
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct {
size_t len;
uint8_t* buf;
} byte_array_t;
typedef struct {
uint8_t buf[32];
} byte_array_32_t;
byte_array_t copy_byte_array(byte_array_t src);
void free_byte_array(byte_array_t ba);
bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1);
#endif
......@@ -15,5 +15,6 @@
#include "openair2/COMMON/udp_messages_def.h"
#include "openair2/COMMON/gtpv1_u_messages_def.h"
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/e1ap_messages_def.h"
#include "openair2/COMMON/ngap_messages_def.h"
......@@ -79,6 +79,7 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/as_message.h>
#include <openair2/RRC/LTE/rrc_types.h>
#include <openair2/COMMON/rrc_messages_types.h>
#include <openair2/COMMON/e1ap_messages_types.h>
#include <openair3/NAS/COMMON/UTIL/OctetString.h>
#include <openair3/NAS/COMMON/IES/AccessPointName.h>
......@@ -409,7 +410,7 @@ typedef struct MessageHeader_s {
} MessageHeader;
typedef struct message_info_s {
int id;
MessagesIds id;
message_priorities_t priority;
/* Message payload size */
MessageHeaderSize size;
......
......@@ -15,9 +15,6 @@ OPENAIR_DIR = /usr/local/oai/oai-develop/openairinterface5g
FreeDiameter prefix not found, install freeDiameter if EPC, HSS
3. building the compilation directives ...
running cmake ../../..
NETTLE VERSION_INSTALLED = 3.5.1
NETTLE_VERSION_MAJOR = 3
NETTLE_VERSION_MINOR = 5
cuda include /usr/include
cuda library
-- CMAKE_BUILD_TYPE is RelWithDebInfo
......@@ -61,9 +58,6 @@ Call Stack (most recent call first):
FreeDiameter prefix not found, install freeDiameter if EPC, HSS
3. building the compilation directives ...
running cmake ../../..
NETTLE VERSION_INSTALLED = 3.5.1
NETTLE_VERSION_MAJOR = 3
NETTLE_VERSION_MINOR = 5
cuda include /usr/include
cuda library
-- CMAKE_BUILD_TYPE is RelWithDebInfo
......
[[_TOC_]]
# 1. Introduction
E1 is named for the interface that lies between the nodes CU Control Plane (CUCP) and CU User Plane (CUUP). Once the nodes are configured, all user plane traffic flows through CUUP.
The E1 design in OAI follows the 3GPP specification in TS 38.460. The code design on E1 in OAI is very similar to
F1. The ITTI message passing mechanism is used to exchange messages between E1AP thread, SCTP thread and RRC thread.
The following sequence chart shows the current E1AP message flow.
```mermaid
sequenceDiagram
participant c as CUCP
participant u as CUUP
u->>c: SCTP new association
c->>u: SCTP new association response
Note over u: Create UDP sockets for F1-U and N3
u->>c: E1AP Setup Request
c->>u: E1AP Setup Response
Note over c: Receives PDU session setup request from AMF
c->>u: Bearer Context Setup Request
Note over u: Configure DRBs and create GTP Tunnels for F1-U and N3
u->>c: Bearer Context Setup Response
Note over c: Sends F1-U UL TNL info to DU and receives DL TNL info
c->>u: Bearer Context Modification Request
Note over u: Updates GTP Tunnels with received info
```
_Note that the E1 bearer release procedures are currently not implemented._
# 2. Running the E1 Split
## 2.1 Configuration File
The gNB is started based on the node type that is specified in the configuration file. To start a gNB instance in CUCP or CUUP, the `tr_s_preference` should be set to "f1" and the config member `E1_INTERFACE` should be present in the config file. The `type` parameter within the `E1_INTERFACE` should be set to `cp`, and `nr-softmodem` should be used to run a CU-CP. The type should be `up` and `nr-cuup` should be used to run the CU-UP. Further, there are the parameters `ipv4_cucp` and `ipv4_cuup` to specify the IP addresses of the respective network functions.
For CUCP, a typical `E1_INTERFACE` config looks like
```
E1_INTERFACE =
(
{
type = "cp";
ipv4_cucp = "127.0.0.4";
ipv4_cuup = "127.0.0.5";
}
)
```
For CUUP, it is
```
E1_INTERFACE =
(
{
type = "up";
ipv4_cucp = "127.0.0.4";
ipv4_cuup = "127.0.0.5";
}
)
```
One could take an existing CU configuration file and add the above parameters to run the gNB as CUCP or CUUP.
The CUUP uses the IP address specified in `local_s_address` for F1-U and `GNB_IPV4_ADDRESS_FOR_NGU` for N3 links. Note that `local_s_address` is under `gNBs` and `GNB_IPV4_ADDRESS_FOR_NGU` is part of the `NETWORK_INTERFACES` config member.
Alternatively, you can use the config files `ci-scripts/conf_files/gnb-cucp.sa.conf` and `ci-scripts/conf_files/gnb-cuup.sa.conf` which are already in the repository.
## 2.2 Steps to Run the Split in rfsimulator with OAI UE
Note: A 5G core must be running at this point. Steps to start the OAI 5G core can be found [in the oai-cn5g-fed repository](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) or [here](NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md).
0. Open wireshark to capture the E1AP messages. You might set the capture filter
to `sctp` to limit the number of captured packages.
1. Start the CUCP first by running the following command
```
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb-cucp.sa.conf --gNBs.[0].min_rxtxtime 6 --sa
```
Note that `min_rxtxtime` should be set to `6` only when you are connecting an OAI UE to the gNB.
2. Start the CUUP and DU (in any order)
CUUP (has its own executable):
```
sudo ./nr-cuup -O ../../../ci-scripts/conf_files/gnb-cuup.sa.conf --sa
```
DU:
```
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gNB_SA_DU.conf --rfsim --sa
```
You need to use `--rfsim` if you are running the test with rfsimulator.
3. Start OAI UE or COTS UE.
OAI UE:
```
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa
```
# 3. Configuration file IP addresses of network functions
You can also run the nodes on different machines. If you do so please change the interface parameters accordingly and make sure the interfaces are reachable. Please refer to the following figure for an overview of all parameters.
![E1/F1/NG parameters](images/e1-archi.png){width=1200}
[PDF version](images/e1-archi.pdf) | [LaTeX/TikZ version](img/e1-archi.tex) if you want to modify to reflect your setup
......@@ -91,7 +91,8 @@ In the first part (*amf_ip_address*) we specify the IP of the AMF and in the sec
Please read [CN5G tutorial for more details](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
### **gNB configuration in CU/DU split mode**
### gNB configuration in F1 (CU/DU split mode)
For the configuration of the gNB in CU and DU blocks, the following sample configuration files are provided for the [CU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf) and the [DU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf) entities respectively. These configuration files have to be updated with the IP addresses of the CU and the DU over the F1 interface. For example, in the following section from the DU configuration file, *local_n_address* corresponds to the DU address and *remote_n_address* corresponds to the CU address:
```bash
......@@ -112,9 +113,11 @@ MACRLCs = (
);
```
At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface, as well as some IP traffic tests over *F1-U* have been validated using the OAI gNB/nrUE in RFSIMULATOR mode.
### gNB configuration with F1 and E1
Please refer to [E1-design](E1-design) for more information.
## 1.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
......
\documentclass{standalone}
%\usepackage[tt=false]{libertine}
\renewcommand{\familydefault}{\sfdefault}
% improve for some encodings
\usepackage{textcomp}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{fit}
\tikzset{splitpos/.store in=\splitpos,splitpos=0.5}
\newcommand{\ip}[1]{\texttt{#1}}
\begin{document}
\begin{tikzpicture}
[
font=\scriptsize,
node distance=1.5cm and 3.2cm,
entity/.style={
rectangle,
draw,
inner sep=0pt,
minimum height=6mm,minimum width=11mm,
align=center
},
split/.style={postaction={%
decorate,
decoration={
markings,mark={
at position \splitpos
with {
\draw (0pt,2.5pt) -- (0pt,-2.5pt);
}
}
}
}
},
ip/.style={font=\tiny,outer sep=1pt,inner sep=1pt},
]
\node[entity] (cu-cp) {CU-CP};
\node[entity,below=of cu-cp] (cu-up) {CU-UP};
\node[entity,below left=0.45cm and 3.2cm of cu-cp] (du) {DU};
\node[entity,right=of cu-cp] (amf) {AMF};
\node[entity,right=of cu-up] (upf) {UPF};
\draw[split,splitpos=0.5] (cu-cp) --
node[ip,at start, below right, align=left] {\ip{GNB\_IPV4\_ADDRESS\_FOR\_NG\_AMF:38412}}
node[above] {NG-C/N2}
%node[ip,at end, below left] {127.0.1.10/24}
(amf);
\draw[split,splitpos=0.5] (cu-up) --
node[ip, at start, below right,align=left] {\ip{GNB\_IPV4\_ADDRESS\_FOR\_NGU:2152}}
node[above] {NG-U/N3}
%node[ip, at end, below left] {127.0.1.10/24}
(upf);
\draw[split,splitpos=0.5] (cu-cp) --
node[ip, at start, below right] {\ip{ipv4\_cucp:38462}}
node[right] {E1AP}
node[ip, at end, above right] {\ip{ipv4\_cuup:38462}}
(cu-up);
\draw[split] (du.north east) --
node[ip, at start, below right] {to \ip{remote\_n\_address:38472}}
node[above] {F1-C}
node[ip, at end, above left, align=right] {\ip{local\_s\_address:38472}}
(cu-cp);
\draw[split] (du.south east) --
node[ip, at start, above right] {to \ip{remote\_n\_address:remote\_n\_portd}}
node[above] {F1-U}
node[ip, at end, below left, align=right] {\ip{local\_s\_address:local\_s\_portd}}
(cu-up);
\end{tikzpicture}
\end{document}
......@@ -68,5 +68,5 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP && \
./build_oai -I --install-optional-packages -w USRP && \
rm /etc/pki/entitlement/*pem
......@@ -57,4 +57,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP
./build_oai -I -w USRP --install-optional-packages
......@@ -39,7 +39,6 @@ ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
nettle \
tzdata \
procps-ng \
atlas \
......
......@@ -44,7 +44,6 @@ RUN apt-get update && \
tzdata \
procps \
libsctp1 \
libnettle6 \
libblas3 \
libatlas3-base \
libconfig9 \
......
......@@ -52,7 +52,6 @@ RUN yum repolist --disablerepo=* && \
libX11 \
atlas \
lksctp-tools \
nettle \
tzdata \
net-tools \
iputils \
......
......@@ -44,7 +44,6 @@ RUN yum repolist --disablerepo=* && \
libX11 \
atlas \
lksctp-tools \
nettle \
tzdata \
gdb \
python3 \
......
......@@ -44,7 +44,6 @@ RUN apt-get update && \
procps \
libsctp1 \
tzdata \
libnettle6 \
libblas3 \
libatlas3-base \
libconfig9 \
......
......@@ -41,7 +41,6 @@ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
procps-ng \
nettle \
tzdata \
atlas \
gdb \
......
......@@ -45,7 +45,6 @@ RUN apt-get update && \
tzdata \
procps \
libsctp1 \
libnettle6 \
liblapacke \
libatlas3-base \
libconfig9 \
......
#/*
# * 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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu18.04
#
#---------------------------------------------------------------------
FROM ran-base:latest as gnb-base
FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
FROM ubuntu:bionic as oai-nr-cuup
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libsctp1 \
libconfig9 \
openssl && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
# Create directory for configuration files
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -41,7 +41,6 @@ RUN yum update -y && \
lksctp-tools \
procps-ng \
tzdata \
nettle \
net-tools \
iputils \
iproute \
......
......@@ -44,7 +44,6 @@ RUN apt-get update && \
libsctp1 \
procps \
tzdata \
libnettle6 \
liblapacke \
libatlas3-base \
libconfig9 \
......
......@@ -46,7 +46,6 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
nettle \
tzdata \
atlas \
hostname \
......@@ -101,7 +100,6 @@ WORKDIR /usr/bin/
COPY --from=phy-sim-build \
/usr/bin/killall \
/usr/bin/xmlstarlet \
/usr/bin/svn \
./
# Copy the relevant configuration files for phySim
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "common/utils/simple_executable.h"
#include "executables/softmodem-common.h"
#include "common/utils/ocp_itti/intertask_interface.h"
#include "openair3/ocp-gtpu/gtp_itf.h"
#include "openair2/E1AP/e1ap.h"
#include "common/ran_context.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "openair2/F1AP/f1ap_common.h"
#include "openair2/GNB_APP/gnb_config.h"
RAN_CONTEXT_t RC;
THREAD_STRUCT thread_struct;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int asn1_xer_print;
int oai_exit = 0;
instance_t CUuniqInstance = 0;
RRC_release_list_t rrc_release_info;
void exit_function(const char *file, const char *function, const int line, const char *s)
{
}
nfapi_mode_t nfapi_mod = -1;
void nfapi_setmode(nfapi_mode_t nfapi_mode)
{
nfapi_mod = nfapi_mode;
}
nfapi_mode_t nfapi_getmode(void)
{
return nfapi_mod;
}
ngran_node_t get_node_type()
{
return ngran_gNB_CUUP;
}
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const pc,
const srb_flag_t sf,
const MBMS_flag_t mf,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t c,
const sdu_size_t size,
mem_block_t *const buf,
const uint32_t *const a,
const uint32_t *const b)
{
abort();
return 0;
}
int nr_rlc_get_available_tx_space(const rnti_t rntiP, const logical_chan_id_t channel_idP)
{
abort();
return 0;
}
void nr_rlc_bearer_init(NR_RLC_BearerConfig_t *RLC_BearerConfig, NR_RLC_BearerConfig__servedRadioBearer_PR rb_type)
{
abort();
}
void rrc_gNB_generate_dedicatedRRCReconfiguration(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, NR_CellGroupConfig_t *cell_groupConfig_from_DU)
{
abort();
}
void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig)
{
abort();
}
rlc_op_status_t nr_rrc_rlc_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
const NR_SRB_ToAddModList_t *const srb2add_listP,
const NR_DRB_ToAddModList_t *const drb2add_listP,
const NR_DRB_ToReleaseList_t *const drb2release_listP,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
{
abort();
return 0;
}
int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_pP)
{
abort();
return 0;
}
void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config_pr)
{
abort();
}
void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_context_p, e1ap_bearer_setup_resp_t *e1ap_resp)
{
abort();
}
f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP)
{
abort();
return NULL;
}
void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP)
{
abort();
}
int main(int argc, char **argv)
{
/// static configuration for NR at the moment
if (load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY) == NULL) {
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
}
logInit();
set_softmodem_sighandler();
itti_init(TASK_MAX, tasks_info);
int rc;
rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for SCTP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
rc = itti_create_task(TASK_CUUP_E1, E1AP_CUUP_task, NULL);
AssertFatal(rc >= 0, "Create task for CUUP E1 failed\n");
pdcp_layer_init();
MessageDef *msg = RCconfig_NR_CU_E1(true);
AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n");
itti_send_msg_to_task(TASK_CUUP_E1, 0, msg);
printf("TYPE <CTRL-C> TO TERMINATE\n");
itti_wait_tasks_end();
logClean();
printf("Bye.\n");
return 0;
}
......@@ -198,21 +198,14 @@ void rx_func(void *param) {
}
up_removed++;
}
for (j = 0; j < NUMBER_OF_NR_PUCCH_MAX; j++)
for (j = 0; j < gNB->max_nb_pucch; j++)
if (gNB->pucch[j]->active > 0 &&
gNB->pucch[j]->pucch_pdu.rnti == rnti_to_remove[i]) {
gNB->pucch[j]->active = 0;
gNB->pucch[j]->pucch_pdu.rnti = 0;
pucch_removed++;
}
#if 0
for (j = 0; j < NUMBER_OF_NR_PDCCH_MAX; j++)
gNB->pdcch_pdu[j].frame = -1;
for (j = 0; j < NUMBER_OF_NR_PDCCH_MAX; j++)
gNB->ul_pdcch_pdu[j].frame = -1;
for (j = 0; j < NUMBER_OF_NR_PRACH_MAX; j++)
gNB->prach_vars.list[j].frame = -1;
#endif
}
if (rnti_to_remove_count) LOG_W(NR_PHY, "to remove rnti_to_remove_count=%d, up_removed=%d down_removed=%d pucch_removed=%d\n", rnti_to_remove_count, up_removed, down_removed, pucch_removed);
rnti_to_remove_count = 0;
......
......@@ -68,7 +68,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <openair2/GNB_APP/gnb_app.h>
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h"
#include "stats.h"
#include "nr-softmodem.h"
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
......@@ -78,6 +77,9 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include "gnb_config.h"
#include "openair2/E1AP/e1ap_common.h"
#include "openair2/E1AP/e1ap_api.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
......@@ -289,16 +291,60 @@ void exit_function(const char *file, const char *function, const int line, const
int create_gNB_tasks(uint32_t gnb_nb) {
static int create_gNB_tasks(void) {
uint32_t gnb_nb = RC.nb_nr_inst;
uint32_t gnb_id_start = 0;
uint32_t gnb_id_end = gnb_id_start + gnb_nb;
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
itti_wait_ready(1);
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
RCconfig_NR_L1();
RCconfig_nr_prs();
if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc();
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n");
AssertFatal (gnb_nb <= RC.nb_nr_inst,
"Number of gNB is greater than gNB defined in configuration file (%d/%d)!",
gnb_nb, RC.nb_nr_inst);
LOG_I(GNB_APP,"Allocating gNB_RRC_INST for %d instances\n",RC.nb_nr_inst);
RC.nrrrc = (gNB_RRC_INST **)malloc(RC.nb_nr_inst*sizeof(gNB_RRC_INST *));
LOG_I(PHY, "%s() RC.nb_nr_inst:%d RC.nrrrc:%p\n", __FUNCTION__, RC.nb_nr_inst, RC.nrrrc);
ngran_node_t node_type = get_node_type();
for (int gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
RC.nrrrc[gnb_id] = (gNB_RRC_INST*)calloc(1,sizeof(gNB_RRC_INST));
LOG_I(PHY, "%s() Creating RRC instance RC.nrrrc[%d]:%p (%d of %d)\n", __FUNCTION__, gnb_id, RC.nrrrc[gnb_id], gnb_id+1, gnb_id_end);
configure_nr_rrc(gnb_id);
}
if (RC.nb_nr_inst > 0 &&
!get_softmodem_params()->nsa &&
!(node_type == ngran_gNB_DU)) {
// we start pdcp in both cuup (for drb) and cucp (for srb)
init_pdcp();
}
if (is_x2ap_enabled() ) { //&& !NODE_IS_DU(node_type)
LOG_I(X2AP, "X2AP enabled \n");
__attribute__((unused)) uint32_t x2_register_gnb_pending = gNB_app_register_x2 (gnb_id_start, gnb_id_end);
}
/* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info
* can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/
if ((get_softmodem_params()->sa || is_x2ap_enabled()) &&
!NODE_IS_DU(node_type)) {
/* Try to register each gNB */
//registered_gnb = 0;
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);
}
if (gnb_nb > 0) {
/* Last task to create, others task must be ready before its start */
/*if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1;
}*/
if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SCTP failed\n");
return -1;
......@@ -313,7 +359,8 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
}
if (get_softmodem_params()->sa) {
if (get_softmodem_params()->sa &&
!NODE_IS_DU(node_type)) {
char* gnb_ipv4_address_for_NGU = NULL;
uint32_t gnb_port_for_NGU = 0;
......@@ -327,6 +374,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
for(int i = GNB_INTERFACE_NAME_FOR_NG_AMF_IDX; i <= GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX; i++) {
if( NETParams[i].strptr == NULL) {
LOG_E(NGAP, "No AMF configuration in the file.\n");
exit(1);
} else {
LOG_D(NGAP, "Configuration in the file: %s.\n",*NETParams[i].strptr);
}
......@@ -346,15 +394,26 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return -1;
}
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
LOG_I(NR_RRC, "Creating NR RRC gNB Task, that will also create TASKS\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
return -1;
}
//Use check on x2ap to consider the NSA scenario and check for SA scenario
if(is_x2ap_enabled() || get_softmodem_params()->sa) {
// If CU
if (node_type == ngran_gNB_CU || node_type == ngran_gNB) {
MessageDef *msg = RCconfig_NR_CU_E1(false);
instance_t inst = 0;
createE1inst(UPtype, inst, &E1AP_SETUP_REQ(msg));
cuup_init_n3(inst);
itti_free(TASK_UNKNOWN, msg);
getCxtE1(inst)->same_process = true;
;
RC.nrrrc[gnb_id_start]->e1_inst = inst; // stupid instance !!!*/
}
//Use check on x2ap to consider the NSA scenario
if((is_x2ap_enabled() || get_softmodem_params()->sa) && (node_type != ngran_gNB_CUCP)) {
if (itti_create_task (TASK_GTPV1_U, &gtpv1uTask, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1;
......@@ -504,7 +563,7 @@ void init_pdcp(void) {
LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (!get_softmodem_params()->nsa) {
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
if (!NODE_IS_DU(get_node_type())) {
pdcp_layer_init();
nr_pdcp_module_init(pdcp_initmask, 0);
}
......@@ -582,7 +641,7 @@ int main( int argc, char **argv ) {
// don't create if node doesn't connect to RRC/S1/GTP
if (NFAPI_MODE != NFAPI_MODE_PNF) {
int ret = create_gNB_tasks(1);
int ret = create_gNB_tasks();
AssertFatal(ret == 0, "cannot create ITTI tasks\n");
}
......
......@@ -102,6 +102,8 @@ int config_sync_var=-1;
instance_t CUuniqInstance=0;
instance_t DUuniqInstance=0;
int get_node_type() {return -1;}
RAN_CONTEXT_t RC;
int oai_exit = 0;
......
......@@ -1219,8 +1219,8 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
if (tx_data != NULL) {
uint8_t *dlsch_sdu = (uint8_t *)tx_data->TLVs[0].value.direct;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
AssertFatal(msgTx->num_pdsch_slot < gNB->number_of_nr_dlsch_max,"Number of PDSCH PDUs %d exceeded the limit %d\n",
msgTx->num_pdsch_slot,gNB->number_of_nr_dlsch_max);
AssertFatal(msgTx->num_pdsch_slot < NUMBER_OF_NR_DLSCH_MAX,"Number of PDSCH PDUs %d exceeded the limit %d\n",
msgTx->num_pdsch_slot, NUMBER_OF_NR_DLSCH_MAX);
handle_nr_nfapi_pdsch_pdu(msgTx, pdsch_pdu, dlsch_sdu);
}
else {
......
......@@ -134,7 +134,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
int max_mimo_layers = (CSI_RS_antenna_ports<NR_MAX_NB_LAYERS) ? CSI_RS_antenna_ports : NR_MAX_NB_LAYERS;
gNB->nr_mimo_precoding_matrix = (int32_t ***)malloc16(max_mimo_layers* sizeof(int32_t **));
gNB->nr_mimo_precoding_matrix = (int32_t ***)malloc16(max_mimo_layers * sizeof(int32_t **));
int32_t ***mat = gNB->nr_mimo_precoding_matrix;
double complex res_code;
......@@ -489,9 +489,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
while(gNB->configured == 0) usleep(10000);
gNB->number_of_nr_dlsch_max = NUMBER_OF_NR_DLSCH_MAX;
gNB->number_of_nr_ulsch_max = NUMBER_OF_NR_ULSCH_MAX;
load_dftslib();
crcTableInit();
......@@ -607,14 +604,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
//PRS init
nr_init_prs(gNB);
for (int id=0; id<NUMBER_OF_NR_SRS_MAX; id++) {
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t**)malloc16_clear(MAX_NUM_NR_SRS_AP*sizeof(int32_t*));
for(int ap=0; ap<MAX_NUM_NR_SRS_AP; ap++) {
gNB->nr_srs_info[id]->srs_generated_signal[ap] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
}
}
generate_ul_reference_signal_sequences(SHRT_MAX);
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
......@@ -623,6 +612,15 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
/// Transport init necessary for NR synchro
init_nr_transport(gNB);
gNB->nr_srs_info = (nr_srs_info_t **)malloc16_clear(gNB->max_nb_srs * sizeof(nr_srs_info_t*));
for (int id = 0; id < gNB->max_nb_srs; id++) {
gNB->nr_srs_info[id] = (nr_srs_info_t *)malloc16_clear(sizeof(nr_srs_info_t));
gNB->nr_srs_info[id]->srs_generated_signal = (int32_t**)malloc16_clear(MAX_NUM_NR_SRS_AP*sizeof(int32_t*));
for(int ap=0; ap<MAX_NUM_NR_SRS_AP; ap++) {
gNB->nr_srs_info[id]->srs_generated_signal[ap] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*MAX_NUM_NR_SRS_SYMBOLS*sizeof(int32_t));
}
}
common_vars->txdataF = (int32_t **)malloc16(Ptx*sizeof(int32_t*));
common_vars->rxdataF = (int32_t **)malloc16(Prx*sizeof(int32_t*));
/* Do NOT allocate per-antenna txdataF/rxdataF: the gNB gets a pointer to the
......@@ -653,7 +651,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
int nb_re_pusch = N_RB_UL * NR_NB_SC_PER_RB;
int nb_re_pusch2 = nb_re_pusch + (nb_re_pusch&7);
for (int ULSCH_id=0; ULSCH_id<gNB->number_of_nr_ulsch_max; ULSCH_id++) {
for (int ULSCH_id = 0; ULSCH_id < NUMBER_OF_NR_ULSCH_MAX; ULSCH_id++) {
pusch_vars[ULSCH_id] = (NR_gNB_PUSCH *)malloc16_clear( sizeof(NR_gNB_PUSCH) );
pusch_vars[ULSCH_id]->rxdataF_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_estimates = (int32_t **)malloc16(n_buf*sizeof(int32_t *) );
......@@ -760,13 +758,14 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(nr_gold_csi_rs);
free_and_zero(gNB->nr_csi_info);
for (int id = 0; id < NUMBER_OF_NR_SRS_MAX; id++) {
for (int id = 0; id < gNB->max_nb_srs; id++) {
for(int i=0; i<MAX_NUM_NR_SRS_AP; i++) {
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal[i]);
}
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal);
free_and_zero(gNB->nr_srs_info[id]);
}
free_and_zero(gNB->nr_srs_info);
free_ul_reference_signal_sequences();
free_gnb_lowpapr_sequences();
......@@ -804,7 +803,7 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(prach_vars->prach_ifft);
NR_gNB_PUSCH** pusch_vars = gNB->pusch_vars;
for (int ULSCH_id=0; ULSCH_id<gNB->number_of_nr_ulsch_max; ULSCH_id++) {
for (int ULSCH_id = 0; ULSCH_id < NUMBER_OF_NR_ULSCH_MAX; ULSCH_id++) {
for (int i=0; i< max_ul_mimo_layers; i++)
free_and_zero(pusch_vars[ULSCH_id]->llr_layers[i]);
for (int i = 0; i < Prx; i++) {
......@@ -982,8 +981,8 @@ void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg) {
msg->num_pdsch_slot = 0;
int num_cw = NR_MAX_NB_LAYERS > 4? 2:1;
for (int i=0; i<gNB->number_of_nr_dlsch_max; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n",i,gNB->number_of_nr_dlsch_max);
for (int i = 0; i < NUMBER_OF_NR_DLSCH_MAX; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n", i, NUMBER_OF_NR_DLSCH_MAX);
for (int j=0; j<num_cw; j++) {
msg->dlsch[i][j] = new_gNB_dlsch(fp, grid_size);
AssertFatal(msg->dlsch[i][j]!=NULL,"Can't initialize dlsch %d \n", i);
......@@ -997,30 +996,62 @@ void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg)
const nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
const uint16_t grid_size = cfg->carrier_config.dl_grid_size[fp->numerology_index].value;
int num_cw = NR_MAX_NB_LAYERS > 4? 2:1;
for (int i=0; i<gNB->number_of_nr_dlsch_max; i++)
for (int i = 0; i < NUMBER_OF_NR_DLSCH_MAX; i++)
for (int j=0; j<num_cw; j++)
free_gNB_dlsch(&msg->dlsch[i][j], grid_size, fp);
}
void init_nr_transport(PHY_VARS_gNB *gNB) {
void init_nr_transport(PHY_VARS_gNB *gNB)
{
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
const nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
LOG_I(PHY, "Initialise nr transport\n");
for (int i=0; i<NUMBER_OF_NR_PUCCH_MAX; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for PUCCH %d/%d\n",i,NUMBER_OF_NR_PUCCH_MAX);
int nb_slots_per_period = cfg->cell_config.frame_duplex_type.value ?
fp->slots_per_frame / get_nb_periods_per_frame(cfg->tdd_table.tdd_period.value) :
fp->slots_per_frame;
int nb_ul_slots_period = 0;
if (cfg->cell_config.frame_duplex_type.value) {
for(int i=0; i<nb_slots_per_period; i++) {
for(int j=0; j<NR_NUMBER_OF_SYMBOLS_PER_SLOT; j++) {
if(cfg->tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[j].slot_config.value == 1) { // UL symbol
nb_ul_slots_period++;
break;
}
}
}
}
else
nb_ul_slots_period = fp->slots_per_frame;
int buffer_ul_slots; // the UL channels are scheduled sl_ahead before they are transmitted
int slot_ahead = gNB->if_inst ? gNB->if_inst->sl_ahead : 6;
if (slot_ahead > nb_slots_per_period)
buffer_ul_slots = nb_ul_slots_period + (slot_ahead - nb_slots_per_period);
else
buffer_ul_slots = (nb_ul_slots_period < slot_ahead) ? nb_ul_slots_period : slot_ahead;
gNB->max_nb_pucch = MAX_MOBILES_PER_GNB * buffer_ul_slots;
gNB->max_nb_srs = buffer_ul_slots << 1; // assuming at most 2 SRS per slot
gNB->pucch = (NR_gNB_PUCCH_t **) malloc16(gNB->max_nb_pucch * sizeof(NR_gNB_PUCCH_t*));
for (int i = 0; i < gNB->max_nb_pucch; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for PUCCH %d/%d\n", i, gNB->max_nb_pucch);
gNB->pucch[i] = new_gNB_pucch();
AssertFatal(gNB->pucch[i]!=NULL,"Can't initialize pucch %d \n", i);
AssertFatal(gNB->pucch[i] != NULL,"Can't initialize pucch %d \n", i);
}
for (int i=0; i<NUMBER_OF_NR_SRS_MAX; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n",i,NUMBER_OF_NR_SRS_MAX);
gNB->srs = (NR_gNB_SRS_t **) malloc16(gNB->max_nb_srs * sizeof(NR_gNB_SRS_t*));
for (int i = 0; i < gNB->max_nb_srs; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n", i, gNB->max_nb_srs);
gNB->srs[i] = new_gNB_srs();
AssertFatal(gNB->srs[i]!=NULL,"Can't initialize srs %d \n", i);
}
for (int i=0; i<gNB->number_of_nr_ulsch_max; i++) {
for (int i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++) {
LOG_I(PHY,"Allocating Transport Channel Buffers for ULSCH %d/%d\n",i,gNB->number_of_nr_ulsch_max);
LOG_I(PHY,"Allocating Transport Channel Buffers for ULSCH %d/%d\n", i, NUMBER_OF_NR_ULSCH_MAX);
gNB->ulsch[i] = new_gNB_ulsch(gNB->max_ldpc_iterations, fp->N_RB_UL);
......@@ -1039,12 +1070,14 @@ void reset_nr_transport(PHY_VARS_gNB *gNB)
{
const NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
for (int i = 0; i < NUMBER_OF_NR_PUCCH_MAX; i++)
for (int i = 0; i < gNB->max_nb_pucch; i++)
free_gNB_pucch(gNB->pucch[i]);
free(gNB->pucch);
for (int i = 0; i < NUMBER_OF_NR_SRS_MAX; i++)
for (int i = 0; i < gNB->max_nb_srs; i++)
free_gNB_srs(gNB->srs[i]);
free(gNB->srs);
for (int i=0; i<gNB->number_of_nr_ulsch_max; i++)
for (int i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++)
free_gNB_ulsch(&gNB->ulsch[i], fp->N_RB_UL);
}
......@@ -582,6 +582,6 @@ void dump_pdsch_stats(FILE *fd,PHY_VARS_gNB *gNB) {
void clear_pdsch_stats(PHY_VARS_gNB *gNB) {
for (int i=0;i<gNB->number_of_nr_dlsch_max;i++)
for (int i = 0;i < NUMBER_OF_NR_SCH_STATS_MAX; i++)
memset((void*)&gNB->dlsch_stats[i],0,sizeof(gNB->dlsch_stats[i]));
}
......@@ -39,8 +39,8 @@ extern uint16_t prach_root_sequence_map_abc[138];
extern uint16_t nr_du[838];
extern const char *prachfmt[];
void init_prach_list(PHY_VARS_gNB *gNB) {
void init_prach_list(PHY_VARS_gNB *gNB)
{
AssertFatal(gNB!=NULL,"gNB is null\n");
for (int i=0; i<NUMBER_OF_NR_PRACH_MAX; i++){
gNB->prach_vars.list[i].frame = -1;
......@@ -48,11 +48,10 @@ void init_prach_list(PHY_VARS_gNB *gNB) {
}
}
void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id) {
void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id)
{
gNB->prach_vars.list[prach_id].frame = -1;
gNB->prach_vars.list[prach_id].slot = -1;
}
int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
......
......@@ -40,7 +40,7 @@ int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
int16_t first_free_index=-1;
AssertFatal(gNB!=NULL,"gNB is null\n");
for (i=0; i<gNB->number_of_nr_ulsch_max; i++) {
for (i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++) {
AssertFatal(gNB->ulsch[i]!=NULL,"gNB->ulsch[%d] is null\n",i);
LOG_D(PHY,"searching for rnti %x : ulsch_index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,gNB->ulsch[i]->harq_mask,gNB->ulsch[i]->rnti,first_free_index);
if ((gNB->ulsch[i]->harq_mask >0) &&
......@@ -60,7 +60,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
int ulsch_id = find_nr_ulsch(ulsch_pdu->rnti,gNB,SEARCH_EXIST_OR_FREE);
AssertFatal( (ulsch_id>=0) && (ulsch_id<gNB->number_of_nr_ulsch_max),
AssertFatal((ulsch_id >= 0) && (ulsch_id < NUMBER_OF_NR_ULSCH_MAX),
"illegal or no ulsch_id found!!! rnti %04x ulsch_id %d\n",ulsch_pdu->rnti,ulsch_id);
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ulsch_id];
......@@ -121,7 +121,7 @@ void nr_ulsch_layer_demapping(int16_t *llr_cw,
void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) {
for (int i=0;i<gNB->number_of_nr_ulsch_max;i++) {
for (int i = 0;i < NUMBER_OF_NR_SCH_STATS_MAX;i++) {
if (gNB->ulsch_stats[i].rnti>0 && gNB->ulsch_stats[i].frame != gNB->ulsch_stats[i].dump_frame) {
gNB->ulsch_stats[i].dump_frame = gNB->ulsch_stats[i].frame;
......@@ -155,14 +155,14 @@ void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) {
void clear_pusch_stats(PHY_VARS_gNB *gNB) {
for (int i=0;i<gNB->number_of_nr_ulsch_max;i++)
for (int i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++)
memset((void*)&gNB->ulsch_stats[i],0,sizeof(gNB->ulsch_stats[i]));
}
NR_gNB_SCH_STATS_t *get_ulsch_stats(PHY_VARS_gNB *gNB,NR_gNB_ULSCH_t *ulsch) {
NR_gNB_SCH_STATS_t *stats=NULL;
int first_free=-1;
for (int i=0;i<gNB->number_of_nr_ulsch_max;i++) {
for (int i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++) {
if (gNB->ulsch_stats[i].rnti == 0 && first_free == -1) {
first_free = i;
stats=&gNB->ulsch_stats[i];
......
......@@ -70,20 +70,21 @@ void free_gNB_pucch(NR_gNB_PUCCH_t *pucch)
int nr_find_pucch(uint16_t rnti,
int frame,
int slot,
PHY_VARS_gNB *gNB) {
PHY_VARS_gNB *gNB)
{
AssertFatal(gNB!=NULL,"gNB is null\n");
int index = -1;
for (int i = 0; i < NUMBER_OF_NR_PUCCH_MAX; i++) {
for (int i = 0; i < gNB->max_nb_pucch; i++) {
AssertFatal(gNB->pucch[i] != NULL,"gNB->pucch[%d] is null\n",i);
if ((gNB->pucch[i]->active > 0) &&
(gNB->pucch[i]->pucch_pdu.rnti == rnti) &&
(gNB->pucch[i]->frame == frame) &&
(gNB->pucch[i]->slot == slot))
return(i);
return i;
else if ((gNB->pucch[i]->active == 0) && (index == -1))
index=i;
index = i;
}
if (index==-1)
......@@ -95,11 +96,13 @@ int nr_find_pucch(uint16_t rnti,
void nr_fill_pucch(PHY_VARS_gNB *gNB,
int frame,
int slot,
nfapi_nr_pucch_pdu_t *pucch_pdu) {
nfapi_nr_pucch_pdu_t *pucch_pdu)
{
if (NFAPI_MODE == NFAPI_MODE_PNF)
gNB->pucch[0]->active = 0; //check if ture in monolithic mode
int id = nr_find_pucch(pucch_pdu->rnti,frame,slot,gNB);
AssertFatal((id >= 0) && (id < NUMBER_OF_NR_PUCCH_MAX),
AssertFatal((id >= 0) && (id < gNB->max_nb_pucch),
"invalid id found for pucch !!! rnti %04x id %d\n",pucch_pdu->rnti,id);
NR_gNB_PUCCH_t *pucch = gNB->pucch[id];
......
......@@ -64,7 +64,7 @@ int nr_find_srs(rnti_t rnti,
AssertFatal(gNB!=NULL,"gNB is null\n");
int index = -1;
for (int i=0; i<NUMBER_OF_NR_SRS_MAX; i++) {
for (int i = 0; i < gNB->max_nb_srs; i++) {
AssertFatal(gNB->srs[i]!=NULL,"gNB->srs[%d] is null\n",i);
if ((gNB->srs[i]->active>0) &&
(gNB->srs[i]->srs_pdu.rnti==rnti) &&
......@@ -85,7 +85,7 @@ void nr_fill_srs(PHY_VARS_gNB *gNB,
nfapi_nr_srs_pdu_t *srs_pdu) {
int id = nr_find_srs(srs_pdu->rnti,frame,slot,gNB);
AssertFatal( (id>=0) && (id<NUMBER_OF_NR_SRS_MAX),
AssertFatal((id >= 0) && (id < gNB->max_nb_srs),
"invalid id found for srs !!! rnti %04x id %d\n",srs_pdu->rnti,id);
NR_gNB_SRS_t *srs = gNB->srs[id];
......
......@@ -617,16 +617,15 @@ typedef struct PHY_VARS_gNB_s {
nfapi_nr_ul_tti_request_t UL_tti_req;
nfapi_nr_uci_indication_t uci_indication;
int max_nb_pucch;
int max_nb_srs;
NR_gNB_PBCH pbch;
NR_gNB_COMMON common_vars;
NR_gNB_PRACH prach_vars;
NR_gNB_PRS prs_vars;
NR_gNB_PUSCH *pusch_vars[NUMBER_OF_NR_ULSCH_MAX];
NR_gNB_PUCCH_t *pucch[NUMBER_OF_NR_PUCCH_MAX];
NR_gNB_SRS_t *srs[NUMBER_OF_NR_SRS_MAX];
NR_gNB_PDCCH_t pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
NR_gNB_UL_PDCCH_t ul_pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
NR_gNB_DLSCH_t *dlsch[NUMBER_OF_NR_DLSCH_MAX][2]; // Nusers times two spatial streams
NR_gNB_PUCCH_t **pucch;
NR_gNB_SRS_t **srs;
NR_gNB_ULSCH_t *ulsch[NUMBER_OF_NR_ULSCH_MAX]; // [Nusers times]
/// statistics for DLSCH measurement collection
NR_gNB_SCH_STATS_t dlsch_stats[NUMBER_OF_NR_SCH_STATS_MAX];
......@@ -636,7 +635,7 @@ typedef struct PHY_VARS_gNB_s {
t_nrPolar_params **polarParams;
/// SRS variables
nr_srs_info_t *nr_srs_info[NUMBER_OF_NR_SRS_MAX];
nr_srs_info_t **nr_srs_info;
/// CSI variables
nr_csi_info_t *nr_csi_info;
......@@ -763,8 +762,6 @@ typedef struct PHY_VARS_gNB_s {
notifiedFIFO_t resp_RU_tx;
tpool_t threadPool;
int nbDecode;
int number_of_nr_dlsch_max;
int number_of_nr_ulsch_max;
void *scopeData;
/// structure for analyzing high-level RT measurements
rt_L1_profiling_t rt_L1_profiling;
......@@ -827,7 +824,7 @@ typedef struct processingData_L1tx {
PHY_VARS_gNB *gNB;
nfapi_nr_dl_tti_pdcch_pdu pdcch_pdu[NFAPI_NR_MAX_NB_CORESETS];
nfapi_nr_ul_dci_request_pdus_t ul_pdcch_pdu[NFAPI_NR_MAX_NB_CORESETS];
NR_gNB_CSIRS_t csirs_pdu[NUMBER_OF_NR_CSIRS_MAX];
NR_gNB_CSIRS_t csirs_pdu[NR_SYMBOLS_PER_SLOT];
NR_gNB_DLSCH_t *dlsch[NUMBER_OF_NR_DLSCH_MAX][2];
NR_gNB_SSB_t ssb[64];
uint16_t num_pdsch_slot;
......
......@@ -107,7 +107,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx,
int found = 0;
for (int id=0; id<NUMBER_OF_NR_CSIRS_MAX; id++) {
for (int id = 0; id < NR_SYMBOLS_PER_SLOT; id++) {
NR_gNB_CSIRS_t *csirs = &msgTx->csirs_pdu[id];
if (csirs->active == 0) {
LOG_D(PHY,"Frame %d Slot %d CSI_RS with ID %d is now active\n",frame,slot,id);
......@@ -203,8 +203,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
AssertFatal(TX_req->pdu_list[pduIndex].num_TLV == 1, "TX_req->pdu_list[%d].num_TLV %d != 1\n",
pduIndex,TX_req->pdu_list[pduIndex].num_TLV);
uint8_t *sdu = (uint8_t *)TX_req->pdu_list[pduIndex].TLVs[0].value.direct;
AssertFatal(msgTx->num_pdsch_slot < gNB->number_of_nr_dlsch_max,"Number of PDSCH PDUs %d exceeded the limit %d\n",
msgTx->num_pdsch_slot,gNB->number_of_nr_dlsch_max);
AssertFatal(msgTx->num_pdsch_slot < NUMBER_OF_NR_DLSCH_MAX,"Number of PDSCH PDUs %d exceeded the limit %d\n",
msgTx->num_pdsch_slot, NUMBER_OF_NR_DLSCH_MAX);
handle_nr_nfapi_pdsch_pdu(msgTx,&dl_tti_pdu->pdsch_pdu, sdu);
}
}
......
......@@ -33,6 +33,7 @@
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "SCHED_NR/phy_frame_config_nr.h"
#include "common/utils/nr/nr_common.h"
/*******************************************************************
*
......@@ -53,48 +54,13 @@
int set_tdd_config_nr( nfapi_nr_config_request_scf_t *cfg,
int mu,
int nrofDownlinkSlots, int nrofDownlinkSymbols,
int nrofUplinkSlots, int nrofUplinkSymbols) {
int nrofUplinkSlots, int nrofUplinkSymbols)
{
int slot_number = 0;
int nb_periods_per_frame;
int nb_periods_per_frame = get_nb_periods_per_frame(cfg->tdd_table.tdd_period.value);
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
switch(cfg->tdd_table.tdd_period.value) {
case 0:
nb_periods_per_frame = 20; // 10ms/0p5ms
break;
case 1:
nb_periods_per_frame = 16; // 10ms/0p625ms
break;
case 2:
nb_periods_per_frame = 10; // 10ms/1ms
break;
case 3:
nb_periods_per_frame = 8; // 10ms/1p25ms
break;
case 4:
nb_periods_per_frame = 5; // 10ms/2ms
break;
case 5:
nb_periods_per_frame = 4; // 10ms/2p5ms
break;
case 6:
nb_periods_per_frame = 2; // 10ms/5ms
break;
case 7:
nb_periods_per_frame = 1; // 10ms/10ms
break;
default:
AssertFatal(1==0,"Undefined tdd period %d\n", cfg->tdd_table.tdd_period.value);
}
int nb_slots_per_period = ((1<<mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame;
if ( (nrofDownlinkSymbols + nrofUplinkSymbols) == 0 )
......
......@@ -184,7 +184,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
}
for (int i=0;i<NUMBER_OF_NR_CSIRS_MAX;i++){
for (int i = 0; i < NR_SYMBOLS_PER_SLOT; i++){
NR_gNB_CSIRS_t *csirs = &msgTx->csirs_pdu[i];
if (csirs->active == 1) {
LOG_D(PHY, "CSI-RS generation started in frame %d.%d\n",frame,slot);
......@@ -529,7 +529,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
for (int i = 0; i < gNB->max_nb_pucch; i++){
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
if (pucch) {
if ((pucch->active == 1) &&
......@@ -552,7 +552,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
for (int ULSCH_id=0;ULSCH_id<gNB->number_of_nr_ulsch_max;ULSCH_id++) {
for (int ULSCH_id = 0; ULSCH_id < NUMBER_OF_NR_ULSCH_MAX; ULSCH_id++) {
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id];
int harq_pid;
NR_UL_gNB_HARQ_t *ulsch_harq;
......@@ -582,7 +582,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
for (int i=0;i<NUMBER_OF_NR_SRS_MAX;i++) {
for (int i = 0; i < gNB->max_nb_srs; i++) {
NR_gNB_SRS_t *srs = gNB->srs[i];
if (srs) {
if ((srs->active == 1) && (srs->frame == frame_rx) && (srs->slot == slot_rx)) {
......@@ -713,7 +713,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
start_meas(&gNB->phy_proc_rx);
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
for (int i = 0; i < gNB->max_nb_pucch; i++){
NR_gNB_PUCCH_t *pucch = gNB->pucch[i];
if (pucch) {
if (NFAPI_MODE == NFAPI_MODE_PNF)
......@@ -775,7 +775,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
for (int ULSCH_id=0;ULSCH_id<gNB->number_of_nr_ulsch_max;ULSCH_id++) {
for (int ULSCH_id = 0; ULSCH_id < NUMBER_OF_NR_ULSCH_MAX; ULSCH_id++) {
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id];
NR_UL_gNB_HARQ_t *ulsch_harq;
......@@ -870,7 +870,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
for (int i = 0; i < NUMBER_OF_NR_SRS_MAX; i++) {
for (int i = 0; i < gNB->max_nb_srs; i++) {
NR_gNB_SRS_t *srs = gNB->srs[i];
if (srs) {
if ((srs->active == 1) && (srs->frame == frame_rx) && (srs->slot == slot_rx)) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -366,6 +366,8 @@ int main(int argc, char **argv)
frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
crcTableInit();
nr_phy_config_request_sim(gNB, N_RB_DL, N_RB_DL, mu, Nid_cell,SSB_positions);
gNB->gNB_config.tdd_table.tdd_period.value = 6;
set_tdd_config_nr(&gNB->gNB_config, mu, 7, 6, 2, 4);
phy_init_nr_gNB(gNB);
//init_eNB_afterRU();
frame_length_complex_samples = frame_parms->samples_per_subframe;
......@@ -612,6 +614,11 @@ int main(int argc, char **argv)
reset_DLSCH_struct(gNB, &msgDataTx);
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES * (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
for (int i = 0; i < nb_slots_to_set; ++i)
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
phy_free_nr_gNB(gNB);
free(RC.gNB[0]);
free(RC.gNB);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -41,3 +41,4 @@
#include "sctp_messages_def.h"
#include "udp_messages_def.h"
#include "gtpv1_u_messages_def.h"
#include "e1ap_messages_def.h"
This diff is collapsed.
add_subdirectory(MESSAGES)
add_library(E1AP e1ap.c)
target_link_libraries(E1AP
PUBLIC asn1_e1ap
PRIVATE UTIL asn1_nr_rrc asn1_lte_rrc)
target_include_directories(E1AP PUBLIC ${CMAKE_CURRENT_DIR})
add_library(e1ap e1ap.c e1ap_common.c e1ap_api.c)
target_link_libraries(e1ap
PUBLIC asn1_e1ap f1ap
PRIVATE asn1_nr_rrc asn1_lte_rrc asn1_f1ap UTIL e1_pdcp_if e1_if)
target_include_directories(e1ap PUBLIC ${CMAKE_CURRENT_DIR})
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment