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
b00f64ed
Commit
b00f64ed
authored
Jan 14, 2016
by
lukashov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1)Removing dlsch_dual_stream_correlation
2) Fixing bug in mrc_TM4 - removing loop over tx antennas.
parent
10e8d306
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
142 deletions
+20
-142
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+14
-128
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+0
-8
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 @
b00f64ed
...
...
@@ -468,7 +468,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
symbol
,
nb_rb
,
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
NULL
,
&
(
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
);
...
...
@@ -476,12 +476,12 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
//to be optimized (just take complex conjugate)
dlsch_dual_stream_correlation
_opposite
(
frame_parms
,
dlsch_dual_stream_correlation
(
frame_parms
,
symbol
,
nb_rb
,
&
(
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
[
2
]),
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
NULL
,
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_rho2_ext
,
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_ch_rho2_ext
,
lte_ue_pdsch_vars
[
eNB_id
]
->
log2_maxh1
);
// 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);
...
...
@@ -2598,7 +2598,7 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
// print_ints("c0",&mmtmpD2);
// print_ints("c1",&mmtmpD3);
dl_ch_rho128
[
0
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
//
print_shorts("rho 0:",dl_ch_rho128);
//
print_shorts("rho 0:",dl_ch_rho128);
// multiply by conjugated channel
mmtmpD0
=
_mm_madd_epi16
(
dl_ch128
[
1
],
dl_ch128i
[
1
]);
// mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
...
...
@@ -2651,117 +2651,6 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
#endif
}
void
dlsch_dual_stream_correlation_opposite
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int
**
dl_ch_estimates_ext
,
int
**
dl_ch_estimates_ext_i
,
int
**
dl_ch_rho_ext
,
unsigned
char
output_shift
)
{
#if defined(__x86_64__)||defined(__i386__)
unsigned
short
rb
;
__m128i
*
dl_ch128
,
*
dl_ch128i
,
*
dl_ch_rho128
,
mmtmpD0
,
mmtmpD1
,
mmtmpD2
,
mmtmpD3
;
unsigned
char
aarx
,
symbol_mod
,
pilots
=
0
;
// printf("dlsch_dual_stream_correlation: symbol %d\n",symbol);
symbol_mod
=
(
symbol
>=
(
7
-
frame_parms
->
Ncp
))
?
symbol
-
(
7
-
frame_parms
->
Ncp
)
:
symbol
;
if
((
symbol_mod
==
0
)
||
(
symbol_mod
==
(
4
-
frame_parms
->
Ncp
)))
{
pilots
=
1
;
}
// printf("Dual stream correlation (%p)\n",dl_ch_estimates_ext_i);
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
//printf ("antenna %d", aarx);
dl_ch128
=
(
__m128i
*
)
&
dl_ch_estimates_ext
[
aarx
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
if
(
dl_ch_estimates_ext_i
==
NULL
)
// TM3/4
dl_ch128i
=
(
__m128i
*
)
&
dl_ch_estimates_ext
[
2
+
aarx
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
else
dl_ch128i
=
(
__m128i
*
)
&
dl_ch_estimates_ext_i
[
aarx
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_rho128
=
(
__m128i
*
)
&
dl_ch_rho_ext
[
aarx
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
for
(
rb
=
0
;
rb
<
nb_rb
;
rb
++
)
{
// multiply by conjugated channel
mmtmpD0
=
_mm_madd_epi16
(
dl_ch128
[
0
],
dl_ch128i
[
0
]);
// print_ints("re",&mmtmpD0);
// mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
mmtmpD1
=
_mm_shufflelo_epi16
(
dl_ch128i
[
0
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_shufflehi_epi16
(
mmtmpD1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
&
conjugate
[
0
]);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
dl_ch128
[
0
]);
// print_ints("im",&mmtmpD1);
// mmtmpD1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpD0
=
_mm_srai_epi32
(
mmtmpD0
,
output_shift
);
// print_ints("re(shift)",&mmtmpD0);
mmtmpD1
=
_mm_srai_epi32
(
mmtmpD1
,
output_shift
);
// print_ints("im(shift)",&mmtmpD1);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
// print_ints("c0",&mmtmpD2);
// print_ints("c1",&mmtmpD3);
dl_ch_rho128
[
0
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
// print_shorts("rho 2:",dl_ch_rho128);
// multiply by conjugated channel
mmtmpD0
=
_mm_madd_epi16
(
dl_ch128
[
1
],
dl_ch128i
[
1
]);
// mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
mmtmpD1
=
_mm_shufflelo_epi16
(
dl_ch128i
[
1
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_shufflehi_epi16
(
mmtmpD1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
dl_ch128
[
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
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
dl_ch_rho128
[
1
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
if
(
pilots
==
0
)
{
// multiply by conjugated channel
mmtmpD0
=
_mm_madd_epi16
(
dl_ch128
[
2
],
dl_ch128i
[
2
]);
// mmtmpD0 contains real part of 4 consecutive outputs (32-bit)
mmtmpD1
=
_mm_shufflelo_epi16
(
dl_ch128i
[
2
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_shufflehi_epi16
(
mmtmpD1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpD1
=
_mm_sign_epi16
(
mmtmpD1
,
*
(
__m128i
*
)
conjugate
);
mmtmpD1
=
_mm_madd_epi16
(
mmtmpD1
,
dl_ch128
[
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
);
mmtmpD2
=
_mm_unpacklo_epi32
(
mmtmpD0
,
mmtmpD1
);
mmtmpD3
=
_mm_unpackhi_epi32
(
mmtmpD0
,
mmtmpD1
);
dl_ch_rho128
[
2
]
=
_mm_packs_epi32
(
mmtmpD2
,
mmtmpD3
);
dl_ch128
+=
3
;
dl_ch128i
+=
3
;
dl_ch_rho128
+=
3
;
}
else
{
dl_ch128
+=
2
;
dl_ch128i
+=
2
;
dl_ch_rho128
+=
2
;
}
}
}
_mm_empty
();
_m_empty
();
#elif defined(__arm__)
#endif
}
void
dlsch_detection_mrc
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
**
rxdataF_comp
,
int
**
rxdataF_comp_i
,
...
...
@@ -2917,7 +2806,7 @@ void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
int
**
rxdataF_comp0
=
lte_ue_pdsch_vars
->
rxdataF_comp0
;
int
**
rxdataF_comp1
=
lte_ue_pdsch_vars
->
rxdataF_comp1
[
harq_pid
][
round
];
int
**
dl_ch_rho_ext
=
lte_ue_pdsch_vars
->
dl_ch_rho_ext
[
harq_pid
][
round
];
int
**
dl_ch_rho_ext
=
lte_ue_pdsch_vars
->
dl_ch_rho_ext
[
harq_pid
][
round
];
//for first stream
int
**
dl_ch_rho2_ext
=
lte_ue_pdsch_vars
->
dl_ch_rho2_ext
;
int
**
dl_ch_mag0
=
lte_ue_pdsch_vars
->
dl_ch_mag0
;
int
**
dl_ch_mag1
=
lte_ue_pdsch_vars
->
dl_ch_mag1
;
...
...
@@ -2927,14 +2816,12 @@ void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
if
(
frame_parms
->
nb_antennas_rx
>
1
)
{
for
(
aatx
=
0
;
aatx
<
frame_parms
->
nb_antennas_tx_eNB
;
aatx
++
)
{
rxdataF_comp128_0
=
(
__m128i
*
)
&
rxdataF_comp0
[(
aatx
<<
1
)][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
rxdataF_comp128_1
=
(
__m128i
*
)
&
rxdataF_comp0
[(
aatx
<<
1
)
+
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_0
=
(
__m128i
*
)
&
dl_ch_mag0
[(
aatx
<<
1
)][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_1
=
(
__m128i
*
)
&
dl_ch_mag0
[(
aatx
<<
1
)
+
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_0b
=
(
__m128i
*
)
&
dl_ch_magb0
[(
aatx
<<
1
)][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_1b
=
(
__m128i
*
)
&
dl_ch_magb0
[(
aatx
<<
1
)
+
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
rxdataF_comp128_0
=
(
__m128i
*
)
&
rxdataF_comp0
[
0
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
rxdataF_comp128_1
=
(
__m128i
*
)
&
rxdataF_comp0
[
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_0
=
(
__m128i
*
)
&
dl_ch_mag0
[
0
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_1
=
(
__m128i
*
)
&
dl_ch_mag0
[
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_0b
=
(
__m128i
*
)
&
dl_ch_magb0
[
0
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
dl_ch_mag128_1b
=
(
__m128i
*
)
&
dl_ch_magb0
[
1
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
// MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
for
(
i
=
0
;
i
<
nb_rb
*
3
;
i
++
)
{
...
...
@@ -2945,8 +2832,7 @@ void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
// print_shorts("mrc compens0:",&rxdataF_comp128_0[i]);
// print_shorts("mrc mag128_0:",&dl_ch_mag128_0[i]);
// print_shorts("mrc mag128_0b:",&dl_ch_mag128_0b[i]);
}
}
}
}
// if (rho) {
rho128_0
=
(
__m128i
*
)
&
dl_ch_rho_ext
[
0
][
symbol
*
frame_parms
->
N_RB_DL
*
12
];
...
...
@@ -2980,7 +2866,7 @@ void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
//print_shorts("mrc mag128_i0b:",&dl_ch_mag128_i0b[i]);
}
}
}
_mm_empty
();
_m_empty
();
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
b00f64ed
...
...
@@ -952,14 +952,6 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
int
**
dl_ch_rho_ext
,
unsigned
char
output_shift
);
void
dlsch_dual_stream_correlation_opposite
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
unsigned
char
symbol
,
unsigned
short
nb_rb
,
int
**
dl_ch_estimates_ext
,
int
**
dl_ch_estimates_ext_i
,
int
**
dl_ch_rho_ext
,
unsigned
char
output_shift
);
void
dlsch_channel_compensation_TM56
(
int
**
rxdataF_ext
,
int
**
dl_ch_estimates_ext
,
int
**
dl_ch_mag
,
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
b00f64ed
...
...
@@ -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_
d2_rho_n
.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_
mrc
.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_
rho_n
.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_
mrc
.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_
rho_n
.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_
mrc
.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_
rho_n
.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_
mrc
.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_fix_pce_sh%d_d2_%d_
rho_n
.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_fix_pce_sh%d_d2_%d_
mrc
.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_fix_sh%d_d2_%d_
rho_n
.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_fix_sh%d_d2_%d_
mrc
.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