Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
d104ef73
Commit
d104ef73
authored
3 years ago
by
Thomas Schlichter
Browse files
Options
Downloads
Patches
Plain Diff
gNB: fix memory allocations for PUSCH in phy_init_nr_gNB()
parent
9e90b8f2
No related branches found
No related tags found
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1572
integration_2022_wk21b
,
!1490
add support for 15 kHz SCS
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair1/PHY/INIT/nr_init.c
+18
-15
18 additions, 15 deletions
openair1/PHY/INIT/nr_init.c
openair1/PHY/defs_gNB.h
+0
-4
0 additions, 4 deletions
openair1/PHY/defs_gNB.h
with
18 additions
and
19 deletions
openair1/PHY/INIT/nr_init.c
+
18
−
15
View file @
d104ef73
...
...
@@ -252,10 +252,16 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
int
N_RB_UL
=
cfg
->
carrier_config
.
ul_grid_size
[
cfg
->
ssb_config
.
scs_common
.
value
].
value
;
int
n_buf
=
Prx
*
max_ul_mimo_layers
;
int
nb_re_pusch
=
N_RB_UL
*
NR_NB_SC_PER_RB
;
#ifdef __AVX2__
int
nb_re_pusch2
=
nb_re_pusch
+
(
nb_re_pusch
&
7
);
#else
int
nb_re_pusch2
=
nb_re_pusch
;
#endif
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
gNB
->
number_of_nr_ulsch_max
;
ULSCH_id
++
)
{
pusch_vars
[
ULSCH_id
]
=
(
NR_gNB_PUSCH
*
)
malloc16_clear
(
sizeof
(
NR_gNB_PUSCH
)
);
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext2
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_ext
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
ptrs_phase_per_slot
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
...
...
@@ -265,23 +271,22 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb0
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_mag
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
rho
=
(
int32_t
**
)
malloc16
_clear
(
n_buf
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
ULSCH_id
]
->
rho
=
(
int32_t
**
)
malloc16
(
n_buf
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
Prx
;
i
++
)
{
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
N_RB_UL
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext2
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
N_RB_UL
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
}
for
(
i
=
0
;
i
<
n_buf
;
i
++
)
{
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
*
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
N_RB_UL
*
1
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
pusch_vars
[
ULSCH_id
]
->
ptrs_phase_per_slot
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
symbols_per_slot
);
// symbols per slot
pusch_vars
[
ULSCH_id
]
->
rxdataF_comp
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
N_RB_UL
*
1
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_mag0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
N_RB_UL
*
12
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
N_RB_UL
*
12
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_mag
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
N_RB_UL
*
12
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
N_RB_UL
*
12
);
pusch_vars
[
ULSCH_id
]
->
rho
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
N_RB_UL
*
12
*
7
*
2
)
);
pusch_vars
[
ULSCH_id
]
->
rxdataF_comp
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_mag0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_mag
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
ul_ch_magb
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
pusch_vars
[
ULSCH_id
]
->
rho
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
nb_re_pusch2
*
fp
->
symbols_per_slot
);
}
pusch_vars
[
ULSCH_id
]
->
llr
=
(
int16_t
*
)
malloc16_clear
(
(
8
*
((
3
*
8
*
6144
)
+
12
))
*
sizeof
(
int16_t
)
);
// [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
pusch_vars
[
ULSCH_id
]
->
ul_valid_re_per_slot
=
(
int16_t
*
)
malloc16_clear
(
sizeof
(
int16_t
)
*
fp
->
symbols_per_slot
);
...
...
@@ -389,7 +394,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
gNB
->
number_of_nr_ulsch_max
;
ULSCH_id
++
)
{
for
(
int
i
=
0
;
i
<
Prx
;
i
++
)
{
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
[
i
]);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext2
[
i
]);
}
for
(
int
i
=
0
;
i
<
n_buf
;
i
++
)
{
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates
[
i
]);
...
...
@@ -404,7 +408,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rho
[
i
]);
}
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext2
);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates
);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
ul_ch_estimates_ext
);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
ptrs_phase_per_slot
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_gNB.h
+
0
−
4
View file @
d104ef73
...
...
@@ -436,10 +436,6 @@ typedef struct {
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..2*ofdm_symbol_size[
int32_t
**
rxdataF_ext
;
/// \brief Holds the received data in the frequency domain for the allocated RBs in normal format.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
rxdataF_ext2
;
/// \brief Hold the channel estimates in time domain based on DRS.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..4*ofdm_symbol_size[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment