Commit 73bfe44f authored by Vincent Savaux's avatar Vincent Savaux

Adapt time-freq DL synchro to NB-IoT

parent f2d2e36d
......@@ -1047,6 +1047,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
......
......@@ -43,6 +43,8 @@ int lte_sync_time_NB_IoT(int **rxdata, ///rx data in time domain
NB_IoT_DL_FRAME_PARMS *frame_parms,
int *eNB_id);
void lte_sync_timefreq_NB_IoT(PHY_VARS_UE_NB_IoT *ue,int band,unsigned int DL_freq);
////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -183,9 +183,9 @@ int lte_sync_time_init_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms ) // LTE_UE_C
}
for (i=0; i<frame_parms->ofdm_symbol_size; i++)
if (l < 4){ // Skip CP length
if (l < 4){ // Skip longest CP length
((int32_t*)primary_synch0_time_NB_IoT)[l*(frame_parms->nb_prefix_samples + frame_parms->ofdm_symbol_size) + i] = sync_tmp[i];
}else{
}else{ // take into account the longest CP length is second slot of subframe
((int32_t*)primary_synch0_time_NB_IoT)[frame_parms->nb_prefix_samples0 + frame_parms->ofdm_symbol_size +
(l-1)*(frame_parms->nb_prefix_samples + frame_parms->ofdm_symbol_size) + i] = sync_tmp[i];
}
......
This diff is collapsed.
......@@ -240,10 +240,10 @@ int32_t ul_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
received_data = (int16_t *)&rxdataF_ext[aa][symbol_offset];
estimated_channel = (int16_t *)&ul_ch_estimates[aa][symbol_offset];
if (index_Nsc_RU){ // NB-IoT: a shift ul_sc_start is added in order to get the same position of the first pilot in rxdataF_ext and ul_ref_sigs_rx
pilot_sig = &ul_ref_sigs_rx[u][index_Nsc_RU][24-(ul_sc_start<<1)]; // pilot values are the same every slots
if (index_Nsc_RU){ // NB-IoT: a shift ul_sc_start is added in order to get the same position of the first pilot in rxdataF_ext and ul_ref_sigs_rx_NB_IoT
pilot_sig = &ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][24-(ul_sc_start<<1)]; // pilot values are the same every slots
}else{
pilot_sig = &ul_ref_sigs_rx[u][index_Nsc_RU][24 + 2*12*(n_s)-(ul_sc_start<<1)]; // pilot values depends on the slots
pilot_sig = &ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][24 + 2*12*(n_s)-(ul_sc_start<<1)]; // pilot values depends on the slots
}
for (k=0;k<12;k++){
......@@ -335,7 +335,7 @@ int32_t ul_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
received_data = (int16_t *)&rxdataF_ext[aa][symbol_offset];
estimated_channel = (int16_t *)&ul_ch_estimates[aa][symbol_offset];
pilot_sig = &ul_ref_sigs_rx[u][index_Nsc_RU][24 + 2*12*(n_s)-(ul_sc_start<<1)]; // pilot values is the same during 3 symbols l = 1, 2, 3
pilot_sig = &ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][24 + 2*12*(n_s)-(ul_sc_start<<1)]; // pilot values is the same during 3 symbols l = 1, 2, 3
for (k=0;k<12;k++){
// Multiplication by the complex conjugate of the pilot
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ extern int8_t wACK_RX_NB_IoT[5][4];
extern short conjugate[8],conjugate2[8];
extern short *ul_ref_sigs_rx[30][4]; // NB-IoT: format 1 pilots
extern short *ul_ref_sigs_rx_NB_IoT[30][4]; // NB-IoT: format 1 pilots
// extern short *ul_ref_sigs_rx_format2[30][3]; // NB-IoT: format 2 pilots
extern unsigned short dftsizes[33];
......
......@@ -34,7 +34,7 @@ extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
*/
//#include "PHY/LTE_TRANSPORT/extern.h"
#include "PHY/LTE_TRANSPORT/extern_NB_IoT.h"
//#include "SIMULATION/ETH_TRANSPORT/extern.h"
extern unsigned int DAQ_MBOX_NB_IoT;
......
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