Commit bc93c534 authored by Vincent Savaux's avatar Vincent Savaux

improve extract_rbs in ulsch with start carrier

parent 40878776
......@@ -1007,6 +1007,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_Isc_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
......
......@@ -154,7 +154,7 @@ int32_t lte_ul_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
rx_power_correction = 1;
if (l == (3 - frame_parms->Ncp)) {
if (l == (3 - frame_parms->Ncp)) {
symbol_offset = frame_parms->N_RB_UL*12*(l+((7-frame_parms->Ncp)*(Ns&1)));
......
......@@ -698,8 +698,10 @@ typedef struct {
uint8_t Nslot_UL;
// Number of subcarrier for NPUSH, can be 1, 3, 6, 12
uint8_t N_sc_RU;
// index of UL NB_IoT resource block
// Index of UL NB_IoT resource block
uint32_t UL_RB_ID_NB_IoT;
// Subcarrier indication fields, obtained through DCI, Section 16.5.1.1 in 36.213
uint32_t I_sc;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} NB_IoT_UL_eNB_HARQ_t;
......
......@@ -223,6 +223,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
// uint32_t first_rb,
uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
uint8_t N_sc_RU, // number of subcarriers in UL
uint32_t I_sc, // subcarrier indication field
uint32_t nb_rb,
uint8_t l,
uint8_t Ns,
......@@ -230,7 +231,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
void extract_CQI_NB_IoT(void *o,UCI_format_NB_IoT_t uci_format,NB_IoT_eNB_UE_stats *stats,uint8_t N_RB_DL, uint16_t * crnti, uint8_t * access_mode);
//*****************vincent part for nprach ******************//
//*****************Vincent part for nprach ******************//
void RX_NPRACH_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int16_t *Rx_buffer);
uint32_t TA_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
......@@ -244,4 +245,7 @@ uint8_t NPRACH_detection_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int16_t *Rx_sub_sample
int16_t* sub_sampling_NB_IoT(int16_t *input_buffer, uint32_t length_input, uint32_t *length_ouput, uint16_t sub_sampling_rate);
//************************************************************//
//*****************Vincent part for ULSCH demodulation ******************//
uint16_t get_UL_sc_start(uint16_t I_sc);
//************************************************************//
#endif
......@@ -547,8 +547,9 @@ void ulsch_detection_mrc_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
int32_t **rxdataF_ext,
// uint32_t first_rb,
uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
uint8_t N_sc_RU, // number of subcarriers in UL
uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
uint8_t N_sc_RU, // number of subcarriers in UL
uint32_t I_sc, // subcarrier indication field
uint32_t nb_rb,
uint8_t l,
uint8_t Ns,
......@@ -558,9 +559,11 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
// uint16_t nb_rb2;
uint8_t aarx,n;
// int32_t *rxF,*rxF_ext;
//uint8_t symbol = l+Ns*frame_parms->symbols_per_tti/2;
uint8_t symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
uint8_t symbol = l+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
uint16_t ul_sc_start; // subcarrier start index into UL RB
ul_sc_start = get_UL_sc_start(I_sc);
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
......@@ -572,8 +575,8 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
if (nb_rb1) { // RB NB-IoT is in the first half
for (n=0;n<N_sc_RU;n++){
// Note that FFT split the RBs
rxdataF_ext[aarx][symbol*frame_parms->N_RB_UL*12 + n] = rxdataF[aarx][UL_RB_ID_NB_IoT*12 + frame_parms->first_carrier_offset + symbol*frame_parms->ofdm_symbol_size + n];
// Note that FFT splits the RBs
rxdataF_ext[aarx][symbol*frame_parms->N_RB_UL*12 + n] = rxdataF[aarx][UL_RB_ID_NB_IoT*12 + ul_sc_start + frame_parms->first_carrier_offset + symbol*frame_parms->ofdm_symbol_size + n];
}
......@@ -593,8 +596,8 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
} else { // RB NB-IoT is in the second half
for (n=0;n<N_sc_RU;n++){
// Note that FFT split the RBs
rxdataF_ext[aarx][symbol*frame_parms->N_RB_UL*12 + n] = rxdataF[aarx][6*(2*UL_RB_ID_NB_IoT - frame_parms->N_RB_UL) + symbol*frame_parms->ofdm_symbol_size + n];
// Note that FFT splits the RBs
rxdataF_ext[aarx][symbol*frame_parms->N_RB_UL*12 + n] = rxdataF[aarx][6*(2*UL_RB_ID_NB_IoT - frame_parms->N_RB_UL) + ul_sc_start + symbol*frame_parms->ofdm_symbol_size + n];
}
......@@ -1435,7 +1438,8 @@ void rx_ulsch_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
pusch_vars->rxdataF_ext[eNB_id],
// ulsch[UE_id]->harq_process->first_rb,
ulsch[UE_id]->harq_process->UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
ulsch[UE_id]->harq_process-> N_sc_RU, // number of subcarriers in UL
ulsch[UE_id]->harq_process->N_sc_RU, // number of subcarriers in UL
ulsch[UE_id]->harq_process->I_sc, // subcarrier indication field
ulsch[UE_id]->harq_process->nb_rb,
l%(frame_parms->symbols_per_tti/2),
l/(frame_parms->symbols_per_tti/2),
......
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