defs.h 6.95 KB
Newer Older
ghaddab's avatar
ghaddab committed
1
/*******************************************************************************
2
    OpenAirInterface
ghaddab's avatar
ghaddab committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
    Copyright(c) 1999 - 2014 Eurecom

    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.


    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
17 18
    along with OpenAirInterface.The full GNU General Public License is
   included in this distribution in the file called "COPYING". If not,
ghaddab's avatar
ghaddab committed
19 20 21 22 23
   see <http://www.gnu.org/licenses/>.

  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
24
  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr
25

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
ghaddab's avatar
ghaddab committed
27 28

 *******************************************************************************/
29 30 31 32 33 34 35 36 37 38 39
/* Definitions for LTE Reference signals */
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __LTE_REFSIG_DEFS__H__
#define __LTE_REFSIG_DEFS__H__
#include "PHY/defs.h"

/** @ingroup _PHY_REF_SIG
 * @{
*/

/*! \brief gold sequenquence generator
40
\param x1
41 42 43 44 45 46 47 48 49 50 51 52
\param x2 this should be set to c_init if reset=1
\param reset resets the generator
\return 32 bits of the gold sequence
*/
unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char reset);


/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL reference signals.
@param frame_parms LTE DL Frame parameters
@param lte_gold_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells) */

53
void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell);
54

55 56
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS);

57 58
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti);

Raymond Knopp's avatar
 
Raymond Knopp committed
59 60 61
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
@param frame_parms LTE DL Frame parameters
@param lte_gold_uespec_table pointer to table where sequences are stored
62
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
Raymond Knopp's avatar
 
Raymond Knopp committed
63 64
@param n_idDMRS Scrambling identity for TM10*/

65
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN);
66 67 68 69 70 71 72 73 74 75 76 77 78


/*! \brief This function generates the cell-specific reference signal sequence (36-211, Sec 6.10.1.1)
@param phy_vars_eNB Pointer to eNB variables
@param output Output vector for OFDM symbol (Frequency Domain)
@param amp Q15 amplitude
@param Ns Slot number (0..19)
@param l symbol (0,1) - Note 1 means 3!
@param p antenna index
*/


int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
79
                     int32_t *output,
80 81 82 83
                     short amp,
                     unsigned char Ns,
                     unsigned char l,
                     unsigned char p);
84

Raymond Knopp's avatar
 
Raymond Knopp committed
85 86 87 88 89
/*! \brief This function generates the UE-specific reference signal sequence (36-211, Sec 6.10.3.2)
@param phy_vars_eNB Pointer to eNB variables
@param output Output vector for OFDM symbol (Frequency Domain)
@param amp Q15 amplitude
@param Ns Slot number (0..19)
90
@param lprime symbol (0,1)
Raymond Knopp's avatar
 
Raymond Knopp committed
91 92 93
@param p antenna index
@param SS_flag Flag to indicate special subframe
*/
Xiwen JIANG's avatar
Xiwen JIANG committed
94
/*int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
95
                   uint8_t UE_id,
96
                   int32_t *output,
97 98
                   short amp,
                   uint8_t Ns,
99
		   uint8_t lprime,
100
                   uint8_t p,
Xiwen JIANG's avatar
Xiwen JIANG committed
101
                   int SS_flag);*/
Raymond Knopp's avatar
 
Raymond Knopp committed
102

103 104 105 106 107
/*! \brief This function generates the MBSFN reference signal sequence (36-211, Sec 6.10.1.2)
@param phy_vars_eNB Pointer to eNB variables
@param output Output vector for OFDM symbol (Frequency Domain)
@param amp Q15 amplitude
@param Ns Slot number (0..19)
108
@param l symbol (0,1,2)
109
*/
110
int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
111 112 113
                 short amp,
                 int subframe,
                 unsigned char l);
114 115 116 117 118 119 120 121 122 123 124


/*!\brief This function generates the cell-specific reference signal sequence (36-211, Sec 6.10.1.1) for channel estimation upon reception
@param phy_vars_ue Pointer to UE variables
@param eNB_offset offset with respect to Nid_cell in frame_parms of current eNB (to estimate channels of adjacent eNBs)
@param output Output vector for OFDM symbol (Frequency Domain)
@param Ns Slot number (0..19)
@param l symbol (0,1) - Note 1 means 3!
@param p antenna intex
*/
int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
125 126 127 128 129
                        uint8_t eNB_offset,
                        int *output,
                        unsigned char Ns,
                        unsigned char l,
                        unsigned char p);
130

Xiwen JIANG's avatar
Xiwen JIANG committed
131 132 133 134 135 136 137 138 139 140
/*!\brief This function generates the ue-specific reference signal
 * sequence (36-211, Sec 6.10.3.1) for beamforming channel estimation upon reception
@param phy_vars_ue Pointer to UE variables
@param output Output vector for OFDM symbol (Frequency Domain)
@param Ns Slot number (0..19)
@param p antenna port intex
@param lprime symbol (0,1)
@param SS_flag Flag to indicate special subframe
@param nRB_PDSCH number of allocated PDSCH RBs
*/
141
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
142
                      int32_t *output,
143 144
                      unsigned char Ns,
                      unsigned char p,
145 146 147
                      int lprime,
                      int SS_flag,
                      uint16_t nRB_PDSCH);
148

149
int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue,
150 151 152
                    int *output,
                    int subframe,
                    unsigned char l);
153 154 155 156 157 158 159 160 161 162 163 164 165




void generate_ul_ref_sigs(void);
void generate_ul_ref_sigs_rx(void);

void free_ul_ref_sigs(void);

/*!
\brief This function generate the sounding reference symbol (SRS) for the uplink. The SRS is always transmitted in the last symbol of the slot and uses the full bandwidth. This function makes the following simplifications wrt LTE Rel.8:
 1) the SRS in OpenAir is quantized to a QPSK sequence.
 2) no group hopping, no sequence hopping
166
 3) u = N_id_cell%30, v=0, alpha=0,
167 168 169 170 171 172 173
 4) Msc_RS = 300, k_0=0
@param txdataF pointer to the frequency domain TX signal
@param amp amplitudte of the transmit signal (irrelevant for #ifdef IFFT_FPGA)
@param frame_parms LTE DL Frame Parameters
@sub_frame_offset  Offset of this subframe in units of subframes
*/

174
int lte_generate_srs(int32_t **txdataF,
175 176 177
                     short amp,
                     LTE_DL_FRAME_PARMS *frame_parms,
                     unsigned int sub_frame_offset);
178 179 180


#endif