Commit d7ffd70b authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/nr_vcd' into develop_integration_2020_w27

parents 91104cb6 24bdbde2
......@@ -518,7 +518,29 @@ const char* eurecomFunctionsNames[] = {
"wakeup_txfh",
"gNB_thread_rxtx0",
"gNB_thread_rxtx1",
"ru_thread_tx_wait"
"ru_thread_tx_wait",
"gNB_ulsch_decoding",
"gNB_pdsch_codeword_scrambling",
"gNB_dlsch_encoding",
"gNB_pdsch_modulation",
"gNB_pdcch_tx",
"phy_procedures_gNB_tx",
"phy_procedures_gNB_common_tx",
"phy_procedures_gNB_uespec_rx",
"nr_rx_pusch",
"nr_ulsch_procedures_rx",
"macxface_gNB_dlsch_ulsch_scheduler",
/*NR ue-softmodem signal*/
"nr_ue_ulsch_encoding",
"nr_segmentation",
"ldpc_encoder_optim",
"nr_rate_matching_ldpc",
"nr_interleaving_ldpc",
"pss_synchro_nr",
"pss_search_time_nr",
"nr_initial_ue_sync",
"beam_switching_gpio"
};
struct vcd_module_s vcd_modules[] = {
......
......@@ -511,6 +511,29 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1,
VCD_SIGNAL_DUMPER_FUNCTIONS_RU_TX_WAIT,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,
/* NR ue-softmodem signal*/
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INTERLEAVING_LDPC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR,
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions;
......
......@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (249)
#define VCD_NUM_FUNCTIONS (269)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187)
......
......@@ -3393,3 +3393,106 @@ ID = VCD_FUNCTION_RU_TX_WAIT
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = ru_thread_tx_wait
ID = VCD_FUNCTION_PHY_gNB_ULSCH_DECODING
DESC = VCD function PHY_gNB_ULSCH_DECODING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_ulsch_decoding
ID = VCD_FUNCTION_gNB_PDSCH_CODEWORD_SCRAMBLING
DESC = VCD function gNB_PDSCH_CODEWORD_SCRAMBLING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_pdsch_codeword_scrambling
ID = VCD_FUNCTION_gNB_DLSCH_ENCODING
DESC = VCD function gNB_DLSCH_ENCODING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_dlsch_encoding
ID = VCD_FUNCTION_gNB_PDSCH_MODULATION
DESC = VCD function gNB_PDSCH_MODULATION
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_pdsch_modulation
ID = VCD_FUNCTION_PHY_gNB_PDCCH_TX
DESC = VCD function PHY_gNB_PDCCH_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_pdcch_tx
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_TX
DESC = VCD function PHY_PROCEDURES_gNB_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_procedures_gNB_tx
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_COMMON_TX
DESC = VCD function PHY_PROCEDURES_gNB_COMMON_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_procedures_gNB_common_tx
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_UESPEC_RX
DESC = VCD function PHY_PROCEDURES_gNB_UESPEC_RX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_procedures_gNB_uespec_rx
ID = VCD_FUNCTION_NR_RX_PUSCH
DESC = VCD function NR_RX_PUSCH
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_rx_pusch
ID = VCD_FUNCTION_NR_ULSCH_PROCEDURES_RX
DESC = VCD function NR_ULSCH_PROCEDURES_RX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_ulsch_procedures_rx
ID = VCD_FUNCTION_gNB_DLSCH_ULSCH_SCHEDULER
DESC = VCD function gNB_DLSCH_ULSCH_SCHEDULER
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = macxface_gNB_dlsch_ulsch_scheduler
#function for nrUE
ID = VCD_FUNCTION_NR_UE_ULSCH_ENCODING
DESC = VCD function NR_UE_ULSCH_ENCODING
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_ue_ulsch_encoding
ID = VCD_FUNCTION_NR_SEGMENTATION
DESC = VCD function NR_SEGMENTATION
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_segmentation
ID = VCD_FUNCTION_LDPC_ENCODER_OPTIM
DESC = VCD function LDPC_ENCODER_OPTIM
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = ldpc_encoder_optim
ID = VCD_FUNCTION_NR_RATE_MATCHING_LDPC
DESC = VCD function NR_RATE_MATCHING_LDPC
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_rate_matching_ldpc
ID = VCD_FUNCTION_NR_INTERLEAVING_LDPC
DESC = VCD function NR_INTERLEAVING_LDPC
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_interleaving_ldpc
ID = VCD_FUNCTION_PSS_SYNCHRO_NR
DESC = VCD function PSS_SYNCHRO_NR
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = pss_synchro_nr
ID = VCD_FUNCTION_PSS_SEARCH_TIME_NR
DESC = VCD function PSS_SEARCH_TIME_NR
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = pss_search_time_nr
ID = VCD_FUNCTION_NR_INITIAL_UE_SYNC
DESC = VCD function NR_INITIAL_UE_SYNC
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_initial_ue_sync
ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
DESC = VCD function BEAM_SWITCHING_GPIO
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = beam_switching_gpio
......@@ -35,6 +35,7 @@
#include "nr_sch_dmrs.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
......@@ -48,7 +49,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
uint8_t reset, b_idx;
uint32_t x1, x2, s=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
reset = 1;
x2 = (n_RNTI<<15) + (q<<14) + Nid;
......@@ -63,7 +64,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
}
void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
......@@ -201,11 +202,13 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
/// Modulation
start_meas(dlsch_modulation_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 1);
for (int q=0; q<rel15->NrOfCodewords; q++)
nr_modulation(scrambled_output[q],
encoded_length,
Qm,
mod_symbs[q]);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0);
stop_meas(dlsch_modulation_stats);
#ifdef DEBUG_DLSCH
printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_re);
......
......@@ -347,7 +347,7 @@ int nr_dlsch_encoding(unsigned char *a,
float Coderate = 0.0;
uint8_t Nl = 4;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
A = rel15->TBSize[0]<<3;
......@@ -539,7 +539,7 @@ int nr_dlsch_encoding(unsigned char *a,
r_offset += E;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
return 0;
}
......@@ -357,6 +357,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
// harq_process->trials[nfapi_ulsch_pdu_rel15->round]++;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,1);
harq_process->TBS = pusch_pdu->pusch_data.tb_size;
A = (harq_process->TBS)<<3;
......@@ -721,6 +723,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#endif
ulsch->last_iteration_cnt = ret;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
return(ret);
}
......@@ -38,6 +38,7 @@
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
//#include "SCHED/defs.h"
//#include "SCHED/extern.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common_lib.h"
#include <math.h>
......@@ -213,6 +214,9 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode,
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
int ret=-1;
int rx_power=0; //aarx,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_IN);
LOG_D(PHY,"nr_initial sync ue RB_DL %d\n", fp->N_RB_DL);
......@@ -477,6 +481,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode,
}
// exit_fun("debug exit");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);
return ret;
}
......@@ -262,8 +262,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////
/////////////////////////////////////////////////////////////////////////////////////////
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_IN);
LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
......@@ -331,6 +330,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
BG = 1;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION, VCD_FUNCTION_IN);
Kb=nr_segmentation(harq_process->b,
harq_process->c,
harq_process->B,
......@@ -339,6 +339,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
pz,
&harq_process->F,
BG);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION, VCD_FUNCTION_OUT);
F = harq_process->F;
Kr = harq_process->K;
......@@ -389,7 +390,11 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
impp.n_segments=harq_process->C;
impp.macro_num=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_IN);
nrLDPC_encoder(harq_process->c,harq_process->d,*pz,Kb,Kr,BG,&impp);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_OUT);
//stop_meas(te_stats);
//printf("end ldpc encoder -- output\n");
......@@ -435,6 +440,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->pusch_pdu.nrOfLayers,harq_process->C);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
nr_rate_matching_ldpc(Ilbrm,
Tbslbrm,
BG,
......@@ -446,6 +452,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Kr-F-2*(*pz),
harq_process->pusch_pdu.pusch_data.rv_index,
E);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_OUT);
......@@ -464,10 +471,14 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
//stop_meas(rm_stats);
//start_meas(i_stats);
nr_interleaving_ldpc(E,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INTERLEAVING_LDPC, VCD_FUNCTION_IN);
nr_interleaving_ldpc(E,
mod_order,
harq_process->e+r_offset,
harq_process->f+r_offset);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INTERLEAVING_LDPC, VCD_FUNCTION_OUT);
//stop_meas(i_stats);
......@@ -488,7 +499,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
memcpy(ulsch->g,harq_process->f,G); // g is the concatenated code block
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_OUT);
return(0);
}
......@@ -38,6 +38,7 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#define DEFINE_VARIABLES_PSS_NR_H
#include "PHY/NR_REFSIG/pss_nr.h"
......@@ -672,6 +673,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
int **rxdata = NULL;
int fo_flag = PHY_vars_UE->UE_fo_compensation; // flag to enable freq offset estimation and compensation
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, VCD_FUNCTION_IN);
#ifdef DBG_PSS_NR
LOG_M("rxdata0_rand.m","rxd0_rand", &PHY_vars_UE->common_vars.rxdata[0][0], frame_parms->samples_per_frame, 1, 1);
......@@ -710,6 +712,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR, VCD_FUNCTION_IN);
synchro_position = pss_search_time_nr(rxdata,
frame_parms,
fo_flag,
......@@ -717,6 +720,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
(int *)&PHY_vars_UE->common_vars.eNb_id,
(int *)&PHY_vars_UE->common_vars.freq_offset);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR, VCD_FUNCTION_OUT);
#if TEST_SYNCHRO_TIMING_PSS
......@@ -749,6 +753,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
}
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, VCD_FUNCTION_OUT);
return synchro_position;
}
......
......@@ -144,7 +144,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if ((cfg->cell_config.frame_duplex_type.value == TDD) &&
(nr_slot_select(cfg,frame,slot) == NR_UPLINK_SLOT)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1);
if (do_meas==1) start_meas(&gNB->phy_proc_tx);
......@@ -153,12 +153,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,1);
if (nfapi_mode == 0 || nfapi_mode == 1) {
if ((!(frame%ssb_frame_periodicity))) // generate SSB only for given frames according to SSB periodicity
nr_common_signal_procedures(gNB,frame, slot);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,0);
if (gNB->pdcch_pdu || gNB->ul_dci_pdu) {
......@@ -167,7 +167,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
gNB->ul_dci_pdu==NULL?0:gNB->ul_dci_pdu->pdcch_pdu.pdcch_pdu_rel15.numDlDci,
gNB->pdcch_pdu==NULL?0:gNB->pdcch_pdu->pdcch_pdu_rel15.numDlDci);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,1);
nr_generate_dci_top(gNB->pdcch_pdu,
gNB->ul_dci_pdu,
......@@ -175,7 +175,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
&gNB->common_vars.txdataF[0][txdataF_offset],
AMP, *fp);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,0);
}
for (int i=0; i<gNB->num_pdsch_rnti; i++) {
......@@ -198,7 +198,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
}
......@@ -382,6 +382,7 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,1);
LOG_D(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d\n",frame_rx,slot_rx);
for (int i=0;i<NUMBER_OF_NR_PUCCH_MAX;i++){
......@@ -430,12 +431,12 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
(ulsch->rnti > 0)) {
// for for an active HARQ process
for (harq_pid=0;harq_pid<NR_MAX_ULSCH_HARQ_PROCESSES;harq_pid++) {
ulsch_harq = ulsch->harq_processes[harq_pid];
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
if ((ulsch_harq->status == NR_ACTIVE) &&
(ulsch_harq->frame == frame_rx) &&
(ulsch_harq->slot == slot_rx) &&
(ulsch_harq->handled == 0)){
ulsch_harq = ulsch->harq_processes[harq_pid];
AssertFatal(ulsch_harq!=NULL,"harq_pid %d is not allocated\n",harq_pid);
if ((ulsch_harq->status == NR_ACTIVE) &&
(ulsch_harq->frame == frame_rx) &&
(ulsch_harq->slot == slot_rx) &&
(ulsch_harq->handled == 0)){
#ifdef DEBUG_RXDATA
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
......@@ -450,18 +451,22 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
fclose(f);
#endif
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid);
if (no_sig) return;
}
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
nr_ulsch_procedures(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid);
break;
}
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1);
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,1);
nr_ulsch_procedures(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,0);
break;
}
}
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
}
......@@ -386,7 +386,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
start_meas(&RC.nrmac[module_idP]->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
pdcp_run(&ctxt);
//rrc_rx_tx(&ctxt, CC_id);
......@@ -505,5 +505,5 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
stop_meas(&RC.nrmac[module_idP]->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
}
......@@ -420,6 +420,7 @@ static int trx_usrp_write(openair0_device *device,
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
s->tx_count++;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,1);
// bit 3 enables gpio (for backward compatibility)
if (flags_msb&8) {
// push GPIO bits 7-9 from flags_msb
......@@ -428,6 +429,7 @@ static int trx_usrp_write(openair0_device *device,
s->usrp->set_gpio_attr("FP0", "OUT", gpio789, 0x380);
s->usrp->clear_command_time();
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,0);
if (cc>1) {
std::vector<void *> buff_ptrs;
......
......@@ -32,43 +32,50 @@ variables.frame_number_RX1_UE[63:0]
variables.trx_ts_ue[63:0]
variables.trx_ts[63:0]
variables.trx_tst[63:0]
@22
variables.frame_number_RX0_UE[63:0]
@420
variables.frame_number_RX0_UE[63:0]
@24
variables.frame_number_RX0_RU[63:0]
variables.tti_number_RX0_RU[63:0]
variables.frame_number_TX0_RU[63:0]
variables.tti_number_TX0_RU[63:0]
@28
functions.mac_schedule_dlsch
functions.macxface_eNB_dlsch_ulsch_scheduler
@24
variables.frame_number_RX0_gNB[63:0]
variables.slot_number_RX0_gNB[63:0]
variables.frame_number_TX0_gNB[63:0]
variables.slot_number_TX0_gNB[63:0]
variables.slot_number_RX1_gNB[63:0]
variables.frame_number_RX1_gNB[63:0]
@28
functions.gNB_thread_rxtx0
functions.phy_procedures_ru_feprx0
functions.phy_procedures_ru_feprx1
functions.phy_procedures_gNB_uespec_rx
functions.nr_rx_pusch
functions.nr_ulsch_procedures_rx
functions.gNB_ulsch_decoding
@24
variables.frame_number_RX1_gNB[63:0]
variables.slot_number_RX1_gNB[63:0]
variables.frame_number_TX0_RU[63:0]
variables.frame_number_TX0_gNB[63:0]
variables.frame_number_TX1_gNB[63:0]
variables.tti_number_TX0_RU[63:0]
variables.slot_number_TX0_gNB[63:0]
variables.slot_number_TX1_gNB[63:0]
@29
functions.mac_schedule_dlsch
@28
functions.macxface_gNB_dlsch_ulsch_scheduler
functions.gNB_thread_rxtx0
functions.gNB_thread_rxtx1
functions.phy_enb_pdcch_tx
functions.phy_eNB_dlsch_encoding
functions.phy_eNB_dlsch_encoding_w
functions.generate_dlsch
@420
variables.frame_number_RX0_UE[63:0]
@28
functions.phy_procedures_ru_feprx0
functions.phy_procedures_ru_feprx1
functions.phy_procedures_gNB_common_tx
functions.phy_procedures_gNB_tx
functions.gNB_pdcch_tx
functions.gNB_dlsch_encoding
functions.gNB_pdsch_codeword_scrambling
functions.gNB_pdsch_modulation
functions.phy_procedures_ru_feptx_ofdm0
functions.phy_procedures_ru_feptx_ofdm1
functions.phy_procedures_ru_feptx_ofdm2
functions.phy_procedures_ru_feptx_prec0
functions.phy_procedures_ru_feptx_prec1
functions.phy_procedures_ru_feptx_prec2
@22
variables.ru_tx_ofdm_mask[63:0]
[pattern_trace] 1
[pattern_trace] 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