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
canghaiwuhen
OpenXG-RAN
Commits
ca0d8a44
Commit
ca0d8a44
authored
Mar 21, 2017
by
Elena_Lukashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing dlsch_demod_shift.
parent
93c1315b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
40 deletions
+24
-40
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+6
-13
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
+18
-27
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
ca0d8a44
...
...
@@ -60,9 +60,6 @@ int16_t dlsch_demod_shift = 0;
// [MCS][i_mod (0,1,2) = (2,4,6)]
unsigned
char
offset_mumimo_llr_drange_fix
=
0
;
uint8_t
interf_unaw_shift0
=
0
;
uint8_t
interf_unaw_shift1
=
0
;
uint8_t
interf_unaw_shift
=
0
;
//inferference-free case
unsigned
char
interf_unaw_shift_tm4_mcs
[
29
]
=
{
5
,
3
,
4
,
3
,
3
,
2
,
1
,
1
,
2
,
0
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
0
,
2
,
1
,
0
,
1
,
0
,
1
,
0
,
0
}
;
...
...
@@ -419,22 +416,18 @@ int rx_pdsch(PHY_VARS_UE *ue,
dlsch0_harq
->
mimo_mode
);
LOG_D
(
PHY
,
"Channel Level TM34 avg_0 %d, avg_1 %d, rx_type %d, rx_standard %d, interf_unaw_shift %d
\n
"
,
avg_0
[
0
],
avg_1
[
0
],
rx_type
,
rx_standard
,
interf_unaw
_shift
);
avg_1
[
0
],
rx_type
,
rx_standard
,
dlsch_demod
_shift
);
if
(
rx_type
>
rx_standard
)
{
avg_0
[
0
]
=
(
log2_approx
(
avg_0
[
0
])
/
2
)
+
dlsch_demod_shift
;
// + 2 ;//+ 4;
avg_1
[
0
]
=
(
log2_approx
(
avg_1
[
0
])
/
2
)
+
dlsch_demod_shift
;
// + 2 ;//+ 4;
avg_0
[
0
]
=
(
log2_approx
(
avg_0
[
0
])
/
2
)
-
13
+
dlsch_demod_shift
;
// + 2 ;//+ 4;
avg_1
[
0
]
=
(
log2_approx
(
avg_1
[
0
])
/
2
)
-
13
+
dlsch_demod_shift
;
// + 2 ;//+ 4;
pdsch_vars
[
eNB_id
]
->
log2_maxh0
=
cmax
(
avg_0
[
0
],
0
);
pdsch_vars
[
eNB_id
]
->
log2_maxh1
=
cmax
(
avg_1
[
0
],
0
);
//printf("TM4 I-A log2_maxh0 = %d\n", pdsch_vars[eNB_id]->log2_maxh0);
//printf("TM4 I-A log2_maxh1 = %d\n", pdsch_vars[eNB_id]->log2_maxh1);
// printf("dlsch_demod_shift %d\n", dlsch_demod_shift);
}
else
{
avg_0
[
0
]
=
(
log2_approx
(
avg_0
[
0
])
/
2
)
-
13
+
interf_unaw
_shift
;
avg_1
[
0
]
=
(
log2_approx
(
avg_1
[
0
])
/
2
)
-
13
+
interf_unaw
_shift
;
avg_0
[
0
]
=
(
log2_approx
(
avg_0
[
0
])
/
2
)
-
13
+
dlsch_demod
_shift
;
avg_1
[
0
]
=
(
log2_approx
(
avg_1
[
0
])
/
2
)
-
13
+
dlsch_demod
_shift
;
pdsch_vars
[
eNB_id
]
->
log2_maxh0
=
cmax
(
avg_0
[
0
],
0
);
pdsch_vars
[
eNB_id
]
->
log2_maxh1
=
cmax
(
avg_1
[
0
],
0
);
//printf("TM4 I-UA log2_maxh0 = %d\n", pdsch_vars[eNB_id]->log2_maxh0);
//printf("TM4 I-UA log2_maxh1 = %d\n", pdsch_vars[eNB_id]->log2_maxh1);
}
}
else
if
(
dlsch0_harq
->
mimo_mode
<
DUALSTREAM_UNIFORM_PRECODING1
)
{
// single-layer precoding (TM5, TM6)
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
View file @
ca0d8a44
...
...
@@ -56,10 +56,7 @@
extern
unsigned
int
dlsch_tbs25
[
27
][
25
],
TBStable
[
27
][
110
];
extern
unsigned
char
offset_mumimo_llr_drange_fix
;
extern
uint8_t
interf_unaw_shift0
;
extern
uint8_t
interf_unaw_shift1
;
extern
uint8_t
interf_unaw_shift
;
extern
int16_t
dlsch_demod_shift
;
#include "PHY/TOOLS/lte_phy_scope.h"
...
...
@@ -341,7 +338,7 @@ int main(int argc, char **argv)
perfect_ce
=
0
;
while
((
c
=
getopt
(
argc
,
argv
,
"ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XYv:
W:
J:K:U"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XYv:J:K:U"
))
!=
-
1
)
{
switch
(
c
)
{
case
'a'
:
...
...
@@ -625,14 +622,8 @@ int main(int argc, char **argv)
case
'Y'
:
perfect_ce
=
1
;
break
;
case
'V'
:
interf_unaw_shift0
=
atoi
(
optarg
);
break
;
case
'W'
:
interf_unaw_shift1
=
atoi
(
optarg
);
break
;
case
'J'
:
interf_unaw_shift
=
atoi
(
optarg
);
dlsch_demod_shift
=
atof
(
optarg
);
break
;
case
'K'
:
tpmi_retr
=
atoi
(
optarg
);
...
...
@@ -755,9 +746,9 @@ int main(int argc, char **argv)
printf
(
"n_frames = %d
\n
"
,
n_frames
);
printf
(
"Transmission mode %d with %dx%d antenna configuration, Extended Prefix %d
\n
"
,
transmission_mode
,
n_tx_phy
,
n_rx
,
extended_prefix_flag
);
printf
(
"Using receiver type %d
\n
"
,
rx_type
);
printf
(
"
TM1 shift %d
\n
"
,
interf_unaw
_shift
);
//printf("Using I_UA rec shift layer 1 %d\n",
interf_unaw
_shift0);
//printf("Using I_UA rec shift layer 2 %d\n",
interf_unaw
_shift1);
printf
(
"
dlsch_demod_shift %d
\n
"
,
dlsch_demod
_shift
);
//printf("Using I_UA rec shift layer 1 %d\n",
dlsch_demod
_shift0);
//printf("Using I_UA rec shift layer 2 %d\n",
dlsch_demod
_shift1);
snr1
=
snr0
+
snr_int
;
printf
(
"SNR0 %f, SNR1 %f
\n
"
,
snr0
,
snr1
);
...
...
@@ -791,25 +782,25 @@ 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_rnd%d_mcs%d_mcsi%d_ab_pce_sh%d_rpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_pce_sh%d_rpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
else
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_sh%d_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_sh%d_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
}
else
{
//abstx=0
if
(
perfect_ce
==
1
){
if
(
updated_csi
==
1
){
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_up_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_up_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
}
else
{
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
}
}
else
{
if
(
updated_csi
==
1
){
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_up_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_up_rtpmi%d_n.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
}
else
{
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_rtpmi%csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
tpmi_retr
);
sprintf
(
bler_fname
,
"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_rtpmi%csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
tpmi_retr
);
}
}
}
...
...
@@ -817,14 +808,14 @@ int main(int argc, char **argv)
if
(
transmission_mode
==
3
||
transmission_mode
==
4
){
if
(
rank_adapt
==
1
){
if
(
perfect_ce
==
1
)
sprintf
(
rankadapt_fname
,
"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
);
sprintf
(
rankadapt_fname
,
"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
);
else
sprintf
(
rankadapt_fname
,
"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
);
sprintf
(
rankadapt_fname
,
"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
);
}
else
{
if
(
perfect_ce
==
1
)
sprintf
(
rankadapt_fname
,
"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
);
sprintf
(
rankadapt_fname
,
"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
);
else
sprintf
(
rankadapt_fname
,
"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
);
sprintf
(
rankadapt_fname
,
"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
n_rx
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
);
}
rankadapt_fd
=
fopen
(
rankadapt_fname
,
"w"
);
if
(
rankadapt_fd
==
NULL
)
{
...
...
@@ -877,9 +868,9 @@ int main(int argc, char **argv)
else
if
(
perfect_ce
==
1
)
sprintf
(
csv_fname
,
"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_%d_csi.m"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
n_ch_rlz
);
sprintf
(
csv_fname
,
"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_%d_csi.m"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_shift
,
n_ch_rlz
);
else
sprintf
(
csv_fname
,
"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_sh%d_%d_csi.m"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
num_rounds
,
mcs1
,
mcs2
,
interf_unaw
_shift
,
n_ch_rlz
);
sprintf
(
csv_fname
,
"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_sh%d_%d_csi.m"
,
transmission_mode
,
rx_type
,
channel_model
,
n_frames
,
num_rounds
,
mcs1
,
mcs2
,
dlsch_demod
_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