Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
713c84e4
Commit
713c84e4
authored
Feb 13, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/stability-7.2-improv' into integration_2024_w06
parents
9890410a
3bb9e6b0
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
333 additions
and
204 deletions
+333
-204
cmake_targets/tools/MODULES/Findxran.cmake
cmake_targets/tools/MODULES/Findxran.cmake
+2
-0
cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
...gets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
+23
-6
doc/ORAN_FHI7.2_Tutorial.md
doc/ORAN_FHI7.2_Tutorial.md
+165
-74
executables/nr-ru.c
executables/nr-ru.c
+12
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+14
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+24
-5
radio/fhi_72/CMakeLists.txt
radio/fhi_72/CMakeLists.txt
+1
-1
radio/fhi_72/oaioran.c
radio/fhi_72/oaioran.c
+79
-78
radio/fhi_72/oran-config.c
radio/fhi_72/oran-config.c
+5
-5
radio/fhi_72/oran-init.c
radio/fhi_72/oran-init.c
+0
-31
radio/fhi_72/oran-params.h
radio/fhi_72/oran-params.h
+2
-0
radio/fhi_72/oran_isolate.c
radio/fhi_72/oran_isolate.c
+3
-2
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
...ERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
+1
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf
...R-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf
+1
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf
...IC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf
+1
-0
No files found.
cmake_targets/tools/MODULES/Findxran.cmake
View file @
713c84e4
...
@@ -107,6 +107,8 @@ if (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.0")
...
@@ -107,6 +107,8 @@ if (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.0")
set
(
xran_VERSION 5.1.0
)
set
(
xran_VERSION 5.1.0
)
elseif
(
xran_VERSION_STRING STREQUAL
"oran_e_maintenance_release_v1.1"
)
elseif
(
xran_VERSION_STRING STREQUAL
"oran_e_maintenance_release_v1.1"
)
set
(
xran_VERSION 5.1.1
)
set
(
xran_VERSION 5.1.1
)
elseif
(
xran_VERSION_STRING STREQUAL
"oran_e_maintenance_release_v1.2"
)
set
(
xran_VERSION 5.1.2
)
endif
()
endif
()
unset
(
xran_VERSION_LINE
)
unset
(
xran_VERSION_LINE
)
unset
(
xran_VERSION_STRING
)
unset
(
xran_VERSION_STRING
)
...
...
cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
View file @
713c84e4
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
index 7508117..
a93c085
100644
index 7508117..
0dbe0bd
100644
--- a/fhi_lib/app/src/common.h
--- a/fhi_lib/app/src/common.h
+++ b/fhi_lib/app/src/common.h
+++ b/fhi_lib/app/src/common.h
@@ -28,7 +28,7 @@
@@ -28,7 +28,7 @@
...
@@ -7,12 +7,12 @@ index 7508117..a93c085 100644
...
@@ -7,12 +7,12 @@ index 7508117..a93c085 100644
#include <rte_mbuf.h>
#include <rte_mbuf.h>
-#define VERSIONX "oran_e_maintenance_release_v1.0"
-#define VERSIONX "oran_e_maintenance_release_v1.0"
+#define VERSIONX "oran_e_maintenance_release_v1.
1
"
+#define VERSIONX "oran_e_maintenance_release_v1.
2
"
#define APP_O_DU 0
#define APP_O_DU 0
#define APP_O_RU 1
#define APP_O_RU 1
diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile
diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile
index de141bf..
5bcde3d
100644
index de141bf..
c12b912
100644
--- a/fhi_lib/lib/Makefile
--- a/fhi_lib/lib/Makefile
+++ b/fhi_lib/lib/Makefile
+++ b/fhi_lib/lib/Makefile
@@ -23,11 +23,11 @@
MYCUSTOMSPACE1='------------------------------------------------------------'
@@ -23,11 +23,11 @@
MYCUSTOMSPACE1='------------------------------------------------------------'
...
@@ -30,6 +30,15 @@ index de141bf..5bcde3d 100644
...
@@ -30,6 +30,15 @@ index de141bf..5bcde3d 100644
OBJDUMP := objdump
OBJDUMP := objdump
ifeq ($(SHELL),cmd.exe)
ifeq ($(SHELL),cmd.exe)
@@ -57,7 +57,7 @@
endif
RTE_TARGET ?= x86_64-native-linux-icc
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
API_DIR := $(PROJECT_DIR)/api
SRC_DIR := $(PROJECT_DIR)/src
ETH_DIR := $(PROJECT_DIR)/ethernet
@@ -95,8 +95,7 @@
CPP_SRC = $(SRC_DIR)/xran_compression.cpp \
@@ -95,8 +95,7 @@
CPP_SRC = $(SRC_DIR)/xran_compression.cpp \
$(SRC_DIR)/xran_bfp_cplane32.cpp \
$(SRC_DIR)/xran_bfp_cplane32.cpp \
$(SRC_DIR)/xran_bfp_cplane64.cpp \
$(SRC_DIR)/xran_bfp_cplane64.cpp \
...
@@ -117,10 +126,18 @@ index 7d3afc5..3e00c5a 100644
...
@@ -117,10 +126,18 @@ index 7d3afc5..3e00c5a 100644
uint16_t *num_prbu,
uint16_t *num_prbu,
uint16_t *start_prbu,
uint16_t *start_prbu,
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
index b6ba257..
74b3c26
100644
index b6ba257..
b53325f
100644
--- a/fhi_lib/lib/ethernet/ethdi.c
--- a/fhi_lib/lib/ethernet/ethdi.c
+++ b/fhi_lib/lib/ethernet/ethdi.c
+++ b/fhi_lib/lib/ethernet/ethdi.c
@@ -479,11 +479,13 @@
xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
@@ -335,6 +335,7 @@
xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
uint16_t count;
char *argv[] = { name, core_mask, "-n2", iova_mode, socket_mem, socket_limit, "--proc-type=auto",
+ "--no-telemetry",
"--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev};
@@ -479,11 +480,13 @@
xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
ctx->tx_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX,
ctx->tx_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX,
rte_lcore_to_socket_id(*lcore_id), RING_F_SC_DEQ);
rte_lcore_to_socket_id(*lcore_id), RING_F_SC_DEQ);
PANIC_ON(ctx->tx_ring[i] == NULL, "failed to allocate rx ring");
PANIC_ON(ctx->tx_ring[i] == NULL, "failed to allocate rx ring");
...
@@ -134,7 +151,7 @@ index b6ba257..74b3c26 100644
...
@@ -134,7 +151,7 @@ index b6ba257..74b3c26 100644
}
}
}
}
} else {
} else {
@@ -553,7 +55
5
,7 @@
xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
@@ -553,7 +55
6
,7 @@
xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
ctx->up_dl_pkt_gen_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING,
ctx->up_dl_pkt_gen_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING,
rte_lcore_to_socket_id(*lcore_id), /*RING_F_SC_DEQ*/0);
rte_lcore_to_socket_id(*lcore_id), /*RING_F_SC_DEQ*/0);
PANIC_ON(ctx->up_dl_pkt_gen_ring[i] == NULL, "failed to allocate dl gen ring");
PANIC_ON(ctx->up_dl_pkt_gen_ring[i] == NULL, "failed to allocate dl gen ring");
...
...
doc/ORAN_FHI7.2_Tutorial.md
View file @
713c84e4
This diff is collapsed.
Click to expand it.
executables/nr-ru.c
View file @
713c84e4
...
@@ -1216,6 +1216,18 @@ void *ru_thread( void *param ) {
...
@@ -1216,6 +1216,18 @@ void *ru_thread( void *param ) {
malloc_IF4p5_buffer
(
ru
);
malloc_IF4p5_buffer
(
ru
);
}
}
int
cpu
=
sched_getcpu
();
if
(
ru
->
ru_thread_core
>
-
1
&&
cpu
!=
ru
->
ru_thread_core
)
{
/* we start the ru_thread using threadCreate(), which already sets CPU
* affinity; let's force it here again as per feature request #732 */
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
CPU_SET
(
ru
->
ru_thread_core
,
&
cpuset
);
int
ret
=
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
AssertFatal
(
ret
==
0
,
"Error in pthread_getaffinity_np(): ret: %d, errno: %d"
,
ret
,
errno
);
LOG_I
(
PHY
,
"RU %d: manually set CPU affinity to CPU %d
\n
"
,
ru
->
idx
,
ru
->
ru_thread_core
);
}
LOG_I
(
PHY
,
"Starting IF interface for RU %d, nb_rx %d
\n
"
,
ru
->
idx
,
ru
->
nb_rx
);
LOG_I
(
PHY
,
"Starting IF interface for RU %d, nb_rx %d
\n
"
,
ru
->
idx
,
ru
->
nb_rx
);
AssertFatal
(
ru
->
nr_start_if
(
ru
,
NULL
)
==
0
,
"Could not start the IF device
\n
"
);
AssertFatal
(
ru
->
nr_start_if
(
ru
,
NULL
)
==
0
,
"Could not start the IF device
\n
"
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
713c84e4
...
@@ -358,8 +358,20 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
...
@@ -358,8 +358,20 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
rbSize
,
tda_info
->
nrOfSymbols
,
N_PRB_DMRS
*
dmrs_length
,
0
,
0
,
1
)
>>
3
;
rbSize
,
tda_info
->
nrOfSymbols
,
N_PRB_DMRS
*
dmrs_length
,
0
,
0
,
1
)
>>
3
;
}
while
(
TBS
<
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
);
}
while
(
TBS
<
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
);
AssertFatal
(
TBS
>=
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
,
"Couldn't allocate enough resources for %d bytes in SIB1 PDSCH
\n
"
,
if
(
TBS
<
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
)
{
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
);
for
(
int
rb
=
0
;
rb
<
bwpSize
;
rb
++
)
LOG_I
(
NR_MAC
,
"vrb_map[%d] %x
\n
"
,
rbStart
+
rb
,
vrb_map
[
rbStart
+
rb
]);
}
AssertFatal
(
TBS
>=
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
,
"Couldn't allocate enough resources for %d bytes in SIB1 PDSCH (rbStart %d, rbSize %d, bwpSize %d SLmask %x - [%d,%d])
\n
"
,
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
,
rbStart
,
rbSize
,
bwpSize
,
SL_to_bitmap
(
tda_info
->
startSymbolIndex
,
tda_info
->
nrOfSymbols
),
tda_info
->
startSymbolIndex
,
tda_info
->
nrOfSymbols
);
pdsch
->
rbSize
=
rbSize
;
pdsch
->
rbSize
=
rbSize
;
pdsch
->
rbStart
=
0
;
pdsch
->
rbStart
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
713c84e4
...
@@ -185,7 +185,16 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac,
...
@@ -185,7 +185,16 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac,
NR_sched_pucch_t
*
curr_pucch
=
&
UE
->
UE_sched_ctrl
.
sched_pucch
[
pucch_index
];
NR_sched_pucch_t
*
curr_pucch
=
&
UE
->
UE_sched_ctrl
.
sched_pucch
[
pucch_index
];
if
(
!
curr_pucch
->
active
)
if
(
!
curr_pucch
->
active
)
continue
;
continue
;
DevAssert
(
frameP
==
curr_pucch
->
frame
&&
slotP
==
curr_pucch
->
ul_slot
);
if
(
frameP
!=
curr_pucch
->
frame
||
slotP
!=
curr_pucch
->
ul_slot
)
{
LOG_E
(
NR_MAC
,
"PUCCH frame/slot mismatch: current %4d.%2d vs. request %4d.%2d: not scheduling PUCCH
\n
"
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
frameP
,
slotP
);
memset
(
curr_pucch
,
0
,
sizeof
(
*
curr_pucch
));;
continue
;
}
const
uint16_t
O_ack
=
curr_pucch
->
dai_c
;
const
uint16_t
O_ack
=
curr_pucch
->
dai_c
;
const
uint16_t
O_csi
=
curr_pucch
->
csi_bits
;
const
uint16_t
O_csi
=
curr_pucch
->
csi_bits
;
...
@@ -1296,8 +1305,13 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
...
@@ -1296,8 +1305,13 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
return
pucch_index
;
// index of current PUCCH structure
return
pucch_index
;
// index of current PUCCH structure
}
}
else
if
(
curr_pucch
->
active
)
{
else
if
(
curr_pucch
->
active
)
{
AssertFatal
(
1
==
0
,
"This shouldn't happen! curr_pucch frame.slot %d.%d not matching with computed frame.slot %d.%d
\n
"
,
LOG_E
(
NR_MAC
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
pucch_frame
,
pucch_slot
);
"current PUCCH inactive: curr_pucch frame.slot %d.%d not matching with computed frame.slot %d.%d
\n
"
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
pucch_frame
,
pucch_slot
);
memset
(
curr_pucch
,
0
,
sizeof
(
*
curr_pucch
));
}
}
else
{
// unoccupied occasion
else
{
// unoccupied occasion
// checking if in ul_slot the resources potentially to be assigned to this PUCCH are available
// checking if in ul_slot the resources potentially to be assigned to this PUCCH are available
...
@@ -1392,8 +1406,13 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
...
@@ -1392,8 +1406,13 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
curr_pucch
->
resource_indicator
==
idx
)
curr_pucch
->
resource_indicator
==
idx
)
curr_pucch
->
sr_flag
=
true
;
curr_pucch
->
sr_flag
=
true
;
else
if
(
curr_pucch
->
active
)
{
else
if
(
curr_pucch
->
active
)
{
AssertFatal
(
1
==
0
,
"This shouldn't happen! curr_pucch frame.slot %d.%d not matching with SR function frame.slot %d.%d
\n
"
,
LOG_E
(
NR_MAC
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
SFN
,
slot
);
"current PUCCH inactive: curr_pucch frame.slot %d.%d not matching with computed frame.slot %d.%d
\n
"
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
SFN
,
slot
);
memset
(
curr_pucch
,
0
,
sizeof
(
*
curr_pucch
));
continue
;
continue
;
}
}
else
{
else
{
...
...
radio/fhi_72/CMakeLists.txt
View file @
713c84e4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
pkg_check_modules
(
dpdk REQUIRED libdpdk
)
pkg_check_modules
(
dpdk REQUIRED libdpdk
)
pkg_check_modules
(
numa REQUIRED numa
)
pkg_check_modules
(
numa REQUIRED numa
)
find_package
(
xran 5.1.
1
EXACT REQUIRED
)
# E release -> 5
find_package
(
xran 5.1.
2
EXACT REQUIRED
)
# E release -> 5
# Ignore xran-specific warning: we don't care/can't change the following warning, so suppress
# Ignore xran-specific warning: we don't care/can't change the following warning, so suppress
# alignment 1 of 'struct XYZ' is less than 2
# alignment 1 of 'struct XYZ' is less than 2
...
...
radio/fhi_72/oaioran.c
View file @
713c84e4
...
@@ -81,7 +81,11 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
...
@@ -81,7 +81,11 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
const
struct
xran_fh_init
*
fh_init
=
&
xran_ctx
->
fh_init
;
const
struct
xran_fh_init
*
fh_init
=
&
xran_ctx
->
fh_init
;
int
num_ports
=
fh_init
->
xran_ports
;
int
num_ports
=
fh_init
->
xran_ports
;
static
int
rx_RU
[
XRAN_PORTS_NUM
][
20
]
=
{
0
};
const
struct
xran_fh_config
*
fh_config
=
&
xran_ctx
->
fh_cfg
;
const
int
slots_per_subframe
=
1
<<
fh_config
->
frame_conf
.
nNumerology
;
static
int
rx_RU
[
XRAN_PORTS_NUM
][
160
]
=
{
0
};
uint32_t
rx_tti
=
callback_tag
->
slotiId
;
uint32_t
rx_tti
=
callback_tag
->
slotiId
;
tti
=
xran_get_slot_idx_from_tti
(
rx_tti
,
&
frame
,
&
subframe
,
&
slot
,
&
second
);
tti
=
xran_get_slot_idx_from_tti
(
rx_tti
,
&
frame
,
&
subframe
,
&
slot
,
&
second
);
...
@@ -95,7 +99,7 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
...
@@ -95,7 +99,7 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status)
}
}
first_rx_set
=
1
;
first_rx_set
=
1
;
if
(
first_read_set
==
1
)
{
if
(
first_read_set
==
1
)
{
slot2
=
slot
+
(
subframe
<<
1
);
slot2
=
slot
+
(
subframe
*
slots_per_subframe
);
rx_RU
[
ru_id
][
slot2
]
=
1
;
rx_RU
[
ru_id
][
slot2
]
=
1
;
if
(
last_frame
>
0
&&
frame
>
0
if
(
last_frame
>
0
&&
frame
>
0
&&
((
slot2
>
0
&&
last_frame
!=
frame
)
||
(
slot2
==
0
&&
last_frame
!=
((
1024
+
frame
-
1
)
&
1023
))))
&&
((
slot2
>
0
&&
last_frame
!=
frame
)
||
(
slot2
==
0
&&
last_frame
!=
((
1024
+
frame
-
1
)
&
1023
))))
...
@@ -164,14 +168,17 @@ int oai_physide_ul_full_slot_call_back(void *param)
...
@@ -164,14 +168,17 @@ int oai_physide_ul_full_slot_call_back(void *param)
int
read_prach_data
(
ru_info_t
*
ru
,
int
frame
,
int
slot
)
int
read_prach_data
(
ru_info_t
*
ru
,
int
frame
,
int
slot
)
{
{
/* calculate tti and subframe_id from frame, slot num */
/* calculate tti and subframe_id from frame, slot num */
int
tti
=
20
*
(
frame
)
+
(
slot
);
uint32_t
subframe
=
XranGetSubFrameNum
(
tti
,
2
,
10
);
uint32_t
is_prach_slot
=
xran_is_prach_slot
(
0
,
subframe
,
(
slot
%
2
));
int
sym_idx
=
0
;
int
sym_idx
=
0
;
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
struct
xran_prach_cp_config
*
pPrachCPConfig
=
&
(
xran_ctx
->
PrachCPConfig
);
struct
xran_prach_cp_config
*
pPrachCPConfig
=
&
(
xran_ctx
->
PrachCPConfig
);
struct
xran_ru_config
*
ru_conf
=
&
(
xran_ctx
->
fh_cfg
.
ru_conf
);
struct
xran_ru_config
*
ru_conf
=
&
(
xran_ctx
->
fh_cfg
.
ru_conf
);
int
slots_per_frame
=
10
<<
xran_ctx
->
fh_cfg
.
frame_conf
.
nNumerology
;
int
slots_per_subframe
=
1
<<
xran_ctx
->
fh_cfg
.
frame_conf
.
nNumerology
;
int
tti
=
slots_per_frame
*
(
frame
)
+
(
slot
);
uint32_t
subframe
=
slot
/
slots_per_subframe
;
uint32_t
is_prach_slot
=
xran_is_prach_slot
(
0
,
subframe
,
(
slot
%
slots_per_subframe
));
int
nb_rx_per_ru
=
ru
->
nb_rx
/
xran_ctx
->
fh_init
.
xran_ports
;
int
nb_rx_per_ru
=
ru
->
nb_rx
/
xran_ctx
->
fh_init
.
xran_ports
;
/* If it is PRACH slot, copy prach IQ from XRAN PRACH buffer to OAI PRACH buffer */
/* If it is PRACH slot, copy prach IQ from XRAN PRACH buffer to OAI PRACH buffer */
...
@@ -275,17 +282,19 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
...
@@ -275,17 +282,19 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
#endif
#endif
// return(0);
// return(0);
int
tti
=
(
*
frame
*
20
)
+
*
slot
;
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
int
slots_per_frame
=
10
<<
xran_ctx
->
fh_cfg
.
frame_conf
.
nNumerology
;
int
tti
=
slots_per_frame
*
(
*
frame
)
+
(
*
slot
);
read_prach_data
(
ru
,
*
frame
,
*
slot
);
read_prach_data
(
ru
,
*
frame
,
*
slot
);
struct
xran_device_ctx
*
xran_ctx
=
xran_dev_get_ctx
();
const
struct
xran_fh_init
*
fh_init
=
&
xran_ctx
->
fh_init
;
const
struct
xran_fh_init
*
fh_init
=
&
xran_ctx
->
fh_init
;
int
nPRBs
=
xran_ctx
->
fh_cfg
.
nULRBs
;
int
nPRBs
=
xran_ctx
->
fh_cfg
.
nULRBs
;
int
fftsize
=
1
<<
xran_ctx
->
fh_cfg
.
ru_conf
.
fftSize
;
int
fftsize
=
1
<<
xran_ctx
->
fh_cfg
.
ru_conf
.
fftSize
;
int
slot_offset_rxdata
=
3
&
(
*
slot
);
int
slot_offset_rxdata
=
3
&
(
*
slot
);
uint32_t
slot_size
=
4
*
14
*
4096
;
uint32_t
slot_size
=
4
*
14
*
fftsize
;
uint8_t
*
rx_data
=
(
uint8_t
*
)
ru
->
rxdataF
[
0
];
uint8_t
*
rx_data
=
(
uint8_t
*
)
ru
->
rxdataF
[
0
];
uint8_t
*
start_ptr
=
NULL
;
uint8_t
*
start_ptr
=
NULL
;
int
nb_rx_per_ru
=
ru
->
nb_rx
/
fh_init
->
xran_ports
;
int
nb_rx_per_ru
=
ru
->
nb_rx
/
fh_init
->
xran_ports
;
...
@@ -324,18 +333,16 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
...
@@ -324,18 +333,16 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
else
else
pData
=
p_sec_desc
->
pData
;
pData
=
p_sec_desc
->
pData
;
ptr
=
pData
;
ptr
=
pData
;
pos
=
(
int32_t
*
)(
start_ptr
+
(
4
*
sym_idx
*
4096
));
pos
=
(
int32_t
*
)(
start_ptr
+
(
4
*
sym_idx
*
fftsize
));
if
(
ptr
==
NULL
||
pos
==
NULL
)
continue
;
uint8_t
*
u8dptr
;
struct
xran_prb_map
*
pRbMap
=
pPrbMap
;
struct
xran_prb_map
*
pRbMap
=
pPrbMap
;
AssertFatal
(
ptr
!=
NULL
,
"ptr NULL
\n
"
);
AssertFatal
(
pos
!=
NULL
,
"pos NULL
\n
"
);
if
(
1
)
{
uint32_t
idxElm
=
0
;
uint32_t
idxElm
=
0
;
u8dptr
=
(
uint8_t
*
)
ptr
;
uint8_t
*
src
=
(
uint8_t
*
)
ptr
;
int16_t
payload_len
=
0
;
int16_t
payload_len
=
0
;
uint8_t
*
src
=
(
uint8_t
*
)
u8dptr
;
LOG_D
(
PHY
,
"pRbMap->nPrbElm %d
\n
"
,
pRbMap
->
nPrbElm
);
LOG_D
(
PHY
,
"pRbMap->nPrbElm %d
\n
"
,
pRbMap
->
nPrbElm
);
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
...
@@ -392,10 +399,6 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
...
@@ -392,10 +399,6 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
exit
(
-
1
);
exit
(
-
1
);
}
}
}
}
}
else
{
return
0
;
}
}
// sym_ind
}
// sym_ind
}
// ant_ind
}
// ant_ind
}
// vv_inf
}
// vv_inf
...
@@ -457,9 +460,7 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp)
...
@@ -457,9 +460,7 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp)
.
sBufferList
.
pBuffers
->
pData
;
.
sBufferList
.
pBuffers
->
pData
;
struct
xran_prb_map
*
pPrbMap
=
(
struct
xran_prb_map
*
)
pPrbMapData
;
struct
xran_prb_map
*
pPrbMap
=
(
struct
xran_prb_map
*
)
pPrbMapData
;
ptr
=
pData
;
ptr
=
pData
;
pos
=
pos
=
&
ru
->
txdataF_BF
[
ant_id
][
sym_idx
*
fftsize
];
&
ru
->
txdataF_BF
[
ant_id
][
sym_idx
*
4096
/*fp->ofdm_symbol_size*/
];
// We had to use a different ru structure than benetel
// so the access to the buffer is not the same.
uint8_t
*
u8dptr
;
uint8_t
*
u8dptr
;
struct
xran_prb_map
*
pRbMap
=
pPrbMap
;
struct
xran_prb_map
*
pRbMap
=
pPrbMap
;
...
...
radio/fhi_72/oran-config.c
View file @
713c84e4
...
@@ -500,7 +500,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in
...
@@ -500,7 +500,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in
io_cfg
->
dpdkIoVaMode
=
0
;
/* IOVA mode */
io_cfg
->
dpdkIoVaMode
=
0
;
/* IOVA mode */
io_cfg
->
dpdkMemorySize
=
0
;
/* DPDK memory size */
io_cfg
->
dpdkMemorySize
=
0
;
/* DPDK memory size */
io_cfg
->
core
=
*
gpd
(
fhip
,
nump
,
ORAN_CONFIG_IO_CORE
)
->
iptr
;
io_cfg
->
core
=
*
gpd
(
fhip
,
nump
,
ORAN_CONFIG_IO_CORE
)
->
iptr
;
io_cfg
->
system_core
=
0
;
/* TODO how called in sample app? */
io_cfg
->
system_core
=
*
gpd
(
fhip
,
nump
,
ORAN_CONFIG_SYSTEM_CORE
)
->
iptr
;
io_cfg
->
pkt_proc_core
=
get_u64_mask
(
gpd
(
fhip
,
nump
,
ORAN_CONFIG_WORKER_CORES
));
io_cfg
->
pkt_proc_core
=
get_u64_mask
(
gpd
(
fhip
,
nump
,
ORAN_CONFIG_WORKER_CORES
));
io_cfg
->
pkt_proc_core_64_127
=
0x0
;
// bitmap 0 -> no core
io_cfg
->
pkt_proc_core_64_127
=
0x0
;
// bitmap 0 -> no core
io_cfg
->
pkt_aux_core
=
0
;
/* sapmle app says 0 = "do not start" */
io_cfg
->
pkt_aux_core
=
0
;
/* sapmle app says 0 = "do not start" */
...
@@ -684,9 +684,6 @@ static bool set_fh_prach_config(const openair0_config_t *oai0,
...
@@ -684,9 +684,6 @@ static bool set_fh_prach_config(const openair0_config_t *oai0,
{
{
const
split7_config_t
*
s7cfg
=
&
oai0
->
split7
;
const
split7_config_t
*
s7cfg
=
&
oai0
->
split7
;
// for FR2, need at least to update nPrachFilterIdx
AssertFatal
(
oai0
->
nr_band
<
100
,
"can only handle FR1!
\n
"
);
prach_config
->
nPrachConfIdx
=
s7cfg
->
prach_index
;
prach_config
->
nPrachConfIdx
=
s7cfg
->
prach_index
;
prach_config
->
nPrachSubcSpacing
=
oai0
->
nr_scs_for_raster
;
prach_config
->
nPrachSubcSpacing
=
oai0
->
nr_scs_for_raster
;
prach_config
->
nPrachZeroCorrConf
=
0
;
prach_config
->
nPrachZeroCorrConf
=
0
;
...
@@ -694,7 +691,10 @@ static bool set_fh_prach_config(const openair0_config_t *oai0,
...
@@ -694,7 +691,10 @@ static bool set_fh_prach_config(const openair0_config_t *oai0,
prach_config
->
nPrachRootSeqIdx
=
0
;
prach_config
->
nPrachRootSeqIdx
=
0
;
prach_config
->
nPrachFreqStart
=
s7cfg
->
prach_freq_start
;
prach_config
->
nPrachFreqStart
=
s7cfg
->
prach_freq_start
;
prach_config
->
nPrachFreqOffset
=
(
s7cfg
->
prach_freq_start
*
12
-
oai0
->
num_rb_dl
*
6
)
*
2
;
prach_config
->
nPrachFreqOffset
=
(
s7cfg
->
prach_freq_start
*
12
-
oai0
->
num_rb_dl
*
6
)
*
2
;
if
(
oai0
->
nr_band
<
100
)
prach_config
->
nPrachFilterIdx
=
get_prach_filterindex_fr1
(
oai0
->
duplex_mode
,
s7cfg
->
prach_index
);
prach_config
->
nPrachFilterIdx
=
get_prach_filterindex_fr1
(
oai0
->
duplex_mode
,
s7cfg
->
prach_index
);
else
prach_config
->
nPrachFilterIdx
=
XRAN_FILTERINDEX_PRACH_ABC
;
prach_config
->
startSymId
=
0
;
prach_config
->
startSymId
=
0
;
prach_config
->
lastSymId
=
0
;
prach_config
->
lastSymId
=
0
;
prach_config
->
startPrbc
=
0
;
prach_config
->
startPrbc
=
0
;
...
...
radio/fhi_72/oran-init.c
View file @
713c84e4
...
@@ -78,32 +78,6 @@ static uint32_t get_nFpgaToSW_FTH_RxBufferLen(int mu)
...
@@ -78,32 +78,6 @@ static uint32_t get_nFpgaToSW_FTH_RxBufferLen(int mu)
}
}
}
}
/* is this necessary?
int32_t set_main_core(uint32_t main_core)
{
struct sched_param sched_param;
cpu_set_t cpuset;
int32_t result = 0;
memset(&sched_param, 0, sizeof(struct sched_param));
// set main thread affinity mask to CPU2
sched_param.sched_priority = 99;
CPU_ZERO(&cpuset);
printf("This system has %d processors configured and %d processors available.\n", get_nprocs_conf(), get_nprocs());
if (main_core < get_nprocs_conf())
CPU_SET(main_core, &cpuset);
else
return -1;
if ((result = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset))) {
printf("pthread_setaffinity_np failed: coreId = 2, result = %d\n", result);
}
printf("%s [CPU %2d] [PID: %6d]\n", __FUNCTION__, sched_getcpu(), getpid());
return result;
}
*/
static
struct
xran_prb_map
get_xran_prb_map_dl
(
const
struct
xran_fh_config
*
f
)
static
struct
xran_prb_map
get_xran_prb_map_dl
(
const
struct
xran_fh_config
*
f
)
{
{
struct
xran_prb_map
prbmap
=
{
struct
xran_prb_map
prbmap
=
{
...
@@ -432,11 +406,6 @@ int *oai_oran_initialize(const openair0_config_t *openair0_cfg)
...
@@ -432,11 +406,6 @@ int *oai_oran_initialize(const openair0_config_t *openair0_cfg)
print_fh_config
(
&
xran_fh_config
[
o_xu_id
]);
print_fh_config
(
&
xran_fh_config
[
o_xu_id
]);
}
}
// if ((xret = set_main_core(init.something)) < 0) {
// printf("set_main_core() failed %d\n", xret);
// exit(-1);
// }
xret
=
xran_init
(
0
,
NULL
,
&
init
,
NULL
,
&
gxran_handle
);
xret
=
xran_init
(
0
,
NULL
,
&
init
,
NULL
,
&
gxran_handle
);
if
(
xret
!=
XRAN_STATUS_SUCCESS
)
{
if
(
xret
!=
XRAN_STATUS_SUCCESS
)
{
printf
(
"xran_init failed %d
\n
"
,
xret
);
printf
(
"xran_init failed %d
\n
"
,
xret
);
...
...
radio/fhi_72/oran-params.h
View file @
713c84e4
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#define CONFIG_STRING_ORAN "fhi_72"
#define CONFIG_STRING_ORAN "fhi_72"
#define ORAN_CONFIG_DPDK_DEVICES "dpdk_devices"
#define ORAN_CONFIG_DPDK_DEVICES "dpdk_devices"
#define ORAN_CONFIG_SYSTEM_CORE "system_core"
#define ORAN_CONFIG_IO_CORE "io_core"
#define ORAN_CONFIG_IO_CORE "io_core"
#define ORAN_CONFIG_WORKER_CORES "worker_cores"
#define ORAN_CONFIG_WORKER_CORES "worker_cores"
#define ORAN_CONFIG_DU_ADDR "du_addr"
#define ORAN_CONFIG_DU_ADDR "du_addr"
...
@@ -42,6 +43,7 @@
...
@@ -42,6 +43,7 @@
// TODO: ethernet addr check
// TODO: ethernet addr check
#define ORAN_GLOBALPARAMS_DESC { \
#define ORAN_GLOBALPARAMS_DESC { \
{ORAN_CONFIG_DPDK_DEVICES, "PCI addr of devices for DPDK\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
{ORAN_CONFIG_DPDK_DEVICES, "PCI addr of devices for DPDK\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
{ORAN_CONFIG_SYSTEM_CORE, "DPDK control threads core\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
{ORAN_CONFIG_IO_CORE, "DPDK Core used for IO\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \
{ORAN_CONFIG_IO_CORE, "DPDK Core used for IO\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \
{ORAN_CONFIG_WORKER_CORES, "CPU Cores to use for workers\n", PARAMFLAG_MANDATORY, .uptr=NULL, .defintarrayval=NULL,TYPE_UINTARRAY, 0}, \
{ORAN_CONFIG_WORKER_CORES, "CPU Cores to use for workers\n", PARAMFLAG_MANDATORY, .uptr=NULL, .defintarrayval=NULL,TYPE_UINTARRAY, 0}, \
{ORAN_CONFIG_DU_ADDR, "Ether addr of DU\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
{ORAN_CONFIG_DU_ADDR, "Ether addr of DU\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
...
...
radio/fhi_72/oran_isolate.c
View file @
713c84e4
...
@@ -209,10 +209,11 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot)
...
@@ -209,10 +209,11 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot)
printf
(
"ORAN: %d.%d ORAN_fh_if4p5_south_in ERROR in RX function
\n
"
,
f
,
sl
);
printf
(
"ORAN: %d.%d ORAN_fh_if4p5_south_in ERROR in RX function
\n
"
,
f
,
sl
);
}
}
int
slots_per_frame
=
10
<<
(
ru
->
openair0_cfg
.
nr_scs_for_raster
);
proc
->
tti_rx
=
sl
;
proc
->
tti_rx
=
sl
;
proc
->
frame_rx
=
f
;
proc
->
frame_rx
=
f
;
proc
->
tti_tx
=
(
sl
+
sl_ahead
)
%
20
;
proc
->
tti_tx
=
(
sl
+
sl_ahead
)
%
slots_per_frame
;
proc
->
frame_tx
=
(
sl
>
(
19
-
sl_ahead
))
?
(
f
+
1
)
&
1023
:
f
;
proc
->
frame_tx
=
(
sl
>
(
slots_per_frame
-
1
-
sl_ahead
))
?
(
f
+
1
)
&
1023
:
f
;
if
(
proc
->
first_rx
==
0
)
{
if
(
proc
->
first_rx
==
0
)
{
if
(
proc
->
tti_rx
!=
*
slot
)
{
if
(
proc
->
tti_rx
!=
*
slot
)
{
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf
View file @
713c84e4
...
@@ -284,6 +284,7 @@ log_config : {
...
@@ -284,6 +284,7 @@ log_config : {
fhi_72
= {
fhi_72
= {
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
system_core
=
0
;
io_core
=
4
;
io_core
=
4
;
worker_cores
= (
2
);
worker_cores
= (
2
);
du_addr
= (
"76:76:64:6e:00:01"
,
"76:76:64:6e:00:01"
);
du_addr
= (
"76:76:64:6e:00:01"
,
"76:76:64:6e:00:01"
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel650.conf
View file @
713c84e4
...
@@ -272,6 +272,7 @@ log_config :
...
@@ -272,6 +272,7 @@ log_config :
fhi_72
= {
fhi_72
= {
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
system_core
=
0
;
io_core
=
4
;
io_core
=
4
;
worker_cores
= (
2
);
worker_cores
= (
2
);
du_addr
= (
"00:11:22:33:44:66"
,
"00:11:22:33:44:67"
);
du_addr
= (
"00:11:22:33:44:66"
,
"00:11:22:33:44:67"
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf
View file @
713c84e4
...
@@ -275,6 +275,7 @@ log_config :
...
@@ -275,6 +275,7 @@ log_config :
fhi_72
= {
fhi_72
= {
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
dpdk_devices
= (
"0000:31:06.0"
,
"0000:31:06.1"
);
system_core
=
0
;
io_core
=
4
;
io_core
=
4
;
worker_cores
= (
2
);
worker_cores
= (
2
);
du_addr
= (
"00:11:22:33:44:99"
,
"00:11:22:33:44:99"
);
du_addr
= (
"00:11:22:33:44:99"
,
"00:11:22:33:44:99"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment