Commit 21172d27 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/t2-offload-mr3' into t2-offload-mr3

parents 5d29915d 69e776f2
...@@ -1687,7 +1687,7 @@ set(libnas_ies_OBJS ...@@ -1687,7 +1687,7 @@ set(libnas_ies_OBJS
set (libnas_utils_OBJS set (libnas_utils_OBJS
${NAS_SRC}COMMON/UTIL/device.c ${NAS_SRC}COMMON/UTIL/device.c
${NAS_SRC}COMMON/UTIL/memory.c common/utils/mem/memory.c
${NAS_SRC}COMMON/UTIL/nas_timer.c ${NAS_SRC}COMMON/UTIL/nas_timer.c
${NAS_SRC}COMMON/UTIL/socket.c ${NAS_SRC}COMMON/UTIL/socket.c
${NAS_SRC}COMMON/UTIL/stty.c ${NAS_SRC}COMMON/UTIL/stty.c
...@@ -2052,7 +2052,6 @@ add_executable(nr-softmodem ...@@ -2052,7 +2052,6 @@ add_executable(nr-softmodem
${rrc_h} ${rrc_h}
${nr_rrc_h} ${nr_rrc_h}
${s1ap_h} ${s1ap_h}
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_DIR}/executables/nr-gnb.c ${OPENAIR_DIR}/executables/nr-gnb.c
${OPENAIR_DIR}/executables/nr-ru.c ${OPENAIR_DIR}/executables/nr-ru.c
${OPENAIR_DIR}/executables/nr-softmodem.c ${OPENAIR_DIR}/executables/nr-softmodem.c
...@@ -2121,7 +2120,6 @@ target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) ...@@ -2121,7 +2120,6 @@ target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_executable(nr-uesoftmodem add_executable(nr-uesoftmodem
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_DIR}/executables/nr-uesoftmodem.c ${OPENAIR_DIR}/executables/nr-uesoftmodem.c
${OPENAIR_DIR}/executables/nr-ue.c ${OPENAIR_DIR}/executables/nr-ue.c
${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR_DIR}/executables/softmodem-common.c
...@@ -2439,9 +2437,6 @@ make_driver(nasmesh ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH ${nasmesh_src}) ...@@ -2439,9 +2437,6 @@ make_driver(nasmesh ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH ${nasmesh_src})
# user space tool for configuring MESH IP driver # user space tool for configuring MESH IP driver
################ ################
add_executable(rb_tool add_executable(rb_tool
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/constant.h
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/ioctl.h
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/rrc_nas_primitives.h
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c
) )
target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/) target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/)
......
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 2
#define N_ANTENNA_UL 2
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn:627360,
ssb_nr_arfcn:627360,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
rx_to_tx_latency:2,
}],
}],
/* UE capabilities */
/* USIM data */
ue_list: [
{
"ue_id" : 1,
"imsi": "208970000000111",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 2,
"imsi": "208970000000112",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 3,
"imsi": "208970000000113",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 4,
"imsi": "208970000000114",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 5,
"imsi": "208970000000115",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 6,
"imsi": "208970000000116",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 7,
"imsi": "208970000000100",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 8,
"imsi": "208970000000102",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 9,
"imsi": "208970000000103",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 10,
"imsi": "208970000000104",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 11,
"imsi": "208970000000110",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 12,
"imsi": "208970000000105",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 13,
"imsi": "208970000000106",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 14,
"imsi": "208970000000107",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 15,
"imsi": "208970000000108",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 16,
"imsi": "208970000000109",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
],
}
...@@ -49,7 +49,7 @@ adb_ue_2: ...@@ -49,7 +49,7 @@ adb_ue_2:
amarisoft_ue: amarisoft_ue:
Host: amariue Host: amariue
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg & InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-20897-2x2.cfg &
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2 TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
amarisoft_ue_1: amarisoft_ue_1:
Host: amariue Host: amariue
......
...@@ -23,8 +23,8 @@ gNBs = ...@@ -23,8 +23,8 @@ gNBs =
tr_s_preference = "f1"; tr_s_preference = "f1";
local_s_if_name = "eth0"; local_s_if_name = "eth0";
local_s_address = "192.168.71.140"; local_s_address = "192.168.71.150";
remote_s_address = "192.168.71.142"; remote_s_address = "192.168.71.171";
local_s_portc = 501; local_s_portc = 501;
local_s_portd = 2153; local_s_portd = 2153;
remote_s_portc = 500; remote_s_portc = 500;
...@@ -51,9 +51,9 @@ gNBs = ...@@ -51,9 +51,9 @@ gNBs =
{ {
GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.150";
GNB_INTERFACE_NAME_FOR_NGU = "eth0"; GNB_INTERFACE_NAME_FOR_NGU = "eth0";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.150";
GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
} }
......
...@@ -78,12 +78,8 @@ security = { ...@@ -78,12 +78,8 @@ security = {
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="debug";
pdcp_log_level ="info"; pdcp_log_level ="info";
rrc_log_level ="info"; rrc_log_level ="info";
f1ap_log_level ="debug"; f1ap_log_level ="info";
ngap_log_level ="debug"; ngap_log_level ="info";
}; };
...@@ -16,7 +16,7 @@ gNBs = ...@@ -16,7 +16,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1; tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }, { sst = 2 }, { sst = 3 }) });
nr_cellid = 12345678L; nr_cellid = 12345678L;
...@@ -24,8 +24,8 @@ gNBs = ...@@ -24,8 +24,8 @@ gNBs =
tr_s_preference = "f1"; tr_s_preference = "f1";
local_s_if_name = "lo"; local_s_if_name = "lo";
local_s_address = "192.168.72.140"; local_s_address = "192.168.71.150";
remote_s_address = "192.168.72.143"; remote_s_address = "0.0.0.0"; # multiple DUs
local_s_portc = 501; local_s_portc = 501;
local_s_portd = 2152; local_s_portd = 2152;
remote_s_portc = 500; remote_s_portc = 500;
...@@ -52,9 +52,9 @@ gNBs = ...@@ -52,9 +52,9 @@ gNBs =
( (
{ {
type = "cp"; type = "cp";
ipv4_cucp = "192.168.72.140"; ipv4_cucp = "192.168.71.150";
port_cucp = 38462; port_cucp = 38462;
ipv4_cuup = "192.168.72.141"; ipv4_cuup = "0.0.0.0"; # multiple CU-UPs
port_cuup = 38462; port_cuup = 38462;
} }
) )
......
...@@ -22,12 +22,12 @@ gNBs = ...@@ -22,12 +22,12 @@ gNBs =
tr_s_preference = "f1"; tr_s_preference = "f1";
local_s_if_name = "lo"; local_s_if_name = "lo";
local_s_address = "192.168.72.141"; local_s_address = "192.168.72.161";
remote_s_address = "192.168.72.142"; remote_s_address = "192.168.72.171";
local_s_portc = 501; local_s_portc = 501;
local_s_portd = 2152; local_s_portd = 2153;
remote_s_portc = 500; remote_s_portc = 500;
remote_s_portd = 2152; remote_s_portd = 2153;
# ------- SCTP definitions # ------- SCTP definitions
SCTP : SCTP :
...@@ -41,17 +41,17 @@ gNBs = ...@@ -41,17 +41,17 @@ gNBs =
( (
{ {
type = "up"; type = "up";
ipv4_cucp = "192.168.72.140"; ipv4_cucp = "192.168.71.150";
ipv4_cuup = "192.168.72.141"; ipv4_cuup = "192.168.71.161";
} }
) )
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.141/24"; GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.161/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.141/24"; GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.161/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152 GNB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
} }
......
Active_gNBs = ( "gNB-Eurecom-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
# cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 222; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
nr_cellid = 12345678L;
////////// Physical parameters:
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 423130;
dl_frequencyBand = 1;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 422194;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 0;
dl_carrierBandwidth = 52;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 14025; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 0;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 7;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 1;
ul_absoluteFrequencyPointA = 384194;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 0;
ul_carrierBandwidth = 52;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 14025;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 0;
#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 = 12;
preambleReceivedTargetPower = -90;
#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 = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 0,
# 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 = -70;
n_TimingAdvanceOffset = 0;
# 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 = 0;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 0;
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.68.195";
remote_n_address = "192.168.68.194";
local_n_portc = 500;
local_n_portd = 2153;
remote_n_portc = 501;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 1;
}
);
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
# The higher att for TX than RX is because we use a circulator (as for TDD),
# while we should use a duplexer in the FDD case. However, it uses the same setup.
att_tx = 18
att_rx = 0;
bands = [1];
max_pdschReferenceSignalPower = -27;
max_rxgain = 108;
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";
}
);
log_config : {
global_log_level = "info";
};
...@@ -15,7 +15,7 @@ gNBs = ...@@ -15,7 +15,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1; tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }, { sst = 2 }, { sst = 3 } ) });
nr_cellid = 12345678L; nr_cellid = 12345678L;
...@@ -23,7 +23,6 @@ gNBs = ...@@ -23,7 +23,6 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
min_rxtxtime = 6; min_rxtxtime = 6;
force_256qam_off = 1;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -170,8 +169,8 @@ MACRLCs = ( ...@@ -170,8 +169,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "f1"; tr_n_preference = "f1";
local_n_if_name = "eth0"; local_n_if_name = "eth0";
local_n_address = "192.168.71.142"; local_n_address = "192.168.71.171";
remote_n_address = "192.168.71.140"; remote_n_address = "192.168.71.150";
local_n_portc = 500; local_n_portc = 500;
local_n_portd = 2153; local_n_portd = 2153;
remote_n_portc = 501; remote_n_portc = 501;
......
...@@ -22,9 +22,9 @@ gNBs = ...@@ -22,9 +22,9 @@ gNBs =
////////// Physical parameters: ////////// Physical parameters:
pdsch_AntennaPorts_XP = 2; pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 2;
do_CSIRS = 1; do_CSIRS = 1;
do_SRS = 0; do_SRS = 1;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
......
...@@ -27,14 +27,10 @@ ...@@ -27,14 +27,10 @@
<TestCaseRequestedList> <TestCaseRequestedList>
111111 111111
100021 100021
000020
000021 000021
000022 000022
000023 000023
000024
020021 020021
020022
030021
100021 100021
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -46,80 +42,38 @@ ...@@ -46,80 +42,38 @@
<images_to_pull>oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan</images_to_pull> <images_to_pull>oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan</images_to_pull>
</testCase> </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"> <testCase id="000021">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc> <desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path> <yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services> <services>mysql oai-nrf oai-amf oai-smf oai-spgwu</services>
<nb_healthy>6</nb_healthy> <nb_healthy>5</nb_healthy>
</testCase> </testCase>
<testCase id="000022"> <testCase id="000022">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 5G CU-CP RF sim SA</desc> <desc>Deploy OAI 5G RAN RF sim SA (1 CU-CP, 3 CU-UPs, 3 DUs)</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path> <yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-cucp</services> <services>oai-cucp oai-cuup oai-cuup2 oai-cuup3 oai-du oai-du2 oai-du3</services>
<nb_healthy>7</nb_healthy> <nb_healthy>12</nb_healthy>
</testCase> </testCase>
<testCase id="000023"> <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> <class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc> <desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path> <yaml_path>yaml_files/5g_rfsimulator_e1</yaml_path>
<services>oai-nr-ue</services> <services>oai-nr-ue oai-nr-ue2 oai-nr-ue3</services>
<nb_healthy>10</nb_healthy> <nb_healthy>15</nb_healthy>
</testCase> </testCase>
<testCase id="020021"> <testCase id="020021">
<class>Ping</class> <class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc> <desc>Ping ext-dn from all NR-UEs</desc>
<id>rfsim5g_ue</id> <id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id>
<ping_args> -c 20 192.168.73.135</ping_args> <ping_args> -c 20 12.1.1.1 -i0.25</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold> <ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase> </testCase>
<testCase id="020022">
<class>Ping</class>
<desc>Ping NR-UE from ext-dn</desc>
<id>rfsim5g_ext_dn</id>
<ping_args>-c 20 12.1.1.2</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_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"> <testCase id="100021">
<class>UndeployGenObject</class> <class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc> <desc>Undeploy all OAI 5G stack</desc>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>rfsim-5gnr-down-e1</htmlTabRef> <htmlTabRef>rfsim-5gnr-down-e1</htmlTabRef>
<htmlTabName>CleanUp CUCP-CUUP-DU E1+F1 split</htmlTabName> <htmlTabName>CleanUp E1+F1 split</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100022 100022
......
...@@ -27,13 +27,11 @@ ...@@ -27,13 +27,11 @@
<TestCaseRequestedList> <TestCaseRequestedList>
111111 111111
100021 100021
000020
000021 000021
000022 000022
000023
000024
000025
020021 020021
030021
030022
100021 100021
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -42,61 +40,29 @@ ...@@ -42,61 +40,29 @@
<class>Pull_Local_Registry</class> <class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc> <desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id> <test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull> <images_to_pull>oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan</images_to_pull>
</testCase>
<testCase id="000020">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase> </testCase>
<testCase id="000021"> <testCase id="000021">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc> <desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services> <services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy> <nb_healthy>6</nb_healthy>
</testCase> </testCase>
<testCase id="000022"> <testCase id="000022">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 5G CU RF sim SA</desc> <desc>Deploy OAI 5G CU+DU+UE RF sim SA</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-cu</services>
<nb_healthy>7</nb_healthy>
</testCase>
<testCase id="000023">
<class>DeployGenObject</class>
<desc>Deploy 3 OAI 5G DUs RF sim SA</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-du oai-du2 oai-du3</services>
<nb_healthy>10</nb_healthy>
</testCase>
<testCase id="000024">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-nr-ue oai-nr-ue2</services>
<nb_healthy>12</nb_healthy>
</testCase>
<testCase id="000025">
<class>DeployGenObject</class>
<desc>Deploy OAI 5G NR-UE RF sim SA</desc>
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-nr-ue3</services> <services>oai-cu oai-du oai-nr-ue</services>
<nb_healthy>13</nb_healthy> <nb_healthy>9</nb_healthy>
</testCase> </testCase>
<testCase id="020021"> <testCase id="020021">
<class>Ping</class> <class>Ping</class>
<desc>Ping ext-dn from all NR-UEs</desc> <desc>Ping ext-dn from all NR-UEs</desc>
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id> <id>rfsim5g_ue</id>
<ping_args> -c 20 192.168.72.135 -i0.25</ping_args> <ping_args> -c 20 192.168.72.135 -i0.25</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold> <ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase> </testCase>
...@@ -107,7 +73,7 @@ ...@@ -107,7 +73,7 @@
<server_container_name>rfsim5g-oai-nr-ue</server_container_name> <server_container_name>rfsim5g-oai-nr-ue</server_container_name>
<client_container_name>rfsim5g-oai-ext-dn</client_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> <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> <client_options>-c 12.1.1.2 -u -i 1 -t 10 -b 20M</client_options>
</testCase> </testCase>
<testCase id="030022"> <testCase id="030022">
...@@ -116,7 +82,7 @@ ...@@ -116,7 +82,7 @@
<server_container_name>rfsim5g-oai-ext-dn</server_container_name> <server_container_name>rfsim5g-oai-ext-dn</server_container_name>
<client_container_name>rfsim5g-oai-nr-ue</client_container_name> <client_container_name>rfsim5g-oai-nr-ue</client_container_name>
<server_options>-u -i 1 -s</server_options> <server_options>-u -i 1 -s</server_options>
<client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 30 -b 1M</client_options> <client_options>-B 12.1.1.2 -c 192.168.72.135 -u -i 1 -t 10 -b 5M</client_options>
</testCase> </testCase>
<testCase id="100021"> <testCase id="100021">
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
<TestCaseRequestedList> <TestCaseRequestedList>
111111 111111
100001 100001
000000
000001 000001
000002 000002
000003 000003
...@@ -36,6 +35,7 @@ ...@@ -36,6 +35,7 @@
000005 000005
000006 000006
000007 000007
000008
020001 020001
020002 020002
020003 020003
...@@ -58,22 +58,14 @@ ...@@ -58,22 +58,14 @@
<class>Pull_Local_Registry</class> <class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc> <desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id> <test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb-asan oai-nr-ue-asan</images_to_pull> <images_to_pull>oai-gnb-asan oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000">
<class>DeployGenObject</class>
<desc>Deploy MySql Database</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>mysql</services>
<nb_healthy>1</nb_healthy>
</testCase> </testCase>
<testCase id="000001"> <testCase id="000001">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 5G CoreNetwork</desc> <desc>Deploy OAI 5G CoreNetwork</desc>
<yaml_path>yaml_files/5g_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_rfsimulator</yaml_path>
<services>oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services> <services>mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn</services>
<nb_healthy>6</nb_healthy> <nb_healthy>6</nb_healthy>
</testCase> </testCase>
...@@ -125,6 +117,12 @@ ...@@ -125,6 +117,12 @@
<nb_healthy>17</nb_healthy> <nb_healthy>17</nb_healthy>
</testCase> </testCase>
<testCase id="000008">
<class>Attach_UE</class>
<desc>Attach OAI UE (Wait for IP)</desc>
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
</testCase>
<testCase id="020001"> <testCase id="020001">
<class>Ping</class> <class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc> <desc>Ping ext-dn from NR-UE</desc>
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
<testCase id="070000"> <testCase id="070000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/90Mbps/UDP)(60 sec)(single-ue profile)</desc> <desc>iperf (DL/70Mbps/UDP)(60 sec)(single-ue profile)</desc>
<iperf_args>-u -b 90M -t 60 -i 1 -fm</iperf_args> <iperf_args>-u -b 70M -t 60 -i 1 -fm</iperf_args>
<direction>DL</direction> <direction>DL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold> <iperf_packetloss_threshold>25</iperf_packetloss_threshold>
......
...@@ -145,8 +145,8 @@ ...@@ -145,8 +145,8 @@
<testCase id="000020"> <testCase id="000020">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/2Mbps/UDP)(30 sec)(multi-ue profile)</desc> <desc>iperf (UL/3.6Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 20M -t 30 -i 1 </iperf_args> <iperf_args>-u -b 36M -t 30 -i 1 </iperf_args>
<direction>IPERF3</direction> <direction>IPERF3</direction>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id> <id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold> <iperf_packetloss_threshold>25</iperf_packetloss_threshold>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>TEST-SA-FR1-F1-B200</htmlTabRef> <htmlTabRef>TEST-SA-FR1-F1-B200</htmlTabRef>
<htmlTabName>40 MHz TDD F1 SA</htmlTabName> <htmlTabName>10 MHz FDD F1 SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
...@@ -89,11 +89,11 @@ ...@@ -89,11 +89,11 @@
<testCase id="130102"> <testCase id="130102">
<class>Deploy_Object</class> <class>Deploy_Object</class>
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc> <desc>Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_f1_b200_gnb</yaml_path> <yaml_path>ci-scripts/yaml_files/sa_f1_b200_gnb</yaml_path>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
<services>gnb_du_tdd</services> <services>gnb_du_fdd</services>
</testCase> </testCase>
<testCase id="100000"> <testCase id="100000">
...@@ -159,8 +159,8 @@ ...@@ -159,8 +159,8 @@
<testCase id="170000"> <testCase id="170000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc> <desc>iperf (DL/50Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args> <iperf_args>-u -b 50M -t 30 -i 1 -fm</iperf_args>
<direction>DL</direction> <direction>DL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>10</iperf_packetloss_threshold> <iperf_packetloss_threshold>10</iperf_packetloss_threshold>
...@@ -170,8 +170,8 @@ ...@@ -170,8 +170,8 @@
<testCase id="170001"> <testCase id="170001">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc> <desc>iperf (UL/25Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 8M -t 30 -i 1 -fm</iperf_args> <iperf_args>-u -b 25M -t 30 -i 1 -fm</iperf_args>
<direction>UL</direction> <direction>UL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>1</iperf_packetloss_threshold> <iperf_packetloss_threshold>1</iperf_packetloss_threshold>
...@@ -181,8 +181,8 @@ ...@@ -181,8 +181,8 @@
<testCase id="170002"> <testCase id="170002">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (BIDIR TCP)(20 sec)(single-ue profile)</desc> <desc>iperf (BIDIR TCP)(60 sec)(single-ue profile)</desc>
<iperf_args>-t 20 --bidir</iperf_args> <iperf_args>-t 60 --bidir</iperf_args>
<direction>BIDIR</direction> <direction>BIDIR</direction>
<id>idefix</id> <id>idefix</id>
<iperf_profile>single-ue</iperf_profile> <iperf_profile>single-ue</iperf_profile>
......
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
<testCase id="270000"> <testCase id="270000">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (DL/100Mbps/UDP)(30 sec)(single-ue profile)</desc> <desc>iperf (DL/80Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 100M -t 30 -i 1 -fm</iperf_args> <iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args>
<direction>DL</direction> <direction>DL</direction>
<id>idefix</id> <id>idefix</id>
<iperf_packetloss_threshold>5</iperf_packetloss_threshold> <iperf_packetloss_threshold>5</iperf_packetloss_threshold>
......
...@@ -49,8 +49,10 @@ services: ...@@ -49,8 +49,10 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF). # Three slices are defined
- SST_0=1 - SST_0=1
- SST_1=2
- SST_2=3
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance # One single SMF instance
...@@ -101,6 +103,8 @@ services: ...@@ -101,6 +103,8 @@ services:
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SST1=2
- NSSAI_SST2=3
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
...@@ -127,10 +131,16 @@ services: ...@@ -127,10 +131,16 @@ services:
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF) # Three slices are defined
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
- NSSAI_SST_1=2
- NSSAI_SD_1=0xffffff
- DNN_1=oai
- NSSAI_SST_2=3
- NSSAI_SD_2=0xffffff
- DNN_2=oai
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-smf - oai-smf
...@@ -145,6 +155,7 @@ services: ...@@ -145,6 +155,7 @@ services:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
...@@ -162,18 +173,19 @@ services: ...@@ -162,18 +173,19 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-cu: oai-cu:
image: oaisoftwarealliance/oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-cu container_name: rfsim5g-oai-cu
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 ASAN_OPTIONS: detect_leaks=0
depends_on: depends_on:
- oai-ext-dn - oai-ext-dn
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.140 ipv4_address: 192.168.71.150
volumes: volumes:
- ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf - ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck: healthcheck:
...@@ -181,56 +193,19 @@ services: ...@@ -181,56 +193,19 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-du: oai-du:
image: oaisoftwarealliance/oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-du container_name: rfsim5g-oai-du
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-cu
networks:
public_net:
ipv4_address: 192.168.71.142
volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-du2:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du2
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_DU_ID 0xe01 --gNBs.[0].nr_cellid 87654321 --gNBs.[0].servingCellConfigCommon.[0].physCellId 1 --MACRLCs.[0].local_n_address 192.168.71.143 --log_config.global_log_options level,nocolor,time USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-cu
networks:
public_net:
ipv4_address: 192.168.71.143
volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-du3:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du3
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim --gNBs.[0].gNB_DU_ID 0xe02 --gNBs.[0].nr_cellid 11111111 --gNBs.[0].servingCellConfigCommon.[0].physCellId 2 --MACRLCs.[0].local_n_address 192.168.71.144 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 ASAN_OPTIONS: detect_leaks=0
depends_on: depends_on:
- oai-cu - oai-cu
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.144 ipv4_address: 192.168.71.171
volumes: volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf - ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck: healthcheck:
...@@ -238,56 +213,22 @@ services: ...@@ -238,56 +213,22 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.142 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-du
networks:
public_net:
ipv4_address: 192.168.71.150
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue2:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3619200000 --rfsimulator.serveraddr 192.168.71.143 --log_config.global_log_options level,nocolor,time USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 -r 106 --numerology 1 -C 3619200000
depends_on: --uicc0.imsi 208990100001100
- oai-du2 --rfsimulator.serveraddr 192.168.71.171
networks:
public_net:
ipv4_address: 192.168.71.151
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue3:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue3
environment:
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001102 -C 3619200000 --rfsimulator.serveraddr 192.168.71.144 --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0 ASAN_OPTIONS: detect_leaks=0
depends_on: depends_on:
- oai-du3 - oai-du
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.152 ipv4_address: 192.168.71.181
volumes: volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck: healthcheck:
......
...@@ -65,7 +65,8 @@ $ docker logout ...@@ -65,7 +65,8 @@ $ docker logout
All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_rfsimulator` folder for a deployment with monolithic gNB. All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_rfsimulator` folder for a deployment with monolithic gNB.
For a deployment with the gNB split in CU and DU components, the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_f1_rfsimulator` folder. For a deployment with the gNB split in CU and DU components, please refer to the `../5g_f1_rfsimulator` folder.
For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please refer to the ../5g_rfsimulator_e1` folder.
## 2.1. Deploy OAI 5G Core Network ## ## 2.1. Deploy OAI 5G Core Network ##
......
# CI test for 5G F1+E1 splits with RFsimulator
## General
This docker-compose file deploys a core, RAN, and 3 UEs. Specifically:
- 5GC mini deployment,
- 1 CU-CP,
- 3 CU-UPs, one for slices SST=1,2,3,
- 3 DUs,
- 3 UEs connecting to each DU, each requesting slice SST=1,2,3.
The CU-CP associates each UE X connecting through DU X to CU-UP X, X=1,2,3. To this end, the docker-compose file deliberately employs the three `f1u_netX` networks to route the user-plane traffic of each DU X/CU-UP X pair, through the `f1u_netX` network in order to effectively test that the correct CU-UP is associated. Basically, the traffic test will only succeed if the correct pair of DU/CU-UP has been established; if not, the DU/CU-UP cannot communicate, as the traffic cannot be routed.
Core network components are on `core_net` network, CU-CP <--> CU-UP X communicate via `e1_net` network, CU-CP <--> DU X communicate via `f1c_net` network and DU X <--> NR_UE X communicate via `ue_net` network.
## Connectivity
```
AMF --> 192.168.71.132 (N2,Namf)
SMF --> 192.168.71.133 (N4,Nsmf)
NRF --> 192.168.71.130 (Nnrf)
SPGWU --> 192.168.71.134 (N3)
CU-CP --> 192.168.71.X (N2), 192.168.72.2 (F1C), 192.168.77.2 (E1)
CU-UP1 --> 192.168.71.X (N3), 192.168.73.2 (F1U), 192.168.77.3 (E1)
CU-UP2 --> 192.168.71.X (N3), 192.168.74.2 (F1U), 192.168.77.4 (E1)
CU-UP3 --> 192.168.71.X (N3), 192.168.76.2 (F1U), 192.168.77.5 (E1)
DU1 --> 192.168.72.2 (F1C), 192.168.73.3 (F1U), 192.168.78.2 (RFSIM)
DU2 --> 192.168.72.3 (F1C), 192.168.74.3 (F1U), 192.168.78.3 (RFSIM)
DU3 --> 192.168.72.4 (F1C), 192.168.76.3 (F1U), 192.168.78.4 (RFSIM)
UE1 --> 192.168.78.5 (RFSIM)
UE2 --> 192.168.78.6 (RFSIM)
UE3 --> 192.168.78.7 (RFSIM)
```
## How to run
You should be able to deploy the [basic 5G RFsim deployment](../5g_rfsimulator/README.md).
First, start the MySQL server and 5GC:
```bash
docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu
docker-compose ps -a
```
Wait till everything is healthy.
Next, start the RAN:
```bash
docker-compose up -d oai-cucp oai-cuup{,2,3} oai-du{,2,3}
```
You can verify that the DUs and CU-UPs connected successfully:
```bash
docker logs rfsim5g-oai-cucp
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
18535.139811 [RRC] I Accepting new CU-UP ID 3585 name gNB-OAI (assoc_id 257)
18535.425744 [RRC] I Accepting new CU-UP ID 3584 name gNB-OAI (assoc_id 260)
18535.425757 [RRC] I Accepting new CU-UP ID 3586 name gNB-OAI (assoc_id 261)
18535.669733 [NR_RRC] I Received F1 Setup Request from gNB_DU 3585 (du-rfsim) on assoc_id 263
18535.669814 [RRC] I Accepting DU 3585 (du-rfsim), sending F1 Setup Response
18536.066417 [NR_RRC] I Received F1 Setup Request from gNB_DU 3586 (du-rfsim) on assoc_id 265
18536.066476 [RRC] I Accepting DU 3586 (du-rfsim), sending F1 Setup Response
18536.135581 [NR_RRC] I Received F1 Setup Request from gNB_DU 3584 (du-rfsim) on assoc_id 267
18536.135650 [RRC] I Accepting DU 3584 (du-rfsim), sending F1 Setup Response
```
</details>
You should see that the CU-UP initialized two GTP instances (one for NG-U, the other for F1-U):
```bash
docker logs -f rfsim5g-oai-cuup
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
122690.500374 [GTPU] I Initializing UDP for local address 192.168.73.2 with port 2153
122690.500406 [GTPU] I Created gtpu instance id: 96
122690.500413 [GTPU] I Configuring GTPu address : 192.168.71.161, port : 2152
122690.500414 [GTPU] I Initializing UDP for local address 192.168.71.161 with port 2152
122690.500420 [GTPU] I Created gtpu instance id: 97
```
</details>
You should see the typical periodical output at the DUs:
```bash
docker logs rfsim5g-oai-du
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
18626.446953 [NR_MAC] I Frame.Slot 128.0
18629.151076 [NR_MAC] I Frame.Slot 256.0
```
</details>
```
Next, connect the UEs. They are configured to connect to each DU by setting the
RFsimulator server address to the `public_net` IP address of each DU. For each,
you should see that they get an IP address
```bash
docker compose up -d oai-nr-ue{,2,3}
```
```bash
docker logs rfsim5g-oai-nr-ue
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
18758.176149 [NR_RRC] I rrcReconfigurationComplete Encoded 10 bits (2 bytes)
18758.176153 [NR_RRC] I Logical Channel UL-DCCH (SRB1), Generating RRCReconfigurationComplete (bytes 2)
18758.176154 [NAS] I [UE 0] Received NAS_CONN_ESTABLI_CNF: errCode 1, length 87
18758.176455 [OIP] I Interface oaitun_ue1 successfully configured, ip address 12.1.1.3, mask 255.255.255.0 broadcast address 12.1.1.255
```
</details>
Alternatively, check that they all received an IP address (the associated IP addresses might be different):
```bash
docker exec -it rfsim5g-oai-nr-ue3 ip a show oaitun_ue1
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
inet 12.1.1.2/24 brd 12.1.1.255 scope global oaitun_ue1
[...]
```
</details>
```bash
docker exec -it rfsim5g-oai-nr-ue2 ip a show oaitun_ue1
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
inet 12.1.1.4/24 brd 12.1.1.255 scope global oaitun_ue1
[...]
```
</details>
```bash
docker exec -it rfsim5g-oai-nr-ue ip a show oaitun_ue1
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
inet 12.1.1.3/24 brd 12.1.1.255 scope global oaitun_ue1
[...]
```
</details>
Also, note that each DU sees only one UE! At the CU-CP, you should see that
each DU has been associated to a different CU-UP, based on the NSSAI (`exact
NSSAI match`):
```bash
docker logs rfsim5g-oai-cucp | grep CU-U
```
<details>
<summary>The output is similar to:</summary>
```console
[...]
18757.531423 [RRC] I selecting CU-UP ID 3586 based on exact NSSAI match (3:0xffffff)
18757.531434 [RRC] I UE 1 associating to CU-UP assoc_id 261 out of 3 CU-UPs
18758.171502 [RRC] I selecting CU-UP ID 3584 based on exact NSSAI match (1:0xffffff)
18758.171510 [RRC] I UE 2 associating to CU-UP assoc_id 260 out of 3 CU-UPs
18758.772320 [RRC] I selecting CU-UP ID 3585 based on exact NSSAI match (2:0xffffff)
18758.772327 [RRC] I UE 3 associating to CU-UP assoc_id 257 out of 3 CU-UPs
```
</details>
Also, each UE should be able to ping the core network. For instance, with UE 1:
```bash
docker exec -it rfsim5g-oai-nr-ue ping -c1 12.1.1.1
```
<details>
<summary>The output is similar to:</summary>
```console
PING 12.1.1.1 (12.1.1.1) 56(84) bytes of data.
64 bytes from 12.1.1.1: icmp_seq=1 ttl=64 time=15.2 ms
--- 12.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.155/15.155/15.155/0.000 ms
```
</details>
Finally, undeploy the UEs (to give them time to do deregistration), and then
the rest of the network:
```bash
docker compose stop oai-nr-ue{,2,3}
docker compose down
```
...@@ -8,7 +8,7 @@ services: ...@@ -8,7 +8,7 @@ services:
environment: environment:
USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function USE_ADDITIONAL_OPTIONS: --sa --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function
volumes: volumes:
- ../../conf_files/gnb-cu.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf - ../../conf_files/gnb-cu.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
networks: networks:
public_net: public_net:
ipv4_address: 192.168.68.194 ipv4_address: 192.168.68.194
...@@ -20,15 +20,15 @@ services: ...@@ -20,15 +20,15 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
gnb_du_tdd: gnb_du_fdd:
image: oai-gnb:latest image: oai-gnb:latest
privileged: true privileged: true
container_name: sa-du-b200-gnb container_name: sa-du-b200-gnb
environment: environment:
USE_B2XX: 'yes' USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx -E --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 1 --RUs.[0].att_rx 18 --RUs.[0].att_tx 18 USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 0 --MACRLCs.[0].ul_max_mcs 28 --L1s.[0].max_ldpc_iterations 20
volumes: volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf - ../../conf_files/gnb-du.sa.band1.52prb.usrpb210.conf:/opt/oai-gnb/etc/gnb.conf
- /dev:/dev - /dev:/dev
networks: networks:
public_net: public_net:
......
This diff is collapsed.
...@@ -28,24 +28,12 @@ set(CONF2UEDATA_LIB_SRC ...@@ -28,24 +28,12 @@ set(CONF2UEDATA_LIB_SRC
${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c ${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c ${OPENAIR_DIR}/common/utils/mem/memory.c
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
) )
set(conf2uedata_HDR
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.h
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.h
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.h
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.h
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.h
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.h
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.h
${OPENAIR_DIR}/common/utils/utils.h
)
include_directories( include_directories(
${OPENAIR_DIR}/common/utils ${OPENAIR_DIR}/common/utils
${OPENAIR_DIR}/openair3/NAS/UE ${OPENAIR_DIR}/openair3/NAS/UE
...@@ -65,7 +53,7 @@ set(conf2uedata_SRC ...@@ -65,7 +53,7 @@ set(conf2uedata_SRC
${CONF2UEDATA_LIB_SRC} ${CONF2UEDATA_LIB_SRC}
) )
add_executable(conf2uedata ${conf2uedata_SRC} ${conf2uedata_HDR} ) add_executable(conf2uedata ${conf2uedata_SRC} )
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES}) target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
# usim binary # usim binary
...@@ -76,7 +64,7 @@ set(usim_SRC ...@@ -76,7 +64,7 @@ set(usim_SRC
) )
add_executable(usim ${usim_SRC} ${conf2uedata_HDR} ) add_executable(usim ${usim_SRC} )
target_link_libraries(usim ${CONFIG_LIBRARIES}) target_link_libraries(usim ${CONFIG_LIBRARIES})
# nvram binary # nvram binary
...@@ -87,5 +75,5 @@ set(nvram_SRC ...@@ -87,5 +75,5 @@ set(nvram_SRC
) )
add_executable(nvram ${nvram_SRC} ${conf2uedata_HDR} ) add_executable(nvram ${nvram_SRC})
target_link_libraries(nvram ${CONFIG_LIBRARIES}) target_link_libraries(nvram ${CONFIG_LIBRARIES})
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <platform_types.h> #include "common/platform_types.h"
#include "config_userapi.h" #include "config_userapi.h"
#include "config_common.h" #include "config_common.h"
#include "../utils/LOG/log.h" #include "../utils/LOG/log.h"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <errno.h> #include <errno.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <platform_types.h> #include "common/platform_types.h"
#include "config_common.h" #include "config_common.h"
#include "../utils/LOG/log.h" #include "../utils/LOG/log.h"
static int managed_ptr_sz(configmodule_interface_t *cfg, void *ptr) static int managed_ptr_sz(configmodule_interface_t *cfg, void *ptr)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <platform_types.h> #include "common/platform_types.h"
#define CONFIG_LOADCONFIG_MAIN #define CONFIG_LOADCONFIG_MAIN
#include "config_load_configmodule.h" #include "config_load_configmodule.h"
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <errno.h> #include <errno.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <platform_types.h> #include "common/platform_types.h"
#include "config_userapi.h" #include "config_userapi.h"
#include "config_common.h" #include "config_common.h"
#include "../utils/LOG/log.h" #include "../utils/LOG/log.h"
......
...@@ -89,7 +89,9 @@ ...@@ -89,7 +89,9 @@
#define NUM_MAX_CBA_GROUP 4 #define NUM_MAX_CBA_GROUP 4
#define printk printf #define printk printf
#define RETURNok (0)
#define RETURNerror (-1)
#define DEFAULT_NAS_PATH "PWD"
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE) #define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
#endif /* __PLATFORM_CONSTANTS_H__ */ #endif /* __PLATFORM_CONSTANTS_H__ */
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <platform_types.h> #include "common/platform_types.h"
#define OAI_EXIT_NORMAL 0 #define OAI_EXIT_NORMAL 0
#define OAI_EXIT_ASSERT 1 #define OAI_EXIT_ASSERT 1
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
* *
* In code: * In code:
* ``` * ```
* set_log(ASN1, OAI_INFO); // enable logging * set_log(ASN1, OAILOG_INFO); // enable logging
* // do your encoding here * // do your encoding here
* set_log(ASN1, OAI_ERR); // disable logging * set_log(ASN1, OAILOG_ERR); // disable logging
* ``` * ```
* *
* in gdb: * in gdb:
......
...@@ -19,42 +19,11 @@ ...@@ -19,42 +19,11 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/***************************************************************************** #include <stdio.h>
Source memory.c #include <stdlib.h>
#include <string.h>
Version 0.1 #include "common/utils/mem/oai_memory.h"
#include "common/utils/LOG/log.h"
Date 2012/10/09
Product NAS stack
Subsystem Utilities
Author Frederic Maurel
Description Memory access utilities
*****************************************************************************/
#include "memory.h"
#include "commonDef.h"
#include "nas_log.h"
#include <stdio.h> // fopen, fread, fclose
#include <stdlib.h> // getenv, malloc, free
#include <string.h> // strlen
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
/****************************************************************************/
/******************* L O C A L D E F I N I T I O N S *******************/
/****************************************************************************/
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/**************************************************************************** /****************************************************************************
** ** ** **
...@@ -85,13 +54,12 @@ char* memory_get_path(const char* dirname, const char* filename) ...@@ -85,13 +54,12 @@ char* memory_get_path(const char* dirname, const char* filename)
} }
if (path == NULL) { if (path == NULL) {
LOG_TRACE(WARNING, "MEMORY - %s and %s environment variables are not defined trying local directory", dirname, DEFAULT_NAS_PATH);
path = "."; path = ".";
} }
/* Append non-volatile data file name */ /* Append non-volatile data file name */
size_t size = strlen(path) + strlen(filename) + 1; size_t size = strlen(path) + strlen(filename) + 1;
char* data_filename = (char*)malloc(size+1); char* data_filename = (char*)malloc(size + 1);
if (data_filename != NULL) { if (data_filename != NULL) {
if (size != sprintf(data_filename, "%s/%s", path, filename)) { if (size != sprintf(data_filename, "%s/%s", path, filename)) {
...@@ -114,19 +82,17 @@ char* memory_get_path_from_ueid(const char* dirname, const char* filename, int u ...@@ -114,19 +82,17 @@ char* memory_get_path_from_ueid(const char* dirname, const char* filename, int u
} }
if (path == NULL) { if (path == NULL) {
LOG_TRACE(WARNING, "MEMORY - %s and %s environment variables are not defined trying local directory", dirname, DEFAULT_NAS_PATH);
path = "."; path = ".";
} }
/* Append non-volatile data file name */ /* Append non-volatile data file name */
if ( snprintf(buffer, sizeof(buffer), "%s/%s%d", path, filename, ueid) < 0 ) { if (snprintf(buffer, sizeof(buffer), "%s/%s%d", path, filename, ueid) < 0) {
return NULL; return NULL;
} }
return strdup(buffer); return strdup(buffer);
} }
/**************************************************************************** /****************************************************************************
** ** ** **
** Name: memory_read() ** ** Name: memory_read() **
...@@ -201,8 +167,3 @@ int memory_write(const char* datafile, const void* data, size_t size) ...@@ -201,8 +167,3 @@ int memory_write(const char* datafile, const void* data, size_t size)
return (rc); return (rc);
} }
/****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/
/****************************************************************************/
...@@ -19,42 +19,21 @@ ...@@ -19,42 +19,21 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*****************************************************************************
Source memory.h
Version 0.1
Date 2012/10/09
Product NAS stack
Subsystem Utilities
Author Frederic Maurel
Description Memory access utilities
*****************************************************************************/
#ifndef __MEMORY_H__ #ifndef __MEMORY_H__
#define __MEMORY_H__ #define __MEMORY_H__
#include <stddef.h> // size_t #include <stddef.h>
#include <stdint.h>
/****************************************************************************/ #include <stddef.h>
/********************* G L O B A L C O N S T A N T S *******************/ #ifdef __cplusplus
/****************************************************************************/ extern "C" {
#endif
/****************************************************************************/ #include "common/platform_constants.h"
/************************ G L O B A L T Y P E S ************************/ //-----------------------------------------------------------------------------
/****************************************************************************/
/****************************************************************************/ typedef unsigned char uint8_t;
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
/****************************************************************************/ //-----------------------------------------------------------------------------
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
char* memory_get_path(const char* dirname, const char* filename); char* memory_get_path(const char* dirname, const char* filename);
...@@ -64,4 +43,7 @@ int memory_read(const char* datafile, void* data, size_t size); ...@@ -64,4 +43,7 @@ int memory_read(const char* datafile, void* data, size_t size);
int memory_write(const char* datafile, const void* data, size_t size); int memory_write(const char* datafile, const void* data, size_t size);
#ifdef __cplusplus
}
#endif
#endif /* __MEMORY_H__*/ #endif /* __MEMORY_H__*/
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#define NR_NB_REG_PER_CCE 6 #define NR_NB_REG_PER_CCE 6
#define NR_NB_SC_PER_RB 12 #define NR_NB_SC_PER_RB 12
#define NR_MAX_NUM_LCID 32 #define NR_MAX_NUM_LCID 32
#define NR_MAX_NUM_QFI 64
typedef enum { typedef enum {
nr_FR1 = 0, nr_FR1 = 0,
......
...@@ -117,5 +117,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) { ...@@ -117,5 +117,11 @@ static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \ #define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \ TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
asn1cSeqAdd(&VaR,lOcPtr) asn1cSeqAdd(&VaR,lOcPtr)
#define asn1cFreeStruc(ASN_DEF, STRUCT) \
do { \
ASN_STRUCT_RESET(ASN_DEF, STRUCT); \
free(STRUCT); \
STRUCT = NULL; \
} while (0)
#endif #endif
...@@ -59,29 +59,6 @@ typedef struct timer_elm_s { ...@@ -59,29 +59,6 @@ typedef struct timer_elm_s {
static int nb_queues=0; static int nb_queues=0;
static pthread_mutex_t lock_nb_queues; static pthread_mutex_t lock_nb_queues;
void *pool_buffer_init (void) {
return 0;
}
void *pool_buffer_clean (void *arg) {
//-----------------------------------------------------------------------------
return 0;
}
void free_mem_block (mem_block_t *leP, const char *caller) {
AssertFatal(leP!=NULL,"");
free(leP);
}
mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller) {
mem_block_t *ptr=(mem_block_t *)malloc(sizeP+sizeof(mem_block_t));
ptr->next = NULL;
ptr->previous = NULL;
ptr->data=((unsigned char *)ptr)+sizeof(mem_block_t);
ptr->size=sizeP;
return ptr;
}
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) { void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) {
void *ptr = NULL; void *ptr = NULL;
AssertFatal ((ptr=calloc (size, 1)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n", AssertFatal ((ptr=calloc (size, 1)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n",
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
#include <stdint.h> #include <stdint.h>
#include <sys/epoll.h> #include <sys/epoll.h>
#include <mem_block.h>
#include <assertions.h> #include <assertions.h>
#include "common/utils/mem/oai_memory.h"
typedef enum timer_type_s { typedef enum timer_type_s {
TIMER_PERIODIC, TIMER_PERIODIC,
...@@ -62,7 +61,6 @@ typedef struct itti_lte_time_s { ...@@ -62,7 +61,6 @@ typedef struct itti_lte_time_s {
uint8_t slot; uint8_t slot;
} itti_lte_time_t; } itti_lte_time_t;
typedef struct IttiMsgEmpty_s { typedef struct IttiMsgEmpty_s {
// This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
// To be removed if the structure is filled // To be removed if the structure is filled
...@@ -552,7 +550,6 @@ void itti_set_task_real_time(task_id_t task_id); ...@@ -552,7 +550,6 @@ void itti_set_task_real_time(task_id_t task_id);
void itti_send_terminate_message(task_id_t task_id); void itti_send_terminate_message(task_id_t task_id);
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size); void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size);
int memory_read(const char *datafile, void *data, size_t size);
int itti_free(task_id_t task_id, void *ptr); int itti_free(task_id_t task_id, void *ptr);
int itti_init(task_id_t task_max, const task_info_t *tasks_info); int itti_init(task_id_t task_max, const task_info_t *tasks_info);
......
...@@ -1337,9 +1337,9 @@ INPUT = \ ...@@ -1337,9 +1337,9 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/memory.c \ @CMAKE_CURRENT_SOURCE_DIR@/../common/utils/mem/memory.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/OctetString.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/OctetString.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/memory.h \ @CMAKE_CURRENT_SOURCE_DIR@/../common/utils/mem/oai_memory.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_log.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_log.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVEncoder.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVEncoder.h \
...@@ -1771,7 +1771,6 @@ INPUT = \ ...@@ -1771,7 +1771,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_models.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_models.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_externs.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_externs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_config.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_config.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MEM/mem_block.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_ue_context_management.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_ue_context_management.c \
...@@ -1836,7 +1835,7 @@ INPUT = \ ...@@ -1836,7 +1835,7 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_def.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/platform_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../common/platform_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_types.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_types.h \
......
...@@ -152,9 +152,11 @@ In the CU file: ...@@ -152,9 +152,11 @@ In the CU file:
In the DU file: In the DU file:
- Set `MACRLCs.[0].tr_n_preference` to `f1` - Set `MACRLCs.[0].tr_n_preference` to `f1`
- Update `MACRLCs.[0].local_n_address` (local north-bound address of the DU) to - Update `MACRLCs.[0].local_n_address` (local north-bound address of the DU) to
`127.0.0.4` `127.0.0.4`. This IP address is used to bind the GTP socket (F1-U user plane
traffic).
- Update `MACRLCs.[].remote_n_address` (remote north-bound address of the CU) - Update `MACRLCs.[].remote_n_address` (remote north-bound address of the CU)
to `127.0.0.3` to `127.0.0.3`. This IP address is used as the CU destination IP address for
F1AP communication.
Note: all `local_*_if_name` parameters are ignored. Note: all `local_*_if_name` parameters are ignored.
......
...@@ -69,12 +69,12 @@ sudo python3 ~/dpdk-stable/usertools/dpdk-hugepages.py -p 1G --setup 10G` ...@@ -69,12 +69,12 @@ sudo python3 ~/dpdk-stable/usertools/dpdk-hugepages.py -p 1G --setup 10G`
the host machine* the host machine*
# Modifications in the OAI code # Modifications in the OAI code
## PMD path specification ## DPDK lib and PMD path specification
Path to the PMD for operating the card is specified in `CMakeLists.txt` file in Path to the DPDK lib and Accelercomm PMD for operating the card is specified in the `CMakeLists.txt` file, in
*LDPC OFFLOAD library* section. Modify following line based on the location of *LDPC OFFLOAD library* section. Modify following line based on the location of
the PMD on your system. By deafult, path to the PMD is set to `/opt/dpdk-t2/lib/x86_64-linux-gnu/`. `libdpdk.pc` file associated with the target DPDK library on your system. By default, the path is set to `/usr/local/lib/x86_64-linux-gnu/pkgconfig`.
``` ```
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS "/opt/dpdk-t2/lib/x86_64-linux-gnu/") set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig")
``` ```
## T2 card DPDK initialization ## T2 card DPDK initialization
...@@ -144,7 +144,6 @@ sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa ...@@ -144,7 +144,6 @@ sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa
# Limitations # Limitations
## AMD Xilinx T2 card ## AMD Xilinx T2 card
- offload of the LDPC encoding implemented for MCS > 2, OAI CPU encoder is used for MCS =< 2
- functionality of the LDPC encoding and decoding offload verified in OTA SISO setup with USRP N310 and Quectel RM500Q, blocking of the card reported for MIMO setup (2 layers) - functionality of the LDPC encoding and decoding offload verified in OTA SISO setup with USRP N310 and Quectel RM500Q, blocking of the card reported for MIMO setup (2 layers)
*Note: AMD Xilinx T1 Telco card is not supported anymore.* *Note: AMD Xilinx T1 Telco card is not supported anymore.*
...@@ -44,6 +44,8 @@ RUN apt-get update && \ ...@@ -44,6 +44,8 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required # if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan5 \ libasan5 \
iproute2 \
net-tools \
libubsan1 \ libubsan1 \
liblapacke; fi' && \ liblapacke; fi' && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
......
...@@ -71,7 +71,7 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const pc, ...@@ -71,7 +71,7 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const pc,
const mui_t mui, const mui_t mui,
const confirm_t c, const confirm_t c,
const sdu_size_t size, const sdu_size_t size,
mem_block_t *const buf, uint8_t *const buf,
const uint32_t *const a, const uint32_t *const a,
const uint32_t *const b) const uint32_t *const b)
{ {
......
...@@ -896,35 +896,43 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { ...@@ -896,35 +896,43 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
else //FDD else //FDD
cfg->duplex_mode = duplex_mode_FDD; cfg->duplex_mode = duplex_mode_FDD;
cfg->configFilename = rf_config_file;
cfg->Mod_id = 0; cfg->Mod_id = 0;
cfg->num_rb_dl=N_RB; cfg->num_rb_dl=N_RB;
cfg->tx_num_channels=ru->nb_tx; cfg->tx_num_channels=ru->nb_tx;
cfg->rx_num_channels=ru->nb_rx; cfg->rx_num_channels=ru->nb_rx;
LOG_I(PHY,"Setting RF config for N_RB %d, NB_RX %d, NB_TX %d\n",cfg->num_rb_dl,cfg->rx_num_channels,cfg->tx_num_channels); LOG_I(PHY,"Setting RF config for N_RB %d, NB_RX %d, NB_TX %d\n",cfg->num_rb_dl,cfg->rx_num_channels,cfg->tx_num_channels);
LOG_I(PHY,"tune_offset %.0f Hz, sample_rate %.0f Hz\n",cfg->tune_offset,cfg->sample_rate);
for (i=0; i<ru->nb_tx; i++) { for (i=0; i<ru->nb_tx; i++) {
if (ru->if_frequency == 0) { if (ru->if_frequency == 0) {
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq; cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
} else if (ru->if_freq_offset) { } else if (ru->if_freq_offset) {
cfg->tx_freq[i] = (double)(ru->if_frequency); cfg->tx_freq[i] = (double)(ru->if_frequency);
cfg->rx_freq[i] = (double)(ru->if_frequency + ru->if_freq_offset); LOG_I(PHY, "Setting IF TX frequency to %lu Hz with IF TX frequency offset %d Hz\n", ru->if_frequency, ru->if_freq_offset);
LOG_I(PHY, "Setting IF TX frequency to %lu Hz with IF RX frequency offset %d Hz\n", ru->if_frequency, ru->if_freq_offset);
} else { } else {
cfg->tx_freq[i] = (double)ru->if_frequency; cfg->tx_freq[i] = (double)ru->if_frequency;
cfg->rx_freq[i] = (double)(ru->if_frequency+fp->ul_CarrierFreq-fp->dl_CarrierFreq);
} }
cfg->tx_gain[i] = ru->att_tx; cfg->tx_gain[i] = ru->att_tx;
LOG_I(PHY, "Channel %d: setting tx_gain offset %.0f, tx_freq %.0f Hz\n",
i, cfg->tx_gain[i],cfg->tx_freq[i]);
}
for (i=0; i<ru->nb_rx; i++) {
if (ru->if_frequency == 0) {
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
} else if (ru->if_freq_offset) {
cfg->rx_freq[i] = (double)(ru->if_frequency + ru->if_freq_offset);
LOG_I(PHY, "Setting IF RX frequency to %lu Hz with IF RX frequency offset %d Hz\n", ru->if_frequency, ru->if_freq_offset);
} else {
cfg->rx_freq[i] = (double)(ru->if_frequency+fp->ul_CarrierFreq-fp->dl_CarrierFreq);
}
cfg->rx_gain[i] = ru->max_rxgain-ru->att_rx; cfg->rx_gain[i] = ru->max_rxgain-ru->att_rx;
cfg->configFilename = rf_config_file; LOG_I(PHY, "Channel %d: setting rx_gain offset %.0f, rx_freq %.0f Hz\n",
LOG_I(PHY, "Channel %d: setting tx_gain offset %.0f, rx_gain offset %.0f, tx_freq %.0f Hz, rx_freq %.0f Hz, tune_offset %.0f Hz, sample_rate %.0f Hz\n", i,cfg->rx_gain[i],cfg->rx_freq[i]);
i, cfg->tx_gain[i],
cfg->rx_gain[i],
cfg->tx_freq[i],
cfg->rx_freq[i],
cfg->tune_offset,
cfg->sample_rate);
} }
} }
......
...@@ -402,6 +402,7 @@ static void trigger_deregistration(int sig) ...@@ -402,6 +402,7 @@ static void trigger_deregistration(int sig)
{ {
if (!stop_immediately) { if (!stop_immediately) {
MessageDef *msg = itti_alloc_new_message(TASK_RRC_UE_SIM, 0, NAS_DEREGISTRATION_REQ); MessageDef *msg = itti_alloc_new_message(TASK_RRC_UE_SIM, 0, NAS_DEREGISTRATION_REQ);
NAS_DEREGISTRATION_REQ(msg).cause = AS_DETACH;
itti_send_msg_to_task(TASK_NAS_NRUE, 0, msg); itti_send_msg_to_task(TASK_NAS_NRUE, 0, msg);
stop_immediately = true; stop_immediately = true;
static const char m[] = "Press ^C again to trigger immediate shutdown\n"; static const char m[] = "Press ^C again to trigger immediate shutdown\n";
...@@ -425,6 +426,28 @@ static void get_channel_model_mode(configmodule_interface_t *cfg) ...@@ -425,6 +426,28 @@ static void get_channel_model_mode(configmodule_interface_t *cfg)
init_bler_table("NR_AWGN_RESULTS_DIR"); init_bler_table("NR_AWGN_RESULTS_DIR");
} }
void start_oai_nrue_threads()
{
init_queue(&nr_rach_ind_queue);
init_queue(&nr_rx_ind_queue);
init_queue(&nr_crc_ind_queue);
init_queue(&nr_uci_ind_queue);
init_queue(&nr_sfn_slot_queue);
init_queue(&nr_chan_param_queue);
init_queue(&nr_dl_tti_req_queue);
init_queue(&nr_tx_req_queue);
init_queue(&nr_ul_dci_req_queue);
init_queue(&nr_ul_tti_req_queue);
if (sem_init(&sfn_slot_semaphore, 0, 0) != 0)
{
LOG_E(MAC, "sem_init() error\n");
abort();
}
init_nrUE_standalone_thread(ue_id_g);
}
int NB_UE_INST = 1; int NB_UE_INST = 1;
configmodule_interface_t *uniqCfg = NULL; configmodule_interface_t *uniqCfg = NULL;
......
...@@ -97,7 +97,7 @@ extern void init_NR_UE(int, char *, char *, char *); ...@@ -97,7 +97,7 @@ extern void init_NR_UE(int, char *, char *, char *);
extern void init_NR_UE_threads(int); extern void init_NR_UE_threads(int);
extern void reset_opp_meas(void); extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
extern void start_oai_nrue_threads(void); void start_oai_nrue_threads(void);
void *UE_thread(void *arg); void *UE_thread(void *arg);
void init_nr_ue_vars(PHY_VARS_NR_UE *ue, uint8_t UE_id, uint8_t abstraction_flag); void init_nr_ue_vars(PHY_VARS_NR_UE *ue, uint8_t UE_id, uint8_t abstraction_flag);
void init_nrUE_standalone_thread(int ue_idx); void init_nrUE_standalone_thread(int ue_idx);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <pthread.h> #include <pthread.h>
#include "stddef.h" #include "stddef.h"
#include "platform_types.h" #include "common/platform_types.h"
#include "fapi_nr_ue_constants.h" #include "fapi_nr_ue_constants.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_nr.h" #include "PHY/impl_defs_nr.h"
...@@ -662,7 +662,8 @@ typedef struct ...@@ -662,7 +662,8 @@ typedef struct
typedef struct typedef struct
{ {
uint8_t prach_sequence_length;//RACH sequence length. Only short sequence length is supported for FR2. [38.211, sec 6.3.3.1] Value: 0 = Long sequence 1 = Short sequence uint8_t prach_sequence_length;//RACH sequence length. Only short sequence length is supported for FR2. [38.211, sec 6.3.3.1] Value: 0 = Long sequence 1 = Short sequence
uint8_t prach_sub_c_spacing;//Subcarrier spacing of PRACH. [38.211 sec 4.2] Value:0->4 uint8_t prach_sub_c_spacing; // Subcarrier spacing of PRACH. [38.211 sec 4.2] Value: 0: 15 kHz 1: 30 kHz 2: 60 kHz 3: 120 kHz
// 4: 1.25 kHz 5: 5 kHz
uint8_t restricted_set_config;//PRACH restricted set config Value: 0: unrestricted 1: restricted set type A 2: restricted set type B uint8_t restricted_set_config;//PRACH restricted set config Value: 0: unrestricted 1: restricted set type A 2: restricted set type B
uint8_t num_prach_fd_occasions;//Corresponds to the parameter 𝑀 in [38.211, sec 6.3.3.2] which equals the higher layer parameter msg1FDM Value: 1,2,4,8 uint8_t num_prach_fd_occasions;//Corresponds to the parameter 𝑀 in [38.211, sec 6.3.3.2] which equals the higher layer parameter msg1FDM Value: 1,2,4,8
fapi_nr_num_prach_fd_occasions_t* num_prach_fd_occasions_list; fapi_nr_num_prach_fd_occasions_t* num_prach_fd_occasions_list;
...@@ -672,7 +673,7 @@ typedef struct ...@@ -672,7 +673,7 @@ typedef struct
} fapi_nr_prach_config_t; } fapi_nr_prach_config_t;
typedef struct { typedef struct {
uint16_t target_Nid_cell; int16_t target_Nid_cell;
} fapi_nr_synch_request_t; } fapi_nr_synch_request_t;
typedef struct { typedef struct {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "pnf.h" #include "pnf.h"
# if 1 // for hard-code (remove later) # if 1 // for hard-code (remove later)
#include "COMMON/platform_types.h" #include "common/platform_types.h"
#include "common/platform_constants.h" #include "common/platform_constants.h"
#include "common/ran_context.h" #include "common/ran_context.h"
......
...@@ -543,8 +543,8 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops, unsigned int n, ...@@ -543,8 +543,8 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops, unsigned int n,
} }
LOG_D(PHY,"ULSCH %02d HARQPID %02d R %02d COMBIN %d RV %d NCB %05d \n", ulsch_id, harq_pid, r, p_offloadParams->setCombIn, p_offloadParams->rv, p_offloadParams->n_cb); LOG_D(PHY,"ULSCH %02d HARQPID %02d R %02d COMBIN %d RV %d NCB %05d \n", ulsch_id, harq_pid, r, p_offloadParams->setCombIn, p_offloadParams->rv, p_offloadParams->n_cb);
ops[i]->ldpc_dec.code_block_mode = 1; // ldpc_dec->code_block_mode; ops[i]->ldpc_dec.code_block_mode = 1; // ldpc_dec->code_block_mode;
ops[i]->ldpc_dec.harq_combined_input.offset = ulsch_id * 64 * BBDEV_LDPC_MAX_E + r * BBDEV_LDPC_MAX_E; ops[i]->ldpc_dec.harq_combined_input.offset = ulsch_id * 64 * LDPC_MAX_CB_SIZE + r * LDPC_MAX_CB_SIZE;
ops[i]->ldpc_dec.harq_combined_output.offset = ulsch_id * 64 * BBDEV_LDPC_MAX_E + r * BBDEV_LDPC_MAX_E; ops[i]->ldpc_dec.harq_combined_output.offset = ulsch_id * 64 * LDPC_MAX_CB_SIZE + r * LDPC_MAX_CB_SIZE;
if (bufs->hard_outputs != NULL) if (bufs->hard_outputs != NULL)
ops[i]->ldpc_dec.hard_output = bufs->hard_outputs[start_idx + i]; ops[i]->ldpc_dec.hard_output = bufs->hard_outputs[start_idx + i];
if (bufs->inputs != NULL) if (bufs->inputs != NULL)
...@@ -575,7 +575,7 @@ static void set_ldpc_enc_op(struct rte_bbdev_enc_op **ops, ...@@ -575,7 +575,7 @@ static void set_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
ops[i]->ldpc_enc.n_filler = p_offloadParams->F; ops[i]->ldpc_enc.n_filler = p_offloadParams->F;
ops[i]->ldpc_enc.n_cb = p_offloadParams->n_cb; ops[i]->ldpc_enc.n_cb = p_offloadParams->n_cb;
ops[i]->ldpc_enc.rv_index = p_offloadParams->rv; ops[i]->ldpc_enc.rv_index = p_offloadParams->rv;
ops[i]->ldpc_enc.op_flags = RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | RTE_BBDEV_LDPC_RATE_MATCH; ops[i]->ldpc_enc.op_flags = RTE_BBDEV_LDPC_RATE_MATCH;
ops[i]->ldpc_enc.code_block_mode = 1; ops[i]->ldpc_enc.code_block_mode = 1;
ops[i]->ldpc_enc.output = outputs[start_idx + i]; ops[i]->ldpc_enc.output = outputs[start_idx + i];
ops[i]->ldpc_enc.input = inputs[start_idx + i]; ops[i]->ldpc_enc.input = inputs[start_idx + i];
...@@ -613,7 +613,7 @@ static int retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n, ...@@ -613,7 +613,7 @@ static int retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n,
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
output = &ops[i]->ldpc_enc.output; output = &ops[i]->ldpc_enc.output;
m = output->data; m = output->data;
uint16_t data_len = min((BBDEV_LDPC_MAX_E) / 8, rte_pktmbuf_data_len(m)); // fix me uint16_t data_len = min((LDPC_MAX_CB_SIZE) / 8, rte_pktmbuf_data_len(m)); // fix me
data = m->buf_addr; data = m->buf_addr;
for (int byte = 0; byte < data_len; byte++) for (int byte = 0; byte < data_len; byte++)
for (int bit = 0; bit < 8; bit++) for (int bit = 0; bit < 8; bit++)
...@@ -968,7 +968,7 @@ int32_t LDPCinit() ...@@ -968,7 +968,7 @@ int32_t LDPCinit()
int socket_id = GET_SOCKET(info.socket_id); int socket_id = GET_SOCKET(info.socket_id);
int out_max_sz = 8448; // max code block size (for BG1), 22 * 384 int out_max_sz = 8448; // max code block size (for BG1), 22 * 384
int in_max_sz = BBDEV_LDPC_MAX_E; // max number of encoded bits (for BG2 and MCS0) int in_max_sz = LDPC_MAX_CB_SIZE; // max number of encoded bits (for BG2 and MCS0)
int num_ops = 1; int num_ops = 1;
int f_ret = create_mempools(ad, socket_id, num_ops, out_max_sz, in_max_sz); int f_ret = create_mempools(ad, socket_id, num_ops, out_max_sz, in_max_sz);
if (f_ret != TEST_SUCCESS) { if (f_ret != TEST_SUCCESS) {
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#ifndef _NRLDPC_EXTERN_H__ #ifndef _NRLDPC_EXTERN_H__
#define _NRLDPC_EXTERN_H__ #define _NRLDPC_EXTERN_H__
#include "openair1/PHY/CODING/nrLDPC_defs.h" #include "openair1/PHY/CODING/nrLDPC_defs.h"
/* LDPC maximum code block size - maximum E */
#define BBDEV_LDPC_MAX_E 32768 #define LDPC_MAX_CB_SIZE 32768
/* ldpc coder/decoder API*/ /* ldpc coder/decoder API*/
typedef struct ldpc_interface_s { typedef struct ldpc_interface_s {
LDPC_initfunc_t *LDPCinit; LDPC_initfunc_t *LDPCinit;
......
...@@ -30,27 +30,27 @@ const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits) ...@@ -30,27 +30,27 @@ const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits)
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize]; uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits*sizeof(uint8_t *) + payloadSizeBits*crcPolynomialSize*sizeof(uint8_t)); uint8_t **crc_generator_matrix = malloc(payloadSizeBits*sizeof(uint8_t *) + payloadSizeBits*crcPolynomialSize*sizeof(uint8_t));
if (crc_generator_matrix) if (crc_generator_matrix)
for (int i = 0; i < payloadSizeBits; i++) for (int i = 0; i < payloadSizeBits; i++)
crc_generator_matrix[i] = ((uint8_t*)&crc_generator_matrix[payloadSizeBits])+i*crcPolynomialSize; crc_generator_matrix[i] = ((uint8_t *)&crc_generator_matrix[payloadSizeBits]) + i * crcPolynomialSize;
for (int i = 0; i < crcPolynomialSize; i++) for (int i = 0; i < crcPolynomialSize; i++)
crc_generator_matrix[payloadSizeBits-1][i]=crcPolynomialPattern[i+1]; crc_generator_matrix[payloadSizeBits - 1][i] = crcPolynomialPattern[i + 1];
for (int i = payloadSizeBits-2; i >= 0; i--){ for (int i = payloadSizeBits - 2; i >= 0; i--) {
for (int j = 0; j < crcPolynomialSize-1; j++) temp1[j]=crc_generator_matrix[i+1][j+1]; for (int j = 0; j < crcPolynomialSize-1; j++) temp1[j]=crc_generator_matrix[i+1][j+1];
temp1[crcPolynomialSize-1]=0; temp1[crcPolynomialSize - 1] = 0;
for (int j = 0; j < crcPolynomialSize; j++) for (int j = 0; j < crcPolynomialSize; j++)
temp2[j]=crc_generator_matrix[i+1][0]*crcPolynomialPattern[j+1]; temp2[j] = crc_generator_matrix[i + 1][0] * crcPolynomialPattern[j + 1];
for (int j = 0; j < crcPolynomialSize; j++){ for (int j = 0; j < crcPolynomialSize; j++) {
if(temp1[j]+temp2[j] == 1) if(temp1[j]+temp2[j] == 1)
crc_generator_matrix[i][j]=1; crc_generator_matrix[i][j]=1;
else else
crc_generator_matrix[i][j]=0; crc_generator_matrix[i][j]=0;
} }
} }
return (const uint8_t **)crc_generator_matrix; return (const uint8_t **)crc_generator_matrix;
} }
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* \email raymond.knopp@eurecom.fr, turker.yilmaz@eurecom.fr * \email raymond.knopp@eurecom.fr, turker.yilmaz@eurecom.fr
* \note * \note
* \warning * \warning
*/ */
/* /*
* Return values: * Return values:
...@@ -68,13 +68,13 @@ int8_t polar_decoder(double *input, ...@@ -68,13 +68,13 @@ int8_t polar_decoder(double *input,
{ {
t_nrPolar_params *polarParams=nr_polar_params(messageType, messageLength, aggregation_level, true); t_nrPolar_params *polarParams=nr_polar_params(messageType, messageLength, aggregation_level, true);
//Assumes no a priori knowledge. //Assumes no a priori knowledge.
uint8_t bit[polarParams->N][polarParams->n+1][2*listSize]; uint8_t bit[polarParams->N][polarParams->n + 1][2 * listSize];
memset(bit,0,sizeof bit); memset(bit, 0, sizeof bit);
uint8_t bitUpdated[polarParams->N][polarParams->n+1]; //0=False, 1=True uint8_t bitUpdated[polarParams->N][polarParams->n+1]; //0=False, 1=True
memset(bitUpdated,0,sizeof bitUpdated); memset(bitUpdated,0,sizeof bitUpdated);
uint8_t llrUpdated[polarParams->N][polarParams->n+1]; //0=False, 1=True uint8_t llrUpdated[polarParams->N][polarParams->n+1]; //0=False, 1=True
memset(llrUpdated,0,sizeof llrUpdated); memset(llrUpdated,0,sizeof llrUpdated);
double llr[polarParams->N][polarParams->n+1][2*listSize]; double llr[polarParams->N][polarParams->n + 1][2 * listSize];
uint8_t crcChecksum[polarParams->crcParityBits][2*listSize]; uint8_t crcChecksum[polarParams->crcParityBits][2*listSize];
memset(crcChecksum,0,sizeof crcChecksum); memset(crcChecksum,0,sizeof crcChecksum);
double pathMetric[2*listSize]; double pathMetric[2*listSize];
...@@ -127,7 +127,8 @@ int8_t polar_decoder(double *input, ...@@ -127,7 +127,8 @@ int8_t polar_decoder(double *input,
double d_tilde[polarParams->N]; double d_tilde[polarParams->N];
nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength);
for (int j = 0; j < polarParams->N; j++) llr[j][polarParams->n][0]=d_tilde[j]; for (int j = 0; j < polarParams->N; j++)
llr[j][polarParams->n][0] = d_tilde[j];
/* /*
* SCL polar decoder. * SCL polar decoder.
...@@ -139,48 +140,56 @@ int8_t polar_decoder(double *input, ...@@ -139,48 +140,56 @@ int8_t polar_decoder(double *input,
uint8_t listIndex[2*listSize], copyIndex; uint8_t listIndex[2*listSize], copyIndex;
for (uint16_t currentBit=0; currentBit<polarParams->N; currentBit++) { for (uint16_t currentBit=0; currentBit<polarParams->N; currentBit++) {
updateLLR(currentListSize, currentBit, 0, polarParams->N, polarParams->n+1, 2*listSize, llr, llrUpdated, bit, bitUpdated); updateLLR(currentListSize, currentBit, 0, polarParams->N, polarParams->n + 1, 2 * listSize, llr, llrUpdated, bit, bitUpdated);
if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit.
updatePathMetric(pathMetric, currentListSize, 0, currentBit, polarParams->N, polarParams->n+1, 2*listSize, llr); updatePathMetric(pathMetric, currentListSize, 0, currentBit, polarParams->N, polarParams->n + 1, 2 * listSize, llr);
} else { //Information or CRC bit. } else { //Information or CRC bit.
updatePathMetric2(pathMetric, currentListSize, currentBit, polarParams->N, polarParams->n+1, 2*listSize, llr); updatePathMetric2(pathMetric, currentListSize, currentBit, polarParams->N, polarParams->n + 1, 2 * listSize, llr);
for (int i = 0; i < currentListSize; i++) { for (int i = 0; i < currentListSize; i++) {
for (int j = 0; j < polarParams->N; j++) { for (int j = 0; j < polarParams->N; j++) {
for (int k = 0; k < (polarParams->n+1); k++) { for (int k = 0; k < (polarParams->n + 1); k++) {
bit[j][k][i+currentListSize]=bit[j][k][i]; bit[j][k][i + currentListSize] = bit[j][k][i];
llr[j][k][i+currentListSize]=llr[j][k][i]; llr[j][k][i + currentListSize] = llr[j][k][i];
} }
} }
} }
for (int i = 0; i < currentListSize; i++) { for (int i = 0; i < currentListSize; i++) {
bit[currentBit][0][i]=0; bit[currentBit][0][i] = 0;
crcState[i+currentListSize]=crcState[i]; crcState[i + currentListSize] = crcState[i];
} }
for (int i = currentListSize; i < 2*currentListSize; i++) bit[currentBit][0][i]=1;
bitUpdated[currentBit][0]=1;
updateCrcChecksum2(polarParams->crcParityBits, 2*listSize, crcChecksum,
polarParams->K, polarParams->crcParityBits, extended_crc_generator_matrix,
currentListSize, nonFrozenBit, polarParams->crcParityBits);
currentListSize*=2;
//Keep only the best "listSize" number of entries. for (int i = currentListSize; i < 2 * currentListSize; i++)
bit[currentBit][0][i] = 1;
bitUpdated[currentBit][0] = 1;
updateCrcChecksum2(polarParams->crcParityBits,
2 * listSize,
crcChecksum,
polarParams->K,
polarParams->crcParityBits,
extended_crc_generator_matrix,
currentListSize,
nonFrozenBit,
polarParams->crcParityBits);
currentListSize *= 2;
// Keep only the best "listSize" number of entries.
if (currentListSize > listSize) { if (currentListSize > listSize) {
for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; for (uint8_t i = 0; i < 2 * listSize; i++)
listIndex[i] = i;
nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize);
//sort listIndex[listSize, ..., 2*listSize-1] in descending order. // sort listIndex[listSize, ..., 2*listSize-1] in descending order.
uint8_t swaps, tempInd; uint8_t swaps, tempInd;
for (uint8_t i = 0; i < listSize; i++) { for (uint8_t i = 0; i < listSize; i++) {
swaps = 0; swaps = 0;
for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { for (uint8_t j = listSize; j < (2 * listSize - i) - 1; j++) {
if (listIndex[j+1] > listIndex[j]) { if (listIndex[j + 1] > listIndex[j]) {
tempInd = listIndex[j]; tempInd = listIndex[j];
listIndex[j] = listIndex[j + 1]; listIndex[j] = listIndex[j + 1];
listIndex[j + 1] = tempInd; listIndex[j + 1] = tempInd;
...@@ -196,8 +205,8 @@ int8_t polar_decoder(double *input, ...@@ -196,8 +205,8 @@ int8_t polar_decoder(double *input,
for (int k=(listSize-1); k>0; k--) { for (int k=(listSize-1); k>0; k--) {
for (int i=0; i<polarParams->N; i++) { for (int i=0; i<polarParams->N; i++) {
for (int j=0; j<(polarParams->n+1); j++) { for (int j=0; j<(polarParams->n+1); j++) {
bit[i][j][listIndex[(2*listSize-1)-k]]=bit[i][j][listIndex[k]]; bit[i][j][listIndex[(2 * listSize - 1) - k]] = bit[i][j][listIndex[k]];
llr[i][j][listIndex[(2*listSize-1)-k]]=llr[i][j][listIndex[k]]; llr[i][j][listIndex[(2 * listSize - 1) - k]] = llr[i][j][listIndex[k]];
} }
} }
} }
...@@ -285,7 +294,8 @@ int8_t polar_decoder(double *input, ...@@ -285,7 +294,8 @@ int8_t polar_decoder(double *input,
for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) {
if ( crcState[listIndex[i]] == 1 ) { if ( crcState[listIndex[i]] == 1 ) {
for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_U[j]=bit[j][0][listIndex[i]]; for (int j = 0; j < polarParams->N; j++)
polarParams->nr_polar_U[j] = bit[j][0][listIndex[i]];
//Extract the information bits (û to ĉ) //Extract the information bits (û to ĉ)
nr_polar_info_bit_extraction(polarParams->nr_polar_U, polarParams->nr_polar_CPrime, polarParams->information_bit_pattern, polarParams->N); nr_polar_info_bit_extraction(polarParams->nr_polar_U, polarParams->nr_polar_CPrime, polarParams->information_bit_pattern, polarParams->N);
...@@ -626,7 +636,7 @@ uint32_t polar_decoder_int16(int16_t *input, ...@@ -626,7 +636,7 @@ uint32_t polar_decoder_int16(int16_t *input,
printf("\n"); printf("\n");
#endif #endif
int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); int16_t d_tilde[polarParams->N];
nr_polar_rate_matching_int16(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength, polarParams->i_bil); nr_polar_rate_matching_int16(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength, polarParams->i_bil);
for (int i=0; i<polarParams->N; i++) { for (int i=0; i<polarParams->N; i++) {
...@@ -687,14 +697,9 @@ uint32_t polar_decoder_int16(int16_t *input, ...@@ -687,14 +697,9 @@ uint32_t polar_decoder_int16(int16_t *input,
uint64_t B[4] = {0}; uint64_t B[4] = {0};
if (polarParams->K<65) { if (polarParams->K<65) {
B[0] = polarParams->B_tab0[0][Cprimebyte[0]] | B[0] = polarParams->B_tab0[0][Cprimebyte[0]] | polarParams->B_tab0[1][Cprimebyte[1]] | polarParams->B_tab0[2][Cprimebyte[2]]
polarParams->B_tab0[1][Cprimebyte[1]] | | polarParams->B_tab0[3][Cprimebyte[3]] | polarParams->B_tab0[4][Cprimebyte[4]] | polarParams->B_tab0[5][Cprimebyte[5]]
polarParams->B_tab0[2][Cprimebyte[2]] | | polarParams->B_tab0[6][Cprimebyte[6]] | polarParams->B_tab0[7][Cprimebyte[7]];
polarParams->B_tab0[3][Cprimebyte[3]] |
polarParams->B_tab0[4][Cprimebyte[4]] |
polarParams->B_tab0[5][Cprimebyte[5]] |
polarParams->B_tab0[6][Cprimebyte[6]] |
polarParams->B_tab0[7][Cprimebyte[7]];
} else if (polarParams->K<129) { } else if (polarParams->K<129) {
int len = polarParams->K/8; int len = polarParams->K/8;
......
...@@ -45,20 +45,23 @@ static inline void updateBit(uint8_t listSize, ...@@ -45,20 +45,23 @@ static inline void updateBit(uint8_t listSize,
uint8_t bit[xlen][ylen][zlen], uint8_t bit[xlen][ylen][zlen],
uint8_t bitU[xlen][ylen]) uint8_t bitU[xlen][ylen])
{ {
uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); uint16_t offset = (xlen / (pow(2, (ylen - col))));
for (uint8_t i=0; i<listSize; i++) { for (uint8_t i = 0; i < listSize; i++) {
if (( (row) % (2*offset) ) >= offset ) { if (((row) % (2 * offset)) >= offset) {
if (bitU[row][col-1]==0) updateBit(listSize, row, (col-1), xlen, ylen, zlen, bit, bitU); if (bitU[row][col - 1] == 0)
bit[row][col][i] = bit[row][col-1][i]; updateBit(listSize, row, (col - 1), xlen, ylen, zlen, bit, bitU);
} else { bit[row][col][i] = bit[row][col - 1][i];
if (bitU[row][col-1]==0) updateBit(listSize, row, (col-1), xlen, ylen, zlen, bit, bitU); } else {
if (bitU[row+offset][col-1]==0) updateBit(listSize, (row+offset), (col-1), xlen, ylen, zlen, bit, bitU); if (bitU[row][col - 1] == 0)
bit[row][col][i] = ( (bit[row][col-1][i]+bit[row+offset][col-1][i]) % 2); updateBit(listSize, row, (col - 1), xlen, ylen, zlen, bit, bitU);
} if (bitU[row + offset][col - 1] == 0)
} updateBit(listSize, (row + offset), (col - 1), xlen, ylen, zlen, bit, bitU);
bit[row][col][i] = ((bit[row][col - 1][i] + bit[row + offset][col - 1][i]) % 2);
}
}
bitU[row][col]=1; bitU[row][col] = 1;
} }
static inline void computeLLR(uint16_t row, static inline void computeLLR(uint16_t row,
...@@ -75,35 +78,38 @@ static inline void computeLLR(uint16_t row, ...@@ -75,35 +78,38 @@ static inline void computeLLR(uint16_t row,
llr[row][col][i] = log((exp(a + b) + 1) / (exp(a) + exp(b))); //eq. (8a) llr[row][col][i] = log((exp(a + b) + 1) / (exp(a) + exp(b))); //eq. (8a)
} }
void updateLLR(uint8_t listSize, void updateLLR(uint8_t listSize,
uint16_t row, uint16_t row,
uint16_t col, uint16_t col,
uint16_t xlen, uint16_t xlen,
uint8_t ylen, uint8_t ylen,
int zlen, int zlen,
double llr[xlen][ylen][zlen], double llr[xlen][ylen][zlen],
uint8_t llrU[xlen][ylen], uint8_t llrU[xlen][ylen],
uint8_t bit[xlen][ylen][zlen], uint8_t bit[xlen][ylen][zlen],
uint8_t bitU[xlen][ylen] uint8_t bitU[xlen][ylen])
)
{ {
uint16_t offset = (xlen/(pow(2,(ylen-col-1)))); uint16_t offset = (xlen / (pow(2, (ylen - col - 1))));
for (uint8_t i=0; i<listSize; i++) { for (uint8_t i = 0; i < listSize; i++) {
if (( (row) % (2*offset) ) >= offset ) { if ((row % (2 * offset)) >= offset) {
if(bitU[row-offset][col]==0) updateBit(listSize, (row-offset), col, xlen, ylen, zlen, bit, bitU); if (bitU[row - offset][col] == 0)
if(llrU[row-offset][col+1]==0) updateLLR(listSize, (row-offset), (col+1), xlen, ylen, zlen, llr, llrU, bit, bitU ); updateBit(listSize, (row - offset), col, xlen, ylen, zlen, bit, bitU);
if(llrU[row][col+1]==0) updateLLR(listSize, row, (col+1), xlen, ylen, zlen, llr, llrU, bit, bitU); if (llrU[row - offset][col + 1] == 0)
llr[row][col][i] = (pow((-1),bit[row-offset][col][i])*llr[row-offset][col+1][i]) + llr[row][col+1][i]; updateLLR(listSize, (row - offset), (col + 1), xlen, ylen, zlen, llr, llrU, bit, bitU);
} else { if (llrU[row][col + 1] == 0)
if(llrU[row][col+1]==0) updateLLR(listSize, row, (col+1), xlen, ylen, zlen, llr, llrU, bit, bitU ); updateLLR(listSize, row, (col + 1), xlen, ylen, zlen, llr, llrU, bit, bitU);
if(llrU[row+offset][col+1]==0) updateLLR(listSize, (row+offset), (col+1), xlen, ylen, zlen, llr, llrU, bit, bitU ); llr[row][col][i] = (pow((-1), bit[row - offset][col][i]) * llr[row - offset][col + 1][i]) + llr[row][col + 1][i];
computeLLR(row, col, i, offset, xlen, ylen, zlen, llr); } else {
} if (llrU[row][col + 1] == 0)
} updateLLR(listSize, row, (col + 1), xlen, ylen, zlen, llr, llrU, bit, bitU);
llrU[row][col]=1; if (llrU[row + offset][col + 1] == 0)
updateLLR(listSize, (row + offset), (col + 1), xlen, ylen, zlen, llr, llrU, bit, bitU);
computeLLR(row, col, i, offset, xlen, ylen, zlen, llr);
}
}
llrU[row][col] = 1;
// printf("LLR (a %f, b %f): llr[%d][%d] %f\n",32*a,32*b,col,row,32*llr[col][row]); // printf("LLR (a %f, b %f): llr[%d][%d] %f\n",32*a,32*b,col,row,32*llr[col][row]);
} }
void updatePathMetric(double *pathMetric, void updatePathMetric(double *pathMetric,
......
...@@ -112,7 +112,7 @@ struct nrPolar_params { ...@@ -112,7 +112,7 @@ struct nrPolar_params {
const uint8_t **crc_generator_matrix; // G_P const uint8_t **crc_generator_matrix; // G_P
const uint8_t **G_N; const uint8_t **G_N;
uint64_t **G_N_tab; fourDimArray_t *G_N_tab;
int groupsize; int groupsize;
int *rm_tab; int *rm_tab;
uint64_t cprime_tab0[32][256]; uint64_t cprime_tab0[32][256];
...@@ -219,9 +219,7 @@ uint32_t nr_polar_output_length(uint16_t K, ...@@ -219,9 +219,7 @@ uint32_t nr_polar_output_length(uint16_t K,
uint16_t E, uint16_t E,
uint8_t n_max); uint8_t n_max);
void nr_polar_channel_interleaver_pattern(uint16_t *cip, void nr_polar_channel_interleaver_pattern(uint16_t *cip, const uint8_t I_BIL, const uint16_t E);
uint8_t I_BIL,
uint16_t E);
void nr_polar_rate_matching_pattern(uint16_t *rmp, void nr_polar_rate_matching_pattern(uint16_t *rmp,
uint16_t *J, uint16_t *J,
...@@ -258,7 +256,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -258,7 +256,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
const uint16_t *Q_0_Nminus1, const uint16_t *Q_0_Nminus1,
uint16_t K, uint16_t K,
uint16_t N, uint16_t N,
uint16_t E, const uint16_t E,
uint8_t n_PC, uint8_t n_PC,
uint8_t n_pc_wm); uint8_t n_pc_wm);
...@@ -284,7 +282,7 @@ void nr_polar_generate_u(uint64_t *u, ...@@ -284,7 +282,7 @@ void nr_polar_generate_u(uint64_t *u,
uint16_t N, uint16_t N,
uint8_t n_pc); uint8_t n_pc);
void nr_polar_uxG(uint64_t *D, const uint64_t *u, const uint64_t **G_N_tab, uint16_t N); void nr_polar_uxG(uint64_t *D, const uint64_t *u, const fourDimArray_t *G_N_tab, uint16_t N);
void nr_polar_info_extraction_from_u(uint64_t *Cprime, void nr_polar_info_extraction_from_u(uint64_t *Cprime,
const uint8_t *u, const uint8_t *u,
......
...@@ -359,15 +359,11 @@ void build_polar_tables(t_nrPolar_params *polarParams) { ...@@ -359,15 +359,11 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
AssertFatal(polarParams->K > 17, "K = %d < 18, is not possible\n",polarParams->K); AssertFatal(polarParams->K > 17, "K = %d < 18, is not possible\n",polarParams->K);
AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K); AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K);
int bit_i,ip; int bit_i,ip;
int numbytes = polarParams->K>>3; const int numbytes = (polarParams->K+7)/8;
int residue = polarParams->K&7; const int residue = polarParams->K&7;
int numbits;
if (residue>0) numbytes++;
for (int byte=0; byte<numbytes; byte++) { for (int byte=0; byte<numbytes; byte++) {
if (byte<(polarParams->K>>3)) numbits=8; int numbits = byte<(polarParams->K>>3) ? 8 : residue;
else numbits=residue;
for (int val=0; val<256; val++) { for (int val=0; val<256; val++) {
polarParams->cprime_tab0[byte][val] = 0; polarParams->cprime_tab0[byte][val] = 0;
...@@ -388,16 +384,20 @@ void build_polar_tables(t_nrPolar_params *polarParams) { ...@@ -388,16 +384,20 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
AssertFatal(polarParams->N == 512 || polarParams->N == 256 || polarParams->N == 128 || polarParams->N == 64, "N = %d, not done yet\n", polarParams->N); AssertFatal(polarParams->N == 512 || polarParams->N == 256 || polarParams->N == 128 || polarParams->N == 64, "N = %d, not done yet\n", polarParams->N);
// build G bit vectors for information bit positions and convert the bit as bytes tables in nr_polar_kronecker_power_matrices.c to // build G bit vectors for information bit positions and convert the bit as bytes tables in nr_polar_kronecker_power_matrices.c to
// 64 bit packed vectors. // 64 bit packed vectors.
polarParams->G_N_tab = (uint64_t **)calloc(polarParams->N, sizeof(int64_t *)); // Truncates id N%64 != 0
allocCast2D(pp, uint64_t, polarParams->G_N_tab, polarParams->N, polarParams->N / 64, false);
simde__m256i zeros = simde_mm256_setzero_si256();
// this code packs the one bit per byte of G_N into a packed bits G_N_tab
for (int i = 0; i < polarParams->N; i++) { for (int i = 0; i < polarParams->N; i++) {
polarParams->G_N_tab[i] = (uint64_t *)memalign(32, (polarParams->N / 64) * sizeof(uint64_t)); for (int j = 0; j < polarParams->N; j += 64) {
memset((void *)polarParams->G_N_tab[i], 0, (polarParams->N / 64) * sizeof(uint64_t)); const simde__m256i tmp1 = simde_mm256_cmpgt_epi8(*(simde__m256i *)&polarParams->G_N[i][j], zeros);
const simde__m256i tmp2 = simde_mm256_cmpgt_epi8(*(simde__m256i *)&polarParams->G_N[i][j + 32], zeros);
for (int j = 0; j < polarParams->N; j++) // cast directly to uint64_t from int32_t propagates the sign bit (in gcc)
polarParams->G_N_tab[i][j / 64] |= ((uint64_t)polarParams->G_N[i][j]) << (j & 63); const uint32_t part1 = simde_mm256_movemask_epi8(tmp1);
const uint32_t part2 = simde_mm256_movemask_epi8(tmp2);
pp[i][j / 64] = ((uint64_t)part2 << 32) | part1;
}
#ifdef DEBUG_POLAR_ENCODER #ifdef DEBUG_POLAR_ENCODER
printf("Bit %d Selecting row %d of G : ", i, i); printf("Bit %d Selecting row %d of G : ", i, i);
...@@ -519,17 +519,13 @@ void polar_encoder_fast(uint64_t *A, ...@@ -519,17 +519,13 @@ void polar_encoder_fast(uint64_t *A,
//int bitlen0=bitlen; //int bitlen0=bitlen;
#ifdef POLAR_CODING_DEBUG #ifdef POLAR_CODING_DEBUG
int A_array = (bitlen + 63) >> 6;
printf("\nTX\n"); printf("\nTX\n");
printf("a: "); printf("a: ");
for (int n = 0; n < bitlen; n++) { for (int n = (bitlen + 63)/64 ; n >=0; n--) {
if (n % 4 == 0) { if (n % 4 == 0)
printf(" "); printf(" ");
} if (n < bitlen)
int n1 = n >> 6; printf("%lu", (A[n/64] >> (n%64)) & 1);
int n2 = n - (n1 << 6);
int alen = n1 == 0 ? bitlen - (A_array << 6) : 64;
printf("%lu", (A[A_array - 1 - n1] >> (alen - 1 - n2)) & 1);
} }
printf("\n"); printf("\n");
#endif #endif
...@@ -692,7 +688,7 @@ void polar_encoder_fast(uint64_t *A, ...@@ -692,7 +688,7 @@ void polar_encoder_fast(uint64_t *A,
#endif #endif
uint64_t D[8] = {0}; uint64_t D[8] = {0};
nr_polar_uxG(D, u, (const uint64_t **)polarParams->G_N_tab, polarParams->N); nr_polar_uxG(D, u, polarParams->G_N_tab, polarParams->N);
#ifdef POLAR_CODING_DEBUG #ifdef POLAR_CODING_DEBUG
printf("d: "); printf("d: ");
......
...@@ -119,22 +119,19 @@ void nr_polar_info_extraction_from_u(uint64_t *Cprime, ...@@ -119,22 +119,19 @@ void nr_polar_info_extraction_from_u(uint64_t *Cprime,
} }
} }
void nr_polar_uxG(uint64_t *D, const uint64_t *u, const uint64_t **G_N_tab, uint16_t N) void nr_polar_uxG(uint64_t *D, const uint64_t *u, const fourDimArray_t *G_N_tab, uint16_t N)
{ {
int N_array = N >> 6; const int N64 = N / 64;
cast2Darray(g_n, uint64_t, G_N_tab);
for (int n = 0; n < N; n++) { for (int n = 0; n < N; n++) {
const uint64_t *Gn = G_N_tab[N - 1 - n]; const uint64_t *Gn = g_n[N - 1 - n];
int n_ones = 0; int n_ones = 0;
for (int a = 0; a < N_array; a++) { for (int a = 0; a < N64; a++)
uint64_t uxG = u[a] & Gn[a]; n_ones += count_bits_set(u[a] & Gn[a]);
if (uxG != 0)
n_ones += count_bits_set(uxG);
}
int n1 = n >> 6; int n1 = n / 64;
int n2 = n - (n1 << 6); int n2 = n - (n1 * 64);
D[n1] |= ((uint64_t)n_ones & 1) << n2; D[n1] |= ((uint64_t)n_ones & 1) << n2;
} }
} }
...@@ -147,8 +144,7 @@ void nr_polar_bit_insertion(uint8_t *input, ...@@ -147,8 +144,7 @@ void nr_polar_bit_insertion(uint8_t *input,
int16_t *Q_PC_N, int16_t *Q_PC_N,
uint8_t n_PC) uint8_t n_PC)
{ {
uint16_t k=0; int k = 0;
uint8_t flag;
if (n_PC>0) { if (n_PC>0) {
/* /*
...@@ -156,22 +152,16 @@ void nr_polar_bit_insertion(uint8_t *input, ...@@ -156,22 +152,16 @@ void nr_polar_bit_insertion(uint8_t *input,
*/ */
} else { } else {
for (int n=0; n<=N-1; n++) { for (int n=0; n<=N-1; n++) {
flag=0; output[n] = 0;
for (int m=0; m<=(K+n_PC)-1; m++) { for (int m=0; m<=(K+n_PC)-1; m++) {
if ( n == Q_I_N[m]) { if ( n == Q_I_N[m]) {
flag=1; output[n] = input[k];
break; k++;
} break;
} }
if (flag) { // n ϵ Q_I_N
output[n]=input[k];
k++;
} else {
output[n] = 0;
} }
} }
} }
} }
...@@ -179,7 +169,7 @@ uint32_t nr_polar_output_length(uint16_t K, ...@@ -179,7 +169,7 @@ uint32_t nr_polar_output_length(uint16_t K,
uint16_t E, uint16_t E,
uint8_t n_max) uint8_t n_max)
{ {
uint8_t n_1, n_2, n_min=5, n; int n_1, n_2, n_min = 5;
double R_min=1.0/8; double R_min=1.0/8;
if ( (E <= (9.0/8)*pow(2,ceil(log2(E))-1)) && (K/E < 9.0/16) ) { if ( (E <= (9.0/8)*pow(2,ceil(log2(E))-1)) && (K/E < 9.0/16) ) {
...@@ -189,8 +179,8 @@ uint32_t nr_polar_output_length(uint16_t K, ...@@ -189,8 +179,8 @@ uint32_t nr_polar_output_length(uint16_t K,
} }
n_2 = ceil(log2(K/R_min)); n_2 = ceil(log2(K/R_min));
n=n_max; int n = n_max;
if (n>n_1) n=n_1; if (n>n_1) n=n_1;
if (n>n_2) n=n_2; if (n>n_2) n=n_2;
if (n<n_min) n=n_min; if (n<n_min) n=n_min;
...@@ -201,19 +191,14 @@ uint32_t nr_polar_output_length(uint16_t K, ...@@ -201,19 +191,14 @@ uint32_t nr_polar_output_length(uint16_t K,
return ((uint32_t) pow(2.0,n)); //=polar_code_output_length return ((uint32_t) pow(2.0,n)); //=polar_code_output_length
} }
void nr_polar_channel_interleaver_pattern(uint16_t *cip, const uint8_t I_BIL, const uint16_t E)
void nr_polar_channel_interleaver_pattern(uint16_t *cip,
uint8_t I_BIL,
uint16_t E)
{ {
if (I_BIL == 1) { if (I_BIL == 1) {
uint16_t T=0, k; int T = E;
while( ((T/2)*(T+1)) < E ) T++; while( ((T/2)*(T+1)) < E ) T++;
int16_t **v = malloc(T * sizeof(*v)); int16_t v[T][T];
for (int i = 0; i <= T-1; i++) v[i] = malloc((T-i) * sizeof(*(v[i]))); int k = 0;
k=0;
for (int i = 0; i <= T-1; i++) { for (int i = 0; i <= T-1; i++) {
for (int j = 0; j <= (T-1)-i; j++) { for (int j = 0; j <= (T-1)-i; j++) {
if (k<E) { if (k<E) {
...@@ -234,16 +219,11 @@ void nr_polar_channel_interleaver_pattern(uint16_t *cip, ...@@ -234,16 +219,11 @@ void nr_polar_channel_interleaver_pattern(uint16_t *cip,
} }
} }
} }
for (int i = 0; i <= T-1; i++) free(v[i]);
free(v);
} else { } else {
for (int i=0; i<=E-1; i++) cip[i]=i; for (int i=0; i<=E-1; i++) cip[i]=i;
} }
} }
void nr_polar_info_bit_pattern(uint8_t *ibp, void nr_polar_info_bit_pattern(uint8_t *ibp,
uint8_t *pcbp, uint8_t *pcbp,
int16_t *Q_I_N, int16_t *Q_I_N,
...@@ -253,47 +233,46 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -253,47 +233,46 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
const uint16_t *Q_0_Nminus1, const uint16_t *Q_0_Nminus1,
uint16_t K, uint16_t K,
uint16_t N, uint16_t N,
uint16_t E, const uint16_t E,
uint8_t n_PC, uint8_t n_PC,
uint8_t n_pc_wm) uint8_t n_pc_wm)
{ {
int16_t *Q_Ftmp_N = malloc(sizeof(int16_t) * (N + 1)); // Last element shows the final int Q_Ftmp_N[N + 1]; // Last element shows the final
int16_t *Q_Itmp_N = malloc(sizeof(int16_t) * (N + 1)); // array index assigned a value. int Q_Itmp_N[N + 1]; // array index assigned a value.
for (int i = 0; i <= N; i++) { for (int i = 0; i <= N; i++) {
Q_Ftmp_N[i] = -1; // Empty array. Q_Ftmp_N[i] = -1; // Empty array.
Q_Itmp_N[i] = -1; Q_Itmp_N[i] = -1;
} }
uint8_t flag; int limit;
uint16_t limit, ind;
if (E < N) { if (E < N) {
if ((K / (double)E) <= (7.0 / 16)) { // puncturing if ((K / (double)E) <= (7.0 / 16)) { // puncturing
for (int n = 0; n <= N - E - 1; n++) { for (int n = 0; n <= N - E - 1; n++) {
ind = Q_Ftmp_N[N] + 1; int ind = Q_Ftmp_N[N] + 1;
Q_Ftmp_N[ind] = J[n]; Q_Ftmp_N[ind] = J[n];
Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1; Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1;
} }
if ((E / (double)N) >= (3.0 / 4)) { if ((E / (double)N) >= (3.0 / 4)) {
limit = ceil((double)(3 * N - 2 * E) / 4); limit = ceil((double)(3 * N - 2 * E) / 4);
for (int n = 0; n <= limit - 1; n++) { for (int n = 0; n <= limit - 1; n++) {
ind = Q_Ftmp_N[N] + 1; int ind = Q_Ftmp_N[N] + 1;
Q_Ftmp_N[ind] = n; Q_Ftmp_N[ind] = n;
Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1; Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1;
} }
} else { } else {
limit = ceil((double)(9 * N - 4 * E) / 16); limit = ceil((double)(9 * N - 4 * E) / 16);
for (int n = 0; n <= limit - 1; n++) { for (int n = 0; n <= limit - 1; n++) {
ind = Q_Ftmp_N[N] + 1; int ind = Q_Ftmp_N[N] + 1;
Q_Ftmp_N[ind] = n; Q_Ftmp_N[ind] = n;
Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1; Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1;
} }
} }
} else { // shortening } else { // shortening
for (int n = E; n <= N - 1; n++) { for (int n = E; n <= N - 1; n++) {
ind = Q_Ftmp_N[N] + 1; int ind = Q_Ftmp_N[N] + 1;
Q_Ftmp_N[ind] = J[n]; Q_Ftmp_N[ind] = J[n];
Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1; Q_Ftmp_N[N] = Q_Ftmp_N[N] + 1;
} }
...@@ -302,13 +281,12 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -302,13 +281,12 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
// Q_I,tmp_N = Q_0_N-1 \ Q_F,tmp_N // Q_I,tmp_N = Q_0_N-1 \ Q_F,tmp_N
for (int n = 0; n <= N - 1; n++) { for (int n = 0; n <= N - 1; n++) {
flag = 1; bool flag = true;
for (int m = 0; m <= Q_Ftmp_N[N]; m++) { for (int m = 0; m <= Q_Ftmp_N[N]; m++)
if (Q_0_Nminus1[n] == Q_Ftmp_N[m]) { if (Q_0_Nminus1[n] == Q_Ftmp_N[m]) {
flag = 0; flag = false;
break; break;
} }
}
if (flag) { if (flag) {
Q_Itmp_N[Q_Itmp_N[N] + 1] = Q_0_Nminus1[n]; Q_Itmp_N[Q_Itmp_N[N] + 1] = Q_0_Nminus1[n];
Q_Itmp_N[N]++; Q_Itmp_N[N]++;
...@@ -317,7 +295,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -317,7 +295,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
// Q_I_N comprises (K+n_PC) most reliable bit indices in Q_I,tmp_N // Q_I_N comprises (K+n_PC) most reliable bit indices in Q_I,tmp_N
for (int n = 0; n <= (K + n_PC) - 1; n++) { for (int n = 0; n <= (K + n_PC) - 1; n++) {
ind = Q_Itmp_N[N] + n - ((K + n_PC) - 1); int ind = Q_Itmp_N[N] + n - ((K + n_PC) - 1);
Q_I_N[n] = Q_Itmp_N[ind]; Q_I_N[n] = Q_Itmp_N[ind];
} }
...@@ -330,13 +308,12 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -330,13 +308,12 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
// Q_F_N = Q_0_N-1 \ Q_I_N // Q_F_N = Q_0_N-1 \ Q_I_N
for (int n = 0; n <= N - 1; n++) { for (int n = 0; n <= N - 1; n++) {
flag = 1; bool flag = true;
for (int m = 0; m <= (K + n_PC) - 1; m++) { for (int m = 0; m <= (K + n_PC) - 1; m++)
if (Q_0_Nminus1[n] == Q_I_N[m]) { if (Q_0_Nminus1[n] == Q_I_N[m]) {
flag = 0; flag = false;
break; break;
} }
}
if (flag) { if (flag) {
Q_F_N[Q_F_N[N] + 1] = Q_0_Nminus1[n]; Q_F_N[Q_F_N[N] + 1] = Q_0_Nminus1[n];
Q_F_N[N]++; Q_F_N[N]++;
...@@ -361,11 +338,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, ...@@ -361,11 +338,7 @@ void nr_polar_info_bit_pattern(uint8_t *ibp,
break; break;
} }
} }
} }
free(Q_Ftmp_N);
free(Q_Itmp_N);
} }
...@@ -391,22 +364,21 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp, ...@@ -391,22 +364,21 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp,
uint16_t N, uint16_t N,
uint16_t E) uint16_t E)
{ {
uint8_t i; uint16_t d[N];
uint16_t *d, ind; for (int m = 0; m < N; m++)
d = (uint16_t *)malloc(sizeof(uint16_t) * N); d[m] = m;
uint16_t* y = calloc(N, sizeof(uint16_t)); uint16_t y[N];
memset(y, 0, sizeof(y));
for (int m=0; m<=N-1; m++) d[m]=m;
for (int m=0; m<=N-1; m++){ for (int m=0; m<=N-1; m++){
i=floor((32*m)/N); int i = floor((32 * m) / N);
J[m] = (P_i_[i]*(N/32)) + (m%(N/32)); J[m] = (P_i_[i]*(N/32)) + (m%(N/32));
y[m] = d[J[m]]; y[m] = d[J[m]];
} }
if (E>=N) { //repetition if (E>=N) { //repetition
for (int k=0; k<=E-1; k++) { for (int k=0; k<=E-1; k++) {
ind = (k%N); int ind = (k % N);
rmp[k]=y[ind]; rmp[k]=y[ind];
} }
} else { } else {
...@@ -420,9 +392,6 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp, ...@@ -420,9 +392,6 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp,
} }
} }
} }
free(d);
free(y);
} }
...@@ -459,9 +428,9 @@ void nr_polar_rm_deinterleaving_cb(const int16_t *in, int16_t *out, const uint16 ...@@ -459,9 +428,9 @@ void nr_polar_rm_deinterleaving_cb(const int16_t *in, int16_t *out, const uint16
{ {
int T = ceil((sqrt(8 * E + 1) - 1) / 2); int T = ceil((sqrt(8 * E + 1) - 1) / 2);
int v_tab[T][T]; int v_tab[T][T];
memset(v_tab, 0, sizeof(v_tab));
int k = 0; int k = 0;
for (int i = 0; i < T; i++) { for (int i = 0; i < T; i++) {
memset(v_tab[i], 0, T * sizeof(int));
for (int j = 0; j < T - i; j++) { for (int j = 0; j < T - i; j++) {
if (k < E) { if (k < E) {
v_tab[i][j] = k + 1; v_tab[i][j] = k + 1;
...@@ -484,7 +453,7 @@ void nr_polar_rm_deinterleaving_cb(const int16_t *in, int16_t *out, const uint16 ...@@ -484,7 +453,7 @@ void nr_polar_rm_deinterleaving_cb(const int16_t *in, int16_t *out, const uint16
} }
k = 0; k = 0;
memset(out, 0, E * sizeof(int16_t)); memset(out, 0, E * sizeof(*out));
for (int i = 0; i < T; i++) { for (int i = 0; i < T; i++) {
for (int j = 0; j < T - i; j++) { for (int j = 0; j < T - i; j++) {
if (v[i][j] != INT_MAX) { if (v[i][j] != INT_MAX) {
...@@ -508,12 +477,12 @@ void nr_polar_rate_matching_int16(int16_t *input, ...@@ -508,12 +477,12 @@ void nr_polar_rate_matching_int16(int16_t *input,
} }
if (E >= N) { // repetition if (E >= N) { // repetition
memset((void *)output, 0, N * sizeof(int16_t)); memset(output, 0, N * sizeof(*output));
for (int i = 0; i <= E - 1; i++) for (int i = 0; i <= E - 1; i++)
output[rmp[i]] += input[i]; output[rmp[i]] += input[i];
} else { } else {
if ((K / (double)E) <= (7.0 / 16)) if ((K / (double)E) <= (7.0 / 16))
memset((void *)output, 0, N * sizeof(int16_t)); // puncturing memset(output, 0, N * sizeof(*output)); // puncturing
else { // shortening else { // shortening
for (int i = 0; i <= N - 1; i++) for (int i = 0; i <= N - 1; i++)
output[i] = 32767; // instead of INFINITY, to prevent [-Woverflow] output[i] = 32767; // instead of INFINITY, to prevent [-Woverflow]
......
...@@ -23,39 +23,34 @@ ...@@ -23,39 +23,34 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
void nr_polar_rate_matching_pattern(uint16_t *rmp, uint16_t *J, const uint8_t *P_i_, uint16_t K, uint16_t N, uint16_t E){ void nr_polar_rate_matching_pattern(uint16_t *rmp, uint16_t *J, const uint8_t *P_i_, uint16_t K, uint16_t N, uint16_t E){
int d[N];
uint8_t i; int y[N];
uint16_t *d, *y, ind;
d = (uint16_t *)malloc(sizeof(uint16_t) * N); for (int m = 0; m <= N - 1; m++)
y = (uint16_t *)malloc(sizeof(uint16_t) * N); d[m] = m;
for (int m=0; m<=N-1; m++) d[m]=m; for (int m = 0; m <= N - 1; m++) {
i = floor((32 * m) / N);
for (int m=0; m<=N-1; m++){ J[m] = (P_i_[i] * (N / 32)) + (m % (N / 32));
i=floor((32*m)/N); y[m] = d[J[m]];
J[m] = (P_i_[i]*(N/32)) + (m%(N/32)); }
y[m] = d[J[m]];
} if (E >= N) { // repetition
for (int k = 0; k <= E - 1; k++) {
if (E>=N) { //repetition ind = (k % N);
for (int k=0; k<=E-1; k++) { rmp[k] = y[ind];
ind = (k%N); }
rmp[k]=y[ind]; } else {
} if ((K / (double)E) <= (7.0 / 16)) { // puncturing
} else { for (int k = 0; k <= E - 1; k++) {
if ( (K/(double)E) <= (7.0/16) ) { //puncturing rmp[k] = y[k + N - E];
for (int k=0; k<=E-1; k++) { }
rmp[k]=y[k+N-E]; } else { // shortening
} for (int k = 0; k <= E - 1; k++) {
} else { //shortening rmp[k] = y[k];
for (int k=0; k<=E-1; k++) { }
rmp[k]=y[k]; }
} }
}
}
free(d);
free(y);
} }
......
...@@ -48,10 +48,7 @@ static void nr_polar_delete_list(t_nrPolar_params * polarParams) { ...@@ -48,10 +48,7 @@ static void nr_polar_delete_list(t_nrPolar_params * polarParams) {
nr_polar_delete_list(polarParams->nextPtr); nr_polar_delete_list(polarParams->nextPtr);
delete_decoder_tree(polarParams); delete_decoder_tree(polarParams);
//From build_polar_tables() // From build_polar_tables()
for (int n=0; n < polarParams->N; n++)
if (polarParams->G_N_tab[n])
free(polarParams->G_N_tab[n]);
free(polarParams->G_N_tab); free(polarParams->G_N_tab);
free(polarParams->rm_tab); free(polarParams->rm_tab);
if (polarParams->crc_generator_matrix) if (polarParams->crc_generator_matrix)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
//#include "PHY/defs_nb_iot.h" //#include "PHY/defs_nb_iot.h"
#include "PHY/LTE_TRANSPORT/dci_NB_IoT.h" #include "PHY/LTE_TRANSPORT/dci_NB_IoT.h"
#include "PHY/impl_defs_lte_NB_IoT.h" #include "PHY/impl_defs_lte_NB_IoT.h"
#include "openair2/COMMON/platform_types.h" #include "common/platform_types.h"
//#include "dci.h" //#include "dci.h"
#include "PHY/LTE_TRANSPORT/uci_NB_IoT.h" #include "PHY/LTE_TRANSPORT/uci_NB_IoT.h"
//#include "dci.h" //#include "dci.h"
......
This diff is collapsed.
...@@ -54,10 +54,13 @@ void nr_modulation(uint32_t *in, ...@@ -54,10 +54,13 @@ void nr_modulation(uint32_t *in,
@param[out] tx_layers, modulated symbols for each layer @param[out] tx_layers, modulated symbols for each layer
*/ */
void nr_layer_mapping(int16_t **mod_symbs, void nr_layer_mapping(int nbCodes,
uint8_t n_layers, int encoded_len,
uint32_t n_symbs, c16_t mod_symbs[nbCodes][encoded_len],
int16_t **tx_layers); uint8_t n_layers,
int layerSz,
uint32_t n_symbs,
c16_t tx_layers[n_layers][layerSz]);
/*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3 /*! \brief Perform NR layer mapping. TS 38.211 V15.4.0 subclause 7.3.1.3
@param[in] ulsch_ue, double Pointer to NR_UE_ULSCH_t struct @param[in] ulsch_ue, double Pointer to NR_UE_ULSCH_t struct
...@@ -135,9 +138,27 @@ void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms, ...@@ -135,9 +138,27 @@ void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms,
@param[in] n_layers, number of DLSCH layers @param[in] n_layers, number of DLSCH layers
*/ */
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset); int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset);
c16_t nr_layer_precoder_cm(int n_layers,
int nr_layer_precoder_cm(int16_t **datatx_F_precoding, int n_symbols,
int *prec_matrix, int symSz,
uint8_t n_layers, c16_t datatx_F_precoding[n_layers][n_symbols][symSz],
int32_t re_offset); c16_t *prec_matrix,
int symbol,
int offset);
/*! \brief Precoding with SIMDe, txdataF_precoded[] = prec_matrix[] * txdataF_res_mapped[]
@param[in] txdataF_res_mapped Tx data after resource mapping, before precoding.
@param[in] prec_matrix Weights of precoding matrix.
@param[in] re_cnt Number of RE (sub carrier) to write to txdataF_precoded, should be multiple of 4.
@param[out] txdataF_precoded Precoded antenna data
*/
void nr_layer_precoder_simd(const int n_layers,
const int n_symbols,
const int symSz,
const c16_t txdataF_res_mapped[n_layers][n_symbols][symSz],
const c16_t prec_matrix[n_layers],
const int symbol,
const int sc_offset,
const int re_cnt,
c16_t *txdataF_precoded);
#endif #endif
NB-IoT transport channel procedures for NB-IoT are here
This diff is collapsed.
...@@ -74,18 +74,11 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch, uint16_t N_RB, const NR_DL_FRAME_PARM ...@@ -74,18 +74,11 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch, uint16_t N_RB, const NR_DL_FRAME_PARM
free(harq->c); free(harq->c);
free(harq->pdu); free(harq->pdu);
int nb_codewords = NR_MAX_NB_LAYERS > 4 ? 2 : 1;
for (int q=0; q<nb_codewords; q++)
free(dlsch->mod_symbs[q]);
free(dlsch->mod_symbs);
for (int layer = 0; layer < max_layers; layer++) { for (int layer = 0; layer < max_layers; layer++) {
free(dlsch->txdataF[layer]);
for (int aa = 0; aa < 64; aa++) for (int aa = 0; aa < 64; aa++)
free(dlsch->ue_spec_bf_weights[layer][aa]); free(dlsch->ue_spec_bf_weights[layer][aa]);
free(dlsch->ue_spec_bf_weights[layer]); free(dlsch->ue_spec_bf_weights[layer]);
} }
free(dlsch->txdataF);
free(dlsch->ue_spec_bf_weights); free(dlsch->ue_spec_bf_weights);
} }
...@@ -103,10 +96,6 @@ NR_gNB_DLSCH_t new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, uint16_t N_RB) ...@@ -103,10 +96,6 @@ NR_gNB_DLSCH_t new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, uint16_t N_RB)
uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
NR_gNB_DLSCH_t dlsch; NR_gNB_DLSCH_t dlsch;
int txdataf_size = frame_parms->N_RB_DL*NR_SYMBOLS_PER_SLOT*NR_NB_SC_PER_RB*8; // max pdsch encoded length for each layer
dlsch.txdataF = (int32_t **)malloc16(max_layers * sizeof(int32_t *));
dlsch.ue_spec_bf_weights = (int32_t ***)malloc16(max_layers * sizeof(int32_t **)); dlsch.ue_spec_bf_weights = (int32_t ***)malloc16(max_layers * sizeof(int32_t **));
for (int layer=0; layer<max_layers; layer++) { for (int layer=0; layer<max_layers; layer++) {
dlsch.ue_spec_bf_weights[layer] = (int32_t **)malloc16(64 * sizeof(int32_t *)); dlsch.ue_spec_bf_weights[layer] = (int32_t **)malloc16(64 * sizeof(int32_t *));
...@@ -118,14 +107,8 @@ NR_gNB_DLSCH_t new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, uint16_t N_RB) ...@@ -118,14 +107,8 @@ NR_gNB_DLSCH_t new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, uint16_t N_RB)
dlsch.ue_spec_bf_weights[layer][aa][re] = 0x00007fff; dlsch.ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
} }
} }
dlsch.txdataF[layer] = (int32_t *)malloc16((txdataf_size) * sizeof(int32_t));
} }
int nb_codewords = NR_MAX_NB_LAYERS > 4 ? 2 : 1;
dlsch.mod_symbs = (int32_t **)malloc16(nb_codewords * sizeof(int32_t *));
for (int q=0; q<nb_codewords; q++)
dlsch.mod_symbs[q] = (int32_t *)malloc16(txdataf_size * max_layers * sizeof(int32_t));
NR_DL_gNB_HARQ_t *harq = &dlsch.harq_process; NR_DL_gNB_HARQ_t *harq = &dlsch.harq_process;
bzero(harq, sizeof(NR_DL_gNB_HARQ_t)); bzero(harq, sizeof(NR_DL_gNB_HARQ_t));
harq->b = malloc16(dlsch_bytes); harq->b = malloc16(dlsch_bytes);
...@@ -385,20 +368,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, ...@@ -385,20 +368,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
impp.rv = rel15->rvIndex[0]; impp.rv = rel15->rvIndex[0];
int nb_re_dmrs = int nb_re_dmrs =
(rel15->dmrsConfigType == NFAPI_NR_DMRS_TYPE1) ? (6 * rel15->numDmrsCdmGrpsNoData) : (4 * rel15->numDmrsCdmGrpsNoData); (rel15->dmrsConfigType == NFAPI_NR_DMRS_TYPE1) ? (6 * rel15->numDmrsCdmGrpsNoData) : (4 * rel15->numDmrsCdmGrpsNoData);
impp.G = nr_get_G(rel15->rbSize, impp.G = nr_get_G(rel15->rbSize, rel15->NrOfSymbols, nb_re_dmrs, get_num_dmrs(rel15->dlDmrsSymbPos), harq->unav_res,
rel15->NrOfSymbols, rel15->qamModOrder[0], rel15->nrOfLayers);
nb_re_dmrs,
get_num_dmrs(rel15->dlDmrsSymbPos),
harq->unav_res,
rel15->qamModOrder[0],
rel15->nrOfLayers);
uint8_t tmp[BBDEV_LDPC_MAX_E] __attribute__((aligned(32)));
uint8_t *e = tmp;
int r_offset = 0; int r_offset = 0;
for (int r = 0; r < impp.n_segments; r++) { for (int r = 0; r < impp.n_segments; r++) {
impp.E = nr_get_E(impp.G, impp.n_segments, impp.Qm, rel15->nrOfLayers, r); impp.E = nr_get_E(impp.G, impp.n_segments, impp.Qm, rel15->nrOfLayers, r);
ldpc_interface_offload.LDPCencoder(&harq->c[r], &e, &impp); uint8_t *f = impp.output + r_offset;
nr_interleaving_ldpc(impp.E, impp.Qm, e, impp.output + r_offset); ldpc_interface_offload.LDPCencoder(&harq->c[r], &f, &impp);
r_offset += impp.E; r_offset += impp.E;
} }
} else { } else {
......
...@@ -65,14 +65,16 @@ void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config) { ...@@ -65,14 +65,16 @@ void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config) {
*(ap+i) = i; *(ap+i) = i;
} }
void get_Wt(int8_t *Wt, uint8_t ap, uint8_t config) { void get_Wt(int *Wt, const int ap, const nfapi_nr_dmrs_type_e config)
{
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
*(Wt+i)=(config==NFAPI_NR_DMRS_TYPE1)?(pdsch_dmrs_1[ap][5+i]):(pdsch_dmrs_2[ap][5+i]); Wt[i] = (config == NFAPI_NR_DMRS_TYPE1) ? (pdsch_dmrs_1[ap][5 + i]) : (pdsch_dmrs_2[ap][5 + i]);
} }
void get_Wf(int8_t *Wf, uint8_t ap, uint8_t config) { void get_Wf(int *Wf, const int ap, const nfapi_nr_dmrs_type_e config)
{
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
*(Wf+i)=(config==NFAPI_NR_DMRS_TYPE1)?(pdsch_dmrs_1[ap][3+i]):(pdsch_dmrs_2[ap][3+i]); Wf[i] = (config == NFAPI_NR_DMRS_TYPE1) ? (pdsch_dmrs_1[ap][3 + i]) : (pdsch_dmrs_2[ap][3 + i]);
} }
uint8_t get_delta(uint8_t ap, uint8_t config) { uint8_t get_delta(uint8_t ap, uint8_t config) {
......
...@@ -39,10 +39,8 @@ ...@@ -39,10 +39,8 @@
#define NR_PDSCH_DMRS_NB_ANTENNA_PORTS 12 #define NR_PDSCH_DMRS_NB_ANTENNA_PORTS 12
void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config); void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config);
void get_Wt(int *Wt, const int ap, const nfapi_nr_dmrs_type_e config);
void get_Wt(int8_t *Wt, uint8_t ap, uint8_t config); void get_Wf(int *Wf, const int ap, const nfapi_nr_dmrs_type_e config);
void get_Wf(int8_t *Wf, uint8_t ap, uint8_t config);
uint8_t get_delta(uint8_t ap, uint8_t config); uint8_t get_delta(uint8_t ap, uint8_t config);
......
...@@ -232,8 +232,8 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB, ...@@ -232,8 +232,8 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB,
{ {
NR_gNB_ULSCH_t *ulsch = &phy_vars_gNB->ulsch[ULSCH_id]; NR_gNB_ULSCH_t *ulsch = &phy_vars_gNB->ulsch[ULSCH_id];
NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_process; NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_process;
int16_t z_ol[BBDEV_LDPC_MAX_E] __attribute__((aligned(16))); int16_t z_ol[LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
int8_t l_ol[BBDEV_LDPC_MAX_E] __attribute__((aligned(16))); int8_t l_ol[LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
uint8_t Qm = pusch_pdu->qam_mod_order; uint8_t Qm = pusch_pdu->qam_mod_order;
uint8_t n_layers = pusch_pdu->nrOfLayers; uint8_t n_layers = pusch_pdu->nrOfLayers;
const int Kr = harq_process->K; const int Kr = harq_process->K;
......
...@@ -116,7 +116,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -116,7 +116,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
{ {
LOG_D(PHY,"nr_ue_ulsch_procedures hard_id %d %d.%d\n",harq_pid,frame,slot); LOG_D(PHY,"nr_ue_ulsch_procedures hard_id %d %d.%d\n",harq_pid,frame,slot);
int8_t Wf[2], Wt[2]; int Wf[2], Wt[2];
int l_prime[2], delta; int l_prime[2], delta;
uint8_t nb_dmrs_re_per_rb; uint8_t nb_dmrs_re_per_rb;
int i; int i;
......
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.
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