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
littleBu
OpenXG-RAN
Commits
ef40f20f
Commit
ef40f20f
authored
Jan 23, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat fhi_72 lib
parent
39757230
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
733 additions
and
722 deletions
+733
-722
radio/fhi_72/oaioran.c
radio/fhi_72/oaioran.c
+412
-401
radio/fhi_72/oaioran.h
radio/fhi_72/oaioran.h
+4
-4
radio/fhi_72/oran-config.c
radio/fhi_72/oran-config.c
+196
-170
radio/fhi_72/oran-init.c
radio/fhi_72/oran-init.c
+5
-6
radio/fhi_72/oran-init.h
radio/fhi_72/oran-init.h
+3
-3
radio/fhi_72/oran-params.h
radio/fhi_72/oran-params.h
+0
-3
radio/fhi_72/oran.h
radio/fhi_72/oran.h
+7
-15
radio/fhi_72/oran_isolate.c
radio/fhi_72/oran_isolate.c
+97
-109
radio/fhi_72/oran_isolate.h
radio/fhi_72/oran_isolate.h
+9
-11
No files found.
radio/fhi_72/oaioran.c
View file @
ef40f20f
This diff is collapsed.
Click to expand it.
radio/fhi_72/oaioran.h
View file @
ef40f20f
...
...
@@ -32,6 +32,6 @@ typedef struct {
}
oran_sync_info_t
;
void
oai_xran_fh_rx_callback
(
void
*
pCallbackTag
,
xran_status_t
status
);
int
oai_physide_dl_tti_call_back
(
void
*
param
);
int
oai_physide_dl_tti_call_back
(
void
*
param
);
#endif
/* OAIORAN_H */
radio/fhi_72/oran-config.c
View file @
ef40f20f
...
...
@@ -75,7 +75,8 @@ static void print_fh_eowd_port(unsigned index, unsigned vf, const struct xran_ec
rspTimerIdx %ld
\n
\
delaySamples [%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld]
\n
\
delayAvg %ld
\n
"
,
index
,
vf
,
index
,
vf
,
eowd_port
->
t1
,
eowd_port
->
t2
,
eowd_port
->
tr
,
...
...
@@ -87,14 +88,22 @@ static void print_fh_eowd_port(unsigned index, unsigned vf, const struct xran_ec
eowd_port
->
numMeas
,
eowd_port
->
txDone
,
eowd_port
->
rspTimerIdx
,
eowd_port
->
delaySamples
[
0
],
eowd_port
->
delaySamples
[
1
],
eowd_port
->
delaySamples
[
2
],
eowd_port
->
delaySamples
[
3
],
eowd_port
->
delaySamples
[
4
],
eowd_port
->
delaySamples
[
5
],
eowd_port
->
delaySamples
[
6
],
eowd_port
->
delaySamples
[
7
],
eowd_port
->
delaySamples
[
8
],
eowd_port
->
delaySamples
[
9
],
eowd_port
->
delaySamples
[
10
],
eowd_port
->
delaySamples
[
11
],
eowd_port
->
delaySamples
[
12
],
eowd_port
->
delaySamples
[
13
],
eowd_port
->
delaySamples
[
14
],
eowd_port
->
delaySamples
[
15
],
eowd_port
->
delaySamples
[
0
],
eowd_port
->
delaySamples
[
1
],
eowd_port
->
delaySamples
[
2
],
eowd_port
->
delaySamples
[
3
],
eowd_port
->
delaySamples
[
4
],
eowd_port
->
delaySamples
[
5
],
eowd_port
->
delaySamples
[
6
],
eowd_port
->
delaySamples
[
7
],
eowd_port
->
delaySamples
[
8
],
eowd_port
->
delaySamples
[
9
],
eowd_port
->
delaySamples
[
10
],
eowd_port
->
delaySamples
[
11
],
eowd_port
->
delaySamples
[
12
],
eowd_port
->
delaySamples
[
13
],
eowd_port
->
delaySamples
[
14
],
eowd_port
->
delaySamples
[
15
],
eowd_port
->
delayAvg
);
}
...
...
@@ -110,17 +119,26 @@ static void print_fh_init_io_cfg(const struct xran_io_cfg *io_cfg)
bbdev_mode %d
\n
\
dpdkIoVaMode %d
\n
\
dpdkMemorySize %d
\n
"
,
io_cfg
->
id
,
io_cfg
->
id
==
0
?
"O-DU"
:
"O-RU"
,
io_cfg
->
id
,
io_cfg
->
id
==
0
?
"O-DU"
:
"O-RU"
,
io_cfg
->
num_vfs
,
io_cfg
->
num_rxq
,
io_cfg
->
dpdk_dev
[
XRAN_UP_VF
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF1
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF1
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF2
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF2
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF3
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF3
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF4
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF4
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF5
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF5
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF6
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF6
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF7
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF7
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF1
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF1
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF2
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF2
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF3
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF3
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF4
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF4
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF5
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF5
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF6
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF6
],
io_cfg
->
dpdk_dev
[
XRAN_UP_VF7
],
io_cfg
->
dpdk_dev
[
XRAN_CP_VF7
],
io_cfg
->
bbdev_dev
[
0
],
io_cfg
->
bbdev_mode
,
io_cfg
->
dpdkIoVaMode
,
...
...
@@ -144,14 +162,22 @@ static void print_fh_init_io_cfg(const struct xran_io_cfg *io_cfg)
io_cfg
->
pkt_proc_core_64_127
,
io_cfg
->
pkt_aux_core
,
io_cfg
->
timing_core
,
io_cfg
->
port
[
XRAN_UP_VF
],
io_cfg
->
port
[
XRAN_CP_VF
],
io_cfg
->
port
[
XRAN_UP_VF1
],
io_cfg
->
port
[
XRAN_CP_VF1
],
io_cfg
->
port
[
XRAN_UP_VF2
],
io_cfg
->
port
[
XRAN_CP_VF2
],
io_cfg
->
port
[
XRAN_UP_VF3
],
io_cfg
->
port
[
XRAN_CP_VF3
],
io_cfg
->
port
[
XRAN_UP_VF4
],
io_cfg
->
port
[
XRAN_CP_VF4
],
io_cfg
->
port
[
XRAN_UP_VF5
],
io_cfg
->
port
[
XRAN_CP_VF5
],
io_cfg
->
port
[
XRAN_UP_VF6
],
io_cfg
->
port
[
XRAN_CP_VF6
],
io_cfg
->
port
[
XRAN_UP_VF7
],
io_cfg
->
port
[
XRAN_CP_VF7
],
io_cfg
->
port
[
XRAN_UP_VF
],
io_cfg
->
port
[
XRAN_CP_VF
],
io_cfg
->
port
[
XRAN_UP_VF1
],
io_cfg
->
port
[
XRAN_CP_VF1
],
io_cfg
->
port
[
XRAN_UP_VF2
],
io_cfg
->
port
[
XRAN_CP_VF2
],
io_cfg
->
port
[
XRAN_UP_VF3
],
io_cfg
->
port
[
XRAN_CP_VF3
],
io_cfg
->
port
[
XRAN_UP_VF4
],
io_cfg
->
port
[
XRAN_CP_VF4
],
io_cfg
->
port
[
XRAN_UP_VF5
],
io_cfg
->
port
[
XRAN_CP_VF5
],
io_cfg
->
port
[
XRAN_UP_VF6
],
io_cfg
->
port
[
XRAN_CP_VF6
],
io_cfg
->
port
[
XRAN_UP_VF7
],
io_cfg
->
port
[
XRAN_CP_VF7
],
io_cfg
->
io_sleep
,
io_cfg
->
nEthLinePerPort
,
io_cfg
->
nEthLineSpeed
,
...
...
@@ -592,7 +618,7 @@ bool set_fh_init(struct xran_fh_init *fh_init)
fh_init
->
p_o_du_addr
=
calloc
(
num_du_addr
,
sizeof
(
struct
rte_ether_addr
));
AssertFatal
(
fh_init
->
p_o_du_addr
!=
NULL
,
"out of memory
\n
"
);
for
(
int
i
=
0
;
i
<
num_du_addr
;
++
i
)
{
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_du_addr
;
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_du_addr
;
if
(
get_ether_addr
(
du_addrs
[
i
],
&
ea
[
i
])
==
NULL
)
{
printf
(
"could not read ethernet address '%s' for DU!
\n
"
,
du_addrs
[
i
]);
return
false
;
...
...
@@ -602,7 +628,7 @@ bool set_fh_init(struct xran_fh_init *fh_init)
char
**
ru_addrs
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_RU_ADDR
)
->
strlistptr
;
AssertFatal
(
fh_init
->
p_o_ru_addr
!=
NULL
,
"out of memory
\n
"
);
for
(
int
i
=
0
;
i
<
num_ru_addr
;
++
i
)
{
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_ru_addr
;
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_ru_addr
;
if
(
get_ether_addr
(
ru_addrs
[
i
],
&
ea
[
i
])
==
NULL
)
{
printf
(
"could not read ethernet address '%s' for RU!
\n
"
,
ru_addrs
[
i
]);
return
false
;
...
...
@@ -651,7 +677,10 @@ static enum xran_cp_filterindex get_prach_filterindex_fr1(duplex_mode_t mode, in
// this is a hack
int
g_kbar
;
static
bool
set_fh_prach_config
(
const
openair0_config_t
*
oai0
,
const
paramdef_t
*
prachp
,
int
nprach
,
struct
xran_prach_config
*
prach_config
)
static
bool
set_fh_prach_config
(
const
openair0_config_t
*
oai0
,
const
paramdef_t
*
prachp
,
int
nprach
,
struct
xran_prach_config
*
prach_config
)
{
const
split7_config_t
*
s7cfg
=
&
oai0
->
split7
;
...
...
@@ -686,7 +715,7 @@ static bool set_fh_srs_config(struct xran_srs_config *srs_config)
return
true
;
}
static
bool
set_fh_frame_config
(
const
openair0_config_t
*
oai0
,
struct
xran_frame_config
*
frame_config
)
static
bool
set_fh_frame_config
(
const
openair0_config_t
*
oai0
,
struct
xran_frame_config
*
frame_config
)
{
const
split7_config_t
*
s7cfg
=
&
oai0
->
split7
;
frame_config
->
nFrameDuplexType
=
oai0
->
duplex_mode
==
duplex_mode_TDD
?
XRAN_TDD
:
XRAN_FDD
;
...
...
@@ -722,9 +751,7 @@ static bool set_maxmin_pd(const paramdef_t *pd, int num, const char *name, uint1
{
const
paramdef_t
*
p
=
gpd
(
pd
,
num
,
name
);
if
(
p
->
numelt
!=
2
)
{
printf
(
"parameter list
\"
%s
\"
should have exactly two parameters (max&min), but has %d
\n
"
,
name
,
num
);
printf
(
"parameter list
\"
%s
\"
should have exactly two parameters (max&min), but has %d
\n
"
,
name
,
num
);
return
false
;
}
*
min
=
p
->
uptr
[
0
];
...
...
@@ -737,7 +764,7 @@ static bool set_maxmin_pd(const paramdef_t *pd, int num, const char *name, uint1
}
extern
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
bool
set_fh_config
(
int
ru_idx
,
int
num_rus
,
const
openair0_config_t
*
oai0
,
struct
xran_fh_config
*
fh_config
)
bool
set_fh_config
(
int
ru_idx
,
int
num_rus
,
const
openair0_config_t
*
oai0
,
struct
xran_fh_config
*
fh_config
)
{
AssertFatal
(
num_rus
==
1
||
num_rus
==
2
,
"only support 1 or 2 RUs as of now
\n
"
);
AssertFatal
(
ru_idx
<
num_rus
,
"illegal ru_idx %d: must be < %d
\n
"
,
ru_idx
,
num_rus
);
...
...
@@ -766,8 +793,7 @@ bool set_fh_config(int ru_idx, int num_rus, const openair0_config_t* oai0, struc
const
int
nfh
=
sizeofArray
(
FHconfigs
);
config_getlist
(
config_get_if
(),
&
FH_ConfigList
,
FHconfigs
,
nfh
,
aprefix
);
if
(
FH_ConfigList
.
numelt
==
0
)
{
printf
(
"No configuration section
\"
%s
\"
found inside
\"
%s
\"
: cannot initialize fhi_lib!
\n
"
,
CONFIG_STRING_ORAN_FH
,
aprefix
);
printf
(
"No configuration section
\"
%s
\"
found inside
\"
%s
\"
: cannot initialize fhi_lib!
\n
"
,
CONFIG_STRING_ORAN_FH
,
aprefix
);
return
false
;
}
paramdef_t
*
fhp
=
FH_ConfigList
.
paramarray
[
ru_idx
];
...
...
radio/fhi_72/oran-init.c
View file @
ef40f20f
...
...
@@ -35,16 +35,15 @@
* 840 samples for long sequence or 144 for short sequence. The payload length
* is 840*16*2/8 octets.*/
#ifdef FCN_1_2_6_EARLIER
#define PRACH_PLAYBACK_BUFFER_BYTES (144
*
4L)
#define PRACH_PLAYBACK_BUFFER_BYTES (144
*
4L)
#else
#define PRACH_PLAYBACK_BUFFER_BYTES (840
*
4L)
#define PRACH_PLAYBACK_BUFFER_BYTES (840
*
4L)
#endif
// structure holding allocated memory for ports (multiple DUs) and sectors
// (multiple CCs)
static
oran_port_instance_t
gPortInst
[
XRAN_PORTS_NUM
][
XRAN_MAX_SECTOR_NR
];
void
*
gxran_handle
;
void
*
gxran_handle
;
static
uint32_t
get_nSW_ToFpga_FTH_TxBufferLen
(
int
mu
,
int
sections
)
{
...
...
radio/fhi_72/oran-init.h
View file @
ef40f20f
...
...
@@ -55,7 +55,7 @@ typedef struct oran_port_instance_t {
}
oran_port_instance_t
;
extern
struct
xran_fh_config
gxran_fh_config
[
XRAN_PORTS_NUM
];
extern
void
*
gxran_handle
;
extern
void
*
gxran_handle
;
struct
openair0_config
;
int
*
oai_oran_initialize
(
const
struct
openair0_config
*
openair0_cfg
);
...
...
radio/fhi_72/oran-params.h
View file @
ef40f20f
...
...
@@ -53,7 +53,6 @@
}
// clang-format on
#define CONFIG_STRING_ORAN_FH "fh_config"
#define ORAN_FH_CONFIG_TADV_CP_DL "Tadv_cp_dl"
...
...
@@ -86,7 +85,6 @@
}
// clang-format on
#define CONFIG_STRING_ORAN_RU "ru_config"
#define ORAN_RU_CONFIG_IQWIDTH "iq_width"
...
...
@@ -101,7 +99,6 @@
}
// clang-format on
#define CONFIG_STRING_ORAN_PRACH "prach_config"
#define ORAN_PRACH_CONFIG_EAXC_OFFSET "eAxC_offset"
...
...
radio/fhi_72/oran.h
View file @
ef40f20f
...
...
@@ -24,19 +24,11 @@
#include "shared_buffers.h"
#include "common_lib.h"
void
oran_fh_if4p5_south_out
(
RU_t
*
ru
,
int
frame
,
int
slot
,
uint64_t
timestamp
);
void
oran_fh_if4p5_south_out
(
RU_t
*
ru
,
int
frame
,
int
slot
,
uint64_t
timestamp
);
void
oran_fh_if4p5_south_in
(
RU_t
*
ru
,
int
*
frame
,
int
*
slot
);
int
transport_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
);
void
oran_fh_if4p5_south_in
(
RU_t
*
ru
,
int
*
frame
,
int
*
slot
);
int
transport_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
);
typedef
struct
{
eth_state_t
e
;
...
...
radio/fhi_72/oran_isolate.c
View file @
ef40f20f
This diff is collapsed.
Click to expand it.
radio/fhi_72/oran_isolate.h
View file @
ef40f20f
...
...
@@ -32,8 +32,7 @@
/*
* Structure added to bear the information needed from OAI RU
*/
typedef
struct
ru_info_s
{
typedef
struct
ru_info_s
{
// Needed for UL
int
nb_rx
;
int32_t
**
rxdataF
;
...
...
@@ -49,7 +48,6 @@ typedef struct ru_info_s{
int
xran_fh_rx_read_slot
(
ru_info_t
*
ru
,
int
*
frame
,
int
*
slot
);
int
xran_fh_tx_send_slot
(
ru_info_t
*
ru
,
int
frame
,
int
slot
,
uint64_t
timestamp
);
int
compute_xran_statistics
();
#endif
/* _ORAN_ISOLATE_H_ */
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