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
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)
pData
=
p_sec_desc
->
pData
;
ptr
=
pData
;
pos
=
(
int32_t
*
)(
start_ptr
+
(
4
*
sym_idx
*
4096
));
if
(
ptr
==
NULL
||
pos
==
NULL
)
continue
;
uint8_t
*
u8dptr
;
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
;
// Calculation of the pointer for the section in the buffer.
// positive half
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
));
int32_t
local_dst
[
pRbElm
->
nRBSize
*
N_SC_PER_PRB
]
__attribute__
((
aligned
(
64
)));
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
// NOTE: gcc 11 knows how to generate AVX2 for this!
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
;
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
}
else
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
struct
xranlib_decompress_request
bfp_decom_req
;
struct
xranlib_decompress_response
bfp_decom_rsp
;
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
);
}
uint32_t
idxElm
=
0
;
uint8_t
*
src
=
(
uint8_t
*
)
ptr
;
int16_t
payload_len
=
0
;
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
;
// Calculation of the pointer for the section in the buffer.
// positive half
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
));
int32_t
local_dst
[
pRbElm
->
nRBSize
*
N_SC_PER_PRB
]
__attribute__
((
aligned
(
64
)));
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_NONE
)
{
// NOTE: gcc 11 knows how to generate AVX2 for this!
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
;
memcpy
((
void
*
)
dst2
,
(
void
*
)
local_dst
,
neg_len
*
4
);
memcpy
((
void
*
)
dst1
,
(
void
*
)
&
local_dst
[
neg_len
],
pos_len
*
4
);
}
else
if
(
pRbElm
->
compMethod
==
XRAN_COMPMETHOD_BLKFLOAT
)
{
struct
xranlib_decompress_request
bfp_decom_req
;
struct
xranlib_decompress_response
bfp_decom_rsp
;
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
}
// 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