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
alex037yang
OpenXG-RAN
Commits
3a83e8df
Commit
3a83e8df
authored
Mar 12, 2021
by
sfn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pdsch UE variables memory allocation
parent
d2f353ac
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
114 deletions
+119
-114
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+19
-16
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+98
-96
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+2
-2
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
3a83e8df
...
@@ -71,31 +71,34 @@ void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
...
@@ -71,31 +71,34 @@ void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
pdsch
->
llr128
=
(
int16_t
**
)
malloc16_clear
(
sizeof
(
int16_t
*
)
);
pdsch
->
llr128
=
(
int16_t
**
)
malloc16_clear
(
sizeof
(
int16_t
*
)
);
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
pdsch
->
rxdataF_ext
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_ext
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_uespec_pilots
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_uespec_pilots
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_comp0
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_comp0
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rho
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rho
=
(
int32_t
**
*
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
//pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
//pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
//pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
//pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch
->
dl_ch_mag0
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_mag0
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magb0
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magb0
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magr0
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magr0
=
(
int32_t
**
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
ptrs_phase_per_slot
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
ptrs_phase_per_slot
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
ptrs_re_per_slot
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
ptrs_re_per_slot
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_ptrs_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
4
*
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_ptrs_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
// the allocated memory size is fixed:
// the allocated memory size is fixed:
AssertFatal
(
fp
->
nb_antennas_rx
<=
4
,
"nb_antennas_rx > 4"
);
//Extend the max number of UE Rx antennas to 4
AssertFatal
(
fp
->
nb_antennas_rx
<=
4
,
"nb_antennas_rx > 4"
);
//Extend the max number of UE Rx antennas to 4
for
(
int
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
for
(
int
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
pdsch
->
rho
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
N_RB_DL
*
12
*
7
*
2
)
);
pdsch
->
rho
[
i
]
=
(
int32_t
*
*
)
malloc16_clear
(
NR_MAX_NB_LAYERS
*
NR_MAX_NB_LAYERS
*
sizeof
(
int32_t
)
);
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
//4: DL antenna ports
for
(
int
j
=
0
;
j
<
NR_MAX_NB_LAYERS
;
j
++
)
{
const
int
idx
=
(
j
*
fp
->
nb_antennas_rx
)
+
i
;
const
int
idx
=
(
j
*
fp
->
nb_antennas_rx
)
+
i
;
const
size_t
num
=
7
*
2
*
fp
->
N_RB_DL
*
12
;
const
size_t
num
=
7
*
2
*
fp
->
N_RB_DL
*
12
;
for
(
int
k
=
0
;
k
<
NR_MAX_NB_LAYERS
;
k
++
)
{
pdsch
->
rho
[
i
][
j
*
NR_MAX_NB_LAYERS
+
k
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
}
pdsch
->
rxdataF_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_uespec_pilots
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
N_RB_DL
*
12
);
pdsch
->
rxdataF_uespec_pilots
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
N_RB_DL
*
12
);
pdsch
->
rxdataF_comp0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_comp0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
3a83e8df
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
3a83e8df
...
@@ -803,7 +803,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext,
...
@@ -803,7 +803,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext,
int32_t
**
dl_ch_magb
,
int32_t
**
dl_ch_magb
,
int32_t
**
dl_ch_magr
,
int32_t
**
dl_ch_magr
,
int32_t
**
rxdataF_comp
,
int32_t
**
rxdataF_comp
,
int32_t
**
rho
,
int32_t
**
*
rho
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
nb_aatx
,
uint8_t
nb_aatx
,
uint8_t
symbol
,
uint8_t
symbol
,
...
@@ -819,7 +819,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
...
@@ -819,7 +819,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
int
**
dl_ch_mag
,
int
**
dl_ch_mag
,
int
**
dl_ch_magb
,
int
**
dl_ch_magb
,
int
**
rxdataF_comp
,
int
**
rxdataF_comp
,
int
**
rho
,
int
**
*
rho
,
unsigned
char
n_tx
,
unsigned
char
n_tx
,
unsigned
char
n_rx
,
unsigned
char
n_rx
,
unsigned
char
mod_order
,
unsigned
char
mod_order
,
...
...
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