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
zzha zzha
OpenXG-RAN
Commits
987f88ff
Commit
987f88ff
authored
Aug 16, 2022
by
thamizhselvan.k
Committed by
Manish
Jan 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes for copying PRACH data from xran buffer to oai buffer
parent
7466a3ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
0 deletions
+56
-0
targets/ARCH/ETHERNET/oran/5g/oran.cpp
targets/ARCH/ETHERNET/oran/5g/oran.cpp
+50
-0
targets/ARCH/ETHERNET/oran/5g/oran_isolate.c
targets/ARCH/ETHERNET/oran/5g/oran_isolate.c
+3
-0
targets/ARCH/ETHERNET/oran/5g/oran_isolate.h
targets/ARCH/ETHERNET/oran/5g/oran_isolate.h
+2
-0
targets/ARCH/ORAN_FHI/lib/xran_common.h
targets/ARCH/ORAN_FHI/lib/xran_common.h
+1
-0
No files found.
targets/ARCH/ETHERNET/oran/5g/oran.cpp
View file @
987f88ff
...
...
@@ -525,6 +525,56 @@ return(0);
}
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
int
read_prach_data
(
ru_info_t
*
ru
,
int
frame
,
int
slot
)
{
p_xran_dev_ctx_2
=
xran_dev_get_ctx
();
struct
rte_mbuf
*
mb
;
/* calculate tti and subframe_id from frame, slot num */
int
tti
=
10
*
(
frame
)
+
(
slot
);
uint32_t
subframe
=
XranGetSubFrameNum
(
tti
,
2
,
10
);
uint32_t
is_prach_slot
=
xran_is_prach_slot
(
subframe
,
(
slot
%
2
));
int
sym_idx
=
0
;
struct
xran_prach_cp_config
*
pPrachCPConfig
=
&
(
p_xran_dev_ctx_2
->
PrachCPConfig
);
/* If it is PRACH slot, copy prach IQ from XRAN PRACH buffer to OAI PRACH buffer */
if
(
is_prach_slot
)
{
for
(
sym_idx
=
0
;
sym_idx
<
pPrachCPConfig
->
numSymbol
;
sym_idx
++
)
{
mb
=
(
struct
rte_mbuf
*
)
p_xran_dev_ctx_2
->
sFHPrachRxBbuIoBufCtrl
[
tti
%
40
][
0
][
0
].
sBufferList
.
pBuffers
[
sym_idx
].
pCtrl
;
if
(
mb
)
{
uint16_t
*
dst
,
*
src
;
int
idx
=
0
;
dst
=
(
uint16_t
*
)((
uint8_t
*
)
ru
->
prach_buf
+
(
sym_idx
*
576
));
src
=
(
uint16_t
*
)
((
uint8_t
*
)
p_xran_dev_ctx_2
->
sFHPrachRxBbuIoBufCtrl
[
tti
%
40
][
0
][
0
].
sBufferList
.
pBuffers
[
sym_idx
].
pData
);
/* convert Network order to host order */
for
(
idx
=
0
;
idx
<
576
/
2
;
idx
++
)
{
dst
[
idx
]
=
ntohs
(
src
[
idx
]);
}
}
else
{
/* TODO: Unlikely this code never gets executed */
printf
(
"%s():%d, There is no prach ctrl data for symb %d
\n
"
,
__func__
,
__LINE__
,
sym_idx
);
}
}
}
return
(
0
);
}
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern
"C"
{
...
...
targets/ARCH/ETHERNET/oran/5g/oran_isolate.c
View file @
987f88ff
...
...
@@ -288,6 +288,9 @@ void oran_fh_if4p5_south_in(RU_t *ru,
ru_info_t
ru_info
;
ru_info
.
nb_rx
=
ru
->
nb_rx
;
ru_info
.
rxdataF
=
ru
->
common
.
rxdataF
;
ru_info
.
prach_buf
=
(
int
*
)
ru
->
prach_rxsigF
[
0
][
0
];
//index: [prach_oca][ant_id]
read_prach_data
(
&
ru_info
,
*
frame
,
*
slot
);
int
ret
=
xran_fh_rx_read_slot
(
s
->
oran_priv
,
&
ru_info
,
*
frame
,
*
slot
);
...
...
targets/ARCH/ETHERNET/oran/5g/oran_isolate.h
View file @
987f88ff
...
...
@@ -43,6 +43,8 @@ typedef struct ru_info_s{
int
nb_tx
;
int32_t
**
txdataF_BF
;
// Needed for Prach
int
*
prach_buf
;
}
ru_info_t
;
#ifdef __cplusplus
...
...
targets/ARCH/ORAN_FHI/lib/xran_common.h
View file @
987f88ff
...
...
@@ -348,6 +348,7 @@ uint8_t xran_get_num_ant_elm(void *pHandle);
enum
xran_category
xran_get_ru_category
(
void
*
pHandle
);
struct
xran_device_ctx
*
xran_dev_get_ctx
(
void
);
int
xran_is_prach_slot
(
uint32_t
subframe_id
,
uint32_t
slot_id
);
int
xran_register_cb_mbuf2ring
(
xran_ethdi_mbuf_send_fn
mbuf_send_cp
,
xran_ethdi_mbuf_send_fn
mbuf_send_up
);
...
...
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