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
alex037yang
OpenXG-RAN
Commits
7f63f23f
Commit
7f63f23f
authored
Dec 21, 2016
by
Xiwen JIANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TDD DL channel calibration (not finished)
parent
a0ffbdd7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
18 deletions
+27
-18
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+1
-1
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-1
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+7
-1
openair1/PHY/MODULATION/compute_bf_weights.c
openair1/PHY/MODULATION/compute_bf_weights.c
+13
-8
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
+5
-7
No files found.
openair1/PHY/INIT/lte_init.c
View file @
7f63f23f
...
...
@@ -1239,7 +1239,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
for
(
i
=
0
;
i
<
fp
->
nb_antennas_tx
;
i
++
)
{
common_vars
->
txdataF_BF
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
)
);
common_vars
->
tdd_calib_coeffs
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
)
);
common_vars
->
tdd_calib_coeffs
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
N_RB_DL
*
12
*
sizeof
(
int32_t
)
);
if
(
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)
common_vars
->
txdata
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
samples_per_tti
*
10
*
sizeof
(
int32_t
)
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
7f63f23f
...
...
@@ -160,7 +160,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
dlsch
->
calib_dl_ch_estimates
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
));
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
dlsch
->
calib_dl_ch_estimates
[
aa
]
=
(
int32_t
*
)
malloc16
(
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES
*
sizeof
(
int32_t
));
dlsch
->
calib_dl_ch_estimates
[
aa
]
=
(
int32_t
*
)
malloc16
(
frame_parms
->
N_RB_DL
*
12
*
sizeof
(
int32_t
));
}
for
(
i
=
0
;
i
<
10
;
i
++
)
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
View file @
7f63f23f
...
...
@@ -1392,6 +1392,12 @@ x0[1+*jj]);
}
// mapping ue specific beamforming weights from UE specified DLSCH structure to common space
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
phy_vars_eNB
->
common_vars
.
beam_weights
[
0
][
5
][
aa
][
re_offset
+
re
]
=
dlsch0
->
ue_spec_bf_weights
[
0
][
aa
][
re_offset
+
re
];
}
}
else
if
(
mimo_mode
>=
TM8
)
{
//TM8,TM9,TM10
//uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode)
...
...
@@ -1985,7 +1991,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
// mapping ue specific beamforming weights from UE specified DLSCH structure to common space
// TO DO: this doesn't have to be done here since we do it once in one frame
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
){
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
memcpy
(
phy_vars_eNB
->
common_vars
.
beam_weights
[
0
][
5
][
aa
],
dlsch0
->
ue_spec_bf_weights
[
0
][
aa
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
}
...
...
openair1/PHY/MODULATION/compute_bf_weights.c
View file @
7f63f23f
...
...
@@ -19,7 +19,7 @@ int read_calibration_matrix(int32_t **tdd_calib_coeffs, char *calibF_fname, LTE_
printf
(
"Loading Calibration matrix from %s
\n
"
,
calibF_fname
);
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
re
=
0
;
re
<
frame_parms
->
ofdm_symbol_size
;
re
++
)
{
for
(
re
=
0
;
re
<
frame_parms
->
N_RB_DL
*
12
;
re
++
)
{
fscanf
(
calibF_fd
,
"%d"
,
&
calibF_e
)
;
//printf("aa=%d, re=%d, tdd_calib[0]=%d\n", aa, re, calibF_e);
((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
re
]))[
0
]
=
calibF_e
;
...
...
@@ -39,19 +39,19 @@ int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_e
return
(
1
);
}
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
multadd_cpx_vector
((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
0
]),(
int16_t
*
)(
&
ul_ch_estimates
[
aa
][
0
]),(
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
0
]),
1
,
frame_parms
->
ofdm_symbol_size
,
15
);
/*for (re=0; re<frame_parms->ofdm_symbol_size
; re++) {
/*multadd_cpx_vector((int16_t*)(&tdd_calib_coeffs[aa][0]),(int16_t*)(&ul_ch_estimates[aa][0]),(int16_t*)(&calib_dl_ch_estimates[aa][0]),1,frame_parms->N_RB_DL*12,15);*/
for
(
re
=
0
;
re
<
frame_parms
->
N_RB_DL
*
12
;
re
++
)
{
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
0
]
+=
(((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
re
]))[
0
]
*
((
int16_t
*
)(
&
ul_ch_estimates
[
aa
][
re
]))[
0
])
>>
15
;
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
0
]
-=
(((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
re
]))[
1
]
*
((
int16_t
*
)(
&
ul_ch_estimates
[
aa
][
re
]))[
1
])
>>
15
;
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
1
]
+=
(((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
re
]))[
0
]
*
((
int16_t
*
)(
&
ul_ch_estimates
[
aa
][
re
]))[
1
])
>>
15
;
((int16_t*)(&calib_dl_ch_estimates[aa][re]))[1] += (((int16_t*)(&tdd_calib_coeffs[aa][re]))[1]*((int16_t*)(&ul_ch_estimates[aa][re]))[0])>>15;
*/
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
1
]
+=
(((
int16_t
*
)(
&
tdd_calib_coeffs
[
aa
][
re
]))[
1
]
*
((
int16_t
*
)(
&
ul_ch_estimates
[
aa
][
re
]))[
0
])
>>
15
;
/*printf("aa=%d, re=%d tdd_calib_coeffs= (%d, %d), ul_ch_estimates = (%d, %d), calib_dl_ch_estimates = (%d, %d)\n",
aa, re,
((int16_t*)&tdd_calib_coeffs[aa][re])[0], ((int16_t*)&tdd_calib_coeffs[aa][re])[1],
((int16_t*)&ul_ch_estimates[aa][re])[0], ((int16_t*)&ul_ch_estimates[aa][re])[1],
((int16_t*)&calib_dl_ch_estimates[aa][re])[0], ((int16_t*)&calib_dl_ch_estimates[aa][re])[1]);*/
//
}
}
}
}
...
...
@@ -63,9 +63,14 @@ void compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates,
//case MRT
case
MRT
:
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
re
=
0
;
re
<
frame_parms
->
ofdm_symbol_size
;
re
++
)
{
((
int16_t
*
)(
&
beam_weights
[
aa
][
re
]))[
0
]
=
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
0
];
((
int16_t
*
)(
&
beam_weights
[
aa
][
re
]))[
1
]
=
-
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
1
];
for
(
re
=
0
;
re
<
frame_parms
->
N_RB_DL
*
6
;
re
++
)
{
((
int16_t
*
)(
&
beam_weights
[
aa
][
frame_parms
->
first_carrier_offset
+
re
]))[
0
]
=
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
0
];
((
int16_t
*
)(
&
beam_weights
[
aa
][
frame_parms
->
first_carrier_offset
+
re
]))[
1
]
=
-
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
1
];
//Normalisation not implemented
}
for
(
re
=
frame_parms
->
N_RB_DL
*
6
;
re
<
frame_parms
->
N_RB_DL
*
12
;
re
++
)
{
((
int16_t
*
)(
&
beam_weights
[
aa
][
re
-
frame_parms
->
N_RB_DL
*
6
+
1
]))[
0
]
=
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
0
];
((
int16_t
*
)(
&
beam_weights
[
aa
][
re
-
frame_parms
->
N_RB_DL
*
6
+
1
]))[
1
]
=
-
((
int16_t
*
)(
&
calib_dl_ch_estimates
[
aa
][
re
]))[
1
];
//Normalisation not implemented
}
}
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
View file @
7f63f23f
...
...
@@ -2149,14 +2149,12 @@ PMI_FEEDBACK:
start_meas
(
&
eNB
->
dl_ch_calib_stats
);
//make sure dlsim is called with perfect channel estimation option (for freq_channel)
//fill drs_ch_estimates with data from eNB2UE->chF
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
for
(
l
=
0
;
l
<
frame_parms
->
symbols_per_tti
;
l
++
)
{
((
int16_t
*
)
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
(
l
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)][
i
].
x
*
AMP
);
//printf("x=%d,AMP=%d\n",eNB2UE[round]->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x,
AMP);
((
int16_t
*
)
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][(
aa
<<
1
)
+
aarx
])[
2
*
i
+
1
+
(
l
*
frame_parms
->
ofdm_symbol_size
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
+
(
aa
*
frame_parms
->
nb_antennas_rx
)
][
i
].
y
*
AMP
);
}
for
(
i
=
0
;
i
<
frame_parms
->
N_RB_DL
*
12
;
i
++
)
{
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
x
*
AMP
);
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
+
1
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
y
*
AMP
);
printf
(
"x=%d, y=%d,AMP=%d
\n
"
,
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
x
,
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
y
,
AMP
);
}
}
}
...
...
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