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
a22335a8
Commit
a22335a8
authored
Feb 08, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FH 7.2: ignore packets with no payload instead of asserting
parent
2b796874
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
66 deletions
+60
-66
radio/fhi_72/oaioran.c
radio/fhi_72/oaioran.c
+60
-66
No files found.
radio/fhi_72/oaioran.c
View file @
a22335a8
...
@@ -325,76 +325,70 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
...
@@ -325,76 +325,70 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
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
*
4096
));
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
;
u8dptr
=
(
uint8_t
*
)
ptr
;
int16_t
payload_len
=
0
;
uint8_t
*
src
=
(
uint8_t
*
)
u8dptr
;
LOG_D
(
PHY
,
"pRbMap->nPrbElm %d
\n
"
,
pRbMap
->
nPrbElm
);
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
LOG_D
(
PHY
,
"prbMap[%d] : PRBstart %d nPRBs %d
\n
"
,
idxElm
,
pRbMap
->
prbMap
[
idxElm
].
nRBStart
,
pRbMap
->
prbMap
[
idxElm
].
nRBSize
);
pRbElm
=
&
pRbMap
->
prbMap
[
idxElm
];
int
pos_len
=
0
;
int
neg_len
=
0
;
if
(
pRbElm
->
nRBStart
<
(
nPRBs
>>
1
))
// there are PRBs left of DC
neg_len
=
min
((
nPRBs
*
6
)
-
(
pRbElm
->
nRBStart
*
12
),
pRbElm
->
nRBSize
*
N_SC_PER_PRB
);
pos_len
=
(
pRbElm
->
nRBSize
*
N_SC_PER_PRB
)
-
neg_len
;
src
=
pData
;
uint32_t
idxElm
=
0
;
// Calculation of the pointer for the section in the buffer.
uint8_t
*
src
=
(
uint8_t
*
)
ptr
;
// positive half
int16_t
payload_len
=
0
;
uint8_t
*
dst1
=
(
uint8_t
*
)(
pos
+
(
neg_len
==
0
?
((
pRbElm
->
nRBStart
*
N_SC_PER_PRB
)
-
(
nPRBs
*
6
))
:
0
));
// negative half
uint8_t
*
dst2
=
(
uint8_t
*
)(
pos
+
(
pRbElm
->
nRBStart
*
N_SC_PER_PRB
)
+
fftsize
-
(
nPRBs
*
6
));
LOG_D
(
PHY
,
"pRbMap->nPrbElm %d
\n
"
,
pRbMap
->
nPrbElm
);
int32_t
local_dst
[
pRbElm
->
nRBSize
*
N_SC_PER_PRB
]
__attribute__
((
aligned
(
64
)));
for
(
idxElm
=
0
;
idxElm
<
pRbMap
->
nPrbElm
;
idxElm
++
)
{
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
LOG_D
(
PHY
,
// NOTE: gcc 11 knows how to generate AVX2 for this!
"prbMap[%d] : PRBstart %d nPRBs %d
\n
"
,
for
(
idx
=
0
;
idx
<
pRbElm
->
nRBSize
*
N_SC_PER_PRB
*
2
;
idx
++
)
idxElm
,
((
int16_t
*
)
local_dst
)[
idx
]
=
((
int16_t
)
ntohs
(((
uint16_t
*
)
src
)[
idx
]))
>>
2
;
pRbMap
->
prbMap
[
idxElm
].
nRBStart
,
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
pRbMap
->
prbMap
[
idxElm
].
nRBSize
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
pRbElm
=
&
pRbMap
->
prbMap
[
idxElm
];
}
else
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
int
pos_len
=
0
;
struct
xranlib_decompress_request
bfp_decom_req
;
int
neg_len
=
0
;
struct
xranlib_decompress_response
bfp_decom_rsp
;
if
(
pRbElm
->
nRBStart
<
(
nPRBs
>>
1
))
// there are PRBs left of DC
payload_len
=
(
3
*
pRbElm
->
iqWidth
+
1
)
*
pRbElm
->
nRBSize
;
neg_len
=
min
((
nPRBs
*
6
)
-
(
pRbElm
->
nRBStart
*
12
),
pRbElm
->
nRBSize
*
N_SC_PER_PRB
);
pos_len
=
(
pRbElm
->
nRBSize
*
N_SC_PER_PRB
)
-
neg_len
;
memset
(
&
bfp_decom_req
,
0
,
sizeof
(
struct
xranlib_decompress_request
));
memset
(
&
bfp_decom_rsp
,
0
,
sizeof
(
struct
xranlib_decompress_response
));
src
=
pData
;
// Calculation of the pointer for the section in the buffer.
bfp_decom_req
.
data_in
=
(
int8_t
*
)
src
;
// positive half
bfp_decom_req
.
numRBs
=
pRbElm
->
nRBSize
;
uint8_t
*
dst1
=
(
uint8_t
*
)(
pos
+
(
neg_len
==
0
?
((
pRbElm
->
nRBStart
*
N_SC_PER_PRB
)
-
(
nPRBs
*
6
))
:
0
));
bfp_decom_req
.
len
=
payload_len
;
// negative half
bfp_decom_req
.
compMethod
=
pRbElm
->
compMethod
;
uint8_t
*
dst2
=
(
uint8_t
*
)(
pos
+
(
pRbElm
->
nRBStart
*
N_SC_PER_PRB
)
+
fftsize
-
(
nPRBs
*
6
));
bfp_decom_req
.
iqWidth
=
pRbElm
->
iqWidth
;
int32_t
local_dst
[
pRbElm
->
nRBSize
*
N_SC_PER_PRB
]
__attribute__
((
aligned
(
64
)));
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
bfp_decom_rsp
.
data_out
=
(
int16_t
*
)
local_dst
;
// NOTE: gcc 11 knows how to generate AVX2 for this!
bfp_decom_rsp
.
len
=
0
;
for
(
idx
=
0
;
idx
<
pRbElm
->
nRBSize
*
N_SC_PER_PRB
*
2
;
idx
++
)
((
int16_t
*
)
local_dst
)[
idx
]
=
((
int16_t
)
ntohs
(((
uint16_t
*
)
src
)[
idx
]))
>>
2
;
xranlib_decompress_avx512
(
&
bfp_decom_req
,
&
bfp_decom_rsp
);
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
}
else
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
outcnt
++
;
struct
xranlib_decompress_request
bfp_decom_req
;
}
else
{
struct
xranlib_decompress_response
bfp_decom_rsp
;
printf
(
"pRbElm->compMethod == %d is not supported
\n
"
,
pRbElm
->
compMethod
);
exit
(
-
1
);
payload_len
=
(
3
*
pRbElm
->
iqWidth
+
1
)
*
pRbElm
->
nRBSize
;
}
memset
(
&
bfp_decom_req
,
0
,
sizeof
(
struct
xranlib_decompress_request
));
memset
(
&
bfp_decom_rsp
,
0
,
sizeof
(
struct
xranlib_decompress_response
));
bfp_decom_req
.
data_in
=
(
int8_t
*
)
src
;
bfp_decom_req
.
numRBs
=
pRbElm
->
nRBSize
;
bfp_decom_req
.
len
=
payload_len
;
bfp_decom_req
.
compMethod
=
pRbElm
->
compMethod
;
bfp_decom_req
.
iqWidth
=
pRbElm
->
iqWidth
;
bfp_decom_rsp
.
data_out
=
(
int16_t
*
)
local_dst
;
bfp_decom_rsp
.
len
=
0
;
xranlib_decompress_avx512
(
&
bfp_decom_req
,
&
bfp_decom_rsp
);
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
outcnt
++
;
}
else
{
printf
(
"pRbElm->compMethod == %d is not supported
\n
"
,
pRbElm
->
compMethod
);
exit
(
-
1
);
}
}
}
else
{
return
0
;
}
}
}
// sym_ind
}
// sym_ind
}
// ant_ind
}
// ant_ind
...
...
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