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
64b683d4
Commit
64b683d4
authored
Feb 03, 2022
by
Sofia Pison
Committed by
rajeshwari.p
Dec 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix offset in RX compressed
parent
a93e3e63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
83 deletions
+36
-83
targets/ARCH/ETHERNET/oran/5g/oran.cpp
targets/ARCH/ETHERNET/oran/5g/oran.cpp
+36
-83
No files found.
targets/ARCH/ETHERNET/oran/5g/oran.cpp
View file @
64b683d4
...
@@ -563,22 +563,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
...
@@ -563,22 +563,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
int
maxflowid
=
num_eaxc
*
(
nSectorNum
-
1
)
+
(
xran_max_antenna_nr
-
1
);
int
maxflowid
=
num_eaxc
*
(
nSectorNum
-
1
)
+
(
xran_max_antenna_nr
-
1
);
//printf("\n ORAN south in frame:%d, slot:%d. oran cpp ru.rxdataF \n",frame,slot);
#if 0
for(int hhh=0; hhh<(14); hhh++ ){
for(int jjj=0; jjj<2048; jjj++){
if(ru->rxdataF[0][hhh*2048+jjj] > 0){
printf(" %d:%x ",hhh*2048+jjj,ru->rxdataF[0][hhh*2048+jjj]);
}
}
};
printf(" \n");
//exit(-1);
#endif
//printf("the maximum flowID will be=%d\n",maxflowid);
for
(
uint16_t
cc_id
=
0
;
cc_id
<
1
/*nSectorNum*/
;
cc_id
++
){
// OAI does not support multiple CC yet.
for
(
uint16_t
cc_id
=
0
;
cc_id
<
1
/*nSectorNum*/
;
cc_id
++
){
// OAI does not support multiple CC yet.
for
(
uint8_t
ant_id
=
0
;
ant_id
<
xran_max_antenna_nr
&&
ant_id
<
ru
->
nb_rx
;
ant_id
++
){
for
(
uint8_t
ant_id
=
0
;
ant_id
<
xran_max_antenna_nr
&&
ant_id
<
ru
->
nb_rx
;
ant_id
++
){
// This loop would better be more inner to avoid confusion and maybe also errors.
// This loop would better be more inner to avoid confusion and maybe also errors.
...
@@ -610,7 +594,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
...
@@ -610,7 +594,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
struct
xran_prb_elm
*
p_prbMapElm
=
&
pRbMap
->
prbMap
[
idxElm
];
struct
xran_prb_elm
*
p_prbMapElm
=
&
pRbMap
->
prbMap
[
idxElm
];
//printf("RRR : nPrbElm=%d\n",pRbMap->nPrbElm);
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
struct
xran_section_desc
*
p_sec_desc
=
NULL
;
struct
xran_section_desc
*
p_sec_desc
=
NULL
;
p_prbMapElm
=
&
pRbMap
->
prbMap
[
idxElm
];
p_prbMapElm
=
&
pRbMap
->
prbMap
[
idxElm
];
...
@@ -632,54 +615,55 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
...
@@ -632,54 +615,55 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
exit
(
-
1
);
exit
(
-
1
);
}
}
// Calculation of the pointer for the section in the buffer.
// Calculation of the pointer for the section in the buffer.
//if(frame==0 && slot==6){printf("Romain: Writing to the buffer! \n");}
// first half
// first half
dst1
=
(
uint8_t
*
)(
pos
+
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
);
dst1
=
(
uint8_t
*
)(
pos
+
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
);
// second half
// second half
dst2
=
(
uint8_t
*
)(
pos
+
(
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
+
1272
/
2
)
+
2048
-
1272
);
dst2
=
(
uint8_t
*
)(
pos
+
(
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
+
1272
/
2
)
+
2048
-
1272
);
//printf("RRR: idxElm=%d,\tnRBStart=%d,\tpos=%p,\tsrc=%p\n",idxElm,p_prbMapElm->nRBStart,pos,src
);
printf
(
"RRR: idxElm=%d
\t
compMethod=%d
\t
iqWidth=%d
\n
"
,
idxElm
,
p_prbMapElm
->
compMethod
,
p_prbMapElm
->
iqWidth
);
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
payload_len
=
p_prbMapElm
->
nRBSize
*
N_SC_PER_PRB
*
4L
;
payload_len
=
p_prbMapElm
->
nRBSize
*
N_SC_PER_PRB
*
4L
;
src1
=
src2
+
payload_len
/
2
;
src1
=
src2
+
payload_len
/
2
;
//printf("RRR: dst1=%p,\tsrc1=%p,\tpayload_len=%d\n\n",dst1,src1,payload_len);
rte_memcpy
(
dst1
,
src1
,
payload_len
/
2
);
rte_memcpy
(
dst1
,
src1
,
payload_len
/
2
);
rte_memcpy
(
dst2
,
src2
,
payload_len
/
2
);
rte_memcpy
(
dst2
,
src2
,
payload_len
/
2
);
}
else
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
}
else
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
printf
(
"idxElm=%d, compMeth==BLKFLOAT
\n
"
,
idxElm
);
struct
xranlib_decompress_request
bfp_decom_req_2
;
struct
xranlib_decompress_request
bfp_decom_req
;
struct
xranlib_decompress_response
bfp_decom_rsp_2
;
struct
xranlib_decompress_response
bfp_decom_rsp
;
struct
xranlib_decompress_request
bfp_decom_req_1
;
struct
xranlib_decompress_response
bfp_decom_rsp_1
;
payload_len
=
(
3
*
p_prbMapElm
->
iqWidth
+
1
)
*
p_prbMapElm
->
nRBSize
;
payload_len
=
(
3
*
p_prbMapElm
->
iqWidth
+
1
)
*
p_prbMapElm
->
nRBSize
;
memset
(
&
bfp_decom_req
,
0
,
sizeof
(
struct
xranlib_decompress_request
));
memset
(
&
bfp_decom_req_2
,
0
,
sizeof
(
struct
xranlib_decompress_request
));
memset
(
&
bfp_decom_rsp
,
0
,
sizeof
(
struct
xranlib_decompress_response
));
memset
(
&
bfp_decom_rsp_2
,
0
,
sizeof
(
struct
xranlib_decompress_response
));
// BEWARE! Compression experimental.
memset
(
&
bfp_decom_req_1
,
0
,
sizeof
(
struct
xranlib_decompress_request
));
// TODO Check if it is really working.
memset
(
&
bfp_decom_rsp_1
,
0
,
sizeof
(
struct
xranlib_decompress_response
));
bfp_decom_req
.
data_in
=
(
int8_t
*
)
src2
;
bfp_decom_req
.
numRBs
=
p_prbMapElm
->
nRBSize
;
bfp_decom_req
.
len
=
payload_len
/
2
;
bfp_decom_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_decom_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
bfp_decom_rsp
.
data_out
=
(
int16_t
*
)
dst2
;
bfp_decom_req_2
.
data_in
=
(
int8_t
*
)
src2
;
bfp_decom_rsp
.
len
=
0
;
bfp_decom_req_2
.
numRBs
=
p_prbMapElm
->
nRBSize
/
2
;
bfp_decom_req_2
.
len
=
payload_len
/
2
;
bfp_decom_req_2
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_decom_req_2
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
xranlib_decompress_avx512
(
&
bfp_decom_req
,
&
bfp_decom_rsp
);
bfp_decom_rsp_2
.
data_out
=
(
int16_t
*
)
dst2
;
bfp_decom_rsp_2
.
len
=
0
;
int16_t
first_half_len
=
bfp_decom_rsp
.
len
;
xranlib_decompress_avx512
(
&
bfp_decom_req_2
,
&
bfp_decom_rsp_2
);
src1
=
src2
+
payload_len
/
2
;
bfp_decom_req
.
data_in
=
(
int8_t
*
)
src1
;
int16_t
first_half_len
=
bfp_decom_rsp_2
.
len
;
bfp_decom_req
.
numRBs
=
p_prbMapElm
->
nRBSize
;
src1
=
src2
+
(
payload_len
/
2
);
bfp_decom_req
.
len
=
payload_len
/
2
;
bfp_decom_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_decom_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
bfp_decom_rsp
.
data_out
=
(
int16_t
*
)
dst1
;
bfp_decom_req_1
.
data_in
=
(
int8_t
*
)
src1
;
bfp_decom_rsp
.
len
=
0
;
bfp_decom_req_1
.
numRBs
=
p_prbMapElm
->
nRBSize
/
2
;
bfp_decom_req_1
.
len
=
payload_len
/
2
;
bfp_decom_req_1
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_decom_req_1
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
xranlib_decompress_avx512
(
&
bfp_decom_req
,
&
bfp_decom_rsp
);
bfp_decom_rsp_1
.
data_out
=
(
int16_t
*
)
dst1
;
payload_len
=
bfp_decom_rsp
.
len
+
first_half_len
;
bfp_decom_rsp_1
.
len
=
0
;
xranlib_decompress_avx512
(
&
bfp_decom_req_1
,
&
bfp_decom_rsp_1
);
payload_len
=
bfp_decom_rsp_1
.
len
+
first_half_len
;
}
else
{
}
else
{
printf
(
"p_prbMapElm->compMethod == %d is not supported
\n
"
,
printf
(
"p_prbMapElm->compMethod == %d is not supported
\n
"
,
p_prbMapElm
->
compMethod
);
p_prbMapElm
->
compMethod
);
...
@@ -692,8 +676,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
...
@@ -692,8 +676,6 @@ int xran_fh_rx_read_slot(void *xranlib_, ru_info_t *ru, int frame, int slot){
printf
(
"ptr ==NULL
\n
"
);
printf
(
"ptr ==NULL
\n
"
);
}
}
}
}
//printf("RRR: exit ...\n");
//exit(-1);
}
}
}
}
return
(
0
);
return
(
0
);
...
@@ -741,22 +723,6 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -741,22 +723,6 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
int
maxflowid
=
num_eaxc
*
(
nSectorNum
-
1
)
+
(
xran_max_antenna_nr
-
1
);
int
maxflowid
=
num_eaxc
*
(
nSectorNum
-
1
)
+
(
xran_max_antenna_nr
-
1
);
#if 0
printf("\n ORAN south out frame:%d, slot:%d. oran cpp ru.txdataF_BF \n",frame,slot);
for(int hhh=0; hhh<(14); hhh++ ){
for(int jjj=0; jjj<2048; jjj++){
if(ru->txdataF_BF[0][hhh*2048+jjj] > 0){
printf(" %d:%x ",hhh*2048+jjj,ru->txdataF_BF[0][hhh*2048+jjj]);
}
}
};
printf(" \n");
//exit(-1);
#endif
//printf("the maximum flowID will be=%d\n",maxflowid);
for
(
uint16_t
cc_id
=
0
;
cc_id
<
1
/*nSectorNum*/
;
cc_id
++
){
// OAI does not support multiple CC yet.
for
(
uint16_t
cc_id
=
0
;
cc_id
<
1
/*nSectorNum*/
;
cc_id
++
){
// OAI does not support multiple CC yet.
for
(
uint8_t
ant_id
=
0
;
ant_id
<
xran_max_antenna_nr
&&
ant_id
<
ru
->
nb_tx
;
ant_id
++
){
for
(
uint8_t
ant_id
=
0
;
ant_id
<
xran_max_antenna_nr
&&
ant_id
<
ru
->
nb_tx
;
ant_id
++
){
// This loop would better be more inner to avoid confusion and maybe also errors.
// This loop would better be more inner to avoid confusion and maybe also errors.
...
@@ -804,14 +770,11 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -804,14 +770,11 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
exit
(
-
1
);
exit
(
-
1
);
}
}
// Calculation of the pointer for the section in the buffer.
// Calculation of the pointer for the section in the buffer.
//if(frame==0 && slot==6){printf("Romain: Writing to the buffer! \n");}
// first half
// first half
src1
=
(
uint8_t
*
)(
pos
+
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
);
src1
=
(
uint8_t
*
)(
pos
+
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
);
// second half
// second half
src2
=
(
uint8_t
*
)(
pos
+
(
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
+
1272
/
2
)
+
2048
-
1272
);
src2
=
(
uint8_t
*
)(
pos
+
(
p_prbMapElm
->
nRBStart
*
N_SC_PER_PRB
+
1272
/
2
)
+
2048
-
1272
);
//printf("RRR: idxElm=%d,\tnRBStart=%d,\tpos=%p,\tsrc=%p\n",idxElm,p_prbMapElm->nRBStart,pos,src);
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
// printf("RRR: nRBSize=%d,\tN_SC_PER_PRB=%d,\tpayload_len=%d\n\n",p_prbMapElm->nRBSize,N_SC_PER_PRB,payload_len);
rte_memcpy
(
dst1
,
src1
,
payload_len
/
2
);
rte_memcpy
(
dst1
,
src1
,
payload_len
/
2
);
rte_memcpy
(
dst2
,
src2
,
payload_len
/
2
);
rte_memcpy
(
dst2
,
src2
,
payload_len
/
2
);
}
else
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
}
else
if
(
p_prbMapElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
...
@@ -821,10 +784,9 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -821,10 +784,9 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
memset
(
&
bfp_com_req
,
0
,
sizeof
(
struct
xranlib_compress_request
));
memset
(
&
bfp_com_req
,
0
,
sizeof
(
struct
xranlib_compress_request
));
memset
(
&
bfp_com_rsp
,
0
,
sizeof
(
struct
xranlib_compress_response
));
memset
(
&
bfp_com_rsp
,
0
,
sizeof
(
struct
xranlib_compress_response
));
// BEWARE! Compression experimental.
// TODO Check if it is really working.
bfp_com_req
.
data_in
=
(
int16_t
*
)
src2
;
bfp_com_req
.
data_in
=
(
int16_t
*
)
src2
;
bfp_com_req
.
numRBs
=
p_prbMapElm
->
nRBSize
;
bfp_com_req
.
numRBs
=
p_prbMapElm
->
nRBSize
/
2
;
bfp_com_req
.
len
=
payload_len
/
2
;
bfp_com_req
.
len
=
payload_len
/
2
;
bfp_com_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_com_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_com_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
bfp_com_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
...
@@ -839,7 +801,7 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -839,7 +801,7 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
dst1
=
dst2
+
first_half_len
;
dst1
=
dst2
+
first_half_len
;
bfp_com_req
.
data_in
=
(
int16_t
*
)
src1
;
bfp_com_req
.
data_in
=
(
int16_t
*
)
src1
;
bfp_com_req
.
numRBs
=
p_prbMapElm
->
nRBSize
;
bfp_com_req
.
numRBs
=
p_prbMapElm
->
nRBSize
/
2
;
bfp_com_req
.
len
=
payload_len
/
2
;
bfp_com_req
.
len
=
payload_len
/
2
;
bfp_com_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_com_req
.
compMethod
=
p_prbMapElm
->
compMethod
;
bfp_com_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
bfp_com_req
.
iqWidth
=
p_prbMapElm
->
iqWidth
;
...
@@ -854,14 +816,7 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -854,14 +816,7 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
p_prbMapElm
->
compMethod
);
p_prbMapElm
->
compMethod
);
exit
(
-
1
);
exit
(
-
1
);
}
}
#if 0
if(slot==0){
for(int16_t iii=0; iii<payload_len; iii++){
printf("%d:%x",iii,dst[iii]);
}
}
printf("\n\n\n");
#endif
p_sec_desc
->
iq_buffer_offset
=
RTE_PTR_DIFF
(
dst
,
u8dptr
);
p_sec_desc
->
iq_buffer_offset
=
RTE_PTR_DIFF
(
dst
,
u8dptr
);
p_sec_desc
->
iq_buffer_len
=
payload_len
;
p_sec_desc
->
iq_buffer_len
=
payload_len
;
...
@@ -877,8 +832,6 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
...
@@ -877,8 +832,6 @@ int xran_fh_tx_send_slot(void *xranlib_, ru_info_t *ru, int frame, int slot, uin
printf
(
"ptr ==NULL
\n
"
);
printf
(
"ptr ==NULL
\n
"
);
}
}
}
}
//printf("RRR: exit ...\n");
//exit(-1);
}
}
}
}
return
(
0
);
return
(
0
);
...
...
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