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
f993b075
Commit
f993b075
authored
Nov 07, 2023
by
Rúben Soares da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Prach PDU Beamforming allocation for pack/unpack procedures
parent
c22fe2ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+23
-20
No files found.
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
f993b075
...
...
@@ -940,16 +940,19 @@ static uint8_t pack_ul_tti_request_prach_pdu(nfapi_nr_prach_pdu_t *prach_pdu, ui
prach_pdu
->
beamforming
.
prg_size
=
0
;
prach_pdu
->
beamforming
.
dig_bf_interface
=
0
;
if
(
prach_pdu
->
beamforming
.
prgs_list
==
NULL
)
{
prach_pdu
->
beamforming
.
prgs_list
=
calloc
(
prach_pdu
->
beamforming
.
num_prgs
==
0
?
1
:
prach_pdu
->
beamforming
.
num_prgs
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
));
}
if
(
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
==
NULL
)
{
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
=
calloc
(
prach_pdu
->
beamforming
.
dig_bf_interface
==
0
?
1
:
prach_pdu
->
beamforming
.
dig_bf_interface
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
));
if
(
prach_pdu
->
beamforming
.
prgs_list
==
NULL
&&
prach_pdu
->
beamforming
.
num_prgs
>
0
)
{
prach_pdu
->
beamforming
.
prgs_list
=
calloc
(
prach_pdu
->
beamforming
.
num_prgs
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
));
// If the first one is NULL, the other indexes, if existing, are most likely also NULL
if
(
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
==
NULL
&&
prach_pdu
->
beamforming
.
dig_bf_interface
>
0
)
{
for
(
int
prg_idx
=
0
;
prg_idx
<
prach_pdu
->
beamforming
.
num_prgs
;
prg_idx
++
)
{
prach_pdu
->
beamforming
.
prgs_list
[
prg_idx
].
dig_bf_interface_list
=
calloc
(
prach_pdu
->
beamforming
.
dig_bf_interface
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
));
for
(
int
dbi_idx
=
0
;
dbi_idx
<
prach_pdu
->
beamforming
.
dig_bf_interface
;
dbi_idx
++
)
{
prach_pdu
->
beamforming
.
prgs_list
[
prg_idx
].
dig_bf_interface_list
[
dbi_idx
].
beam_idx
=
0
;
}
}
}
}
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
[
0
].
beam_idx
=
0
;
// Pack RX Beamforming PDU
if
(
!
(
push16
(
prach_pdu
->
beamforming
.
num_prgs
,
ppWritePackedMsg
,
end
)
...
...
@@ -4771,22 +4774,22 @@ static uint8_t unpack_ul_tti_request_prach_pdu(void *tlv, uint8_t **ppReadPacked
&&
pull8
(
ppReadPackedMsg
,
&
prach_pdu
->
prach_start_symbol
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
prach_pdu
->
num_cs
,
end
)))
{
return
0
;
}
// TODO: ignoring beamforming tlv for now
if
(
prach_pdu
->
beamforming
.
prgs_list
==
NULL
)
{
prach_pdu
->
beamforming
.
prgs_list
=
calloc
(
prach_pdu
->
beamforming
.
num_prgs
==
0
?
1
:
prach_pdu
->
beamforming
.
num_prgs
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
));
}
if
(
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
==
NULL
)
{
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
=
calloc
(
prach_pdu
->
beamforming
.
dig_bf_interface
==
0
?
1
:
prach_pdu
->
beamforming
.
dig_bf_interface
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
));
}
// Pack RX Beamforming PDU
// Unpack RX Beamforming PDU
if
(
!
(
pull16
(
ppReadPackedMsg
,
&
prach_pdu
->
beamforming
.
num_prgs
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
prach_pdu
->
beamforming
.
prg_size
,
end
)
&&
pull8
(
ppReadPackedMsg
,
&
prach_pdu
->
beamforming
.
dig_bf_interface
,
end
)))
{
return
0
;
}
// TODO: ignoring beamforming tlv for now
if
(
prach_pdu
->
beamforming
.
num_prgs
>
0
)
{
prach_pdu
->
beamforming
.
prgs_list
=
calloc
(
prach_pdu
->
beamforming
.
num_prgs
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
));
if
(
prach_pdu
->
beamforming
.
dig_bf_interface
>
0
)
{
for
(
int
prg_idx
=
0
;
prg_idx
<
prach_pdu
->
beamforming
.
num_prgs
;
prg_idx
++
){
prach_pdu
->
beamforming
.
prgs_list
[
prg_idx
].
dig_bf_interface_list
=
calloc
(
prach_pdu
->
beamforming
.
dig_bf_interface
,
sizeof
(
*
prach_pdu
->
beamforming
.
prgs_list
[
0
].
dig_bf_interface_list
));
}
}
}
for
(
int
prg
=
0
;
prg
<
prach_pdu
->
beamforming
.
num_prgs
;
prg
++
)
{
for
(
int
digBFInterface
=
0
;
digBFInterface
<
prach_pdu
->
beamforming
.
dig_bf_interface
;
digBFInterface
++
)
{
if
(
!
pull16
(
ppReadPackedMsg
,
&
prach_pdu
->
beamforming
.
prgs_list
[
prg
].
dig_bf_interface_list
[
digBFInterface
].
beam_idx
,
end
))
{
...
...
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