Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
c64a0a21
Commit
c64a0a21
authored
Sep 25, 2015
by
Xiwen JIANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed for more than 1 physical antenna
parent
f6703c54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
31 deletions
+32
-31
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
+7
-8
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
+0
-3
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+12
-12
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+13
-8
No files found.
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
View file @
c64a0a21
...
...
@@ -229,7 +229,6 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
0
]
-
(
int
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
1
]
+
(
int
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
fl
,
ch
,
dl_bf_ch
,
16
);
//printf("rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",pil_offset,rxF[0],rxF[1],pil[0],pil[1],ch[0],ch[1]);
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
8
]
-
(
int
)
pil
[
1
]
*
rxF
[
9
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
9
]
+
(
int
)
pil
[
1
]
*
rxF
[
8
])
>>
15
);
...
...
@@ -378,13 +377,13 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
8
]
-
(
int
)
pil
[
1
]
*
rxF
[
9
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
9
]
+
(
int
)
pil
[
1
]
*
rxF
[
8
])
>>
15
);
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_bf_ch
,
16
);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[
0],rxF[1
],pil[0],pil[1],ch[0],ch[1]);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[
8],rxF[9
],pil[0],pil[1],ch[0],ch[1]);
pil
+=
2
;
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
16
]
-
(
int
)
pil
[
1
]
*
rxF
[
17
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
17
]
+
(
int
)
pil
[
1
]
*
rxF
[
16
])
>>
15
);
multadd_real_vector_complex_scalar
(
fr
,
ch
,
dl_bf_ch
,
16
);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[
0],rxF[1
],pil[0],pil[1],ch[0],ch[1]);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[
16],rxF[17
],pil[0],pil[1],ch[0],ch[1]);
pil
+=
2
;
}
...
...
@@ -604,19 +603,19 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
0
]
-
(
int
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
1
]
+
(
int
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
fl
,
ch
,
dl_bf_ch
,
16
);
//
printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[0],rxF[1],pil[0],pil[1],ch[0],ch[1]);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[0],rxF[1],pil[0],pil[1],ch[0],ch[1]);
pil
+=
2
;
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
8
]
-
(
int
)
pil
[
1
]
*
rxF
[
9
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
9
]
+
(
int
)
pil
[
1
]
*
rxF
[
8
])
>>
15
);
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_bf_ch
,
16
);
//
printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[8],rxF[9],pil[0],pil[1],ch[0],ch[1]);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[8],rxF[9],pil[0],pil[1],ch[0],ch[1]);
pil
+=
2
;
ch
[
0
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
16
]
-
(
int
)
pil
[
1
]
*
rxF
[
17
])
>>
15
);
ch
[
1
]
=
(
short
)(((
int
)
pil
[
0
]
*
rxF
[
17
]
+
(
int
)
pil
[
1
]
*
rxF
[
16
])
>>
15
);
multadd_real_vector_complex_scalar
(
fr
,
ch
,
dl_bf_ch
,
16
);
//
printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[16],rxF[17],pil[0],pil[1],ch[0],ch[1]);
//printf("symbol=%d,rxF[%d]=(%d,%d),pil=(%d,%d),ch=(%d,%d)\n",symbol,pil_offset,rxF[16],rxF[17],pil[0],pil[1],ch[0],ch[1]);
pil
+=
2
;
}
...
...
@@ -641,13 +640,13 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
if
(
phy_vars_ue
->
perfect_ce
==
0
)
{
dl_bf_ch
=
(
short
*
)
&
dl_bf_ch_estimates
[
aarx
][
ch_offset
];
printf
(
"dlsch_bf_ch_est.c:symbol %d, dl_bf_ch (%d,%d)
\n
"
,
symbol
,
dl_bf_ch
[
0
],
dl_bf_ch
[
1
]);
//
printf("dlsch_bf_ch_est.c:symbol %d, dl_bf_ch (%d,%d)\n",symbol,dl_bf_ch[0],dl_bf_ch[1]);
if
(
phy_vars_ue
->
high_speed_flag
==
0
)
{
multadd_complex_vector_real_scalar
(
dl_bf_ch
,
32767
-
phy_vars_ue
->
ch_est_alpha
,
dl_bf_ch
-
(
frame_parms
->
ofdm_symbol_size
<<
1
),
0
,
frame_parms
->
ofdm_symbol_size
);
printf
(
"dlsch_bf_ch_est.c:symbol %d,dl_bf_ch (%d,%d)
\n
"
,
symbol
,
*
(
dl_bf_ch
-
512
*
2
),
*
(
dl_bf_ch
-
512
*
2
+
1
));
//
printf("dlsch_bf_ch_est.c:symbol %d,dl_bf_ch (%d,%d)\n",symbol,*(dl_bf_ch-512*2),*(dl_bf_ch-512*2+1));
}
else
{
// high_speed_flag == 1
if
(
beamforming_mode
==
7
)
{
if
(
frame_parms
->
Ncp
==
0
)
{
...
...
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
View file @
c64a0a21
...
...
@@ -42,9 +42,6 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
unsigned
char
l
,
unsigned
char
symbol
)
{
int
pilot
[
2
][
200
]
__attribute__
((
aligned
(
16
)));
unsigned
char
nu
,
aarx
;
unsigned
short
k
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
View file @
c64a0a21
...
...
@@ -1018,18 +1018,20 @@ break;
//precoding UE spec RS
//printf("precoding UE spec RS\n");
for
(
aa
=
0
;
aa
<
nb_antennas_tx_phy
;
aa
++
)
{
ind
=
3
*
lprime
*
dlsch0_harq
->
nb_rb
+
mprime2
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
ind
=
3
*
lprime
*
dlsch0_harq
->
nb_rb
+
mprime2
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
tmp_sample1
=
qpsk
[(
phy_vars_eNB
->
lte_gold_uespec_port5_table
[
0
][
Ns
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
tmp_sample1
=
qpsk
[(
phy_vars_eNB
->
lte_gold_uespec_port5_table
[
0
][
Ns
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
mprime2
++
;
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
0
]
*
((
uint16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=-
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
1
]
*
((
uint16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
0
]
*
((
uint16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
1
]
*
((
uint16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
0
])
>>
15
);
for
(
aa
=
0
;
aa
<
nb_antennas_tx_phy
;
aa
++
)
{
//for (aa=0; aa<1; aa++) {
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
0
]
*
((
int16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
0
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
0
]
+=-
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
1
]
*
((
int16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
0
]
*
((
int16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
1
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
aa
][
tti_offset
])[
1
]
+=
(
int16_t
)((((
int16_t
*
)
&
tmp_sample1
)[
1
]
*
((
int16_t
*
)
&
beamforming_weights
[
re
][
aa
])[
0
])
>>
15
);
// ((int16_t*)&txdataF[aa][tti_offset])[0] = 0xffff;
// ((int16_t*)&txdataF[aa][tti_offset])[1] = 0xffff;
...
...
@@ -1037,8 +1039,6 @@ break;
//printf("tmp_sample1=(%d,%d)\n",((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
//printf("beamforing_weights[%d][%d]=(%d,%d)\n",re,aa,((int16_t*)&beamforming_weights[re][aa])[0],((int16_t*)&beamforming_weights[re][aa])[1]);
//printf("txdataF[%d][%d]= (%d,%d)\n ",aa,tti_offset,((int16_t*)&txdataF[aa][tti_offset])[0],((int16_t*)&txdataF[aa][tti_offset])[1]);
mprime2
++
;
}
}
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
c64a0a21
...
...
@@ -564,6 +564,11 @@ int main(int argc, char **argv)
exit
(
-
1
);
}
if
(
transmission_mode
==
7
&&
(
n_tx_phy
!=
2
&&
n_tx_phy
!=
4
&&
n_tx_phy
!=
8
&&
n_tx_phy
!=
16
&&
n_tx_phy
!=
64
))
{
msg
(
"For TM7, physical antenna number should be an exponent of 2, maximum 64 antennas supported.
\n
"
);
exit
(
-
1
);
}
break
;
case
'z'
:
...
...
@@ -753,7 +758,7 @@ int main(int argc, char **argv)
beamforming_weights
[
re
]
=
(
int32_t
*
)
malloc
(
n_tx_phy
*
sizeof
(
int32_t
));
for
(
aa
=
0
;
aa
<
n_tx_phy
;
aa
++
)
//beamforming_weights[re][aa] = 0x00008000;
beamforming_weights
[
re
][
aa
]
=
0x0000
7fff
;
beamforming_weights
[
re
][
aa
]
=
0x0000
cfff
>>
(
n_tx_phy
>>
1
)
;
}
}
...
...
@@ -2924,12 +2929,12 @@ PMI_FEEDBACK:
}
else
{
for
(
aarx
=
0
;
aarx
<
PHY_vars_UE
->
lte_frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
if
(
aa
==
0
)
{
r_re
[
aarx
][
i
]
=
(
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)])
;
r_im
[
aarx
][
i
]
=
(
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)
+
1
])
;
r_re
[
aarx
][
i
]
=
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)]
;
r_im
[
aarx
][
i
]
=
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)
+
1
]
;
//printf("r[%d][%d]=> %f, %f\n",aarx,i,r_re[aarx][i],r_im[aarx][i]);
}
else
{
r_re
[
aarx
][
i
]
+=
(
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)])
;
r_im
[
aarx
][
i
]
+=
(
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)
+
1
])
;
r_re
[
aarx
][
i
]
+=
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)]
;
r_im
[
aarx
][
i
]
+=
(
double
)(((
short
*
)
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNB_id
][
aa
]))[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
(
i
<<
1
)
+
1
]
;
}
}
...
...
@@ -3022,10 +3027,10 @@ PMI_FEEDBACK:
// printf("s_re[0][%d]=> %f , r_re[0][%d]=> %f\n",i,s_re[aa][i],i,r_re[aa][i]);
/*((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti)+2*i] =
(short) (r_re[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0));
((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti)+2*i+1] =
((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti)+2*i+1] =
(short) (r_im[aa][i] + (iqim*r_re[aa][i]) + sqrt(sigma2/2)*gaussdouble(0.0,1.0));*/
((
short
*
)
PHY_vars_UE
->
lte_ue_common_vars
.
rxdata
[
aa
])[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
2
*
i
]
=
(
short
)
(
r_re
[
aa
][
i
])
;
((
short
*
)
PHY_vars_UE
->
lte_ue_common_vars
.
rxdata
[
aa
])[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
2
*
i
+
1
]
=
(
short
)
(
r_im
[
aa
][
i
]
+
(
iqim
*
r_re
[
aa
][
i
]))
;
((
short
*
)
PHY_vars_UE
->
lte_ue_common_vars
.
rxdata
[
aa
])[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
2
*
i
]
=
(
short
)
r_re
[
aa
][
i
]
;
((
short
*
)
PHY_vars_UE
->
lte_ue_common_vars
.
rxdata
[
aa
])[(
2
*
subframe
*
PHY_vars_UE
->
lte_frame_parms
.
samples_per_tti
)
+
2
*
i
+
1
]
=
(
short
)
r_im
[
aa
][
i
]
;
//printf("rxdata[%d][%d]=> %d, %d\n",aa,subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti+i,r_re[aa][i],r_im[aa][i]);
}
}
...
...
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