defs.h 5.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * 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
 */

22 23 24 25 26 27 28 29
#ifndef __MODULATION_DEFS__H__
#define __MODULATION_DEFS__H__
#include "PHY/defs.h"
/** @addtogroup _PHY_MODULATION_
 * @{
*/

/**
30
\fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype)
31 32 33 34
This function performs OFDM modulation with cyclic extension or zero-padding.

@param input The sequence input samples in the frequency-domain.  This is a concatenation of the input symbols in SIMD redundant format
@param output The time-domain output signal
35
@param fftsize size of OFDM symbol size (\f$N_d\f$)
36 37 38 39 40
@param nb_symbols The number of OFDM symbols in the block
@param nb_prefix_samples The number of prefix/suffix/zero samples
@param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS)

*/
41 42
void PHY_ofdm_mod(int *input,
                  int *output,
43
                  int fftsize,
44 45 46 47
                  unsigned char nb_symbols,
                  unsigned short nb_prefix_samples,
                  Extension_t etype
                 );
48 49 50

#ifdef OPENAIR_LTE

51
/*!
52 53 54 55 56
\brief This function implements the OFDM front end processor on reception (FEP)
\param phy_vars_ue Pointer to PHY variables
\param l symbol within slot (0..6/7)
\param Ns Slot number (0..19)
\param sample_offset offset within rxdata (points to beginning of subframe)
57
\param no_prefix if 1 prefix is removed by HW
58
\param reset_freq_est if non-zero it resets the frequency offset estimation loop
59 60 61
*/

int slot_fep(PHY_VARS_UE *phy_vars_ue,
62 63 64
             unsigned char l,
             unsigned char Ns,
             int sample_offset,
65 66
             int no_prefix,
	     int reset_freq_est);
67 68

int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
69 70 71 72
                   unsigned char l,
                   int subframe,
                   int sample_offset,
                   int no_prefix);
73 74

int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
75 76 77 78 79
                LTE_eNB_COMMON *eNb_common_vars,
                unsigned char l,
                unsigned char Ns,
                unsigned char eNb_id,
                int no_prefix);
80

81 82 83 84 85 86 87 88 89 90 91
int front_end_fft(PHY_VARS_UE *ue,
             unsigned char l,
             unsigned char Ns,
             int sample_offset,
             int no_prefix);

int front_end_chanEst(PHY_VARS_UE *ue,
             unsigned char l,
             unsigned char Ns,
            int reset_freq_est);

92
void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms);
93

94
void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
Raymond Knopp's avatar
 
Raymond Knopp committed
95

96
void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms,int do_precoding);
97

98
void remove_7_5_kHz(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe);
99

100
void apply_7_5_kHz(PHY_VARS_UE *phy_vars_ue,int32_t*txdata,uint8_t subframe);
101 102 103

void init_prach625(LTE_DL_FRAME_PARMS *frame_parms);

104
void remove_625_Hz(PHY_VARS_eNB *phy_vars_eNB,int16_t *prach);
105

106
void apply_625_Hz(PHY_VARS_UE *phy_vars_ue,int16_t *prach);
107

108
/** \brief This function performs beamforming precoding for common
109 110 111 112 113
 * data
    @param txdataF Table of pointers for frequency-domain TX signals
    @param txdataF_BF Table of pointers for frequency-domain TX signals
    @param frame_parms Frame descriptor structure
after beamforming
114
    @param beam_weights Beamforming weights applied on each
115 116
antenna element and each carrier
    @param slot Slot number
117 118
    @param symbol Symbol index on which to act
    @param aa physical antenna index*/
119 120 121 122 123
int beam_precoding(int32_t **txdataF,
	           int32_t **txdataF_BF,
                   LTE_DL_FRAME_PARMS *frame_parms,
	           int32_t ***beam_weights,
                   int slot,
124 125
                   int symbol,
                   int aa);
126

127 128 129 130 131 132 133
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs);

int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_estimates, int32_t **tdd_calib_coeffs, int nb_ant, int nb_freq);

int compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, PRECODE_TYPE_t precode_type, int nb_ant, int nb_freq);


134 135 136
#endif
/** @}*/
#endif