/*******************************************************************************
OpenAirInterface
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
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see .
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
//#define DEBUG_DAC 1
#include
#include
#include "PHY/TOOLS/defs.h"
void dac(double **s_re,
double **s_im,
uint32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
uint32_t length,
double amp_dBm,
uint8_t B,
uint32_t meas_length,
uint32_t meas_offset) {
int i;
int aa;
double V=0.0,amp;
for (i=0;i>16);
else //assume (nb_tx_antennas==1)
amp1 = ((AMP*ONE_OVER_SQRT2_Q15)>>15);
amp1 = amp1*sqrt(512.0/300.0); //account for loss due to null carriers
//printf("DL: amp1 %f dB (%d,%d), tx_power %f\n",20*log10(amp1),input_offset,input_offset_meas,txpwr_dBm);
*/
for (i=0;i