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
wangwenhui
OpenXG-RAN
Commits
071db178
Commit
071db178
authored
Jan 17, 2016
by
lukashov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avg_0[0] = max(avg_0[0],avg_0[1]);
avg_1[0] = max(avg_1[0],avg_1[1]);
parent
f703b8e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+20
-22
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+6
-6
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
071db178
...
...
@@ -464,27 +464,25 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
}*/
// compute correlation between signal and interference channels (rho12 and rho21)
dlsch_dual_stream_correlation
TM34
(
frame_parms
,
// this is doing h0'h1, needed for llr[1]
dlsch_dual_stream_correlation
(
frame_parms
,
// this is doing h0'h1, needed for llr[1]
symbol
,
nb_rb
,
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
&
(
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
[
2
]),
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_rho_ext
[
harq_pid
][
round
],
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh0
,
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh1
);
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh1
);
//printf("rho stream1 =%d\n", <e_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] );
//to be optimized (just take complex conjugate)
dlsch_dual_stream_correlation
TM34
(
frame_parms
,
// this is doing h1'h0, needed for llr[0]
dlsch_dual_stream_correlation
(
frame_parms
,
// this is doing h1'h0, needed for llr[0]
symbol
,
nb_rb
,
&
(
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
[
2
]),
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_rho2_ext
,
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh0
,
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh1
);
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh0
);
// printf("rho stream2 =%d\n",<e_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext );
//printf("TM3 log2_maxh : %d\n",lte_ue_pdsch_vars[eNB_id]->log2_maxh);
...
...
@@ -1913,12 +1911,12 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
if
(
aarx
==
0
)
{
/*
if (aarx==0) {
output_shift=output_shift0;
}
else {
output_shift=output_shift1;
}
}
*/
// printf("antenna %d\n", aarx);
// printf("symbol %d, rx antenna %d\n", symbol, aarx);
...
...
@@ -2093,10 +2091,10 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
0
]);
// print_ints("im",&mmtmpD1);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
0
);
// printf("Shift: %d\n",output_shift);
// print_ints("re(shift)",&mmtmpD0);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
0
);
// print_ints("im(shift)",&mmtmpD1);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -2116,8 +2114,8 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
1
]);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
0
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
0
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -2135,8 +2133,8 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
2
]);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
0
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
0
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -2160,9 +2158,9 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
// print_ints("im",&mmtmpD1);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
0
]);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
1
);
// print_ints("re(shift)",&mmtmpD0);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
1
);
// print_ints("im(shift)",&mmtmpD1);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -2181,8 +2179,8 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
1
]);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
1
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
1
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -2200,8 +2198,8 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
rxdataF128
[
2
]);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
1
);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
1
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
...
...
@@ -3314,8 +3312,8 @@ void dlsch_channel_level_TM34(int **dl_ch_estimates_ext,
(((
int
*
)
&
avg_1_128D
)[
3
])
/
(
nb_rb
*
nre
);
// printf("From Chan_level aver stream 1 %d =%d\n", aarx, avg_1[aarx]);
}
avg_0
[
0
]
=
max
(
avg_0
[
0
],
avg_
1
[
0
]);
avg_1
[
0
]
=
max
(
avg_
0
[
1
],
avg_1
[
1
]);
avg_0
[
0
]
=
max
(
avg_0
[
0
],
avg_
0
[
1
]);
avg_1
[
0
]
=
max
(
avg_
1
[
0
],
avg_1
[
1
]);
//avg_0[0]=max (avg_0[0], avg_0[1]);
// avg_0[0] = avg_0[0] + avg_0[1];
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
071db178
...
...
@@ -790,14 +790,14 @@ int main(int argc, char **argv)
sprintf
(
bler_fname
,
"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_u%d_imod%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_rx
,
mcs1
,
mcs_i
,
rx_type
,
i_mod
);
else
if
(
abstx
==
1
)
if
(
perfect_ce
==
1
)
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_ab_pce_sh%d_max
e
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_ab_pce_sh%d_max
am
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
else
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_ab_sh%d_d2_max
e
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_ab_sh%d_d2_max
am
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
else
//abstx=0
if
(
perfect_ce
==
1
)
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_pce_sh%d_d2_max
e
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_pce_sh%d_d2_max
am
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
else
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_sh%d_d2_max
e
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_mcs%d_mcsi%d_sh%d_d2_max
am
ant.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
mcs1
,
mcs2
,
interf_unaw_shift
);
bler_fd
=
fopen
(
bler_fname
,
"w"
);
if
(
bler_fd
==
NULL
)
{
...
...
@@ -833,9 +833,9 @@ int main(int argc, char **argv)
else
if
(
perfect_ce
==
1
)
sprintf
(
csv_fname
,
"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_ab_pce_sh%d_d2_%d_max
e
ant.m"
,
transmission_mode
,
rx_type
,
mcs1
,
mcs2
,
channel_model
,
n_frames
,
num_rounds
,
interf_unaw_shift
,
n_ch_rlz
);
sprintf
(
csv_fname
,
"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_ab_pce_sh%d_d2_%d_max
am
ant.m"
,
transmission_mode
,
rx_type
,
mcs1
,
mcs2
,
channel_model
,
n_frames
,
num_rounds
,
interf_unaw_shift
,
n_ch_rlz
);
else
sprintf
(
csv_fname
,
"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_ab_sh%d_d2_%d_max
e
ant.m"
,
transmission_mode
,
rx_type
,
mcs1
,
mcs2
,
channel_model
,
n_frames
,
num_rounds
,
interf_unaw_shift
,
n_ch_rlz
);
sprintf
(
csv_fname
,
"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_ab_sh%d_d2_%d_max
am
ant.m"
,
transmission_mode
,
rx_type
,
mcs1
,
mcs2
,
channel_model
,
n_frames
,
num_rounds
,
interf_unaw_shift
,
n_ch_rlz
);
csv_fd
=
fopen
(
csv_fname
,
"w"
);
fprintf
(
csv_fd
,
"data_all%d=["
,
mcs1
);
...
...
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