Commit 5adc20ca authored by Xiwen JIANG's avatar Xiwen JIANG

patch difference of TM7 dev with svn r7530 to git branch

parent bc14704c
Branches unavailable
2025.w14 2025.w13 2025.w12 2025.w11 2025.w10 2025.w09 2025.w08 2025.w07 2025.w06 2025.w05 2025.w04 2025.w03 2025.w02 2024.w51 2024.w50 2024.w49 2024.w48 2024.w47 2024.w46 2024.w45 2024.w44 2024.w43 2024.w42 2024.w41 2024.w40 2024.w39 2024.w38 2024.w36 2024.w35 2024.w34 2024.w33 2024.w32 2024.w31 2024.w30 2024.w29 2024.w28 2024.w27 2024.w26 2024.w25 2024.w24 2024.w23 2024.w22 2024.w21 2024.w18 2024.w17 2024.w16 2024.w15 2024.w14 2024.w13 2024.w12 2024.w11 2024.w10 2024.w09 2024.w08 2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 2017.w34 2017.w30 2017.w25 2017.w24 2017.w22 2017.w20 2017.w19 2017.w15 2017.w14 2017.w13 2017.w12 2017.w11 2017.w10 2017.w09 2017.w08 2017.w07 2017.w06 2017.w05 2017.w04 2017.w03 2017.w02 2017.w01 2016.w50 v2.2.0 v2.1.0 v2.0.0 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 v0.6.1 v0.6.1_tdd v0.6 v0.5.1_tdd setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0 ARC_1.3
No related merge requests found
......@@ -754,6 +754,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.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_bf_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_est_freq_offset.c
......
......@@ -5,7 +5,7 @@ linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
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
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=4)
......
......@@ -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*) );
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
pdsch->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rxdataF_comp0 = (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_estimates_ext = (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*) );
pdsch->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rxdataF_uespec_pilots = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rxdataF_comp0 = (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_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_bf_ch_estimates = (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_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:
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
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
const int idx = (j<<1)+i;
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_comp0[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_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 );
pdsch->rxdataF_ext[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->rxdataF_comp0[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_bf_ch_estimates[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_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,
if (abstraction_flag==0) {
// TX vars
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_tx*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->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(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
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) );
......
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);
......@@ -124,6 +124,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
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,
module_id_t eNB_id,
uint8_t eNB_offset,
......
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};
/*******************************************************************************
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);
}
......@@ -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_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.
@param frame_parms LTE DL Frame parameters
@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 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);
......@@ -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 amp Q15 amplitude
@param Ns Slot number (0..19)
@param lprime symbol (0,1)
@param p antenna index
@param SS_flag Flag to indicate special subframe
*/
......@@ -92,6 +94,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t *output,
short amp,
uint8_t Ns,
uint8_t lprime,
uint8_t p,
int SS_flag );
......@@ -123,6 +126,12 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
unsigned char l,
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 *output,
int subframe,
......
This diff is collapsed.
This diff is collapsed.
......@@ -142,6 +142,48 @@ void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_t
}
}
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][2][21],uint16_t Nid_cell, uint16_t n_rnti)
{
unsigned char ns,l;
unsigned int n,x1,x2;
for (ns=0; ns<20; ns++) {
for (l=0; l<2; l++) {
x2 = ((((ns>>1)+1)*((Nid_cell<<1)+1))<<16) + n_rnti;
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
//n = 0
// printf("cinit (ns %d, l %d) => %d\n",ns,l,x2);
x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
// skip first 50 double words (1600 bits)
//printf("n=0 : x1 %x, x2 %x\n",x1,x2);
for (n=1; n<50; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
// printf("x1 : %x, x2 : %x\n",x1,x2);
}
for (n=0; n<14; n++) {
x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
lte_gold_uespec_port5_table[ns][l][n] = x1^x2;
// printf("n=%d : c %x\n",n,x1^x2);
}
}
}
}
/*! \brief gold sequenquence generator
\param x1
\param x2 this should be set to c_init if reset=1
......
......@@ -259,6 +259,7 @@ int dlsch_encoding(unsigned char *a,
unsigned char mod_order;
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
uint8_t transmission_mode_7to9=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
......@@ -266,7 +267,13 @@ int dlsch_encoding(unsigned char *a,
// printf("Encoder: A: %d\n",A);
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe);
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
transmission_mode_7to9 = 7;
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM8)
transmission_mode_7to9 = 8;
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM9_10)
transmission_mode_7to9 = 9;
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe,transmission_mode_7to9);
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
......
......@@ -640,7 +640,8 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t first_symbol_flag,
uint16_t nb_rb,
uint16_t pbch_pss_sss_adjust,
short **llr32p)
short **llr32p,
uint8_t beamforming_mode)
{
uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)];
......@@ -661,11 +662,16 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
if (frame_parms->mode1_flag==0)
if (frame_parms->mode1_flag==0 && beamforming_mode!=7)
len = (nb_rb*8);// - (2*pbch_pss_sss_adjust/3);
else
len = (nb_rb*10);// - (5*pbch_pss_sss_adjust/6);
} else {
} else if((beamforming_mode==7) && (frame_parms->Ncp==0) && (symbol==3 || symbol==6 || symbol==9 || symbol==12)){
len = (nb_rb*9);
} else if((beamforming_mode==7) && (frame_parms->Ncp==1) && (symbol==4 || symbol==7 || symbol==10)){
len = (nb_rb*8);
}
else {
len = (nb_rb*12);// - pbch_pss_sss_adjust;
}
......
......@@ -333,11 +333,8 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
return(0);
}
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe)
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
{
int G_adj;
if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
......@@ -348,9 +345,11 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
// PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
// PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
// PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
if (frame_parms->mode1_flag==0) // SISO
if (beamforming_mode==0 && frame_parms->mode1_flag==0)
return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else
else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
else //SISO
return(((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*10)) - G_adj);
} else {
// PDDPDD PDDPDD - 11 PDSCH symbols, 8 full, 3 w/ pilots = 8*12 + 3*8
......@@ -358,7 +357,9 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
// PCCPDD PDDPDD - 9 PDSCH symbols, 6 full, 3 w/pilots = 6*12 + 3*8
if (frame_parms->mode1_flag==0)
return((((int)nb_rb * mod_order * ((9-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else
else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((5-num_pdcch_symbols)*12 + 3*8 + 4*9)) - G_adj);
else //SISO
return(((int)nb_rb * mod_order * ((9-num_pdcch_symbols)*12 + 3*10)) - G_adj);
}
} else { // This is an MBSFN subframe
......
/*******************************************************************************
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_TRANSPORT/uespec_pilots.c
* \brief Top-level routines for generating DL ue-specific reference signals V12.5 2015-03
* \author X.JIANG
* \date 2011
* \version 0.1
* \company Eurecom
* \email: xiwen.jiangeurecom.fr
* \note
* \warning
*/
//#include "defs.h"
#include "PHY/defs.h"
void generate_ue_spec_pilots(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id,
mod_sym_t **txdataF,
int16_t amp,
uint16_t Ntti,
uint8_t beamforming_mode)
{
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
uint32_t tti,tti_offset,slot_offset,Nsymb,samples_per_symbol;
uint8_t second_pilot,aa;
// printf("Doing TX pilots Nsymb %d, second_pilot %d\n",Nsymb,second_pilot);
switch(beamforming_mode){
case 7:
for (tti=0; tti<Ntti; tti++) {
tti_offset = tti*frame_parms->ofdm_symbol_size*Nsymb;
samples_per_symbol = frame_parms->ofdm_symbol_size;
slot_offset = (tti*2)%20;
// printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset);
//Generate UE specific Pilots
printf("generate_dl_ue_spec:tti_offset=%d\n",tti_offset);
if(frame_parms->Ncp==0) {
for(aa=0;aa<phy_vars_eNB->nb_antennas_tx_phy;aa++){
//antenna port 5 symbol 0 slot 0
lte_dl_ue_spec(phy_vars_eNB,
UE_id,
&txdataF[aa][tti_offset+3*samples_per_symbol],
amp,
slot_offset,
1,
5,
0);
//antenna port 5 symbol 1 slot 0
lte_dl_ue_spec(phy_vars_eNB,
UE_id,
&txdataF[aa][tti_offset+6*samples_per_symbol],
amp,
slot_offset,
1,
5,
0);
//antenna port 5 symbol 0 slot 1
lte_dl_ue_spec(phy_vars_eNB,
UE_id,
&txdataF[aa][tti_offset+9*samples_per_symbol],
amp,
slot_offset+1,
0,
5,
0);
//antenna port 5 symbol 1 slot 1
lte_dl_ue_spec(phy_vars_eNB,
UE_id,
&txdataF[aa][tti_offset+12*samples_per_symbol],
amp,
slot_offset+1,
1,
5,
0);
}
} else{
msg("generate_ue_soec_pilots:Extented Cyclic Prefix for TM7 is not supported yet.\n");
}
}
break;
case 8:
case 9:
case 10:
default:
msg("[generate_ue_spec_pilots(in uespec_pilots.c)]ERROR:beamforming mode %d is not supported\n",beamforming_mode);
}
}
/*int generate_ue_spec_pilots_slot(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t **txdataF,
int16_t amp,
uint16_t slot,
int first_pilot_only)
{
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
uint32_t slot_offset,Nsymb,samples_per_symbol;
uint8_t second_pilot;
if (slot<0 || slot>= 20) {
msg("generate_pilots_slot: slot not in range (%d)\n",slot);
return(-1);
}
Nsymb = (frame_parms->Ncp==0)?7:6;
second_pilot = (frame_parms->Ncp==0)?4:3;
slot_offset = slot*frame_parms->ofdm_symbol_size*Nsymb;
samples_per_symbol = frame_parms->ofdm_symbol_size;
// printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset);
//Generate Pilots
//antenna 0 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[0][slot_offset],
amp,
slot,
0,
0);
if (first_pilot_only==0) {
//antenna 0 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[0][slot_offset+(second_pilot*samples_per_symbol)],
amp,
slot,
1,
0);
}
if (frame_parms->nb_antennas_tx > 1) {
if (frame_parms->mode1_flag) {
// antenna 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset],
amp,
slot,
0,
0);
if (first_pilot_only==0) {
// antenna 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset+(second_pilot*samples_per_symbol)],
amp,
slot,
1,
0);
}
} else {
// antenna 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset],
amp,
slot,
0,
1);
if (first_pilot_only == 0) {
// antenna 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset+(second_pilot*samples_per_symbol)],
amp,
slot,
1,
1);
}
}
}
return(0);
}*/
......@@ -304,7 +304,7 @@ void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int sched_subframe,uint8_t *a,int a
phy_vars_eNB->lte_frame_parms.N_RB_DL,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->mcs),1,
2,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe);
2,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,0);
generate_mbsfn_pilot(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
......@@ -319,8 +319,7 @@ void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int sched_subframe,uint8_t *a,int a
subframe,
&phy_vars_eNB->dlsch_rate_matching_stats,
&phy_vars_eNB->dlsch_turbo_encoding_stats,
&phy_vars_eNB->dlsch_interleaving_stats
)<0)
&phy_vars_eNB->dlsch_interleaving_stats)<0)
mac_xface->macphy_exit("problem in dlsch_encoding");
dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1);
......
/*******************************************************************************
/******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
......@@ -157,11 +157,14 @@ void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
\param re_allocated pointer to allocation counter
\param skip_dc offset for positive RBs
\param skip_half indicate that first or second half of RB must be skipped for PBCH/PSS/SSS
\param ue_spec_rs UE specific RS indicator
\param nb_antennas_tx_phy Physical antenna elements which can be different with antenna port number, especially in beamforming case
\param beamforming_weights_rb Beamforming weights applied on each antenna element and each carrier in case of TM7-10
\param use2ndpilots Set to use the pilots from antenna port 1 for PDSCH
\param frame_parms Frame parameter descriptor
*/
int32_t allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
mod_sym_t **txdataF,
uint32_t *jj,
uint32_t *jj2,
......@@ -176,8 +179,11 @@ int32_t allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
int16_t *qam_table_s1,
uint32_t *re_allocated,
uint8_t skip_dc,
uint8_t skip_half);
uint8_t skip_half,
uint8_t lprime,
uint8_t mprime,
uint8_t Ns,
int32_t **beamforming_weights);
/** \fn int32_t dlsch_modulation(mod_sym_t **txdataF,
int16_t amp,
......@@ -194,15 +200,17 @@ int32_t allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
@param num_pdcch_symbols Number of PDCCH symbols in this subframe
@param dlsch0 Pointer to Transport Block 0 DLSCH descriptor for this allocation
@param dlsch1 Pointer to Transport Block 0 DLSCH descriptor for this allocation
@param nb_antennas_tx_phy Physical antenna elements which can be different with antenna port number, especially in beamforming case
@param beamforming_weights Beamforming weights applied on each antenna element and each carrier in case of TM7-10
*/
int32_t dlsch_modulation(mod_sym_t **txdataF,
int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
mod_sym_t **txdataF,
int16_t amp,
uint32_t sub_frame_offset,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch0,
LTE_eNB_DLSCH_t *dlsch1);
LTE_eNB_DLSCH_t *dlsch1,
int32_t **beamforming_weights);
/*
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
@param txdataF Table of pointers for frequency-domain TX signals
......@@ -295,6 +303,13 @@ int32_t generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
int16_t amp,
uint16_t subframe);
void generate_ue_spec_pilots(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id,
mod_sym_t **txdataF,
int16_t amp,
uint16_t Ntti,
uint8_t beamforming_mode);
int32_t generate_pss(mod_sym_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
......@@ -680,6 +695,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
@param nb_rb number of RBs for this allocation
@param pbch_pss_sss_adj Number of channel bits taken by PBCH/PSS/SSS
@param llr128p pointer to pointer to symbol in dlsch_llr
@param beamforming_mode beamforming mode
*/
int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp,
......@@ -688,7 +704,8 @@ int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t first_symbol_flag,
uint16_t nb_rb,
uint16_t pbch_pss_sss_adj,
int16_t **llr128p);
int16_t **llr128p,
uint8_t beamforming_mode);
/**
\brief This function generates log-likelihood ratios (decoder input) for single-stream 16QAM received waveforms
......@@ -904,6 +921,16 @@ uint16_t dlsch_extract_rbs_dual(int32_t **rxdataF,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms);
uint16_t dlsch_extract_rbs_TM7(int32_t **rxdataF,
int32_t **dl_bf_ch_estimates,
int32_t **rxdataF_ext,
int32_t **dl_bf_ch_estimates_ext,
uint32_t *rb_alloc,
uint8_t symbol,
uint8_t subframe,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms);
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
@param rxdataF_ext Frequency-domain received signal in RBs to be demodulated
@param dl_ch_estimates_ext Frequency-domain channel estimates in RBs to be demodulated
......@@ -1249,7 +1276,7 @@ uint8_t get_transmission_mode(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti);
*/
uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL);
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe);
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode);
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
......@@ -1551,7 +1578,7 @@ uint8_t phich_subframe2_pusch_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t s
@param subframe Subframe of received/transmitted PHICH
@returns frame of PUSCH transmission
*/
uint8_t phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);;
uint8_t phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
void print_CQI(void *o,UCI_format_t uci_format,uint8_t eNB_id,int N_RB_DL);
......
......@@ -241,6 +241,15 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
}
}
// printf("slot_fep:transmission_mode[%d] = %d\n", eNB_id, phy_vars_ue->transmission_mode[eNB_id]);
if(phy_vars_ue->transmission_mode[eNB_id] == 7)
if(frame_parms->Ncp==0 && (symbol==3) || (symbol==6) || (symbol==9) || (symbol==12))
lte_dl_bf_channel_estimation(phy_vars_ue,eNB_id,0,Ns,5,symbol);
else if(frame_parms->Ncp==1 && (symbol==4) || (symbol==7) || (symbol==10))
msg("slot_fep(slot_fep.c):channel estimation not supported yet for TM7 extented CP.\n");
else if(phy_vars_ue->transmission_mode[eNB_id] > 7)
msg("slot_fep(slot_fep.c):transmission mode not supported yet.\n");
}
#ifdef DEBUG_FEP
......
PHY_OBJS = $(TOP_DIR)/PHY/LTE_TRANSPORT/pss.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/sss.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/pilots.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/pilots_ue_spec.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/pilots_mbsfn.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_coding.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_modulation.o
......@@ -40,6 +41,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_time.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_timefreq.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_adjust_sync.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_est_freq_offset.o
......@@ -47,7 +49,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_ue_measurements.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_eNB_measurements.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/adjust_gain.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_dl_cell_spec.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_dl_uespec.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_dl_ue_spec.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_gold.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_gold_mbsfn.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_REFSIG/lte_dl_mbsfn.o
......@@ -69,7 +71,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/INIT/lte_init.o
PHY_OBJS += $(TOP_DIR)/PHY/INIT/lte_parms.o
PHY_OBJS += $(TOP_DIR)/PHY/INIT/init_top.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/file_output.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/fft.o
#PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/fft.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/lte_dfts.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/log2_approx.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/cmult_sv.o
......
......@@ -220,6 +220,7 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t proc[NUM_ENB_THREADS];
uint8_t local_flag;
uint32_t rx_total_gain_eNB_dB;
uint8_t nb_antennas_tx_phy;
LTE_DL_FRAME_PARMS lte_frame_parms;
PHY_MEASUREMENTS_eNB PHY_measurements_eNB[NUMBER_OF_eNB_SECTORS_MAX]; /// Measurement variables
LTE_eNB_COMMON lte_eNB_common_vars;
......@@ -241,6 +242,9 @@ typedef struct PHY_VARS_eNB_s {
/// cell-specific reference symbols
uint32_t lte_gold_table[20][2][14];
/// UE-specific reference symbols (p=5), TM 7
uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX][20][2][21];
/// UE-specific reference symbols (p=7...14), TM 8/9/10
uint32_t lte_gold_uespec_table[2][20][2][21];
......@@ -505,8 +509,11 @@ typedef struct {
/// cell-specific reference symbols
uint32_t lte_gold_table[7][20][2][14];
/// UE-specific reference symbols (p=5), TM 7
uint32_t lte_gold_uespec_port5_table[20][2][21];
/// ue-specific reference symbols
uint32_t lte_gold_uespec_table[2][20][2][21];
uint32_t lte_gold_uespec_table[2][20][2][21];
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42];
......
......@@ -587,8 +587,9 @@ typedef enum {
DUALSTREAM_UNIFORM_PRECODING1=9,
DUALSTREAM_UNIFORM_PRECODINGj=10,
DUALSTREAM_PUSCH_PRECODING=11,
TM8=12,
TM9_10=13
TM7=12,
TM8=13,
TM9_10=14
} MIMO_mode_t;
typedef struct {
......@@ -784,6 +785,10 @@ typedef struct {
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
int32_t **rxdataF_ext;
/// \brief Received frequency-domain ue specific pilots.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..12*N_RB_DL[
int32_t **rxdataF_uespec_pilots;
/// \brief Received frequency-domain signal after extraction and channel compensation.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
......@@ -797,6 +802,14 @@ typedef struct {
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
int32_t **dl_ch_estimates_ext;
/// \brief Downlink beamforming channel estimates in frequency domain.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
int32_t **dl_bf_ch_estimates;
/// \brief Downlink beamforming channel estimates.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
int32_t **dl_bf_ch_estimates_ext;
/// \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
......
......@@ -2203,7 +2203,9 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB_SI->harq_processes[0]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB_SI->harq_processes[0]->mcs),
1,
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
(phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7?0:phy_vars_eNB->transmission_mode[(uint8_t)UE_id])),
0,
subframe<<1);
......@@ -2211,13 +2213,14 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
start_meas(&phy_vars_eNB->dlsch_modulation_stats);
// for (sect_id=0;sect_id<number_of_cards;sect_id++)
re_allocated = dlsch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
re_allocated = dlsch_modulation(&phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
AMP,
subframe,
&phy_vars_eNB->lte_frame_parms,
num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB_SI,
(LTE_eNB_DLSCH_t *)NULL);
(LTE_eNB_DLSCH_t *)NULL,
(int32_t **)NULL);
stop_meas(&phy_vars_eNB->dlsch_modulation_stats);
}
......@@ -2338,17 +2341,22 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB_ra->harq_processes[0]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB_ra->harq_processes[0]->mcs),
1,
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
num_pdcch_symbols,
phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
(phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7?0:phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7)),
0,
subframe<<1);
// for (sect_id=0;sect_id<number_of_cards;sect_id++)
re_allocated = dlsch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
re_allocated = dlsch_modulation(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
AMP,
subframe,
&phy_vars_eNB->lte_frame_parms,
num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB_ra,
(LTE_eNB_DLSCH_t *)NULL);
(LTE_eNB_DLSCH_t *)NULL,
(int32_t **)NULL);
}
#ifdef PHY_ABSTRACTION
......@@ -2394,7 +2402,10 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs),
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
num_pdcch_symbols,
phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
(phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7?0:phy_vars_eNB->transmission_mode[(uint8_t)UE_id])),
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs,
pmi2hex_2Ar1(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->pmi_alloc),
......@@ -2413,7 +2424,10 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs),
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
num_pdcch_symbols,
phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
(phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7?0:phy_vars_eNB->transmission_mode[(uint8_t)UE_id]<7)),
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs,
pmi2hex_2Ar1(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->pmi_alloc),
......@@ -2495,7 +2509,10 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs),
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
num_pdcch_symbols,
phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
phy_vars_eNB->transmission_mode[(uint8_t)UE_id]),
0,
subframe<<1);
stop_meas(&phy_vars_eNB->dlsch_scrambling_stats);
......@@ -2510,13 +2527,14 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
// if (UE_id == 1)
// LOG_I(PHY,"[MYEMOS] MCS_i %d\n", phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->mcs);
re_allocated = dlsch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
re_allocated = dlsch_modulation(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
AMP,
subframe,
&phy_vars_eNB->lte_frame_parms,
num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0],
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][1]);
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][1],
(int32_t **)NULL);
stop_meas(&phy_vars_eNB->dlsch_modulation_stats);
}
......
......@@ -138,7 +138,9 @@ void dump_dlsch(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,uint8_t
get_Qm(phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs),
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
phy_vars_ue->frame_rx,subframe);
phy_vars_ue->frame_rx,
subframe,
phy_vars_ue->transmission_mode[eNB_id]);
write_output("rxsigF0.m","rxsF0", phy_vars_ue->lte_ue_common_vars.rxdataF[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,2,1);
write_output("rxsigF0_ext.m","rxsF0_ext", phy_vars_ue->lte_ue_pdsch_vars[0]->rxdataF_ext[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,1,1);
......@@ -167,7 +169,9 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
get_Qm(phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->mcs),
1,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
phy_vars_ue->frame_rx,subframe);
phy_vars_ue->frame_rx,
subframe,
phy_vars_ue->transmission_mode[eNB_id]);
LOG_D(PHY,"[UE %d] Dumping dlsch_SI : nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n",
phy_vars_ue->Mod_id,
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->nb_rb,
......@@ -221,7 +225,9 @@ void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
get_Qm(phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->mcs),
1,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
phy_vars_ue->frame_rx,subframe);
phy_vars_ue->frame_rx,
subframe,
phy_vars_ue->transmission_mode[eNB_id]);
LOG_D(PHY,"[UE %d] Dumping dlsch_ra : nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n",
phy_vars_ue->Mod_id,
phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->nb_rb,
......@@ -2625,7 +2631,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
get_Qm(phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs),
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->Nl,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
frame_rx,subframe_prev);
frame_rx,
subframe_prev,
phy_vars_ue->transmission_mode[eNB_id]);
start_meas(&phy_vars_ue->dlsch_unscrambling_stats);
dlsch_unscrambling(&phy_vars_ue->lte_frame_parms,
0,
......@@ -2782,7 +2790,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc,
get_Qm(phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->mcs),1,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
frame_rx,subframe_prev);
frame_rx,
subframe_prev,
phy_vars_ue->transmission_mode[eNB_id]);
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc[0],
......@@ -2926,7 +2936,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
get_Qm(phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->mcs),1,
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
frame_rx,
subframe_prev);
subframe_prev,
phy_vars_ue->transmission_mode[eNB_id]);
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE] decoding RA (subframe %d): G %d,rnti %x\n" ,subframe_prev,
......@@ -3301,7 +3312,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
get_Qm(phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs),
1,
2,
(subframe_rx==9?-1:0)+frame_rx,subframe_rx);
(subframe_rx==9?-1:0)+frame_rx,
subframe_rx,
phy_vars_ue->transmission_mode[eNB_id]);
dlsch_unscrambling(&phy_vars_ue->lte_frame_parms,1,phy_vars_ue->dlsch_ue_MCH[0],
phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G,
......
This diff is collapsed.
......@@ -551,7 +551,7 @@ int main(int argc, char **argv)
PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->rb_alloc,
get_Qm(PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->mcs),
1,2,
PHY_vars_UE->frame_tx,subframe);
PHY_vars_UE->frame_tx,subframe,0);
dlsch_unscrambling(&PHY_vars_UE->lte_frame_parms,1,PHY_vars_UE->dlsch_ue_MCH[0],
PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->G,
PHY_vars_UE->lte_ue_pdsch_vars_MCH[0]->llr[0],0,subframe<<1);
......
......@@ -6,7 +6,7 @@ rxgain=0;
txgain=0;
eNB_flag = 0;
card = 0;
active_rf = [1 1 1 1];
active_rf = [1 0 0 0];
autocal = [1 1 1 1];
resampling_factor = [2 2 2 2];
limeparms;
......@@ -38,14 +38,14 @@ rffe_band = B19G_TDD*[1 1 1 1];
oarf_config_exmimo(card, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_flag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal,resampling_factor);
%oarf_config_exmimo(1, freq_rx,freq_tx,tdd_config,syncmode,rxgain,txgain,eNB_flag,rf_mode,rf_rxdc,rf_local,rf_vcocal,rffe_rxg_low,rffe_rxg_final,rffe_band,autocal,resampling_factor);
amp = pow2(14)-1;
amp = pow2(10)-1;
n_bit = 16;
length = 307200/pow2(resampling_factor(1));
s = zeros(length,4);
select = 1;
select = 7;
switch(select)
......@@ -73,7 +73,8 @@ case 3
case 4
pss0_f0=[0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0];
pss0_f = pss0_f0(1:2:length(pss0_f0)) + sqrt(-1)*pss0_f0(2:2:length(pss0_f0));
%pss0_f = pss0_f0(1:2:length(pss0_f0)) + sqrt(-1)*pss0_f0(2:2:length(pss0_f0));
pss0_f = pss0_f0(1:2:size(pss0_f0,2)) + sqrt(-1)*pss0_f0(2:2:size(pss0_f0,2));
pss0_f = [0 pss0_f(37:72) zeros(1,512-73) pss0_f(1:36)];
pss0_t = ifft(pss0_f);
......@@ -84,10 +85,15 @@ case 4
pss0_t_fp_re = floor(real(8192*pss0_t/pss0_max));
pss0_t_fp_im = floor(imag(8192*pss0_t/pss0_max));
%keyboard;
s(38400+(1:length(pss0_t_fp_re)),1) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
s(38400+(1:length(pss0_t_fp_re)),2) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
s(38400+(1:length(pss0_t_fp_re)),3) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
s(38400+(1:length(pss0_t_fp_re)),4) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
%s(38400+(1:size(pss0_t_fp_re,2)),1) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
%s(38400+(1:size(pss0_t_fp_re,2)),2) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
%s(38400+(1:size(pss0_t_fp_re,2)),3) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
%s(38400+(1:size(pss0_t_fp_re,2)),4) = 2*floor(pss0_t_fp_re) + 2*sqrt(-1)*floor(pss0_t_fp_im);
case 5
x=1:length;
......@@ -108,7 +114,9 @@ case 6
s(:,1) = OFDM_TX_FRAME(num_carriers,num_zeros,prefix_length,num_symbols_frame,preamble_length);
s(:,1) = floor(amp*(s(:,1)./max([real(s(:,1)); imag(s(:,1))])));
case 7
s(:,1) = floor(txs0);
otherwise
error('unknown case')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment