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
d34a8019
Commit
d34a8019
authored
Jan 27, 2017
by
hbilel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[OAI UE] Fix: use double buffer for rxDataF, dlChannelEst and pdsch context
since two rx threads (even/odd) are used by OAI-UE
parent
0dd076a3
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
69 deletions
+69
-69
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+12
-12
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
+29
-29
openair1/SIMULATION/LTE_PHY/mbmssim.c
openair1/SIMULATION/LTE_PHY/mbmssim.c
+2
-2
openair1/SIMULATION/LTE_PHY/pbchsim.c
openair1/SIMULATION/LTE_PHY/pbchsim.c
+4
-4
openair1/SIMULATION/LTE_PHY/pdcchsim.c
openair1/SIMULATION/LTE_PHY/pdcchsim.c
+8
-8
openair1/SIMULATION/LTE_PHY/pucchsim.c
openair1/SIMULATION/LTE_PHY/pucchsim.c
+1
-1
openair1/SIMULATION/LTE_PHY/syncsim.c
openair1/SIMULATION/LTE_PHY/syncsim.c
+6
-6
targets/SIMU/USER/channel_sim.c
targets/SIMU/USER/channel_sim.c
+1
-1
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+3
-3
targets/SIMU/USER/oaisim_pad.c
targets/SIMU/USER/oaisim_pad.c
+3
-3
No files found.
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
d34a8019
...
@@ -2509,30 +2509,30 @@ int main(int argc, char **argv)
...
@@ -2509,30 +2509,30 @@ int main(int argc, char **argv)
//common vars
//common vars
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
UE
->
common_vars
.
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
}
}
write_output
(
"dlsch00_r0.m"
,
"dl00_r0"
,
write_output
(
"dlsch00_r0.m"
,
"dl00_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
write_output
(
"dlsch01_r0.m"
,
"dl01_r0"
,
write_output
(
"dlsch01_r0.m"
,
"dl01_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
)
if
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
)
write_output
(
"dlsch10_r0.m"
,
"dl10_r0"
,
write_output
(
"dlsch10_r0.m"
,
"dl10_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
((
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
&&
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
))
if
((
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
&&
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
))
write_output
(
"dlsch11_r0.m"
,
"dl11_r0"
,
write_output
(
"dlsch11_r0.m"
,
"dl11_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
//pdsch_vars
//pdsch_vars
...
@@ -2594,7 +2594,7 @@ int main(int argc, char **argv)
...
@@ -2594,7 +2594,7 @@ int main(int argc, char **argv)
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
sprintf
(
fname
,
"rxsigF0_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsigF0_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs0F_r%d"
,
round
);
sprintf
(
vname
,
"rxs0F_r%d"
,
round
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
sprintf
(
fname
,
"rxsig1_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsig1_r%d.m"
,
round
);
...
@@ -2602,20 +2602,20 @@ int main(int argc, char **argv)
...
@@ -2602,20 +2602,20 @@ int main(int argc, char **argv)
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
sprintf
(
fname
,
"rxsigF1_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsigF1_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs1F_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs1F_r%d.m"
,
round
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
}
}
sprintf
(
fname
,
"dlsch00_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch00_r%d.m"
,
round
);
sprintf
(
vname
,
"dl00_r%d"
,
round
);
sprintf
(
vname
,
"dl00_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
sprintf
(
fname
,
"dlsch01_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch01_r%d.m"
,
round
);
sprintf
(
vname
,
"dl01_r%d"
,
round
);
sprintf
(
vname
,
"dl01_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
@@ -2623,7 +2623,7 @@ int main(int argc, char **argv)
...
@@ -2623,7 +2623,7 @@ int main(int argc, char **argv)
sprintf
(
fname
,
"dlsch10_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch10_r%d.m"
,
round
);
sprintf
(
vname
,
"dl10_r%d"
,
round
);
sprintf
(
vname
,
"dl10_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
@@ -2631,7 +2631,7 @@ int main(int argc, char **argv)
...
@@ -2631,7 +2631,7 @@ int main(int argc, char **argv)
sprintf
(
fname
,
"dlsch11_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch11_r%d.m"
,
round
);
sprintf
(
vname
,
"dl11_r%d"
,
round
);
sprintf
(
vname
,
"dl11_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
View file @
d34a8019
...
@@ -3104,24 +3104,24 @@ PMI_FEEDBACK:
...
@@ -3104,24 +3104,24 @@ PMI_FEEDBACK:
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
//printf("x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
//printf("x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
if
(
transmission_mode
==
7
){
if
(
transmission_mode
==
7
){
//this should include the BF weights! Will not work for a random channel
//this should include the BF weights! Will not work for a random channel
if
(
UE
->
high_speed_flag
==
0
)
{
if
(
UE
->
high_speed_flag
==
0
)
{
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
//printf("**,x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
//printf("**,x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,AMP);
}
else
{
}
else
{
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
}
}
...
@@ -3134,15 +3134,15 @@ PMI_FEEDBACK:
...
@@ -3134,15 +3134,15 @@ PMI_FEEDBACK:
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
0
/
2
;
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
0
/
2
;
if
(
transmission_mode
==
7
)
{
if
(
transmission_mode
==
7
)
{
if
(
UE
->
high_speed_flag
==
0
){
if
(
UE
->
high_speed_flag
==
0
){
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
]
=
0
/
2
;
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
]
=
0
/
2
;
}
else
{
}
else
{
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
pdsch_vars
[
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
0
/
2
;
((
int16_t
*
)
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_bf_ch_estimates
[(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
((
l
+
(
Ns
%
2
)
*
pilot2
)
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
0
/
2
;
}
}
}
}
}
}
...
@@ -3485,30 +3485,30 @@ PMI_FEEDBACK:
...
@@ -3485,30 +3485,30 @@ PMI_FEEDBACK:
//write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
//write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
UE
->
common_vars
.
rxdata
[
0
][
subframe
*
UE
->
frame_parms
.
samples_per_tti
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
UE
->
common_vars
.
rxdata
[
0
][
subframe
*
UE
->
frame_parms
.
samples_per_tti
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
//write_output("rxsigF0.m","rxsF0", &UE->common_vars.rxdataF[0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
//write_output("rxsigF0.m","rxsF0", &UE->common_vars.rxdataF[0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
UE
->
common_vars
.
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
]
rxdataF
[
1
],
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
}
}
write_output
(
"dlsch00_r0.m"
,
"dl00_r0"
,
write_output
(
"dlsch00_r0.m"
,
"dl00_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
write_output
(
"dlsch01_r0.m"
,
"dl01_r0"
,
write_output
(
"dlsch01_r0.m"
,
"dl01_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
)
if
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
)
write_output
(
"dlsch10_r0.m"
,
"dl10_r0"
,
write_output
(
"dlsch10_r0.m"
,
"dl10_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
((
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
&&
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
))
if
((
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
&&
(
eNB
->
frame_parms
.
nb_antennas_tx
>
1
))
write_output
(
"dlsch11_r0.m"
,
"dl11_r0"
,
write_output
(
"dlsch11_r0.m"
,
"dl11_r0"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
//pdsch_vars
//pdsch_vars
...
@@ -3535,8 +3535,8 @@ PMI_FEEDBACK:
...
@@ -3535,8 +3535,8 @@ PMI_FEEDBACK:
if
(
trials
==
0
&&
round
==
0
&&
transmission_mode
>=
5
&&
transmission_mode
<
7
)
{
if
(
trials
==
0
&&
round
==
0
&&
transmission_mode
>=
5
&&
transmission_mode
<
7
)
{
for
(
iii
=
0
;
iii
<
NB_RB
;
iii
++
)
{
for
(
iii
=
0
;
iii
<
NB_RB
;
iii
++
)
{
//fprintf(csv_fd, "%d, %d", (UE->pdsch_vars[eNB_id]->pmi_ext[iii]),(UE->pdsch_vars[eNB_id_i]->pmi_ext[iii]));
//fprintf(csv_fd, "%d, %d", (UE->pdsch_vars[eNB_id]->pmi_ext[iii]),(UE->pdsch_vars[eNB_id_i]->pmi_ext[iii]));
fprintf
(
csv_fd
,
"%x,%x,"
,(
UE
->
pdsch_vars
[
eNB_id
]
->
pmi_ext
[
iii
]),(
UE
->
pdsch_vars
[
eNB_id
]
->
pmi_ext
[
iii
]));
fprintf
(
csv_fd
,
"%x,%x,"
,(
UE
->
pdsch_vars
[
subframe
&
0x1
][
eNB_id
]
->
pmi_ext
[
iii
]),(
UE
->
pdsch_vars
[
eNB_id
]
->
pmi_ext
[
iii
]));
printf
(
"%x "
,(
UE
->
pdsch_vars
[
eNB_id
]
->
pmi_ext
[
iii
]));
printf
(
"%x "
,(
UE
->
pdsch_vars
[
subframe
&
0x1
][
eNB_id
]
->
pmi_ext
[
iii
]));
}
}
}
}
}
}
...
@@ -3560,7 +3560,7 @@ PMI_FEEDBACK:
...
@@ -3560,7 +3560,7 @@ PMI_FEEDBACK:
// calculate uncoded BLER
// calculate uncoded BLER
uncoded_ber
=
0
;
uncoded_ber
=
0
;
for
(
i
=
0
;
i
<
coded_bits_per_codeword
;
i
++
)
for
(
i
=
0
;
i
<
coded_bits_per_codeword
;
i
++
)
if
(
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
e
[
i
]
!=
(
UE
->
pdsch_vars
[
0
]
->
llr
[
0
][
i
]
<
0
))
{
if
(
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
e
[
i
]
!=
(
UE
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
llr
[
0
][
i
]
<
0
))
{
uncoded_ber_bit
[
i
]
=
1
;
uncoded_ber_bit
[
i
]
=
1
;
uncoded_ber
++
;
uncoded_ber
++
;
}
}
...
@@ -3579,14 +3579,14 @@ PMI_FEEDBACK:
...
@@ -3579,14 +3579,14 @@ PMI_FEEDBACK:
0
,
0
,
UE
->
dlsch
[
0
][
cw
],
UE
->
dlsch
[
0
][
cw
],
coded_bits_per_codeword
,
coded_bits_per_codeword
,
UE
->
pdsch_vars
[
eNB_id
]
->
llr
[
cw
],
UE
->
pdsch_vars
[
subframe
&
0x1
][
eNB_id
]
->
llr
[
cw
],
0
,
0
,
subframe
<<
1
);
subframe
<<
1
);
stop_meas
(
&
UE
->
dlsch_unscrambling_stats
);
stop_meas
(
&
UE
->
dlsch_unscrambling_stats
);
start_meas
(
&
UE
->
dlsch_decoding_stats
);
start_meas
(
&
UE
->
dlsch_decoding_stats
);
ret
=
dlsch_decoding
(
UE
,
ret
=
dlsch_decoding
(
UE
,
UE
->
pdsch_vars
[
eNB_id
]
->
llr
[
cw
],
UE
->
pdsch_vars
[
subframe
&
0x1
][
eNB_id
]
->
llr
[
cw
],
&
UE
->
frame_parms
,
&
UE
->
frame_parms
,
UE
->
dlsch
[
0
][
cw
],
UE
->
dlsch
[
0
][
cw
],
UE
->
dlsch
[
0
][
cw
]
->
harq_processes
[
UE
->
dlsch
[
0
][
cw
]
->
current_harq_pid
],
UE
->
dlsch
[
0
][
cw
]
->
harq_processes
[
UE
->
dlsch
[
0
][
cw
]
->
current_harq_pid
],
...
@@ -3687,7 +3687,7 @@ PMI_FEEDBACK:
...
@@ -3687,7 +3687,7 @@ PMI_FEEDBACK:
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdata
[
0
][
0
],
10
*
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
sprintf
(
fname
,
"rxsigF0_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsigF0_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs0F_r%d"
,
round
);
sprintf
(
vname
,
"rxs0F_r%d"
,
round
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
rxdataF
[
0
][
0
],
2
*
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
2
,
1
);
write_output
(
fname
,
vname
,
&
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
2
*
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
2
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
sprintf
(
fname
,
"rxsig1_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsig1_r%d.m"
,
round
);
...
@@ -3695,20 +3695,20 @@ PMI_FEEDBACK:
...
@@ -3695,20 +3695,20 @@ PMI_FEEDBACK:
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdata
[
1
],
UE
->
frame_parms
.
samples_per_tti
,
1
,
1
);
sprintf
(
fname
,
"rxsig1F_r%d.m"
,
round
);
sprintf
(
fname
,
"rxsig1F_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs1F_r%d.m"
,
round
);
sprintf
(
vname
,
"rxs1F_r%d.m"
,
round
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
rxdataF
[
1
],
2
*
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
2
,
1
);
write_output
(
fname
,
vname
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
1
],
2
*
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
2
,
1
);
}
}
sprintf
(
fname
,
"dlsch00_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch00_r%d.m"
,
round
);
sprintf
(
vname
,
"dl00_r%d"
,
round
);
sprintf
(
vname
,
"dl00_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
{
sprintf
(
fname
,
"dlsch01_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch01_r%d.m"
,
round
);
sprintf
(
vname
,
"dl01_r%d"
,
round
);
sprintf
(
vname
,
"dl01_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
1
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
@@ -3716,7 +3716,7 @@ PMI_FEEDBACK:
...
@@ -3716,7 +3716,7 @@ PMI_FEEDBACK:
sprintf
(
fname
,
"dlsch10_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch10_r%d.m"
,
round
);
sprintf
(
vname
,
"dl10_r%d"
,
round
);
sprintf
(
vname
,
"dl10_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
2
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
@@ -3724,7 +3724,7 @@ PMI_FEEDBACK:
...
@@ -3724,7 +3724,7 @@ PMI_FEEDBACK:
sprintf
(
fname
,
"dlsch11_r%d.m"
,
round
);
sprintf
(
fname
,
"dlsch11_r%d.m"
,
round
);
sprintf
(
vname
,
"dl11_r%d"
,
round
);
sprintf
(
vname
,
"dl11_r%d"
,
round
);
write_output
(
fname
,
vname
,
write_output
(
fname
,
vname
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
eNB_id
][
3
][
0
]),
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
UE
->
frame_parms
.
ofdm_symbol_size
*
nsymb
/
2
,
1
,
1
);
}
}
...
...
openair1/SIMULATION/LTE_PHY/mbmssim.c
View file @
d34a8019
...
@@ -447,8 +447,8 @@ int main(int argc, char **argv)
...
@@ -447,8 +447,8 @@ int main(int argc, char **argv)
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
}
}
}
}
}
}
...
...
openair1/SIMULATION/LTE_PHY/pbchsim.c
View file @
d34a8019
...
@@ -963,7 +963,7 @@ int main(int argc, char **argv)
...
@@ -963,7 +963,7 @@ int main(int argc, char **argv)
//sprintf(vname,"dl_ch00_%d",l);
//sprintf(vname,"dl_ch00_%d",l);
//write_output(fname,vname,&(common_vars->dl_ch_estimates[0][frame_parms->ofdm_symbol_size*(l%6)]),frame_parms->ofdm_symbol_size,1,1);
//write_output(fname,vname,&(common_vars->dl_ch_estimates[0][frame_parms->ofdm_symbol_size*(l%6)]),frame_parms->ofdm_symbol_size,1,1);
lte_est_freq_offset
(
UE
->
common_vars
.
dl_ch_estimates
[
0
],
lte_est_freq_offset
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
],
&
UE
->
frame_parms
,
&
UE
->
frame_parms
,
l
,
l
,
&
freq_offset
,
&
freq_offset
,
...
@@ -1051,13 +1051,13 @@ int main(int argc, char **argv)
...
@@ -1051,13 +1051,13 @@ int main(int argc, char **argv)
if
(
n_frames
==
1
)
{
if
(
n_frames
==
1
)
{
write_output
(
"H00.m"
,
"h00"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H00.m"
,
"h00"
,
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
if
(
n_tx
==
2
)
if
(
n_tx
==
2
)
write_output
(
"H10.m"
,
"h10"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H10.m"
,
"h10"
,
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
UE
->
common_vars
.
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
write_output
(
"PBCH_rxF0_ext.m"
,
"pbch0_ext"
,
UE
->
pbch_vars
[
0
]
->
rxdataF_ext
[
0
],
12
*
4
*
6
,
1
,
1
);
write_output
(
"PBCH_rxF0_ext.m"
,
"pbch0_ext"
,
UE
->
pbch_vars
[
0
]
->
rxdataF_ext
[
0
],
12
*
4
*
6
,
1
,
1
);
write_output
(
"PBCH_rxF0_comp.m"
,
"pbch0_comp"
,
UE
->
pbch_vars
[
0
]
->
rxdataF_comp
[
0
],
12
*
4
*
6
,
1
,
1
);
write_output
(
"PBCH_rxF0_comp.m"
,
"pbch0_comp"
,
UE
->
pbch_vars
[
0
]
->
rxdataF_comp
[
0
],
12
*
4
*
6
,
1
,
1
);
write_output
(
"PBCH_rxF_llr.m"
,
"pbch_llr"
,
UE
->
pbch_vars
[
0
]
->
llr
,(
frame_parms
->
Ncp
==
0
)
?
1920
:
1728
,
1
,
4
);
write_output
(
"PBCH_rxF_llr.m"
,
"pbch_llr"
,
UE
->
pbch_vars
[
0
]
->
llr
,(
frame_parms
->
Ncp
==
0
)
?
1920
:
1728
,
1
,
4
);
...
...
openair1/SIMULATION/LTE_PHY/pdcchsim.c
View file @
d34a8019
...
@@ -1060,9 +1060,9 @@ int main(int argc, char **argv)
...
@@ -1060,9 +1060,9 @@ int main(int argc, char **argv)
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
k
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
int16_t
)(
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
eNB2UE
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
y
*
AMP
);
}
}
}
}
...
@@ -1072,8 +1072,8 @@ int main(int argc, char **argv)
...
@@ -1072,8 +1072,8 @@ int main(int argc, char **argv)
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)
UE
->
common_vars
.
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
0
/
2
;
((
int16_t
*
)
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
*
2
]
=
0
/
2
;
}
}
}
}
}
}
...
@@ -1212,17 +1212,17 @@ int main(int argc, char **argv)
...
@@ -1212,17 +1212,17 @@ int main(int argc, char **argv)
write_output
(
"txsig1.m"
,
"txs1"
,
txdata
[
1
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"txsig1.m"
,
"txs1"
,
txdata
[
1
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
10
*
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
10
*
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
UE
->
common_vars
.
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
if
(
n_rx
>
1
)
{
if
(
n_rx
>
1
)
{
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
10
*
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
10
*
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
rxdataF
[
1
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
write_output
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
1
],
NUMBER_OF_OFDM_CARRIERS
*
2
*
((
frame_parms
->
Ncp
==
0
)
?
14
:
12
),
2
,
1
);
}
}
write_output
(
"H00.m"
,
"h00"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H00.m"
,
"h00"
,
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
if
(
n_tx
==
2
)
if
(
n_tx
==
2
)
write_output
(
"H10.m"
,
"h10"
,
&
(
UE
->
common_vars
.
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H10.m"
,
"h10"
,
&
(
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
eNB
->
frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"pdcch_rxF_ext0.m"
,
"pdcch_rxF_ext0"
,
UE
->
pdcch_vars
[
eNb_id
]
->
rxdataF_ext
[
0
],
3
*
12
*
UE
->
frame_parms
.
N_RB_DL
,
1
,
1
);
write_output
(
"pdcch_rxF_ext0.m"
,
"pdcch_rxF_ext0"
,
UE
->
pdcch_vars
[
eNb_id
]
->
rxdataF_ext
[
0
],
3
*
12
*
UE
->
frame_parms
.
N_RB_DL
,
1
,
1
);
write_output
(
"pdcch_rxF_comp0.m"
,
"pdcch0_rxF_comp0"
,
UE
->
pdcch_vars
[
eNb_id
]
->
rxdataF_comp
[
0
],
4
*
12
*
UE
->
frame_parms
.
N_RB_DL
,
1
,
1
);
write_output
(
"pdcch_rxF_comp0.m"
,
"pdcch0_rxF_comp0"
,
UE
->
pdcch_vars
[
eNb_id
]
->
rxdataF_comp
[
0
],
4
*
12
*
UE
->
frame_parms
.
N_RB_DL
,
1
,
1
);
...
...
openair1/SIMULATION/LTE_PHY/pucchsim.c
View file @
d34a8019
...
@@ -581,7 +581,7 @@ int main(int argc, char **argv)
...
@@ -581,7 +581,7 @@ int main(int argc, char **argv)
//write_output("txsig0.m","txs0", &txdata[0][subframe*frame_parms->samples_per_tti],frame_parms->samples_per_tti,1,1);
//write_output("txsig0.m","txs0", &txdata[0][subframe*frame_parms->samples_per_tti],frame_parms->samples_per_tti,1,1);
write_output
(
"txsig0pucch.m"
,
"txs0"
,
&
txdata
[
0
][
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"txsig0pucch.m"
,
"txs0"
,
&
txdata
[
0
][
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
eNB
->
common_vars
.
rxdata
[
0
][
0
][
subframe
*
frame_parms
->
samples_per_tti
],
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
&
eNB
->
common_vars
.
rxdata
[
0
][
0
][
subframe
*
frame_parms
->
samples_per_tti
],
frame_parms
->
samples_per_tti
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
eNB
->
common_vars
.
rxdataF
[
0
][
0
][
0
],
512
*
nsymb
*
2
,
2
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
&
eNB
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
][
0
],
512
*
nsymb
*
2
,
2
,
1
);
}
}
...
...
openair1/SIMULATION/LTE_PHY/syncsim.c
View file @
d34a8019
...
@@ -1683,9 +1683,9 @@ int main(int argc, char **argv)
...
@@ -1683,9 +1683,9 @@ int main(int argc, char **argv)
frame_parms
,
frame_parms
,
PHY_vars_UE
[
0
]
->
lte_ue_pdcch_vars
[
0
]
->
num_pdcch_symbols
,
PHY_vars_UE
[
0
]
->
lte_ue_pdcch_vars
[
0
]
->
num_pdcch_symbols
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates_time
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates_time
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
0
],
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
],
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdata
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdata
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdataF
,
(
int16_t
**
)
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
,
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdcch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdcch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdsch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdsch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdsch_vars
[
1
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
0
]
->
lte_ue_pdsch_vars
[
1
]
->
rxdataF_comp
[
0
],
...
@@ -1699,9 +1699,9 @@ int main(int argc, char **argv)
...
@@ -1699,9 +1699,9 @@ int main(int argc, char **argv)
frame_parms
,
frame_parms
,
PHY_vars_UE
[
1
]
->
lte_ue_pdcch_vars
[
0
]
->
num_pdcch_symbols
,
PHY_vars_UE
[
1
]
->
lte_ue_pdcch_vars
[
0
]
->
num_pdcch_symbols
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
dl_ch_estimates_time
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
dl_ch_estimates_time
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
0
],
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
],
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
rxdata
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
rxdata
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
rxdataF
,
(
int16_t
**
)
PHY_vars_UE
[
1
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
,
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdcch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdcch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdsch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdsch_vars
[
0
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdsch_vars
[
3
]
->
rxdataF_comp
[
0
],
(
int16_t
*
)
PHY_vars_UE
[
1
]
->
lte_ue_pdsch_vars
[
3
]
->
rxdataF_comp
[
0
],
...
@@ -1718,10 +1718,10 @@ int main(int argc, char **argv)
...
@@ -1718,10 +1718,10 @@ int main(int argc, char **argv)
if
(
n_frames
==
1
)
{
if
(
n_frames
==
1
)
{
write_output
(
"H00.m"
,
"h00"
,
&
(
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
PHY_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H00.m"
,
"h00"
,
&
(
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
0
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
PHY_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
),
1
,
1
);
if
(
n_tx
==
2
)
if
(
n_tx
==
2
)
write_output
(
"H10.m"
,
"h10"
,
&
(
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
PHY_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"H10.m"
,
"h10"
,
&
(
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
2
][
0
]),((
frame_parms
->
Ncp
==
0
)
?
7
:
6
)
*
(
PHY_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
),
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdata
[
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsig0.m"
,
"rxs0"
,
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdata
[
0
],
FRAME_LENGTH_COMPLEX_SAMPLES
,
1
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
nsymb
,
2
,
1
);
write_output
(
"rxsigF0.m"
,
"rxsF0"
,
PHY_vars_UE
[
0
]
->
lte_ue_common_vars
.
rxdataF
[
0
],
NUMBER_OF_OFDM_CARRIERS
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
nsymb
,
2
,
1
);
...
...
targets/SIMU/USER/channel_sim.c
View file @
d34a8019
...
@@ -180,7 +180,7 @@ void do_DL_sig(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_N
...
@@ -180,7 +180,7 @@ void do_DL_sig(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_N
//dlsch_abstraction(PHY_vars_UE_g[UE_id]->sinr_dB, rb_alloc, 8);
//dlsch_abstraction(PHY_vars_UE_g[UE_id]->sinr_dB, rb_alloc, 8);
// fill in perfect channel estimates
// fill in perfect channel estimates
channel_desc_t
*
desc1
=
eNB2UE
[
att_eNB_id
][
UE_id
][
CC_id
];
channel_desc_t
*
desc1
=
eNB2UE
[
att_eNB_id
][
UE_id
][
CC_id
];
int32_t
**
dl_channel_est
=
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
common_vars
.
dl_ch_estimates
[
0
];
int32_t
**
dl_channel_est
=
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
];
// double scale = pow(10.0,(enb_data[att_eNB_id]->tx_power_dBm + eNB2UE[att_eNB_id][UE_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id]->rx_total_gain_dB)/20.0);
// double scale = pow(10.0,(enb_data[att_eNB_id]->tx_power_dBm + eNB2UE[att_eNB_id][UE_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id]->rx_total_gain_dB)/20.0);
double
scale
=
pow
(
10
.
0
,(
frame_parms
->
pdsch_config_common
.
referenceSignalPower
+
eNB2UE
[
att_eNB_id
][
UE_id
][
CC_id
]
->
path_loss_dB
+
(
double
)
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
rx_total_gain_dB
)
/
20
.
0
);
double
scale
=
pow
(
10
.
0
,(
frame_parms
->
pdsch_config_common
.
referenceSignalPower
+
eNB2UE
[
att_eNB_id
][
UE_id
][
CC_id
]
->
path_loss_dB
+
(
double
)
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
rx_total_gain_dB
)
/
20
.
0
);
LOG_D
(
OCM
,
"scale =%lf (%d dB)
\n
"
,
scale
,(
int
)
(
20
*
log10
(
scale
)));
LOG_D
(
OCM
,
"scale =%lf (%d dB)
\n
"
,
scale
,(
int
)
(
20
*
log10
(
scale
)));
...
...
targets/SIMU/USER/oaisim.c
View file @
d34a8019
...
@@ -1043,19 +1043,19 @@ l2l1_task (void *args_p)
...
@@ -1043,19 +1043,19 @@ l2l1_task (void *args_p)
write_output
(
"dlchan0.m"
,
write_output
(
"dlchan0.m"
,
"dlch0"
,
"dlch0"
,
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
dl_ch_estimates
[
0
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
dl_ch_estimates
[
0
][
0
][
0
]),
(
6
(
6
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
1
,
1
);
write_output
(
"dlchan1.m"
,
write_output
(
"dlchan1.m"
,
"dlch1"
,
"dlch1"
,
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
dl_ch_estimates
[
1
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
dl_ch_estimates
[
1
][
0
][
0
]),
(
6
(
6
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
1
,
1
);
write_output
(
"dlchan2.m"
,
write_output
(
"dlchan2.m"
,
"dlch2"
,
"dlch2"
,
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
dl_ch_estimates
[
2
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
][
0
]
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
dl_ch_estimates
[
2
][
0
][
0
]),
(
6
(
6
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
*
(
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
1
,
1
);
...
...
targets/SIMU/USER/oaisim_pad.c
View file @
d34a8019
...
@@ -859,13 +859,13 @@ void run(int argc, char *argv[])
...
@@ -859,13 +859,13 @@ void run(int argc, char *argv[])
&&
(
abstraction_flag
==
0
)
&&
(
oai_emulation
.
info
.
n_frames
==
1
))
{
&&
(
abstraction_flag
==
0
)
&&
(
oai_emulation
.
info
.
n_frames
==
1
))
{
write_output
(
"dlchan0.m"
,
"dlch0"
,
write_output
(
"dlchan0.m"
,
"dlch0"
,
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
0
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
0
][
0
][
0
]),
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
write_output
(
"dlchan1.m"
,
"dlch1"
,
write_output
(
"dlchan1.m"
,
"dlch1"
,
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
1
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
1
][
0
][
0
]),
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
write_output
(
"dlchan2.m"
,
"dlch2"
,
write_output
(
"dlchan2.m"
,
"dlch2"
,
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
dl_ch_estimates
[
2
][
0
][
0
]),
&
(
PHY_vars_UE_g
[
0
]
->
lte_ue_common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
dl_ch_estimates
[
2
][
0
][
0
]),
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
(
6
*
(
PHY_vars_UE_g
[
0
]
->
lte_frame_parms
.
ofdm_symbol_size
)),
1
,
1
);
write_output
(
"pbch_rxF_comp0.m"
,
"pbch_comp0"
,
write_output
(
"pbch_rxF_comp0.m"
,
"pbch_comp0"
,
PHY_vars_UE_g
[
0
]
->
lte_ue_pbch_vars
[
0
]
->
rxdataF_comp
[
0
],
6
*
12
*
4
,
1
,
1
);
PHY_vars_UE_g
[
0
]
->
lte_ue_pbch_vars
[
0
]
->
rxdataF_comp
[
0
],
6
*
12
*
4
,
1
,
1
);
...
...
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