Commit 457ab9f7 authored by Matthieu Kanj's avatar Matthieu Kanj

Adding NPUSH related functions (vincent savaux code)

parent c343f5ef
......@@ -1062,6 +1062,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_ul_ref.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_ul_ref_NB_IoT.c
${OPENAIR1_DIR}/PHY/CODING/lte_segmentation.c
${OPENAIR1_DIR}/PHY/CODING/lte_segmentation_NB_IoT.c
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte.c
......
......@@ -317,19 +317,19 @@ void freq_equalization_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
if (Qm==4)
ul_ch_mag128[re] = _mm_set1_epi16(324); // this is 512*2/sqrt(10)
else {
ul_ch_mag128[re] = _mm_set1_epi16(316); // this is 512*4/sqrt(42)
ul_ch_magb128[re] = _mm_set1_epi16(158); // this is 512*2/sqrt(42)
}
// else {
// ul_ch_mag128[re] = _mm_set1_epi16(316); // this is 512*4/sqrt(42)
// ul_ch_magb128[re] = _mm_set1_epi16(158); // this is 512*2/sqrt(42)
// }
#elif defined(__arm__)
rxdataF_comp128[re] = vmulq_s16(rxdataF_comp128[re],*((int16x8_t *)&inv_ch_NB_IoT[8*amp]));
if (Qm==4)
ul_ch_mag128[re] = vdupq_n_s16(324); // this is 512*2/sqrt(10)
else {
ul_ch_mag128[re] = vdupq_n_s16(316); // this is 512*4/sqrt(42)
ul_ch_magb128[re] = vdupq_n_s16(158); // this is 512*2/sqrt(42)
}
//else {
// ul_ch_mag128[re] = vdupq_n_s16(316); // this is 512*4/sqrt(42)
// ul_ch_magb128[re] = vdupq_n_s16(158); // this is 512*2/sqrt(42)
//}
#endif
// printf("(%d,%d)\n",*(int16_t*)&(rxdataF_comp128[re]),*(1+(int16_t*)&(rxdataF_comp128[re])));
......
......@@ -52,5 +52,9 @@ int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB_NB_IoT *phy_vars_eNB,
unsigned int lte_gold_generic_NB_IoT(unsigned int *x1,
unsigned int *x2,
unsigned char reset);
void generate_ul_ref_sigs_rx(void);
void free_ul_ref_sigs(void);
#endif
This diff is collapsed.
......@@ -690,6 +690,15 @@ typedef struct {
// int calibration_flag;
/// delta_TF for power control
int32_t delta_TF;
///////////////////////////////////////////// 3 parameter added by vincent ///////////////////////////////////////////////
// NB_IoT: Nsymb_UL and Nslot_UL are defined in 36.211, Section 10.1.2.3, Table 10.1.2.3-1
// The number of symbol in a resource unit is given by Nsymb_UL*Nslot_UL
uint8_t Nsymb_UL;
// Number of NPUSCH slots
uint8_t Nslot_UL;
// Number of subcarrier for NPUSH
uint8_t N_sc_RU;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} NB_IoT_UL_eNB_HARQ_t;
......
......@@ -19,13 +19,13 @@
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/lte_mcs.c
/*! \file PHY/LTE_TRANSPORT/lte_mcs_NB_IoT.c
* \brief Some support routines for MCS computations
* \author R. Knopp
* \date 2011
* \author V. Savaux
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \company b<>com
* \email:
* \note
* \warning
*/
......@@ -34,16 +34,24 @@
//#include "PHY/extern.h"
#include "PHY/LTE_TRANSPORT/proto_NB_IoT.h"
unsigned char get_Qm_ul_NB_IoT(unsigned char I_MCS)
// 36213 Section 16.5.1.2, Table
unsigned char get_Qm_ul_NB_IoT(unsigned char I_MCS, uint8_t N_sc_RU)
{
if (I_MCS < 11)
return(2);
else if (I_MCS < 21)
return(4);
else
return(6);
if (N_sc_RU)
return(2);
else
if (I_MCS<2)
return(1);
else
return(2);
// if (I_MCS < 11)
// return(2);
// else if (I_MCS < 21)
// return(4);
// else
// return(6);
}
......@@ -172,7 +172,9 @@ uint8_t subframe2harq_pid_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,uint32_t fra
/** \brief Compute Q (modulation order) based on I_MCS for PUSCH. Implements table 8.6.1-1 from 36.213.
@param I_MCS */
uint8_t get_Qm_ul_NB_IoT(uint8_t I_MCS);
//uint8_t get_Qm_ul_NB_IoT(uint8_t I_MCS);
unsigned char get_Qm_ul_NB_IoT(unsigned char I_MCS, uint8_t N_sc_RU);
/** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
uint8_t *input_buffer,
......
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