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 ...@@ -1007,6 +1007,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools_NB_IoT.c ${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.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.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/pbch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/npbch_NB_IoT.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/npbch_NB_IoT.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
......
...@@ -698,8 +698,10 @@ typedef struct { ...@@ -698,8 +698,10 @@ typedef struct {
uint8_t Nslot_UL; uint8_t Nslot_UL;
// Number of subcarrier for NPUSH, can be 1, 3, 6, 12 // Number of subcarrier for NPUSH, can be 1, 3, 6, 12
uint8_t N_sc_RU; 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; 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; } NB_IoT_UL_eNB_HARQ_t;
......
...@@ -223,6 +223,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF, ...@@ -223,6 +223,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
// uint32_t first_rb, // uint32_t first_rb,
uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
uint8_t N_sc_RU, // number of subcarriers in UL uint8_t N_sc_RU, // number of subcarriers in UL
uint32_t I_sc, // subcarrier indication field
uint32_t nb_rb, uint32_t nb_rb,
uint8_t l, uint8_t l,
uint8_t Ns, uint8_t Ns,
...@@ -230,7 +231,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF, ...@@ -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); 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); 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, 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 ...@@ -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); 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 #endif
...@@ -549,6 +549,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF, ...@@ -549,6 +549,7 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
// uint32_t first_rb, // uint32_t first_rb,
uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block uint32_t UL_RB_ID_NB_IoT, // index of UL NB_IoT resource block
uint8_t N_sc_RU, // number of subcarriers in UL uint8_t N_sc_RU, // number of subcarriers in UL
uint32_t I_sc, // subcarrier indication field
uint32_t nb_rb, uint32_t nb_rb,
uint8_t l, uint8_t l,
uint8_t Ns, uint8_t Ns,
...@@ -558,9 +559,11 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF, ...@@ -558,9 +559,11 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
// uint16_t nb_rb2; // uint16_t nb_rb2;
uint8_t aarx,n; uint8_t aarx,n;
// int32_t *rxF,*rxF_ext; // int32_t *rxF,*rxF_ext;
//uint8_t symbol = l+Ns*frame_parms->symbols_per_tti/2; //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++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
...@@ -572,8 +575,8 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF, ...@@ -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 if (nb_rb1) { // RB NB-IoT is in the first half
for (n=0;n<N_sc_RU;n++){ for (n=0;n<N_sc_RU;n++){
// Note that FFT split the RBs // 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 + frame_parms->first_carrier_offset + symbol*frame_parms->ofdm_symbol_size + n]; 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, ...@@ -593,8 +596,8 @@ void ulsch_extract_rbs_single_NB_IoT(int32_t **rxdataF,
} else { // RB NB-IoT is in the second half } else { // RB NB-IoT is in the second half
for (n=0;n<N_sc_RU;n++){ for (n=0;n<N_sc_RU;n++){
// Note that FFT split the RBs // 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) + symbol*frame_parms->ofdm_symbol_size + n]; 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, ...@@ -1435,7 +1438,8 @@ void rx_ulsch_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
pusch_vars->rxdataF_ext[eNB_id], pusch_vars->rxdataF_ext[eNB_id],
// ulsch[UE_id]->harq_process->first_rb, // 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->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, ulsch[UE_id]->harq_process->nb_rb,
l%(frame_parms->symbols_per_tti/2), l%(frame_parms->symbols_per_tti/2),
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