Commit 34899cd4 authored by Thomas Schlichter's avatar Thomas Schlichter

fix compilation of phy simulators introduced from the usage of get_band()

parent 91487166
......@@ -31,8 +31,7 @@
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"*/
#include "openair1/PHY/defs_RU.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "assertions.h"
#include <math.h>
......
......@@ -51,6 +51,8 @@
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode = 0;
......
......@@ -60,6 +60,8 @@
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode=0;
......
......@@ -52,6 +52,8 @@
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode=0;
......
......@@ -50,6 +50,8 @@ PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
openair0_config_t openair0_cfg[MAX_CARDS];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode=0;
......
......@@ -52,6 +52,8 @@
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode = 0;
......@@ -64,7 +66,7 @@ int main(int argc, char **argv)
{
char c;
int i,sf;
double SNR, snr0 = -2.0, snr1 = 2.0; //, SNR_lin;
double SNR, snr0 = -2.0, snr1 = 2.0, SNR_lin;
double snr_step = 0.1;
uint8_t snr1set = 0;
FILE *output_fd = NULL;
......@@ -83,7 +85,7 @@ int main(int argc, char **argv)
//unsigned char pbch_phase = 0;
int frame = 0, subframe = 0;
NR_DL_FRAME_PARMS *frame_parms;
//double sigma;
double sigma;
unsigned char qbits = 8;
int ret;
int loglvl = OAILOG_WARNING;
......@@ -491,11 +493,15 @@ int main(int argc, char **argv)
//if (i<16) printf("modulated_input[%d] = %d\n",i,modulated_input[i]);
//SNR_lin = pow(10, SNR / 10.0);
//sigma = 1.0 / sqrt(2 * SNR_lin);
#if 1
SNR_lin = pow(10, SNR / 10.0);
sigma = 1.0 / sqrt(2 * SNR_lin);
channel_output_fixed[i] = (short) quantize(sigma / 4.0 / 4.0,
modulated_input[i] + sigma * gaussdouble(0.0, 1.0),
qbits);
#else
channel_output_fixed[i] = (short) quantize(0.01, modulated_input[i], qbits);
//channel_output_fixed[i] = (short) quantize(sigma / 4.0 / 4.0, modulated_input[i] + sigma * gaussdouble(0.0, 1.0), qbits);
//channel_output_fixed[i] = (char)quantize8bit(sigma/4.0,(2.0*modulated_input[i]) - 1.0 + sigma*gaussdouble(0.0,1.0));
#endif
//printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]);
//Uncoded BER
......
......@@ -60,6 +60,8 @@
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
int nfapi_mode = 0;
......
......@@ -119,7 +119,7 @@ void dl_phy_sync_success(module_id_t module_idP,
frame_t frameP,
unsigned char eNB_index, uint8_t first_sync){}
uint32_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn) { return(0);}
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn) { return(0);}
int32_t get_uldl_offset(int nr_bandP) { return(0);}
......
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