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
spbro
OpenXG-RAN
Commits
0b24b5f0
Commit
0b24b5f0
authored
Jan 05, 2023
by
Daniel Andrade
Committed by
Roberto Louro Magueta
Jan 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory allocation in nr_dlsim
parent
d840c9db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+5
-5
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+7
-6
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
0b24b5f0
...
...
@@ -713,16 +713,16 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
}
// CRNTI active
stop_meas
(
&
ue
->
rx_pdsch_stats
);
UEscopeCopy
(
ue
,
pdschRxdataF_comp
,
rxdataF_comp
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
,
rx_size
);
UEscopeCopy
(
ue
,
pdschRxdataF_comp
,
rxdataF_comp
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
*
dlsch0
->
Nl
,
rx_size
);
if
(
ue
->
phy_sim_pdsch_rxdataF_comp
)
memcpy
(
ue
->
phy_sim_pdsch_rxdataF_comp
,
rxdataF_comp
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
);
memcpy
(
ue
->
phy_sim_pdsch_rxdataF_comp
,
rxdataF_comp
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
*
dlsch0
->
Nl
);
if
(
ue
->
phy_sim_pdsch_rxdataF_ext
)
memcpy
(
ue
->
phy_sim_pdsch_rxdataF_ext
,
rxdataF_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
);
memcpy
(
ue
->
phy_sim_pdsch_rxdataF_ext
,
rxdataF_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
*
dlsch0
->
Nl
);
if
(
ue
->
phy_sim_pdsch_dl_ch_estimates_ext
)
memcpy
(
ue
->
phy_sim_pdsch_dl_ch_estimates_ext
,
dl_ch_estimates_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
);
memcpy
(
ue
->
phy_sim_pdsch_dl_ch_estimates_ext
,
dl_ch_estimates_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
*
dlsch0
->
Nl
);
if
(
ue
->
phy_sim_pdsch_dl_ch_estimates
)
memcpy
(
ue
->
phy_sim_pdsch_dl_ch_estimates
,
dl_ch_estimates_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
);
memcpy
(
ue
->
phy_sim_pdsch_dl_ch_estimates
,
dl_ch_estimates_ext
,
sizeof
(
int32_t
)
*
rx_size
*
ue
->
frame_parms
.
nb_antennas_rx
*
dlsch0
->
Nl
);
}
return
0
;
}
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
0b24b5f0
...
...
@@ -1042,12 +1042,13 @@ int main(int argc, char **argv)
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
// Buffers to store internal memory of slot process
UE
->
phy_sim_rxdataF
=
calloc
(
frame_parms
->
samples_per_slot_wCP
*
sizeof
(
int32_t
),
frame_parms
->
nb_antennas_rx
);
UE
->
phy_sim_pdsch_llr
=
calloc
((
8
*
(
3
*
8
*
8448
))
*
sizeof
(
int16_t
),
1
);
//Max length
UE
->
phy_sim_pdsch_rxdataF_ext
=
calloc
(
14
*
frame_parms
->
N_RB_DL
*
12
*
sizeof
(
int32_t
),
frame_parms
->
nb_antennas_rx
);
UE
->
phy_sim_pdsch_rxdataF_comp
=
calloc
(
14
*
frame_parms
->
N_RB_DL
*
12
*
sizeof
(
int32_t
),
frame_parms
->
nb_antennas_rx
);
UE
->
phy_sim_pdsch_dl_ch_estimates
=
calloc
(
14
*
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
),
frame_parms
->
nb_antennas_rx
);
UE
->
phy_sim_pdsch_dl_ch_estimates_ext
=
calloc
(
14
*
frame_parms
->
N_RB_DL
*
12
*
sizeof
(
int32_t
),
frame_parms
->
nb_antennas_rx
);
int
rx_size
=
(((
14
*
frame_parms
->
N_RB_DL
*
12
*
sizeof
(
int32_t
))
+
15
)
>>
4
)
<<
4
;
UE
->
phy_sim_rxdataF
=
calloc
(
sizeof
(
int32_t
*
)
*
frame_parms
->
nb_antennas_rx
*
g_nrOfLayers
,
frame_parms
->
samples_per_slot_wCP
*
sizeof
(
int32_t
));
UE
->
phy_sim_pdsch_llr
=
calloc
(
1
,
(
8
*
(
3
*
8
*
8448
))
*
sizeof
(
int16_t
));
// Max length
UE
->
phy_sim_pdsch_rxdataF_ext
=
calloc
(
sizeof
(
int32_t
*
)
*
frame_parms
->
nb_antennas_rx
*
g_nrOfLayers
,
rx_size
);
UE
->
phy_sim_pdsch_rxdataF_comp
=
calloc
(
sizeof
(
int32_t
*
)
*
frame_parms
->
nb_antennas_rx
*
g_nrOfLayers
,
rx_size
);
UE
->
phy_sim_pdsch_dl_ch_estimates
=
calloc
(
sizeof
(
int32_t
*
)
*
frame_parms
->
nb_antennas_rx
*
g_nrOfLayers
,
rx_size
);
UE
->
phy_sim_pdsch_dl_ch_estimates_ext
=
calloc
(
sizeof
(
int32_t
*
)
*
frame_parms
->
nb_antennas_rx
*
g_nrOfLayers
,
rx_size
);
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
2
)
{
...
...
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