Merge remote-tracking branch 'origin/develop' into fhg-fdd-custom-if
This commit is contained in:
@@ -234,6 +234,20 @@ uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
|
||||
return samp_count;
|
||||
}
|
||||
|
||||
|
||||
uint32_t get_slot_from_timestamp(openair0_timestamp timestamp_rx, NR_DL_FRAME_PARMS* fp)
|
||||
{
|
||||
uint32_t slot_idx = 0;
|
||||
int samples_till_the_slot = 0;
|
||||
timestamp_rx = timestamp_rx%fp->samples_per_frame;
|
||||
|
||||
while (timestamp_rx > samples_till_the_slot) {
|
||||
samples_till_the_slot += fp->get_samples_per_slot(slot_idx,fp);
|
||||
slot_idx++;
|
||||
}
|
||||
return slot_idx;
|
||||
}
|
||||
|
||||
uint32_t get_samples_slot_timestamp(int slot, NR_DL_FRAME_PARMS* fp, uint8_t sl_ahead)
|
||||
{
|
||||
uint32_t samp_count = 0;
|
||||
@@ -292,6 +306,7 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
|
||||
(fp->nb_prefix_samples + fp->ofdm_symbol_size) * (fp->symbols_per_slot * fp->slots_per_subframe - 2);
|
||||
fp->get_samples_per_slot = &get_samples_per_slot;
|
||||
fp->get_samples_slot_timestamp = &get_samples_slot_timestamp;
|
||||
fp->get_slot_from_timestamp = &get_slot_from_timestamp;
|
||||
fp->samples_per_frame = 10 * fp->samples_per_subframe;
|
||||
fp->freq_range = (fp->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2;
|
||||
|
||||
|
||||
@@ -2242,16 +2242,12 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
MIMO_mode_t mimo_mode = -1;
|
||||
uint8_t mprime=0,Ns;
|
||||
int8_t lprime=-1;
|
||||
int aa=0;
|
||||
|
||||
|
||||
#ifdef DEBUG_DLSCH_MODULATION
|
||||
uint8_t Nl0; //= dlsch0_harq->Nl;
|
||||
uint8_t Nl1;
|
||||
#endif
|
||||
int ru_id;
|
||||
RU_t *ru;
|
||||
int eNB_id;
|
||||
|
||||
|
||||
if ((dlsch0 != NULL) && (dlsch1 != NULL)){
|
||||
@@ -2432,11 +2428,13 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
}
|
||||
|
||||
// mapping ue specific beamforming weights from UE specified DLSCH structure to RU beam weights for the eNB
|
||||
for (ru_id=0;ru_id<RC.nb_RU;ru_id++) {
|
||||
/*
|
||||
for (int ru_id=0;ru_id<RC.nb_RU;ru_id++) {
|
||||
RU_t *ru;
|
||||
ru = RC.ru[ru_id];
|
||||
for (eNB_id=0;eNB_id<ru->num_eNB;eNB_id++){
|
||||
for (int eNB_id=0;eNB_id<ru->num_eNB;eNB_id++){
|
||||
if (phy_vars_eNB == ru->eNB_list[eNB_id]) {
|
||||
for (aa=0;aa<ru->nb_tx;aa++){
|
||||
for (int aa=0;aa<ru->nb_tx;aa++){
|
||||
LOG_I(PHY,"ru_id:%d eNB_id:%d aa:%d memcpy(ru->beam_weights, dlsch0->ue_spec_bf_weights[ru_id][0],)\n", ru_id, eNB_id, aa);
|
||||
memcpy(ru->beam_weights[eNB_id][5][aa],
|
||||
dlsch0->ue_spec_bf_weights[ru_id][0],
|
||||
@@ -2445,6 +2443,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -506,10 +506,10 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp,uint64_t CarrierFreq) {
|
||||
|
||||
const int nsymb = fp->symbols_per_slot * fp->slots_per_frame/10;
|
||||
const double Tc=(1/480e3/4096);
|
||||
const double Nu=2048*64*.5;
|
||||
const double Nu=2048*64*(1/(float)(1<<fp->numerology_index));
|
||||
const double f0= (double)CarrierFreq;
|
||||
const double Ncp0=16*64 + (144*64*.5);
|
||||
const double Ncp1=(144*64*.5);
|
||||
const double Ncp0=16*64 + (144*64*(1/(float)(1<<fp->numerology_index)));
|
||||
const double Ncp1=(144*64*(1/(float)(1<<fp->numerology_index)));
|
||||
double tl=0,poff,exp_re,exp_im;
|
||||
double Ncp,Ncpm1=Ncp0;
|
||||
|
||||
|
||||
@@ -483,13 +483,20 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
dft(dftsize,(int16_t *)&tmp_dft_in,
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
}
|
||||
else
|
||||
dft(dftsize,(int16_t *)&rxdata[rxdata_offset-sample_offset],
|
||||
else {
|
||||
//dft(dftsize,(int16_t *)&rxdata[rxdata_offset-sample_offset],
|
||||
// (int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &rxdata[rxdata_offset-sample_offset],
|
||||
(frame_parms->ofdm_symbol_size)*sizeof(int));
|
||||
dft(dftsize,(int16_t *)&tmp_dft_in,
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
}
|
||||
|
||||
// clear DC carrier from OFDM symbols
|
||||
rxdataF[symbol * frame_parms->ofdm_symbol_size] = 0;
|
||||
|
||||
|
||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
uint32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation)[symbol+symb_offset];
|
||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||
@@ -499,5 +506,6 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
(int16_t *)&rxdataF[frame_parms->ofdm_symbol_size*symbol],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
15);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -684,14 +684,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol] = len*dlsch0_harq->Qm + llr_offset_symbol;
|
||||
|
||||
/*LOG_I(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
|
||||
LOG_D(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d energy %d\n",
|
||||
symbol,
|
||||
nb_rb,dlsch0_harq->Qm,
|
||||
pdsch_vars[eNB_id]->llr_length[symbol],
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
(int16_t*)pdsch_vars[eNB_id]->llr[0],
|
||||
pllr_symbol_cw0);*/
|
||||
|
||||
signal_energy(pdsch_vars[eNB_id]->rxdataF_comp0[0], 7*2*frame_parms->N_RB_DL*12));
|
||||
|
||||
|
||||
/*printf("compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p\n",
|
||||
symbol,
|
||||
nb_rb,dlsch0_harq->Qm,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
//#define DEBUG_PBCH 1
|
||||
//#define DEBUG_PBCH
|
||||
//#define DEBUG_PBCH_ENCODING
|
||||
|
||||
#ifdef OPENAIR2
|
||||
@@ -61,7 +61,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
|
||||
int nushiftmod4 = frame_parms->nushift;
|
||||
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and
|
||||
|
||||
if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size;
|
||||
// if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size;
|
||||
rx_offset=(rx_offset)%(frame_parms->ofdm_symbol_size);
|
||||
|
||||
AssertFatal(symbol>=1 && symbol<5,
|
||||
"symbol %d illegal for PBCH extraction\n",
|
||||
@@ -103,8 +104,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
|
||||
j++;
|
||||
}
|
||||
|
||||
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1);
|
||||
rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
|
||||
rx_offset=(rx_offset+1)%(frame_parms->ofdm_symbol_size);
|
||||
//rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
|
||||
}
|
||||
|
||||
rxF_ext+=9;
|
||||
@@ -126,12 +127,14 @@ uint16_t nr_pbch_extract(int **rxdataF,
|
||||
j++;
|
||||
}
|
||||
|
||||
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1);
|
||||
rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
|
||||
rx_offset=(rx_offset+1)%(frame_parms->ofdm_symbol_size);
|
||||
//rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
|
||||
}
|
||||
|
||||
rxF_ext+=9;
|
||||
} else rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 12) : (rx_offset+12);//rx_offset = (rx_offset+12)&(frame_parms->ofdm_symbol_size-1);
|
||||
} else{ //rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 12) : (rx_offset+12);
|
||||
rx_offset = (rx_offset+12)%(frame_parms->ofdm_symbol_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ static void *scope_thread_eNB(void *arg) {
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
usleep(100*1000);
|
||||
}
|
||||
|
||||
// printf("%s",stats_buffer);
|
||||
|
||||
@@ -37,9 +37,12 @@ float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
|
||||
float tput_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
|
||||
float tput_ue_max[NUMBER_OF_UE_MAX] = {0};
|
||||
|
||||
static void ia_receiver_on_off( FL_OBJECT *button, long arg)
|
||||
{
|
||||
void drawsymbol(FL_OBJECT *obj, int id,
|
||||
FL_POINT *p, int n, int w, int h) {
|
||||
fl_points( p, n, FL_YELLOW);
|
||||
}
|
||||
|
||||
static void ia_receiver_on_off( FL_OBJECT *button, long arg) {
|
||||
if (fl_get_button(button)) {
|
||||
fl_set_object_label(button, "IA Receiver ON");
|
||||
// PHY_vars_UE_g[0][0]->use_ia_receiver = 1;
|
||||
@@ -51,9 +54,7 @@ static void ia_receiver_on_off( FL_OBJECT *button, long arg)
|
||||
}
|
||||
}
|
||||
|
||||
static void dl_traffic_on_off( FL_OBJECT *button, long arg)
|
||||
{
|
||||
|
||||
static void dl_traffic_on_off( FL_OBJECT *button, long arg) {
|
||||
if (fl_get_button(button)) {
|
||||
fl_set_object_label(button, "DL Traffic ON");
|
||||
otg_enabled = 1;
|
||||
@@ -65,46 +66,38 @@ static void dl_traffic_on_off( FL_OBJECT *button, long arg)
|
||||
}
|
||||
}
|
||||
|
||||
FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
||||
{
|
||||
|
||||
FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) {
|
||||
FL_OBJECT *obj;
|
||||
FD_lte_phy_scope_enb *fdui = fl_malloc( sizeof *fdui );
|
||||
|
||||
// Define form
|
||||
fdui->lte_phy_scope_enb = fl_bgn_form( FL_NO_BOX, 800, 800 );
|
||||
|
||||
// This the whole UI box
|
||||
obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 800, "" );
|
||||
fl_set_object_color( obj, FL_BLACK, FL_BLACK );
|
||||
|
||||
// Received signal
|
||||
fdui->rxsig_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 20, 370, 100, "Received Signal (Time-Domain, dB)" );
|
||||
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
|
||||
|
||||
// Time-domain channel response
|
||||
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "SRS Frequency Response (samples, abs)" );
|
||||
fl_set_object_boxtype( fdui->chest_t, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->chest_t, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->chest_t, FL_WHITE ); // Label color
|
||||
|
||||
// Frequency-domain channel response
|
||||
fdui->chest_f = fl_add_xyplot( FL_IMPULSE_XYPLOT, 20, 140, 760, 100, "Channel Frequency Response (RE, dB)" );
|
||||
fl_set_object_boxtype( fdui->chest_f, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->chest_f, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->chest_f, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_ybounds( fdui->chest_f,30,70);
|
||||
|
||||
// LLR of PUSCH
|
||||
fdui->pusch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 260, 500, 200, "PUSCH Log-Likelihood Ratios (LLR, mag)" );
|
||||
fl_set_object_boxtype( fdui->pusch_llr, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pusch_llr, FL_BLACK, FL_YELLOW );
|
||||
fl_set_object_lcolor( fdui->pusch_llr, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pusch_llr,2);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pusch_llr, 0, drawsymbol);
|
||||
// I/Q PUSCH comp
|
||||
fdui->pusch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 260, 240, 200, "PUSCH I/Q of MF Output" );
|
||||
fl_set_object_boxtype( fdui->pusch_comp, FL_EMBOSSED_BOX );
|
||||
@@ -112,7 +105,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
||||
fl_set_object_lcolor( fdui->pusch_comp, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pusch_comp,2);
|
||||
fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pusch_comp, 0, drawsymbol);
|
||||
// I/Q PUCCH comp (format 1)
|
||||
fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH1 Energy (SR)" );
|
||||
fl_set_object_boxtype( fdui->pucch_comp1, FL_EMBOSSED_BOX );
|
||||
@@ -120,7 +113,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
||||
fl_set_object_lcolor( fdui->pucch_comp1, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pucch_comp1,2);
|
||||
// fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pucch_comp1, 0, drawsymbol);
|
||||
// I/Q PUCCH comp (fromat 1a/b)
|
||||
fdui->pucch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 600, 240, 100, "PUCCH I/Q of MF Output" );
|
||||
fl_set_object_boxtype( fdui->pucch_comp, FL_EMBOSSED_BOX );
|
||||
@@ -128,13 +121,12 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
||||
fl_set_object_lcolor( fdui->pucch_comp, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pucch_comp,2);
|
||||
// fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pucch_comp, 0, drawsymbol);
|
||||
// Throughput on PUSCH
|
||||
fdui->pusch_tput = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 480, 500, 100, "PUSCH Throughput [frame]/[kbit/s]" );
|
||||
fl_set_object_boxtype( fdui->pusch_tput, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pusch_tput, FL_BLACK, FL_WHITE );
|
||||
fl_set_object_lcolor( fdui->pusch_tput, FL_WHITE ); // Label color
|
||||
|
||||
// Generic eNB Button
|
||||
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" );
|
||||
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
||||
@@ -143,18 +135,15 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
||||
fl_set_object_label(fdui->button_0, "DL Traffic OFF");
|
||||
fl_set_object_color(fdui->button_0, FL_RED, FL_RED);
|
||||
fl_set_object_callback(fdui->button_0, dl_traffic_on_off, 0 );
|
||||
|
||||
fl_end_form( );
|
||||
fdui->lte_phy_scope_enb->fdui = fdui;
|
||||
|
||||
return fdui;
|
||||
}
|
||||
|
||||
void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
PHY_VARS_eNB *phy_vars_enb,
|
||||
int UE_id)
|
||||
{
|
||||
|
||||
int UE_id) {
|
||||
LOG_D(HW,"scope for UE%d\n", UE_id);
|
||||
int i,i2,arx,atx,ind,k;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->frame_parms;
|
||||
int nsymb_ce = 12*frame_parms->N_RB_UL*frame_parms->symbols_per_tti;
|
||||
@@ -192,20 +181,18 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
}
|
||||
|
||||
coded_bits_per_codeword = frame_parms->N_RB_UL*12*Qm*frame_parms->symbols_per_tti;
|
||||
|
||||
chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
||||
llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
|
||||
chest_f_abs = (float *) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
||||
llr = (float *) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
|
||||
bit = malloc(coded_bits_per_codeword*sizeof(float));
|
||||
|
||||
rxsig_t = (int16_t**) phy_vars_enb->RU_list[0]->common.rxdata;
|
||||
//chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id];
|
||||
chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates;
|
||||
chest_f = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates;
|
||||
pusch_llr = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->llr;
|
||||
pusch_comp = (int32_t*) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0];
|
||||
pucch1_comp = (int32_t*) phy_vars_enb->pucch1_stats[UE_id];
|
||||
pucch1_thres = (int32_t*) phy_vars_enb->pucch1_stats_thres[UE_id];
|
||||
pucch1ab_comp = (int32_t*) phy_vars_enb->pucch1ab_stats[UE_id];
|
||||
chest_t = (int16_t **) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates;
|
||||
chest_f = (int16_t **) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates;
|
||||
pusch_llr = (int16_t *) phy_vars_enb->pusch_vars[UE_id]->llr;
|
||||
pusch_comp = (int32_t *) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0];
|
||||
pucch1_comp = (int32_t *) phy_vars_enb->pucch1_stats[UE_id];
|
||||
pucch1_thres = (int32_t *) phy_vars_enb->pucch1_stats_thres[UE_id];
|
||||
pucch1ab_comp = (int32_t *) phy_vars_enb->pucch1ab_stats[UE_id];
|
||||
|
||||
// Received signal in time domain of receive antenna 0
|
||||
if (rxsig_t != NULL) {
|
||||
@@ -236,7 +223,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
if (chest_t[0] !=NULL) {
|
||||
for (i=0; i<(frame_parms->ofdm_symbol_size); i++) {
|
||||
//i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size;
|
||||
i2=i;
|
||||
i2=i;
|
||||
//time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1));
|
||||
time2[i] = (float)i;
|
||||
chest_t_abs[0][i] = 10*log10((float) (1+chest_t[0][2*i2]*chest_t[0][2*i2]+chest_t[0][2*i2+1]*chest_t[0][2*i2+1]));
|
||||
@@ -278,7 +265,6 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
freq[ind] = (float)ind;
|
||||
Re = (float)(chest_f[(atx<<1)+arx][(2*k)]);
|
||||
Im = (float)(chest_f[(atx<<1)+arx][(2*k)+1]);
|
||||
|
||||
chest_f_abs[ind] = (short)10*log10(1.0+((double)Re*Re + (double)Im*Im));
|
||||
ind++;
|
||||
}
|
||||
@@ -333,9 +319,9 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i] < range &&
|
||||
pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i+1] > -range &&
|
||||
pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i+1] < range ) {
|
||||
I[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i];
|
||||
Q[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i+1];
|
||||
ind++;
|
||||
I[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i];
|
||||
Q[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i+1];
|
||||
ind++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,75 +332,62 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
||||
// PUSCH I/Q of MF Output
|
||||
if (pucch1ab_comp!=NULL) {
|
||||
for (ind=0; ind<10240; ind++) {
|
||||
|
||||
I_pucch[ind] = (float)pucch1ab_comp[2*(ind)];
|
||||
Q_pucch[ind] = (float)pucch1ab_comp[2*(ind)+1];
|
||||
A_pucch[ind] = 10*log10(pucch1_comp[ind]);
|
||||
B_pucch[ind] = ind;
|
||||
C_pucch[ind] = (float)pucch1_thres[ind];
|
||||
}
|
||||
|
||||
fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","","");
|
||||
fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","","");
|
||||
fl_add_xyplot_overlay(form->pucch_comp1,1,B_pucch,C_pucch,1024,FL_RED);
|
||||
fl_set_xyplot_ybounds(form->pucch_comp,-5000,5000);
|
||||
fl_set_xyplot_xbounds(form->pucch_comp,-5000,5000);
|
||||
|
||||
fl_set_xyplot_ybounds(form->pucch_comp1,0,80);
|
||||
}
|
||||
|
||||
|
||||
// PUSCH Throughput
|
||||
memmove( tput_time_enb[UE_id], &tput_time_enb[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
|
||||
memmove( tput_enb[UE_id], &tput_enb[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
|
||||
|
||||
tput_time_enb[UE_id][TPUT_WINDOW_LENGTH-1] = (float) frame;
|
||||
tput_enb[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0;
|
||||
|
||||
fl_set_xyplot_data(form->pusch_tput,tput_time_enb[UE_id],tput_enb[UE_id],TPUT_WINDOW_LENGTH,"","","");
|
||||
|
||||
// fl_get_xyplot_ybounds(form->pusch_tput,&ymin,&ymax);
|
||||
// fl_set_xyplot_ybounds(form->pusch_tput,0,ymax);
|
||||
|
||||
fl_check_forms();
|
||||
|
||||
free(llr);
|
||||
free(bit);
|
||||
free(chest_f_abs);
|
||||
}
|
||||
|
||||
FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
|
||||
{
|
||||
|
||||
FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void ) {
|
||||
FL_OBJECT *obj;
|
||||
FD_lte_phy_scope_ue *fdui = fl_malloc( sizeof *fdui );
|
||||
|
||||
// Define form
|
||||
fdui->lte_phy_scope_ue = fl_bgn_form( FL_NO_BOX, 800, 900 );
|
||||
|
||||
// This the whole UI box
|
||||
obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 900, "" );
|
||||
fl_set_object_color( obj, FL_BLACK, FL_BLACK );
|
||||
|
||||
// Received signal
|
||||
fdui->rxsig_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 20, 370, 100, "Received Signal (Time-Domain, dB)" );
|
||||
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->rxsig_t, 0, drawsymbol);
|
||||
// Time-domain channel response
|
||||
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
|
||||
fl_set_object_boxtype( fdui->chest_t, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->chest_t, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->chest_t, FL_WHITE ); // Label color
|
||||
|
||||
fl_set_xyplot_symbol(fdui->chest_t, 0, drawsymbol);
|
||||
// Frequency-domain channel response
|
||||
fdui->chest_f = fl_add_xyplot( FL_IMPULSE_XYPLOT, 20, 140, 760, 100, "Channel Frequency Response (RE, dB)" );
|
||||
fl_set_object_boxtype( fdui->chest_f, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->chest_f, FL_BLACK, FL_RED );
|
||||
fl_set_object_lcolor( fdui->chest_f, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_ybounds( fdui->chest_f,30,70);
|
||||
|
||||
// LLR of PBCH
|
||||
fdui->pbch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 260, 500, 100, "PBCH Log-Likelihood Ratios (LLR, mag)" );
|
||||
fl_set_object_boxtype( fdui->pbch_llr, FL_EMBOSSED_BOX );
|
||||
@@ -423,23 +396,23 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
|
||||
fl_set_xyplot_symbolsize( fdui->pbch_llr,2);
|
||||
fl_set_xyplot_xgrid( fdui->pbch_llr,FL_GRID_MAJOR);
|
||||
fl_set_xyplot_xbounds( fdui->pbch_llr,0,1920);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pbch_llr, 0, drawsymbol);
|
||||
// I/Q PBCH comp
|
||||
fdui->pbch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 260, 240, 100, "PBCH I/Q of MF Output" );
|
||||
fl_set_object_boxtype( fdui->pbch_comp, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pbch_comp, FL_BLACK, FL_GREEN );
|
||||
fl_set_object_lcolor( fdui->pbch_comp, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pbch_comp,2);
|
||||
fl_set_xyplot_symbol(fdui->pbch_comp, 0, drawsymbol);
|
||||
// fl_set_xyplot_xbounds( fdui->pbch_comp,-100,100);
|
||||
// fl_set_xyplot_ybounds( fdui->pbch_comp,-100,100);
|
||||
|
||||
// LLR of PDCCH
|
||||
fdui->pdcch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 380, 500, 100, "PDCCH Log-Likelihood Ratios (LLR, mag)" );
|
||||
fl_set_object_boxtype( fdui->pdcch_llr, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pdcch_llr, FL_BLACK, FL_CYAN );
|
||||
fl_set_object_lcolor( fdui->pdcch_llr, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pdcch_llr,2);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pdcch_llr, 0, drawsymbol);
|
||||
// I/Q PDCCH comp
|
||||
fdui->pdcch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 380, 240, 100, "PDCCH I/Q of MF Output" );
|
||||
fl_set_object_boxtype( fdui->pdcch_comp, FL_EMBOSSED_BOX );
|
||||
@@ -447,7 +420,7 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
|
||||
fl_set_object_lcolor( fdui->pdcch_comp, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pdcch_comp,2);
|
||||
fl_set_xyplot_xgrid( fdui->pdcch_llr,FL_GRID_MAJOR);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pdcch_comp, 0, drawsymbol);
|
||||
// LLR of PDSCH
|
||||
fdui->pdsch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 500, 500, 200, "PDSCH Log-Likelihood Ratios (LLR, mag)" );
|
||||
fl_set_object_boxtype( fdui->pdsch_llr, FL_EMBOSSED_BOX );
|
||||
@@ -455,20 +428,19 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
|
||||
fl_set_object_lcolor( fdui->pdsch_llr, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pdsch_llr,2);
|
||||
fl_set_xyplot_xgrid( fdui->pdsch_llr,FL_GRID_MAJOR);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pdsch_llr, 0, drawsymbol);
|
||||
// I/Q PDSCH comp
|
||||
fdui->pdsch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 500, 240, 200, "PDSCH I/Q of MF Output" );
|
||||
fl_set_object_boxtype( fdui->pdsch_comp, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pdsch_comp, FL_BLACK, FL_YELLOW );
|
||||
fl_set_object_lcolor( fdui->pdsch_comp, FL_WHITE ); // Label color
|
||||
fl_set_xyplot_symbolsize( fdui->pdsch_comp,2);
|
||||
|
||||
fl_set_xyplot_symbol(fdui->pdsch_comp, 0, drawsymbol);
|
||||
// Throughput on PDSCH
|
||||
fdui->pdsch_tput = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 720, 500, 100, "PDSCH Throughput [frame]/[kbit/s]" );
|
||||
fl_set_object_boxtype( fdui->pdsch_tput, FL_EMBOSSED_BOX );
|
||||
fl_set_object_color( fdui->pdsch_tput, FL_BLACK, FL_WHITE );
|
||||
fl_set_object_lcolor( fdui->pdsch_tput, FL_WHITE ); // Label color
|
||||
|
||||
// Generic UE Button
|
||||
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 540, 720, 240, 40, "" );
|
||||
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
||||
@@ -478,10 +450,8 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
|
||||
fl_set_object_color(fdui->button_0, FL_RED, FL_RED);
|
||||
fl_set_object_callback(fdui->button_0, ia_receiver_on_off, 0 );
|
||||
fl_hide_object(fdui->button_0);
|
||||
|
||||
fl_end_form( );
|
||||
fdui->lte_phy_scope_ue->fdui = fdui;
|
||||
|
||||
return fdui;
|
||||
}
|
||||
|
||||
@@ -489,8 +459,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
PHY_VARS_UE *phy_vars_ue,
|
||||
int eNB_id,
|
||||
int UE_id,
|
||||
uint8_t subframe)
|
||||
{
|
||||
uint8_t subframe) {
|
||||
int i,arx,atx,ind,k;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
|
||||
int nsymb_ce = frame_parms->ofdm_symbol_size;//*frame_parms->symbols_per_tti;
|
||||
@@ -521,7 +490,6 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
unsigned char harq_pid = 0;
|
||||
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
|
||||
|
||||
|
||||
if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) {
|
||||
harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->current_harq_pid;
|
||||
|
||||
@@ -556,34 +524,32 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
coded_bits_per_codeword = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
|
||||
}
|
||||
|
||||
I = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
|
||||
Q = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
|
||||
chest_t_abs = (float**) malloc(nb_antennas_rx*sizeof(float*));
|
||||
I = (float *) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
|
||||
Q = (float *) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
|
||||
chest_t_abs = (float **) malloc(nb_antennas_rx*sizeof(float *));
|
||||
|
||||
for (arx=0; arx<nb_antennas_rx; arx++) {
|
||||
chest_t_abs[arx] = (float*) calloc(frame_parms->ofdm_symbol_size,sizeof(float));
|
||||
chest_t_abs[arx] = (float *) calloc(frame_parms->ofdm_symbol_size,sizeof(float));
|
||||
}
|
||||
|
||||
chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
||||
chest_f_abs = (float *) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
|
||||
//llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // Cppcheck returns "invalidFunctionArg" error.
|
||||
llr = (float*) malloc(coded_bits_per_codeword*sizeof(float));
|
||||
llr = (float *) malloc(coded_bits_per_codeword*sizeof(float));
|
||||
memset((void *)llr, 0,coded_bits_per_codeword*sizeof(float)); // init to zero
|
||||
|
||||
bit = malloc(coded_bits_per_codeword*sizeof(float));
|
||||
llr_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); // init to zero
|
||||
bit_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float));
|
||||
|
||||
rxsig_t = (int16_t**) phy_vars_ue->common_vars.rxdata;
|
||||
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
|
||||
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
|
||||
pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
|
||||
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
|
||||
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr;
|
||||
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0];
|
||||
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
|
||||
llr_pdcch = (float *) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); // init to zero
|
||||
bit_pdcch = (float *) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float));
|
||||
rxsig_t = (int16_t **) phy_vars_ue->common_vars.rxdata;
|
||||
chest_t = (int16_t **) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
|
||||
chest_f = (int16_t **) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
|
||||
pbch_llr = (int8_t *) phy_vars_ue->pbch_vars[eNB_id]->llr;
|
||||
pbch_comp = (int16_t *) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
|
||||
pdcch_llr = (int8_t *) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr;
|
||||
pdcch_comp = (int16_t *) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0];
|
||||
pdsch_llr = (int16_t *) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
|
||||
//pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
|
||||
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0];
|
||||
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
|
||||
pdsch_comp = (int16_t *) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0];
|
||||
pdsch_mag = (int16_t *) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
|
||||
|
||||
// Received signal in time domain of receive antenna 0
|
||||
if (rxsig_t != NULL) {
|
||||
@@ -652,7 +618,6 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
freq[ind] = (float)ind;
|
||||
Re = (float)(chest_f[(atx<<1)+arx][(2*k)]);
|
||||
Im = (float)(chest_f[(atx<<1)+arx][(2*k)+1]);
|
||||
|
||||
chest_f_abs[ind] = (short)10*log10(1.0+((double)Re*Re + (double)Im*Im));
|
||||
ind++;
|
||||
}
|
||||
@@ -715,13 +680,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
}
|
||||
|
||||
fl_set_xyplot_xbounds(form->pdcch_llr,0,12*frame_parms->N_RB_DL*2*3);
|
||||
if (frame_parms->N_RB_DL != 100)
|
||||
{
|
||||
fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*2*num_pdcch_symbols,"","","");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_D(PHY,"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
|
||||
if (frame_parms->N_RB_DL != 100) {
|
||||
fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*2*num_pdcch_symbols,"","","");
|
||||
} else {
|
||||
LOG_D(PHY,"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -731,13 +694,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
I[i] = pdcch_comp[2*i];
|
||||
Q[i] = pdcch_comp[2*i+1];
|
||||
}
|
||||
if (frame_parms->N_RB_DL != 100)
|
||||
{
|
||||
fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","","");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_D(PHY,"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
|
||||
if (frame_parms->N_RB_DL != 100) {
|
||||
fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","","");
|
||||
} else {
|
||||
LOG_D(PHY,"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,13 +710,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
}
|
||||
|
||||
fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
|
||||
if (frame_parms->N_RB_DL != 100)
|
||||
{
|
||||
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","","");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_D(PHY,"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
|
||||
if (frame_parms->N_RB_DL != 100) {
|
||||
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","","");
|
||||
} else {
|
||||
LOG_D(PHY,"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,7 +724,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
|
||||
for (k=0; k<frame_parms->symbols_per_tti; k++) {
|
||||
for (i=0; i<12*frame_parms->N_RB_DL/2; i++) {
|
||||
int j = (2*frame_parms->N_RB_DL*12*k)+4*i;
|
||||
int j = (2*frame_parms->N_RB_DL*12*k)+4*i;
|
||||
I[ind] = (pdsch_mag[j ]!=0? 1.0/pdsch_mag[j ]: 0.0) * pdsch_comp[j ]*1.0;
|
||||
Q[ind] = (pdsch_mag[j+1]!=0? 1.0/pdsch_mag[j+1]: 0.0) * pdsch_comp[j+1]*1.0;
|
||||
ind++;
|
||||
@@ -778,7 +737,6 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
// PDSCH Throughput
|
||||
memmove( tput_time_ue[UE_id], &tput_time_ue[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
|
||||
memmove( tput_ue[UE_id], &tput_ue[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
|
||||
|
||||
tput_time_ue[UE_id][TPUT_WINDOW_LENGTH-1] = (float) frame;
|
||||
tput_ue[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0;
|
||||
|
||||
@@ -787,11 +745,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
||||
}
|
||||
|
||||
fl_set_xyplot_data(form->pdsch_tput,tput_time_ue[UE_id],tput_ue[UE_id],TPUT_WINDOW_LENGTH,"","","");
|
||||
|
||||
fl_set_xyplot_ybounds(form->pdsch_tput,0,tput_ue_max[UE_id]);
|
||||
|
||||
fl_check_forms();
|
||||
|
||||
free(I);
|
||||
free(Q);
|
||||
free(chest_f_abs);
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
#ifndef __PHY_DEFS_NB_IOT__H__
|
||||
#define __PHY_DEFS_NB_IOT__H__
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
|
||||
@@ -236,6 +236,7 @@ typedef struct {
|
||||
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
|
||||
|
||||
typedef uint32_t (*get_samples_per_slot_t)(int slot, NR_DL_FRAME_PARMS* fp);
|
||||
typedef uint32_t (*get_slot_from_timestamp_t)(openair0_timestamp timestamp_rx, NR_DL_FRAME_PARMS* fp);
|
||||
|
||||
typedef uint32_t (*get_samples_slot_timestamp_t)(int slot, NR_DL_FRAME_PARMS* fp, uint8_t sl_ahead);
|
||||
|
||||
@@ -292,6 +293,8 @@ struct NR_DL_FRAME_PARMS {
|
||||
uint32_t samples_per_subframe;
|
||||
/// Number of samples in current slot
|
||||
get_samples_per_slot_t get_samples_per_slot;
|
||||
/// slot calculation from timestamp
|
||||
get_slot_from_timestamp_t get_slot_from_timestamp;
|
||||
/// Number of samples before slot
|
||||
get_samples_slot_timestamp_t get_samples_slot_timestamp;
|
||||
/// Number of samples in 0th and center slot of a subframe
|
||||
|
||||
@@ -380,7 +380,8 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
|
||||
case 245: timing_advance_update /= 32; break;
|
||||
case 273: timing_advance_update /= 32; break;
|
||||
case 66: timing_advance_update /= 12; break;
|
||||
default: abort();
|
||||
case 32: timing_advance_update /= 12; break;
|
||||
default: AssertFatal(0==1,"No case defined for PRB %d to calculate timing_advance_update\n",gNB->frame_parms.N_RB_DL);
|
||||
}
|
||||
|
||||
// put timing advance command in 0..63 range
|
||||
|
||||
@@ -388,6 +388,7 @@ void set_tx_harq_id(NR_UE_ULSCH_t *ulsch, int harq_pid, int slot_tx);
|
||||
int get_tx_harq_id(NR_UE_ULSCH_t *ulsch, int slot_tx);
|
||||
|
||||
int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
||||
int is_ssb_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
@@ -356,6 +356,16 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
|
||||
} else {
|
||||
LOG_E(PHY,"[UE %d] frame %d, nr_tti_rx %d, Error decoding PBCH!\n",
|
||||
ue->Mod_id,frame_rx, nr_tti_rx);
|
||||
/*FILE *fd;
|
||||
if ((fd = fopen("rxsig_frame0.dat","w")) != NULL) {
|
||||
fwrite((void *)&ue->common_vars.rxdata[0][0],
|
||||
sizeof(int32_t),
|
||||
ue->frame_parms.samples_per_frame,
|
||||
fd);
|
||||
LOG_I(PHY,"Dummping Frame ... bye bye \n");
|
||||
fclose(fd);
|
||||
exit(0);
|
||||
}*/
|
||||
|
||||
/*
|
||||
write_output("rxsig0.m","rxs0", ue->common_vars.rxdata[0],ue->frame_parms.samples_per_subframe,1,1);
|
||||
@@ -1614,6 +1624,59 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
}
|
||||
#endif
|
||||
|
||||
int is_ssb_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp)
|
||||
{
|
||||
int mu = fp->numerology_index;
|
||||
//uint8_t half_frame_index = fp->half_frame_bit;
|
||||
//uint8_t i_ssb = fp->ssb_index;
|
||||
uint8_t Lmax = fp->Lmax;
|
||||
|
||||
if (!(frame%(1<<(config->ssb_table.ssb_period-1)))){
|
||||
|
||||
if(Lmax <= 8) {
|
||||
if(slot <=3 && (((config->ssb_table.ssb_mask_list[0].ssb_mask << 2*slot)&0x80000000) == 0x80000000 || ((config->ssb_table.ssb_mask_list[0].ssb_mask << (2*slot +1))&0x80000000) == 0x80000000))
|
||||
return 1;
|
||||
else return 0;
|
||||
|
||||
}
|
||||
else if(Lmax == 64) {
|
||||
if (mu == NR_MU_3){
|
||||
|
||||
if (slot>=0 && slot <= 7){
|
||||
if(((config->ssb_table.ssb_mask_list[0].ssb_mask << 2*slot)&0x80000000) == 0x80000000 || ((config->ssb_table.ssb_mask_list[0].ssb_mask << (2*slot +1))&0x80000000) == 0x80000000)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else if (slot>=10 && slot <=17){
|
||||
if(((config->ssb_table.ssb_mask_list[0].ssb_mask << 2*(slot-2))&0x80000000) == 0x80000000 || ((config->ssb_table.ssb_mask_list[0].ssb_mask << (2*(slot-2) +1))&0x80000000) == 0x80000000)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else if (slot>=20 && slot <=27){
|
||||
if(((config->ssb_table.ssb_mask_list[1].ssb_mask << 2*(slot-20))&0x80000000) == 0x80000000 || ((config->ssb_table.ssb_mask_list[1].ssb_mask << (2*(slot-20) +1))&0x80000000) == 0x80000000)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else if (slot>=30 && slot <=37){
|
||||
if(((config->ssb_table.ssb_mask_list[1].ssb_mask << 2*(slot-22))&0x80000000) == 0x80000000 || ((config->ssb_table.ssb_mask_list[1].ssb_mask << (2*(slot-22) +1))&0x80000000) == 0x80000000)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
else return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if (mu == NR_MU_4) {
|
||||
AssertFatal(0==1, "not implemented for mu = %d yet\n", mu);
|
||||
}
|
||||
else AssertFatal(0==1, "Invalid numerology index %d for the synchronization block\n", mu);
|
||||
}
|
||||
else AssertFatal(0==1, "Invalid Lmax %u for the synchronization block\n", Lmax);
|
||||
}
|
||||
else return 0;
|
||||
|
||||
}
|
||||
|
||||
int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp) {
|
||||
|
||||
@@ -1644,6 +1707,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
int frame_rx = proc->frame_rx;
|
||||
int nr_tti_rx = proc->nr_tti_rx;
|
||||
int slot_pbch;
|
||||
//int slot_ssb;
|
||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][0];
|
||||
fapi_nr_config_request_t *cfg = &ue->nrUE_config;
|
||||
|
||||
@@ -1669,6 +1733,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
get_coreset_rballoc(pdcch_vars->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
||||
|
||||
slot_pbch = is_pbch_in_slot(cfg, frame_rx, nr_tti_rx, fp);
|
||||
//slot_ssb = is_ssb_in_slot(cfg, frame_rx, nr_tti_rx, fp);
|
||||
|
||||
// looking for pbch only in slot where it is supposed to be
|
||||
if ((ue->decode_MIB == 1) && slot_pbch)
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
|
||||
static int cmpdouble(const void *p1, const void *p2) {
|
||||
return *(double *)p1 > *(double *)p2;
|
||||
}
|
||||
|
||||
double median(varArray_t *input) {
|
||||
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
|
||||
}
|
||||
|
||||
@@ -79,6 +79,9 @@ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
|
||||
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
||||
|
||||
double DS_TDL = .03;
|
||||
static int cmpdouble(const void *p1, const void *p2) {
|
||||
return *(double *)p1 > *(double *)p2;
|
||||
}
|
||||
|
||||
int emulate_rf = 0;
|
||||
int split73=0;
|
||||
|
||||
@@ -80,6 +80,9 @@ double t_tx_min = 1000000000; /*!< \brief initial min process time for tx */
|
||||
double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
|
||||
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
|
||||
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
||||
static int cmpdouble(const void *p1, const void *p2) {
|
||||
return *(double *)p1 > *(double *)p2;
|
||||
}
|
||||
|
||||
|
||||
int split73=0;
|
||||
@@ -345,7 +348,7 @@ int main(int argc, char **argv) {
|
||||
unsigned short input_buffer_length;
|
||||
unsigned int ret;
|
||||
unsigned int coded_bits_per_codeword,nsymb;
|
||||
unsigned int tx_lev=0,tx_lev_dB,trials,errs[4]= {0,0,0,0},round_trials[4]= {0,0,0,0};
|
||||
unsigned int tx_lev=0,tx_lev_dB,trials,errs[5]= {0,0,0,0,0},round_trials[4]= {0,0,0,0};
|
||||
FILE *bler_fd=NULL;
|
||||
char bler_fname[512];
|
||||
FILE *time_meas_fd=NULL;
|
||||
|
||||
@@ -66,8 +66,9 @@
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
#include "SIMULATION/LTE_PHY/common_sim.h"
|
||||
|
||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||
#include <openair2/RRC/LTE/rrc_vars.h>
|
||||
|
||||
unsigned char NB_eNB_INST=0;
|
||||
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
rlc_info_t Rlc_info_um,Rlc_info_am_config;
|
||||
|
||||
@@ -81,7 +82,6 @@ double cpuf;
|
||||
int sf_ahead=4 ;
|
||||
int sl_ahead=0;
|
||||
uint8_t nfapi_mode = 0;
|
||||
uint16_t NB_UE_INST = 1;
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
|
||||
// dummy functions
|
||||
@@ -150,6 +150,42 @@ int is_x2ap_enabled(void)
|
||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
|
||||
/* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs from command line of
|
||||
dlsim, does not search for CCE/PUCCH occasion but simply sets to 0 */
|
||||
int g_mcsIndex = -1, g_rbStart = -1, g_rbSize = -1;
|
||||
void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
frame_t frame,
|
||||
sub_frame_t slot,
|
||||
int num_slots_per_tdd) {
|
||||
NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
|
||||
AssertFatal(UE_info->num_UEs == 1, "can have only a single UE\n");
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[0];
|
||||
|
||||
/* manually set free CCE to 0 */
|
||||
const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
|
||||
sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss);
|
||||
uint8_t nr_of_candidates;
|
||||
find_aggregation_candidates(&sched_ctrl->aggregation_level,
|
||||
&nr_of_candidates,
|
||||
sched_ctrl->search_space);
|
||||
sched_ctrl->coreset = get_coreset(
|
||||
sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
|
||||
sched_ctrl->cce_index = 0;
|
||||
|
||||
/* set "any" value for PUCCH (simulator evaluates PDSCH only) */
|
||||
sched_ctrl->pucch_sched_idx = 0;
|
||||
sched_ctrl->pucch_occ_idx = 0;
|
||||
|
||||
sched_ctrl->rbStart = g_rbStart;
|
||||
sched_ctrl->rbSize = g_rbSize;
|
||||
sched_ctrl->mcs = g_mcsIndex;
|
||||
sched_ctrl->time_domain_allocation = 2;
|
||||
sched_ctrl->mcsTableIdx = 0;
|
||||
AssertFatal(sched_ctrl->rbStart >= 0, "invalid rbStart %d\n", sched_ctrl->rbStart);
|
||||
AssertFatal(sched_ctrl->rbSize > 0, "invalid rbSize %d\n", sched_ctrl->rbSize);
|
||||
AssertFatal(sched_ctrl->mcs >= 0, "invalid sched_ctrl->mcs %d\n", sched_ctrl->mcs);
|
||||
sched_ctrl->numDmrsCdmGrpsNoData = 1;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
@@ -194,11 +230,10 @@ int main(int argc, char **argv)
|
||||
|
||||
SCM_t channel_model=AWGN;//Rayleigh1_anticorr;
|
||||
|
||||
NB_UE_INST = 1;
|
||||
//double pbch_sinr;
|
||||
//int pbch_tx_ant;
|
||||
int N_RB_DL=106,mu=1;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t dlsch_config;
|
||||
NR_sched_pucch pucch_sched;
|
||||
|
||||
//unsigned char frame_type = 0;
|
||||
|
||||
@@ -227,7 +262,6 @@ int main(int argc, char **argv)
|
||||
|
||||
randominit(0);
|
||||
|
||||
int mcsIndex_set=0,rbStart_set=0,rbSize_set=0;
|
||||
int print_perf = 0;
|
||||
|
||||
FILE *scg_fd=NULL;
|
||||
@@ -393,18 +427,15 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
case 'a':
|
||||
dlsch_config.rbStart = atoi(optarg);
|
||||
rbStart_set=1;
|
||||
g_rbStart = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
dlsch_config.rbSize = atoi(optarg);
|
||||
rbSize_set=1;
|
||||
g_rbSize = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
dlsch_config.mcsIndex[0] = atoi(optarg);
|
||||
mcsIndex_set=1;
|
||||
g_mcsIndex = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@@ -483,6 +514,7 @@ int main(int argc, char **argv)
|
||||
RC.nb_nr_mac_CC[i] = 1;
|
||||
mac_top_init_gNB();
|
||||
gNB_mac = RC.nrmac[0];
|
||||
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
|
||||
gNB_RRC_INST rrc;
|
||||
memset((void*)&rrc,0,sizeof(rrc));
|
||||
|
||||
@@ -560,6 +592,12 @@ int main(int argc, char **argv)
|
||||
// nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions);
|
||||
// call MAC to configure common parameters
|
||||
|
||||
/* rrc_mac_config_req_gNB() has created one user, so set the scheduling
|
||||
* parameters from command line in global variables that will be picked up by
|
||||
* scheduling preprocessor */
|
||||
if (g_mcsIndex < 0) g_mcsIndex = 9;
|
||||
if (g_rbStart < 0) g_rbStart=0;
|
||||
if (g_rbSize < 0) g_rbSize = N_RB_DL - g_rbStart;
|
||||
|
||||
double fs,bw;
|
||||
|
||||
@@ -687,11 +725,6 @@ int main(int argc, char **argv)
|
||||
AssertFatal(input_fd==NULL,"Not ready for input signal file\n");
|
||||
gNB->pbch_configured = 1;
|
||||
gNB->ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234;
|
||||
|
||||
if (mcsIndex_set==0) dlsch_config.mcsIndex[0]=9;
|
||||
|
||||
if (rbStart_set==0) dlsch_config.rbStart=0;
|
||||
if (rbSize_set==0) dlsch_config.rbSize=N_RB_DL-dlsch_config.rbStart;
|
||||
|
||||
//Configure UE
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
@@ -788,8 +821,14 @@ int main(int argc, char **argv)
|
||||
for (int i=0; i<MAX_NUM_CORESET; i++)
|
||||
gNB_mac->UE_info.num_pdcch_cand[0][i] = 0;
|
||||
|
||||
if (css_flag == 0) nr_schedule_uss_dlsch_phytest(0,frame,slot,&pucch_sched,&dlsch_config);
|
||||
else nr_schedule_css_dlsch_phytest(0,frame,slot);
|
||||
if (css_flag == 0) {
|
||||
const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160};
|
||||
const NR_TDD_UL_DL_Pattern_t *tdd_pattern = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
|
||||
const int num_slots_per_tdd = slots_per_frame[*scc->ssbSubcarrierSpacing] >> (7 - tdd_pattern->dl_UL_TransmissionPeriodicity);
|
||||
nr_schedule_ue_spec(0, frame, slot, num_slots_per_tdd);
|
||||
} else {
|
||||
nr_schedule_css_dlsch_phytest(0,frame,slot);
|
||||
}
|
||||
Sched_INFO.module_id = 0;
|
||||
Sched_INFO.CC_id = 0;
|
||||
Sched_INFO.frame = frame;
|
||||
@@ -986,7 +1025,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (print_perf==1) {
|
||||
printf("\ngNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))\n",
|
||||
1000>>*scc->ssbSubcarrierSpacing,dlsch_config.rbSize,dlsch_config.mcsIndex[0],
|
||||
1000>>*scc->ssbSubcarrierSpacing, g_rbSize, g_mcsIndex,
|
||||
gNB->dlsch[0][0]->harq_processes[0]->pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3,
|
||||
gNB->dlsch[0][0]->harq_processes[0]->K,
|
||||
gNB->dlsch[0][0]->harq_processes[0]->K/((gNB->dlsch[0][0]->harq_processes[0]->pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3)>3824?22:10));
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "openair1/SIMULATION/RF/rf.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
|
||||
#include "openair1/PHY/MODULATION/nr_modulation.h"
|
||||
|
||||
//#define DEBUG_NR_PBCHSIM
|
||||
|
||||
|
||||
@@ -45,11 +45,13 @@
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "nr_unitary_defs.h"
|
||||
#include "OCG_vars.h"
|
||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||
#include <openair2/RRC/LTE/rrc_vars.h>
|
||||
|
||||
|
||||
#define NR_PRACH_DEBUG 1
|
||||
#define PRACH_WRITE_OUTPUT_DEBUG 1
|
||||
|
||||
unsigned char NB_eNB_INST=0;
|
||||
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
rlc_info_t Rlc_info_um,Rlc_info_am_config;
|
||||
|
||||
@@ -59,7 +61,6 @@ RAN_CONTEXT_t RC;
|
||||
RU_t *ru;
|
||||
double cpuf;
|
||||
extern uint16_t prach_root_sequence_map0_3[838];
|
||||
uint16_t NB_UE_INST=1;
|
||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
uint8_t nfapi_mode=0;
|
||||
int sl_ahead = 0;
|
||||
@@ -124,6 +125,7 @@ int main(int argc, char **argv){
|
||||
uint8_t config_period;
|
||||
int prachOccasion = 0;
|
||||
double DS_TDL = .03;
|
||||
NB_UE_INST=1;
|
||||
|
||||
// int8_t interf1=-19,interf2=-19;
|
||||
// uint8_t abstraction_flag=0,calibration_flag=0;
|
||||
|
||||
@@ -60,9 +60,11 @@
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
#include "SIMULATION/LTE_PHY/common_sim.h"
|
||||
|
||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||
#include <openair2/RRC/LTE/rrc_vars.h>
|
||||
|
||||
//#define DEBUG_ULSIM
|
||||
|
||||
unsigned char NB_eNB_INST=0;
|
||||
LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
rlc_info_t Rlc_info_um,Rlc_info_am_config;
|
||||
|
||||
@@ -75,7 +77,6 @@ int sf_ahead=4 ;
|
||||
int sl_ahead=0;
|
||||
double cpuf;
|
||||
uint8_t nfapi_mode = 0;
|
||||
uint16_t NB_UE_INST = 1;
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
|
||||
|
||||
@@ -164,6 +165,7 @@ int main(int argc, char **argv)
|
||||
uint16_t N_RB_DL = 106, N_RB_UL = 106, mu = 1;
|
||||
double tx_gain=1.0;
|
||||
double N0=30;
|
||||
NB_UE_INST = 1;
|
||||
|
||||
//unsigned char frame_type = 0;
|
||||
NR_DL_FRAME_PARMS *frame_parms;
|
||||
|
||||
Reference in New Issue
Block a user