Commit 060cdd70 authored by Matthieu Kanj's avatar Matthieu Kanj

removing some warnings + NPUSCH update

parent 03769bdb
......@@ -39,6 +39,9 @@
#include "PHY/LTE_TRANSPORT/extern_NB_IoT.h"
//#define DEBUG_CH
#include "PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h"
#include "T.h"
// For Channel Estimation in Distributed Alamouti Scheme
......@@ -95,7 +98,7 @@ void rotate_channel_single_carrier_NB_IoT(int16_t *estimated_channel,unsigned ch
/////////////////////////////////////////// temporary functions for channel estimation and rotation
/*
void rotate_channel_sc_tmp_NB_IoT(int16_t *estimated_channel,
uint8_t l,
uint8_t Qm,
......@@ -154,6 +157,118 @@ void rotate_channel_sc_tmp_NB_IoT(int16_t *estimated_channel,
}
}
*/
///////////////////////////////////////////////////////////
void rotate_channel_sc_tmp_NB_IoT(int16_t *estimated_channel,
uint8_t l,
uint8_t Qm,
uint8_t counter_msg3,
uint16_t N_SF_per_word,
uint16_t ul_sc_start,
uint8_t flag)
{
//uint32_t I_sc = 10;//eNB->ulsch_NB_IoT[UE_id]->harq_process->I_sc; // NB_IoT: subcarrier indication field: must be defined in higher layer
//uint16_t ul_sc_start; // subcarrier start index into UL RB
int16_t pi_2_re[2] = {32767 , 0};
int16_t pi_2_im[2] = {0 , 32767};
int16_t pi_4_re[2] = {32767 , 23170};
int16_t pi_4_im[2] = {0 , 23170};
int k;
int16_t est_channel_re, est_channel_im, est_channel_re2, est_channel_im2;
int16_t *e_phi_re,*e_phi_im;
switch(ul_sc_start) /// only for single tone and 15 KHz spacing ? // missing the other configs
{
case 0:
e_phi_re = e_phi_re_m6;
e_phi_im = e_phi_im_m6;
break;
case 1:
e_phi_re = e_phi_re_m5;
e_phi_im = e_phi_im_m5;
break;
case 2:
e_phi_re = e_phi_re_m4;
e_phi_im = e_phi_im_m4;
break;
case 3:
e_phi_re = e_phi_re_m3;
e_phi_im = e_phi_im_m3;
break;
case 4:
e_phi_re = e_phi_re_m2;
e_phi_im = e_phi_im_m2;
break;
case 5:
e_phi_re = e_phi_re_m1;
e_phi_im = e_phi_im_m1;
break;
case 6:
e_phi_re = e_phi_re_0;
e_phi_im = e_phi_im_0;
break;
case 7:
e_phi_re = e_phi_re_p1;
e_phi_im = e_phi_im_p1;
break;
case 8:
e_phi_re = e_phi_re_p2;
e_phi_im = e_phi_im_p2;
break;
case 9:
e_phi_re = e_phi_re_p3;
e_phi_im = e_phi_im_p3;
break;
case 10:
e_phi_re = e_phi_re_p4;
e_phi_im = e_phi_im_p4;
break;
case 11:
e_phi_re = e_phi_re_p5;
e_phi_im = e_phi_im_p5;
break;
}
//ul_sc_start = get_UL_sc_start_NB_IoT(I_sc); // NB-IoT: get the used subcarrier in RB
for (k=0;k<12;k++)
{
est_channel_re = estimated_channel[k<<1];
est_channel_im = estimated_channel[(k<<1)+1];
if (Qm == 1) // rotation due to pi/2 BPSK
{
est_channel_re2 = (int16_t)(((int32_t)pi_2_re[l%2] * (int32_t)est_channel_re +
(int32_t)pi_2_im[l%2] * (int32_t)est_channel_im)>>15);
est_channel_im2 = (int16_t)(((int32_t)pi_2_re[l%2] * (int32_t)est_channel_im -
(int32_t)pi_2_im[l%2] * (int32_t)est_channel_re)>>15);
}
if(Qm == 2) // rotation due to pi/4 QPSK
{
est_channel_re2 = (int16_t)(((int32_t)pi_4_re[l%2] * (int32_t)est_channel_re +
(int32_t)pi_4_im[l%2] * (int32_t)est_channel_im)>>15);
est_channel_im2 = (int16_t)(((int32_t)pi_4_re[l%2] * (int32_t)est_channel_im -
(int32_t)pi_4_im[l%2] * (int32_t)est_channel_re)>>15);
}
if(flag==0) // rotation of msg3
{
estimated_channel[k<<1] = (int16_t)(((int32_t)e_phi_re[14*(N_SF_per_word-counter_msg3) + l] * (int32_t)est_channel_re2 +
(int32_t)e_phi_im[14*(N_SF_per_word-counter_msg3) + l] * (int32_t)est_channel_im2)>>15);
estimated_channel[(k<<1)+1] = (int16_t)(((int32_t)e_phi_re[14*(N_SF_per_word-counter_msg3) + l] * (int32_t)est_channel_im2 -
(int32_t)e_phi_im[14*(N_SF_per_word-counter_msg3) + l] * (int32_t)est_channel_re2)>>15);
}
if(flag==1) // rotation of msg5
{
estimated_channel[k<<1] = (int16_t)(((int32_t)e_phi_re[14*(2-counter_msg3) + l] * (int32_t)est_channel_re2 +
(int32_t)e_phi_im[14*(2-counter_msg3) + l] * (int32_t)est_channel_im2)>>15);
estimated_channel[(k<<1)+1] = (int16_t)(((int32_t)e_phi_re[14*(2-counter_msg3) + l] * (int32_t)est_channel_im2 -
(int32_t)e_phi_im[14*(2-counter_msg3) + l] * (int32_t)est_channel_re2)>>15);
}
}
}
//////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
///////////////// for ACK ////////////
int ul_chest_tmp_f2_NB_IoT(int32_t **rxdataF_ext,
......@@ -225,7 +340,7 @@ int ul_chest_tmp_f2_NB_IoT(int32_t **rxdataF_ext,
(int32_t)received_data[k<<1]*(int32_t)pilot_sig[(k<<1)+1])>>15); //imaginary part of estimated channel
}
/// Apply inverse rotation to the channel
rotate_channel_sc_tmp_NB_IoT(estimated_channel,symbol,Qm,counter_msg5,0,flag);
rotate_channel_sc_tmp_NB_IoT(estimated_channel,symbol,Qm,counter_msg5,0,ul_sc_start,flag);
ul_ch_estimates_re = estimated_channel[ul_sc_start<<1];
ul_ch_estimates_im = estimated_channel[(ul_sc_start<<1)+1];
......@@ -325,7 +440,7 @@ int ul_chest_tmp_NB_IoT(int32_t **rxdataF_ext,
(int32_t)received_data[k<<1]*(int32_t)pilot_sig[(k<<1)+1])>>15); //imaginary part of estimated channel
}
rotate_channel_sc_tmp_NB_IoT(estimated_channel,symbol,Qm,counter_msg3,N_SF_per_word,0); // 0 is used to indicate msg3
rotate_channel_sc_tmp_NB_IoT(estimated_channel,symbol,Qm,counter_msg3,N_SF_per_word,ul_sc_start,0); // 0 is used to indicate msg3
//printf("\n");
/*for (k=11;k<12;k++)
{
......
......@@ -45,8 +45,8 @@
uint16_t sequence_length[4] = {100,100,100,100}; //the "32" value corresponds to the max gold sequence length
// int16_t *ul_ref_sigs[30][33];
int16_t *ul_ref_sigs_f2_rx_NB_IoT[16]; //this table contain the 16 possible pilots for format 2 NPUSCH
int16_t *ul_ref_sigs_rx_NB_IoT[30][4]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA
int16_t *ul_ref_sigs_f2_rx_NB_IoT[16]; //this table contain the 16 possible pilots for format 2 NPUSCH
uint16_t u_max[4] = {16,12,14,30}; // maximum u value, see 36.211, Section 10.1.4
/* 36.211 table 5.5.1.2-1 */
......@@ -233,17 +233,18 @@ void generate_ul_ref_sigs_rx_NB_IoT(void)
{
unsigned int u,index_Nsc_RU,n,m; // Vincent: index_Nsc_RU 0,1,2,3 ---> number of sc 1,3,6,12
uint8_t npusch_format = 1; // NB-IoT: format 1 (data), or 2: ack. Should be defined in higher layer
//uint8_t npusch_format = 1; // NB-IoT: format 1 (data), or 2: ack. Should be defined in higher layer
int16_t a;
int16_t qpsk[2];
unsigned int x1, x2=35; // NB-IoT: defined in 36.211, Section 10.1.4.1.1
int16_t ref_sigs_sc1[2*sequence_length[0]];
unsigned int x1, x2; // NB-IoT: defined in 36.211, Section 10.1.4.1.1
int16_t ref_sigs_sc1[2*sequence_length[0]]; // this is for format 1
//int16_t ref_sigs_sc1_f2[2*sequence_length[0]]; // this is for format 2
uint32_t s;
a = ONE_OVER_SQRT2_Q15_NB_IoT;
qpsk[0] = a;
qpsk[1] = -a;
s = lte_gold_generic_NB_IoT(&x1, &x2, 1);
//printf("\n\n\n in generate_ul_ref_sigs_rx_NB_IoT %d \n\n\n",a);
for (index_Nsc_RU=0; index_Nsc_RU<4; index_Nsc_RU++)
{
......@@ -253,33 +254,36 @@ void generate_ul_ref_sigs_rx_NB_IoT(void)
switch (index_Nsc_RU)
{
case 0: // 36.211, Section 10.1.4.1.1
x2=35;
s = lte_gold_generic_NB_IoT(&x1, &x2, 1);
ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU] = (int16_t*)malloc(sizeof(int16_t)*(2*sequence_length[index_Nsc_RU]*12+24)); // *12 is mandatory to fit channel estimation functions
ul_ref_sigs_f2_rx_NB_IoT[u] = (int16_t*)malloc(sizeof(int16_t)*(2*12*12+24)); // first "*12" is mandatory to fit channel estimation functions; first "*12" is the length of pilot sequence for
ul_ref_sigs_f2_rx_NB_IoT[u] = (int16_t*)malloc(sizeof(int16_t)*(2*12*12+24)); // first "*12" is mandatory to fit channel estimation functions; first "*12" is the length of pilot sequence for format 2
// NB-IoT: for same reason, +24 is added in order to fit the possible subcarrier start shift when index_Nsc_RU = 0, 1, 2 --> see ul_sc_start in channel estimation function
for (n=0; n<sequence_length[index_Nsc_RU]; n++) {
if (n>0 && n%32==0)
for (n=0; n<sequence_length[index_Nsc_RU]; n++)
{
s = lte_gold_generic_NB_IoT(&x1, &x2, 0);
}
ref_sigs_sc1[n<<1] = qpsk[(s>>(n%32))&1]*w_n[16*u+n%16];
// ref_sigs_sc1[1+(n<<1)] = qpsk[(s>>n)&1]*w_n[16*u+n%16];
ref_sigs_sc1[1+(n<<1)] = ref_sigs_sc1[n<<1];
if (n>0 && n%32==0)
{
s = lte_gold_generic_NB_IoT(&x1, &x2, 0);
}
ref_sigs_sc1[n<<1] = qpsk[(s>>(n%32))&1]*w_n[16*u+n%16];
// ref_sigs_sc1[1+(n<<1)] = qpsk[(s>>n)&1]*w_n[16*u+n%16];
ref_sigs_sc1[1+(n<<1)] = ref_sigs_sc1[n<<1];
}
for (n=0; n<sequence_length[index_Nsc_RU]; n++) {
ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][12*(n<<1)+24] = ref_sigs_sc1[n<<1]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, real part
ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][1+12*(n<<1)+24]= ref_sigs_sc1[1+(n<<1)]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, imaginary part
}
for (n=0; n<sequence_length[index_Nsc_RU]; n++)
{
ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][12*(n<<1)+24] = ref_sigs_sc1[n<<1]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, real part
ul_ref_sigs_rx_NB_IoT[u][index_Nsc_RU][1+12*(n<<1)+24]= ref_sigs_sc1[1+(n<<1)]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, imaginary part
}
for (n=0; n<4; n++)
{
for (m=0; m<3; m++)
{
ul_ref_sigs_f2_rx_NB_IoT[u][12*((3*n+m)<<1)+24] = ref_sigs_sc1[n<<1]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, real part
ul_ref_sigs_f2_rx_NB_IoT[u][1+12*((3*n+m)<<1)+24] = ref_sigs_sc1[1+(n<<1)]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, imaginary part
{
for (m=0; m<3; m++)
{
ul_ref_sigs_f2_rx_NB_IoT[u][12*((3*n+m)<<1)+24] = ref_sigs_sc1[n<<1]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, real part
ul_ref_sigs_f2_rx_NB_IoT[u][1+12*((3*n+m)<<1)+24] = ref_sigs_sc1[1+(n<<1)]; // ul_ref_sigs_rx_NB_IoT is filled every 12 RE, imaginary part
}
}
}
break;
}
......
......@@ -115,6 +115,14 @@ int generate_NDLSCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
uint32_t subframe,
int RB_IoT_ID);
int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,
uint32_t subframe,
int RB_IoT_ID);
int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
int32_t **txdataF,
int16_t amp,
......@@ -560,6 +568,7 @@ void rotate_channel_sc_tmp_NB_IoT(int16_t *estimated_channel,
uint8_t Qm,
uint8_t counter_msg3,
uint16_t N_SF_per_word,
uint16_t ul_sc_start,
uint8_t flag);
int ul_chequal_tmp_NB_IoT(int32_t **rxdataF_ext,
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.c
* \brief Some support routines for MCS computations
* \author V. SAVAUX, M. KANJ
* \date 2017
* \version 0.1
* \company b<>com
* \email:
* \note
* \warning
*/
#ifndef __PHY_LTE_TRANSPORT_SC_ROTATION_NB_IOT__H__
#define __PHY_LTE_TRANSPORT_SC_ROTATION_NB_IOT__H__
int16_t e_phi_re_p5[120] = {32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, -1, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621};
int16_t e_phi_im_p5[120] = {0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, -1, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009};
int16_t e_phi_re_m6[120] = {32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, -1, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621};
int16_t e_phi_im_m6[120] = {0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, -1, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, 0, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, -1, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010, -1, 21402, 32412, 27683, 9511, -13279, -29622, -32767, -24812, -4808, 17530, 31356, 29955, 14009, 0, -21403, -32413, -27684, -9512, 13278, 29621, 32767, 24811, 4807, -17531, -31357, -29956, -14010};
int16_t e_phi_re_m5[120] = {32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519};
int16_t e_phi_im_m5[120] = {0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319};
int16_t e_phi_re_m4[120] = {32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, 0, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, -1, -32758, 1607, 32678, -3212, -32521, 4807};
int16_t e_phi_im_m4[120] = {0, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, -1, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413};
int16_t e_phi_re_m3[120] = {32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039};
int16_t e_phi_im_m3[120] = {0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852};
int16_t e_phi_re_m2[120] = {32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, -1, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279};
int16_t e_phi_im_m2[120] = {0, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, -1, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, 0, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005};
int16_t e_phi_re_m1[120] = {32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, 0, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, -1, 7179, -14010, 20159, -25330, 29268, -31786};
int16_t e_phi_im_m1[120] = {0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, 0, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962};
int16_t e_phi_re_0[120] = {32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, 0, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, -1, 7179, -14010, 20159, -25330, 29268, -31786};
int16_t e_phi_im_0[120] = {0, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, 0, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961, -1, -7180, 14009, -20160, 25329, -29269, 31785, -32767, 31970, -29622, 25831, -20788, 14732, -7962, -1, 7179, -14010, 20159, -25330, 29268, -31786, 32767, -31971, 29621, -25832, 20787, -14733, 7961};
int16_t e_phi_re_p1[120] = {32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, -1, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279};
int16_t e_phi_im_p1[120] = {0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, 0, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, -1, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004, 0, -20160, 31785, -29956, 15446, 5601, -24279, 32767, -25832, 7961, 13278, -28898, 32284, -22005, -1, 20159, -31786, 29955, -15447, -5602, 24278, -32767, 25831, -7962, -13279, 28897, -32285, 22004};
int16_t e_phi_re_p2[120] = {32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039};
int16_t e_phi_im_p2[120] = {0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, -1, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, 0, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851, 0, -29269, 26318, 5601, -31357, 22594, 11038, -32767, 14732, 19519, -32285, 9511, 23731, -30852, -1, 29268, -26319, -5602, 31356, -22595, -11039, 32767, -14733, -19520, 32284, -9512, -23732, 30851};
int16_t e_phi_re_p3[120] = {32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, 0, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, -1, -32758, 1607, 32678, -3212, -32521, 4807};
int16_t e_phi_im_p3[120] = {0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, -1, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412, 0, -32758, 1607, 32678, -3212, -32521, 4807, 32767, -805, -32728, 2410, 32609, -4012, -32413, 0, 32757, -1608, -32679, 3211, 32520, -4808, -32767, 804, 32727, -2411, -32610, 4011, 32412};
int16_t e_phi_re_p4[120] = {32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519};
int16_t e_phi_im_p4[120] = {0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, -1, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, 0, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318, 0, -29956, -24279, 10278, 32609, 16150, -19520, -32767, -13279, 22004, 31113, 3211, -28511, -26319, -1, 29955, 24278, -10279, -32610, -16151, 19519, 32767, 13278, -22005, -31114, -3212, 28510, 26318};
#endif
\ No newline at end of file
......@@ -39,6 +39,9 @@
//#define DEBUG_ULSCH
//#include "PHY/sse_intrin.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
#include "openair1/SCHED/defs_NB_IoT.h"
#include "T.h"
//extern char* namepointer_chMag ;
......
......@@ -527,7 +527,6 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
void fill_crc_indication_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe,uint8_t crc_flag);
/*@}*/
......
......@@ -55,6 +55,8 @@ void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
////////////////// NB-IoT testing ////////////////////
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control, uint8_t msg3_flag);
void fill_crc_indication_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe,uint8_t crc_flag);
#endif
......@@ -3192,6 +3192,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
///VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 );
}
/*
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control, uint8_t msg3_flag)
{
nfapi_rx_indication_pdu_t *pdu;
......@@ -3232,7 +3233,7 @@ void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t d
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
*/
void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type)
{
......
......@@ -1573,6 +1573,48 @@ void fill_crc_indication_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int frame,int subfra
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control, uint8_t msg3_flag)
{
nfapi_rx_indication_pdu_t *pdu;
pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.RX_NPUSCH.number_of_pdus = 1;
//eNB->UL_INFO.RX_NPUSCH.rx_pdu_list.rx_ue_information.tl.tag = NFAPI_RX_INDICATION_BODY_TAG; // do we need this ??
//eNB->UL_INFO.RX_NPUSCH.rx_pdu_list.rx_ue_information.rnti = rnti; // rnti should be got from eNB structure
//pdu = &eNB->UL_INFO.RX_NPUSCH.rx_pdu_list[eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus];
pdu = &eNB->UL_INFO.RX_NPUSCH.rx_pdu_list[0];
// pdu->rx_ue_information.handle = eNB->ulsch[UE_id]->handle;
// pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
//pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG;
pdu->rx_ue_information.rnti = eNB->ulsch_NB_IoT[0]->rnti;
if(msg3_flag == 1)
{
pdu->rx_indication_rel8.length = 6; //eNB->ulsch_NB_IoT[0]->harq_process->TBS>>3;
int m =0;
for(m=0; m<6;m++)
{
pdu->data[m] = eNB->ulsch_NB_IoT[0]->harq_process->b[2+m];
printf(" pdu content = %d \n", eNB->ulsch_NB_IoT[0]->harq_process->b[2+m]);
}
} else {
pdu->data = eNB->ulsch_NB_IoT[0]->harq_process->b;
}
//pdu->data = eNB->ulsch_NB_IoT[UE_id]->harq_processes[harq_pid]->b;
//eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++;
//eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe;
// do we need to transmit timing ?? however, the nfapi structure does not include timing paramters !!!!!
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
{
......
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