Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dyyu
openairinterface5G
Commits
5adc20ca
Commit
5adc20ca
authored
Aug 18, 2015
by
Xiwen JIANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch difference of TM7 dev with svn r7530 to git branch
parent
bc14704c
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
2886 additions
and
1132 deletions
+2886
-1132
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
common/utils/Makefile.inc
common/utils/Makefile.inc
+1
-1
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+24
-18
openair1/PHY/LTE_ESTIMATION/bf_freq_domain_filters.m
openair1/PHY/LTE_ESTIMATION/bf_freq_domain_filters.m
+59
-0
openair1/PHY/LTE_ESTIMATION/defs.h
openair1/PHY/LTE_ESTIMATION/defs.h
+7
-0
openair1/PHY/LTE_ESTIMATION/filt12_32.h
openair1/PHY/LTE_ESTIMATION/filt12_32.h
+72
-0
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
+96
-0
openair1/PHY/LTE_REFSIG/defs.h
openair1/PHY/LTE_REFSIG/defs.h
+10
-1
openair1/PHY/LTE_REFSIG/lte_dl_ue_spec.c
openair1/PHY/LTE_REFSIG/lte_dl_ue_spec.c
+393
-0
openair1/PHY/LTE_REFSIG/lte_dl_uespec.c
openair1/PHY/LTE_REFSIG/lte_dl_uespec.c
+0
-362
openair1/PHY/LTE_REFSIG/lte_gold.c
openair1/PHY/LTE_REFSIG/lte_gold.c
+42
-0
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+8
-1
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+815
-44
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
+9
-3
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+721
-589
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
+8
-7
openair1/PHY/LTE_TRANSPORT/pilots_ue_spec.c
openair1/PHY/LTE_TRANSPORT/pilots_ue_spec.c
+217
-0
openair1/PHY/LTE_TRANSPORT/pmch.c
openair1/PHY/LTE_TRANSPORT/pmch.c
+2
-3
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+38
-11
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+9
-0
openair1/PHY/Makefile.inc
openair1/PHY/Makefile.inc
+4
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+8
-1
openair1/PHY/impl_defs_lte.h
openair1/PHY/impl_defs_lte.h
+15
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+32
-14
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+20
-7
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+261
-60
openair1/SIMULATION/LTE_PHY/mbmssim.c
openair1/SIMULATION/LTE_PHY/mbmssim.c
+1
-1
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/txsig.m
targets/ARCH/EXMIMO/USERSPACE/OCTAVE/txsig.m
+13
-5
No files found.
cmake_targets/CMakeLists.txt
View file @
5adc20ca
...
@@ -754,6 +754,7 @@ set(PHY_SRC
...
@@ -754,6 +754,7 @@ set(PHY_SRC
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
...
...
common/utils/Makefile.inc
View file @
5adc20ca
...
@@ -5,7 +5,7 @@ linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
...
@@ -5,7 +5,7 @@ linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
CFLAGS
+=
-std
=
gnu99
CFLAGS
+=
-std
=
gnu99
#
CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
CFLAGS
+=
-Wall
-g
-ggdb
-Wstrict-prototypes
-fno-strict-aliasing
# Need to force this option because default kernel module builder is wrong
# Need to force this option because default kernel module builder is wrong
CFLAGS
+=
$(
call
cc-option,-mpreferred-stack-boundary
=
4
)
CFLAGS
+=
$(
call
cc-option,-mpreferred-stack-boundary
=
4
)
...
...
openair1/PHY/INIT/lte_init.c
View file @
5adc20ca
...
@@ -923,14 +923,17 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
...
@@ -923,14 +923,17 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
pdsch
->
llr128_2ndstream
=
(
int16_t
**
)
malloc16_clear
(
sizeof
(
int16_t
*
)
);
pdsch
->
llr128_2ndstream
=
(
int16_t
**
)
malloc16_clear
(
sizeof
(
int16_t
*
)
);
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
pdsch
->
rxdataF_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_comp0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_uespec_pilots
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
rho
=
(
int32_t
**
)
malloc16_clear
(
frame_parms
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
rxdataF_comp0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
rho
=
(
int32_t
**
)
malloc16_clear
(
frame_parms
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_rho_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_rho2_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_mag0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_bf_ch_estimates_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magb0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_rho_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_rho2_ext
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_mag0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
pdsch
->
dl_ch_magb0
=
(
int32_t
**
)
malloc16_clear
(
8
*
sizeof
(
int32_t
*
)
);
// the allocated memory size is fixed:
// the allocated memory size is fixed:
AssertFatal
(
frame_parms
->
nb_antennas_rx
<=
2
,
"nb_antennas_rx > 2"
);
AssertFatal
(
frame_parms
->
nb_antennas_rx
<=
2
,
"nb_antennas_rx > 2"
);
...
@@ -941,13 +944,16 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
...
@@ -941,13 +944,16 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
//frame_parms->nb_antennas_tx; j++)
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
//frame_parms->nb_antennas_tx; j++)
const
int
idx
=
(
j
<<
1
)
+
i
;
const
int
idx
=
(
j
<<
1
)
+
i
;
const
size_t
num
=
7
*
2
*
frame_parms
->
N_RB_DL
*
12
;
const
size_t
num
=
7
*
2
*
frame_parms
->
N_RB_DL
*
12
;
pdsch
->
rxdataF_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_comp0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_uespec_pilots
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
frame_parms
->
N_RB_DL
*
12
);
pdsch
->
dl_ch_estimates_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
rxdataF_comp0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_rho_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_estimates_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_rho2_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_bf_ch_estimates
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_mag0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_bf_ch_estimates_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
frame_parms
->
symbols_per_tti
*
(
frame_parms
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
)
);
pdsch
->
dl_ch_magb0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_rho_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_rho2_ext
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_mag0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
pdsch
->
dl_ch_magb0
[
idx
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
num
);
}
}
}
}
}
}
...
@@ -1268,10 +1274,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -1268,10 +1274,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
if
(
abstraction_flag
==
0
)
{
if
(
abstraction_flag
==
0
)
{
// TX vars
// TX vars
eNB_common_vars
->
txdata
[
eNB_id
]
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
)
);
eNB_common_vars
->
txdata
[
eNB_id
]
=
(
int32_t
**
)
malloc16
(
phy_vars_eNB
->
nb_antennas_tx
_phy
*
sizeof
(
int32_t
*
)
);
eNB_common_vars
->
txdataF
[
eNB_id
]
=
(
mod_sym_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
mod_sym_t
*
)
);
eNB_common_vars
->
txdataF
[
eNB_id
]
=
(
mod_sym_t
**
)
malloc16
(
phy_vars_eNB
->
nb_antennas_tx
_phy
*
sizeof
(
mod_sym_t
*
)
);
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
for
(
i
=
0
;
i
<
phy_vars_eNB
->
nb_antennas_tx
_phy
;
i
++
)
{
#ifdef USER_MODE
#ifdef USER_MODE
eNB_common_vars
->
txdata
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
int32_t
)
);
eNB_common_vars
->
txdata
[
eNB_id
][
i
]
=
(
int32_t
*
)
malloc16_clear
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
int32_t
)
);
eNB_common_vars
->
txdataF
[
eNB_id
][
i
]
=
(
mod_sym_t
*
)
malloc16_clear
(
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX
*
sizeof
(
mod_sym_t
)
);
eNB_common_vars
->
txdataF
[
eNB_id
][
i
]
=
(
mod_sym_t
*
)
malloc16_clear
(
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX
*
sizeof
(
mod_sym_t
)
);
...
...
openair1/PHY/LTE_ESTIMATION/bf_freq_domain_filters.m
0 → 100644
View file @
5adc20ca
filter_length = 12;
F = -3/4:1/4:7/4;
F_l = zeros(8,12);
F_r = zeros(8,12);
F_m = zeros(8,12);
F2 =-3/5:1/5:8/5;
for i=0:3
F_l(i+1,:) = floor(16384*[F(8+i:-1:4) zeros(1,7-i)]);
F_r(i+1,:) = floor(16384*[zeros(1,4+i) F(4:end-i)]);
F_m(i+1,:) = floor(16384*[F(4-i:8) F(7:-1:1+i)]);
end
for i=0:1
F_l(i+5,:) = floor(16384*[F(8:-1:4-i) zeros(1,7-i)]);
F_r(i+5,:) = floor(16384*[zeros(1,5+i) F2(5+i) F2(7:end-i)]);
F_m(i+5,:) = floor(16384*[F(4-i:8) F2(8-i) F2(6:-1:1+i)]);
end
for i=2:3
F_l(i+5,:) = floor(16384*[F2(end:-1:7) F2(8-i) zeros(1,5)]);
F_r(i+5,:) = floor(16384*[zeros(1,4+i) F(4:end-i)]);
F_m(i+5,:) = floor(16384*[F2(4-i:6) F2(4+i) F(8:-1:1+i)]);
end
fd = fopen("filt12_32.h","w");
for i=0:3
fprintf(fd,"short filt12_l%d[12] = {\n",i);
fprintf(fd,"%d,",F_l(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_l(i+1,end));
fprintf(fd,"short filt12_r%d[12] = {\n",i);
fprintf(fd,"%d,",F_r(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_r(i+1,end));
fprintf(fd,"short filt12_m%d[12] = {\n",i);
fprintf(fd,"%d,",F_m(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_m(i+1,end));
end
for i=0:3
fprintf(fd,"short filt12_l%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_l(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_l(i+5,end));
fprintf(fd,"short filt12_r%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_r(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_r(i+5,end));
fprintf(fd,"short filt12_m%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_m(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_m(i+5,end));
end
fclose(fd);
openair1/PHY/LTE_ESTIMATION/defs.h
View file @
5adc20ca
...
@@ -124,6 +124,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
...
@@ -124,6 +124,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uint8_t
symbol
);
uint8_t
symbol
);
int
lte_dl_bf_channel_estimation
(
PHY_VARS_UE
*
phy_vars_ue
,
module_id_t
eNB_id
,
uint8_t
eNB_offset
,
uint8_t
Ns
,
uint8_t
p
,
uint8_t
symbol
);
int
lte_dl_msbfn_channel_estimation
(
PHY_VARS_UE
*
phy_vars_ue
,
int
lte_dl_msbfn_channel_estimation
(
PHY_VARS_UE
*
phy_vars_ue
,
module_id_t
eNB_id
,
module_id_t
eNB_id
,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
...
...
openair1/PHY/LTE_ESTIMATION/filt12_32.h
0 → 100644
View file @
5adc20ca
short
filt12_l0
[
12
]
=
{
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r0
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
20480
,
24576
,
28672
};
short
filt12_m0
[
12
]
=
{
0
,
4096
,
8192
,
12288
,
16384
,
12288
,
8192
,
4096
,
0
,
-
4096
,
-
8192
,
-
12288
};
short
filt12_l1
[
12
]
=
{
20480
,
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r1
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
20480
,
24576
};
short
filt12_m1
[
12
]
=
{
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
12288
,
8192
,
4096
,
0
,
-
4096
,
-
8192
};
short
filt12_l2
[
12
]
=
{
24576
,
20480
,
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r2
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
20480
};
short
filt12_m2
[
12
]
=
{
-
8192
,
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
12288
,
8192
,
4096
,
0
,
-
4096
};
short
filt12_l3
[
12
]
=
{
28672
,
24576
,
20480
,
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r3
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
};
short
filt12_m3
[
12
]
=
{
-
12288
,
-
8192
,
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
12288
,
8192
,
4096
,
0
};
short
filt12_l0_dc
[
12
]
=
{
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r0_dc
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
3276
,
9830
,
13107
,
16384
,
19660
,
22937
,
26214
};
short
filt12_m0_dc
[
12
]
=
{
0
,
4096
,
8192
,
12288
,
16384
,
13107
,
6553
,
3276
,
0
,
-
3277
,
-
6554
,
-
9831
};
short
filt12_l1_dc
[
12
]
=
{
16384
,
12288
,
8192
,
4096
,
0
,
-
4096
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r1_dc
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
6553
,
9830
,
13107
,
16384
,
19660
,
22937
};
short
filt12_m1_dc
[
12
]
=
{
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
9830
,
6553
,
3276
,
0
,
-
3277
,
-
6554
};
short
filt12_l2_dc
[
12
]
=
{
26214
,
22937
,
19660
,
16384
,
13107
,
9830
,
6553
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r2_dc
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
20480
};
short
filt12_m2_dc
[
12
]
=
{
-
6554
,
-
3277
,
0
,
3276
,
6553
,
6553
,
16384
,
12288
,
8192
,
4096
,
0
,
-
4096
};
short
filt12_l3_dc
[
12
]
=
{
26214
,
22937
,
19660
,
16384
,
13107
,
9830
,
3276
,
0
,
0
,
0
,
0
,
0
};
short
filt12_r3_dc
[
12
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
};
short
filt12_m3_dc
[
12
]
=
{
-
9831
,
-
6554
,
-
3277
,
0
,
3276
,
6553
,
9830
,
16384
,
12288
,
8192
,
4096
,
0
};
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
0 → 100644
View file @
5adc20ca
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#ifdef USER_MODE
#include <string.h>
#endif
#include "defs.h"
#include "PHY/defs.h"
#include "filt12_32.h"
//#define DEBUG_CH
/*To be accomplished*/
int
lte_dl_bf_channel_estimation
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
p
,
unsigned
char
symbol
)
{
unsigned
char
aarx
;
int
uespec_pilot
[
9
][
200
];
short
*
pil
,
*
rxF
;
//LTE_UE_PDSCH *lte_ue_pdsch_vars = phy_vars_ue->lte_ue_pdsch_vars[eNB_id];
int
**
rxdataF
=
phy_vars_ue
->
lte_ue_common_vars
.
rxdataF
;
int32_t
**
dl_bf_ch_estimates
=
phy_vars_ue
->
lte_ue_pdsch_vars
[
eNB_id
]
->
dl_bf_ch_estimates
;
int
beamforming_mode
=
phy_vars_ue
->
transmission_mode
>
7
?
phy_vars_ue
->
transmission_mode
:
0
;
// define interpolation filters
//....
//ch_offset = phy_vars_ue->lte_frame_parms.ofdm_symbol_size*symbol;
//generate ue specific pilots
if
(
beamforming_mode
==
7
)
lte_dl_ue_spec_rx
(
phy_vars_ue
,
&
uespec_pilot
[
p
-
5
][
0
],
Ns
,
p
,
0
);
else
if
(
beamforming_mode
>
7
)
lte_dl_ue_spec_rx
(
phy_vars_ue
,
&
uespec_pilot
[
p
-
6
][
0
],
Ns
,
p
,
0
);
else
if
(
beamforming_mode
==
0
)
msg
(
"No beamforming is performed.
\n
"
);
else
msg
(
"Beamforming mode not supported yet.
\n
"
);
if
(
beamforming_mode
==
7
)
{
for
(
aarx
=
0
;
aarx
<
phy_vars_ue
->
lte_frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
/* pil = (short *)&uespec_pilot[0][0];
rxF = (short *)&rxdataF_uespec[aarx][(symbol-1)/3*frame_parms->N_RB_DL*(3+frame_parms->Ncp)];
dl_ch = (short *)&dl_bf_ch_estimates[aarx][ch_offset];
memset(dl_ch,0,4*(phy_vars_ue->lte_frame_parms.ofdm_symbol_size));
//estimation and interpolation */
}
}
else
if
(
beamforming_mode
==
0
){
msg
(
"No beamforming is performed.
\n
"
);
return
(
-
1
);
}
else
{
msg
(
"Beamforming mode is not supported yet.
\n
"
);
return
(
-
1
);
}
//temporal interpolation
return
(
0
);
}
openair1/PHY/LTE_REFSIG/defs.h
View file @
5adc20ca
...
@@ -52,12 +52,13 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
...
@@ -52,12 +52,13 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
void
lte_gold
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table
[
20
][
2
][
14
],
uint16_t
Nid_cell
);
void
lte_gold
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table
[
20
][
2
][
14
],
uint16_t
Nid_cell
);
void
lte_gold_ue_spec
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_uespec_table
[
2
][
20
][
2
][
21
],
uint16_t
Nid_cell
,
uint16_t
*
n_idDMRS
);
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
@param frame_parms LTE DL Frame parameters
@param frame_parms LTE DL Frame parameters
@param lte_gold_uespec_table pointer to table where sequences are stored
@param lte_gold_uespec_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
@param n_idDMRS Scrambling identity for TM10*/
@param n_idDMRS Scrambling identity for TM10*/
void
lte_gold_ue_spec
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_uespec_table
[
2
][
20
][
2
][
21
],
uint16_t
Nid_cell
,
uint16_t
*
n_idDMRS
);
void
lte_gold_mbsfn
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_mbsfn_table
[
10
][
3
][
42
],
uint16_t
Nid_MBSFN
);
void
lte_gold_mbsfn
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_mbsfn_table
[
10
][
3
][
42
],
uint16_t
Nid_MBSFN
);
...
@@ -84,6 +85,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -84,6 +85,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
@param output Output vector for OFDM symbol (Frequency Domain)
@param output Output vector for OFDM symbol (Frequency Domain)
@param amp Q15 amplitude
@param amp Q15 amplitude
@param Ns Slot number (0..19)
@param Ns Slot number (0..19)
@param lprime symbol (0,1)
@param p antenna index
@param p antenna index
@param SS_flag Flag to indicate special subframe
@param SS_flag Flag to indicate special subframe
*/
*/
...
@@ -92,6 +94,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -92,6 +94,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t
*
output
,
mod_sym_t
*
output
,
short
amp
,
short
amp
,
uint8_t
Ns
,
uint8_t
Ns
,
uint8_t
lprime
,
uint8_t
p
,
uint8_t
p
,
int
SS_flag
);
int
SS_flag
);
...
@@ -123,6 +126,12 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
...
@@ -123,6 +126,12 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
unsigned
char
l
,
unsigned
char
l
,
unsigned
char
p
);
unsigned
char
p
);
int
lte_dl_ue_spec_rx
(
PHY_VARS_UE
*
phy_vars_ue
,
mod_sym_t
*
output
,
unsigned
char
Ns
,
unsigned
char
p
,
int
SS_flag
);
int
lte_dl_mbsfn_rx
(
PHY_VARS_UE
*
phy_vars_ue
,
int
lte_dl_mbsfn_rx
(
PHY_VARS_UE
*
phy_vars_ue
,
int
*
output
,
int
*
output
,
int
subframe
,
int
subframe
,
...
...
openair1/PHY/LTE_REFSIG/lte_dl_ue_spec.c
0 → 100644
View file @
5adc20ca
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file PHY/LTE_REFSIG/lte_dl_ue_spec.c
* \brief Top-level routines for generating UE-specific Reference signals from 36-211, V11.3.0 2013-06
* \author R. Knopp X. Jiang
* \date 2015
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr xiwen.jiang@eurecom.fr
* \note
* \warning
*/
#ifdef USER_MODE
#include <stdio.h>
#include <stdlib.h>
#endif
#include "defs.h"
#include "PHY/defs.h"
#include "log.h"
//extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC
int
Wbar_NCP
[
8
][
4
]
=
{{
1
,
1
,
1
,
1
},{
1
,
-
1
,
1
,
-
1
},{
1
,
1
,
1
,
1
},{
1
,
-
1
,
1
,
-
1
},{
1
,
1
,
-
1
,
-
1
},{
-
1
,
-
1
,
1
,
1
},{
1
,
-
1
,
-
1
,
1
},{
-
1
,
1
,
1
,
-
1
}};
int
lte_dl_ue_spec
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint8_t
UE_id
,
mod_sym_t
*
output
,
short
amp
,
uint8_t
Ns
,
uint8_t
lprime
,
uint8_t
p
,
int
SS_flag
)
{
mod_sym_t
qpsk
[
4
],
nqpsk
[
4
];
int16_t
k
=
0
,
a
;
int
mprime
,
mprime_dword
,
mprime_qpsk_symb
;
unsigned
nushift
,
kprime
;
// LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[UE_id][0];
a
=
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
((
short
*
)
&
qpsk
[
0
])[
0
]
=
a
;
((
short
*
)
&
qpsk
[
0
])[
1
]
=
a
;
((
short
*
)
&
qpsk
[
1
])[
0
]
=
-
a
;
((
short
*
)
&
qpsk
[
1
])[
1
]
=
a
;
((
short
*
)
&
qpsk
[
2
])[
0
]
=
a
;
((
short
*
)
&
qpsk
[
2
])[
1
]
=
-
a
;
((
short
*
)
&
qpsk
[
3
])[
0
]
=
-
a
;
((
short
*
)
&
qpsk
[
3
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
0
])[
0
]
=
-
a
;
((
short
*
)
&
nqpsk
[
0
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
1
])[
0
]
=
a
;
((
short
*
)
&
nqpsk
[
1
])[
1
]
=
-
a
;
((
short
*
)
&
nqpsk
[
2
])[
0
]
=
-
a
;
((
short
*
)
&
nqpsk
[
2
])[
1
]
=
a
;
((
short
*
)
&
nqpsk
[
3
])[
0
]
=
a
;
((
short
*
)
&
nqpsk
[
3
])[
1
]
=
a
;
if
(
p
==
5
)
{
if
(
SS_flag
==
0
)
{
if
(
phy_vars_eNB
->
lte_frame_parms
.
Ncp
==
NORMAL
)
{
// this is 3GPP 36-211 6.10.3.2, NORMAL CP, p=5
nushift
=
phy_vars_eNB
->
lte_frame_parms
.
Nid_cell
%
3
;
if
(
lprime
==
0
){
kprime
=
nushift
;
}
else
{
kprime
=
(
nushift
+
2
*
lprime
)
%
4
;
}
k
=
kprime
+
phy_vars_eNB
->
lte_frame_parms
.
first_carrier_offset
;
printf
(
"lte_dl_ue_spec:k=%d
\n
"
,
k
);
for
(
mprime
=
0
;
mprime
<
3
*
phy_vars_eNB
->
lte_frame_parms
.
N_RB_DL
-
1
;
mprime
++
)
{
mprime_dword
=
mprime
>>
4
;
mprime_qpsk_symb
=
mprime
&
0xf
;
//output[k] = qpsk[(phy_vars_eNB->lte_gold_uespec_port5_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
output
[
k
]
=
0xffffffff
;
k
+=
4
;
if
(
k
>=
phy_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
)
{
k
++
;
// skip DC carrier
k
-=
phy_vars_eNB
->
lte_frame_parms
.
ofdm_symbol_size
;
}
}
}
}
}
else
if
(
p
>=
7
)
{
printf
(
"lte_dl_ue_spec:antenna ports >=7 not supported yet!
\n
"
);
}
else
{
LOG_E
(
PHY
,
"Illegal p %d UE specific pilots
\n
"
,
p
);
}
return
(
0
);
}
int
lte_dl_ue_spec_rx
(
PHY_VARS_UE
*
phy_vars_ue
,
mod_sym_t
*
output
,
unsigned
char
Ns
,
unsigned
char
p
,
int
SS_flag
)
{
mod_sym_t
qpsk
[
4
],
nqpsk
[
4
],
*
qpsk_p
,
*
output_p
;
int16_t
a
;
int
w
,
lprime
,
mprime
,
ind
,
l
,
ind_dword
,
ind_qpsk_symb
,
nPRB
;
short
pamp
;
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
pamp
=
ONE_OVER_SQRT2_Q15
;
// This includes complex conjugate for channel estimation
((
short
*
)
&
qpsk
[
0
])[
0
]
=
pamp
;
((
short
*
)
&
qpsk
[
0
])[
1
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
1
])[
0
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
1
])[
1
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
2
])[
0
]
=
pamp
;
((
short
*
)
&
qpsk
[
2
])[
1
]
=
pamp
;
((
short
*
)
&
qpsk
[
3
])[
0
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
3
])[
1
]
=
pamp
;
((
short
*
)
&
nqpsk
[
0
])[
0
]
=
-
pamp
;
((
short
*
)
&
nqpsk
[
0
])[
1
]
=
pamp
;
((
short
*
)
&
nqpsk
[
1
])[
0
]
=
pamp
;
((
short
*
)
&
nqpsk
[
1
])[
1
]
=
pamp
;
((
short
*
)
&
nqpsk
[
2
])[
0
]
=
-
pamp
;
((
short
*
)
&
nqpsk
[
2
])[
1
]
=
-
pamp
;
((
short
*
)
&
nqpsk
[
3
])[
0
]
=
pamp
;
((
short
*
)
&
nqpsk
[
3
])[
1
]
=
-
pamp
;