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
b81ee87f
Commit
b81ee87f
authored
Feb 24, 2017
by
Elena_Lukashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up for SIC llrs
parent
bf6a3b52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
115 deletions
+97
-115
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
+97
-115
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
View file @
b81ee87f
...
...
@@ -37,6 +37,9 @@
#include "extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_LLR_SIC
int16_t
zero
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
int16_t
ones
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
0xffff
,
0xffff
,
0xffff
,
0xffff
,
0xffff
,
0xffff
,
0xffff
,
0xffff
};
#if defined(__x86_64__) || defined(__i386__)
...
...
@@ -702,7 +705,6 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t
*
llr16
=
(
uint16_t
*
)
dlsch_llr
;
int
i
,
len
,
nsymb
;
uint8_t
symbol
,
symbol_mod
;
//uint8_t pilots;
int
len_acc
=
0
;
uint16_t
*
sic_data
;
uint16_t
pbch_pss_sss_adjust
;
...
...
@@ -720,18 +722,16 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
if
((
symbol_mod
==
0
)
||
(
symbol_mod
==
(
4
-
frame_parms
->
Ncp
)))
//pilots=1
amp_tmp
=
dlsch0
->
sqrt_rho_b
;
amp_tmp
=
0x1fff
;
//dlsch0->sqrt_rho_b; already taken into account
else
//pilots=0
amp_tmp
=
dlsch0
->
sqrt_rho_a
;
amp_tmp
=
0x1fff
;
//1.5*dlsch0->sqrt_rho_a; already taken into account
if
(
mod_order_0
==
6
)
amp_tmp
=
amp_tmp
<<
1
;
// to compensate for >> 1 shift in modulation
amp_tmp
=
amp_tmp
<<
1
;
// to compensate for >> 1 shift in modulation to avoid overflow
pbch_pss_sss_adjust
=
adjust_G2
(
frame_parms
,
&
rb_alloc
,
2
,
subframe
,
symbol
);
// printf("amp_tmp=%d\n", amp_tmp);
if
((
symbol_mod
==
0
)
||
(
symbol_mod
==
(
4
-
frame_parms
->
Ncp
)))
{
if
(
frame_parms
->
mode1_flag
==
0
)
len
=
(
nb_rb
*
8
)
-
(
2
*
pbch_pss_sss_adjust
/
3
);
...
...
@@ -751,26 +751,21 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
1
,
len
);
// printf ("Got x0*rho_a\n");
mult_cpx_vector
((
int16_t
*
)
rho_1
,
//Q15
(
int16_t
*
)
rho_amp_x0
,
//Q13
(
int16_t
*
)
rho_rho_amp_x0
,
len
,
13
);
/* write_output("rho_for_multipl.m","rho_for_multipl", rho_1,len,1,
#ifdef DEBUG_LLR_SIC
write_output
(
"rho_for_multipl.m"
,
"rho_for_m"
,
rho_1
,
len
,
1
,
symbol
==
num_pdcch_symbols
?
15
:
symbol
==
nsymb
-
1
?
14
:
13
);
write_output
(
"rho_rho_in_llr.m"
,
"rho2"
,
rho_rho_amp_x0
,
len
,
1
,
symbol
==
num_pdcch_symbols
?
15
:
symbol
==
nsymb
-
1
?
14
:
13
);
// printf ("Computed rho*rho_a*x0\n");*/
//rho_rho_amp_x0_512 = (int16_t)((512*(int16_t *)rho_rho_amp_x0)>>15);
#endif
sub_cpx_vector16
((
int16_t
*
)
rxF
,
(
int16_t
*
)
rho_rho_amp_x0
,
...
...
@@ -778,23 +773,16 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
(
int16_t
*
)
rxF
,
len
*
2
);
// write_output("rxFdata_comp1_after.m","rxF_a", rxF,len,1,1);
// write_output("clean_x1.m","x1", clean_x1,len,1,1);
// printf ("Interference removed \n");
/* write_output("clean_x1.m","x1", clean_x1,len,1,
symbol==num_pdcch_symbols ? 15 :
symbol==nsymb-1 ? 14 : 13);
#ifdef DEBUG_LLR_SIC
write_output
(
"rxFdata_comp1_after.m"
,
"rxF_a"
,
rxF
,
len
,
1
,
1
);
write_output
(
"rxF_comp1.m"
,
"rxF_1_comp"
,
rxF
,
len
,
1
,
symbol
==
num_pdcch_symbols
?
15
:
symbol==nsymb-1 ? 14 : 13);*/
// printf("dlsch_qpsk_llr_SIC: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
symbol
==
nsymb
-
1
?
14
:
13
);
#endif
//this is for QPSK only!!!
for
(
i
=
0
;
i
<
len
*
2
;
i
++
)
{
*
llr16
=
rxF
[
i
];
//clean_x1[i];//(int16_t *)rxF[i];//clean_x1[i]; //(int16_t *)rxF[i];//; //rxF[i];
*
llr16
=
rxF
[
i
];
//printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
llr16
++
;
}
...
...
@@ -958,7 +946,6 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
uint32_t
*
llr32
=
(
uint32_t
*
)
dlsch_llr
;
int
i
,
len
,
nsymb
;
uint8_t
symbol
,
symbol_mod
;
//uint8_t pilots;
int
len_acc
=
0
;
uint16_t
*
sic_data
;
uint16_t
pbch_pss_sss_adjust
;
...
...
@@ -977,17 +964,14 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
pbch_pss_sss_adjust
=
adjust_G2
(
frame_parms
,
&
rb_alloc
,
4
,
subframe
,
symbol
);
if
((
symbol_mod
==
0
)
||
(
symbol_mod
==
(
4
-
frame_parms
->
Ncp
)))
{
amp_tmp
=
dlsch0
->
sqrt_rho_b
;
amp_tmp
=
0x1fff
;
//dlsch0->sqrt_rho_b; already taken into account
if
(
frame_parms
->
mode1_flag
==
0
)
len
=
nb_rb
*
8
-
(
2
*
pbch_pss_sss_adjust
/
3
);
else
len
=
nb_rb
*
10
-
(
5
*
pbch_pss_sss_adjust
/
6
);
}
else
{
amp_tmp
=
dlsch0
->
sqrt_rho_a
;
amp_tmp
=
0x1fff
;;
//dlsch0->sqrt_rho_a; already taken into account
len
=
nb_rb
*
12
-
pbch_pss_sss_adjust
;
}
...
...
@@ -1248,15 +1232,13 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
pbch_pss_sss_adjust
=
adjust_G2
(
frame_parms
,
&
rb_alloc
,
6
,
subframe
,
symbol
);
if
((
symbol_mod
==
0
)
||
(
symbol_mod
==
(
4
-
frame_parms
->
Ncp
)))
{
amp_tmp
=
dlsch0
->
sqrt_rho_b
;
amp_tmp
=
0x1fff
;
//dlsch0->sqrt_rho_b; already taken into account
if
(
frame_parms
->
mode1_flag
==
0
)
len
=
nb_rb
*
8
-
(
2
*
pbch_pss_sss_adjust
/
3
);
else
len
=
nb_rb
*
10
-
(
5
*
pbch_pss_sss_adjust
/
6
);
}
else
{
amp_tmp
=
dlsch0
->
sqrt_rho_a
;
amp_tmp
=
0x1fff
;
//dlsch0->sqrt_rho_a; already taken into account
len
=
nb_rb
*
12
-
pbch_pss_sss_adjust
;
}
...
...
@@ -1357,7 +1339,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
_mm_empty
();
_m_empty
();
}
}
}
//#endif
//==============================================================================================
...
...
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