Commit da524268 authored by Rakesh's avatar Rakesh

Adding VCD traces in gNB

parent c0ca7038
...@@ -503,7 +503,28 @@ const char* eurecomFunctionsNames[] = { ...@@ -503,7 +503,28 @@ const char* eurecomFunctionsNames[] = {
"pdcch_tx", "pdcch_tx",
/*NR softmodem signal*/ /*NR softmodem signal*/
"gNB_thread_rxtx0", "gNB_thread_rxtx0",
"gNB_thread_rxtx1" "gNB_thread_rxtx1",
"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"
}; };
struct vcd_module_s vcd_modules[] = { struct vcd_module_s vcd_modules[] = {
......
...@@ -496,6 +496,29 @@ typedef enum { ...@@ -496,6 +496,29 @@ typedef enum {
/*NR softmodem signal*/ /*NR softmodem signal*/
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1, VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1,
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_END VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions; } vcd_signal_dump_functions;
......
...@@ -73,7 +73,7 @@ typedef struct { ...@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t; } T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (237)//(232) #define VCD_NUM_FUNCTIONS (256)//(232)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (185) #define VCD_NUM_VARIABLES (185)
......
...@@ -3240,3 +3240,101 @@ ID = VCD_FUNCTION_gNB_PROC_RXTX1 ...@@ -3240,3 +3240,101 @@ ID = VCD_FUNCTION_gNB_PROC_RXTX1
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = gNB_thread_rxtx1 VCD_NAME = gNB_thread_rxtx1
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
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "nr_dci.h" #include "nr_dci.h"
#include "nr_sch_dmrs.h" #include "nr_sch_dmrs.h"
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_DLSCH //#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING //#define DEBUG_DLSCH_MAPPING
...@@ -47,7 +48,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in, ...@@ -47,7 +48,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
uint8_t reset, b_idx; uint8_t reset, b_idx;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
reset = 1; reset = 1;
x2 = (n_RNTI<<15) + (q<<14) + Nid; x2 = (n_RNTI<<15) + (q<<14) + Nid;
...@@ -62,7 +63,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in, ...@@ -62,7 +63,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx; *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); //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);
} }
...@@ -138,11 +139,13 @@ for (int i=0; i<encoded_length>>8; i++) { ...@@ -138,11 +139,13 @@ for (int i=0; i<encoded_length>>8; i++) {
/// Modulation /// Modulation
start_meas(dlsch_modulation_stats); 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->nb_codewords; q++) for (int q=0; q<rel15->nb_codewords; q++)
nr_modulation(scrambled_output[q], nr_modulation(scrambled_output[q],
encoded_length, encoded_length,
Qm, Qm,
mod_symbs[q]); mod_symbs[q]);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0);
stop_meas(dlsch_modulation_stats); stop_meas(dlsch_modulation_stats);
#ifdef DEBUG_DLSCH #ifdef DEBUG_DLSCH
printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_symbols); printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_symbols);
......
...@@ -302,7 +302,7 @@ int nr_dlsch_encoding(unsigned char *a,int frame, ...@@ -302,7 +302,7 @@ int nr_dlsch_encoding(unsigned char *a,int frame,
} }
*/ */
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.transport_block_size; A = rel15.transport_block_size;
...@@ -462,7 +462,7 @@ int nr_dlsch_encoding(unsigned char *a,int frame, ...@@ -462,7 +462,7 @@ int nr_dlsch_encoding(unsigned char *a,int frame,
r_offset += E; 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; return 0;
} }
...@@ -349,6 +349,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -349,6 +349,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
// harq_process->trials[nfapi_ulsch_pdu_rel15->round]++; // 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 = nr_compute_tbs(mcs, nb_rb, number_symbols, nb_re_dmrs, length_dmrs, n_layers); harq_process->TBS = nr_compute_tbs(mcs, nb_rb, number_symbols, nb_re_dmrs, length_dmrs, n_layers);
A = harq_process->TBS; A = harq_process->TBS;
...@@ -717,6 +718,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -717,6 +718,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
} }
ulsch->last_iteration_cnt = ret; ulsch->last_iteration_cnt = ret;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
return(ret); return(ret);
} }
...@@ -222,6 +222,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode, ...@@ -222,6 +222,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode,
// FK: added N_RB_DL paramter here as this function shares code with the gNB where it is needed. We should rewrite this function for the UE. // FK: added N_RB_DL paramter here as this function shares code with the gNB where it is needed. We should rewrite this function for the UE.
nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,0); nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,0);
LOG_D(PHY,"nr_initial sync ue RB_DL %d\n", fp->N_RB_DL); LOG_D(PHY,"nr_initial sync ue RB_DL %d\n", fp->N_RB_DL);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_IN);
...@@ -480,6 +481,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode, ...@@ -480,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"); // exit_fun("debug exit");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);
return ret; return ret;
} }
...@@ -246,7 +246,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -246,7 +246,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 nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs); LOG_D(PHY,"ulsch coding nb_rb %d nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs);
...@@ -290,6 +290,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -290,6 +290,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////////////////// b---->| block segmentation |---->c ///////////////////////// ///////////////////////// b---->| block segmentation |---->c /////////////////////////
/////////// ///////////
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION, VCD_FUNCTION_IN);
nr_segmentation(harq_process->b, nr_segmentation(harq_process->b,
harq_process->c, harq_process->c,
harq_process->B, harq_process->B,
...@@ -297,6 +298,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -297,6 +298,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
&harq_process->K, &harq_process->K,
pz, pz,
&harq_process->F); &harq_process->F);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION, VCD_FUNCTION_OUT);
F = harq_process->F; F = harq_process->F;
Coderate = (float) A /(float) G; Coderate = (float) A /(float) G;
...@@ -352,8 +354,12 @@ opp_enabled=0; ...@@ -352,8 +354,12 @@ opp_enabled=0;
} }
printf("\n");*/ printf("\n");*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_IN);
ldpc_encoder_optim_8seg(harq_process->c,harq_process->d,Kr,BG,harq_process->C,NULL,NULL,NULL,NULL); ldpc_encoder_optim_8seg(harq_process->c,harq_process->d,Kr,BG,harq_process->C,NULL,NULL,NULL,NULL);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_OUT);
//stop_meas(te_stats); //stop_meas(te_stats);
//printf("end ldpc encoder -- output\n"); //printf("end ldpc encoder -- output\n");
#ifdef DEBUG_DLSCH_CODING #ifdef DEBUG_DLSCH_CODING
...@@ -394,6 +400,7 @@ opp_enabled=0; ...@@ -394,6 +400,7 @@ opp_enabled=0;
E = nr_get_E(G, harq_process->C, mod_order, harq_process->Nl, r); E = nr_get_E(G, harq_process->C, mod_order, harq_process->Nl, r);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
nr_rate_matching_ldpc(Ilbrm, nr_rate_matching_ldpc(Ilbrm,
Tbslbrm, Tbslbrm,
BG, BG,
...@@ -403,6 +410,7 @@ opp_enabled=0; ...@@ -403,6 +410,7 @@ opp_enabled=0;
harq_process->C, harq_process->C,
harq_process->rvidx, harq_process->rvidx,
E); E);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_OUT);
...@@ -421,10 +429,14 @@ opp_enabled=0; ...@@ -421,10 +429,14 @@ opp_enabled=0;
//stop_meas(rm_stats); //stop_meas(rm_stats);
//start_meas(i_stats); //start_meas(i_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INTERLEAVING_LDPC, VCD_FUNCTION_IN);
nr_interleaving_ldpc(E, nr_interleaving_ldpc(E,
mod_order, mod_order,
harq_process->e+r_offset, harq_process->e+r_offset,
harq_process->f+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); //stop_meas(i_stats);
...@@ -445,7 +457,7 @@ opp_enabled=0; ...@@ -445,7 +457,7 @@ opp_enabled=0;
memcpy(ulsch->g,harq_process->f,G); // g is the concatenated code block 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); return(0);
} }
...@@ -669,6 +669,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) ...@@ -669,6 +669,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
int **rxdata = NULL; int **rxdata = NULL;
int fo_flag = PHY_vars_UE->UE_fo_compensation; // flag to enable freq offset estimation and compensation 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 #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); LOG_M("rxdata0_rand.m","rxd0_rand", &PHY_vars_UE->common_vars.rxdata[0][0], frame_parms->samples_per_frame, 1, 1);
...@@ -707,6 +708,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) ...@@ -707,6 +708,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
#endif #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, synchro_position = pss_search_time_nr(rxdata,
frame_parms, frame_parms,
fo_flag, fo_flag,
...@@ -714,6 +716,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) ...@@ -714,6 +716,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.eNb_id,
(int *)&PHY_vars_UE->common_vars.freq_offset); (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 #if TEST_SYNCHRO_TIMING_PSS
...@@ -746,6 +749,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) ...@@ -746,6 +749,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
} }
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, VCD_FUNCTION_OUT);
return synchro_position; return synchro_position;
} }
......
...@@ -162,7 +162,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -162,7 +162,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_slot_select(cfg,slot)==SF_UL)) return; if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_slot_select(cfg,slot)==SF_UL)) 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); if (do_meas==1) start_meas(&gNB->phy_proc_tx);
...@@ -171,12 +171,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -171,12 +171,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
memset(gNB->common_vars.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t)); memset(gNB->common_vars.txdataF[aa],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 (nfapi_mode == 0 || nfapi_mode == 1) {
if (!(frame%ssb_frame_periodicity)) // generate SSB only for given frames according to SSB periodicity if (!(frame%ssb_frame_periodicity)) // generate SSB only for given frames according to SSB periodicity
nr_common_signal_procedures(gNB,frame, slot); 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);
num_dci = gNB->pdcch_vars.num_dci; num_dci = gNB->pdcch_vars.num_dci;
num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti; num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti;
...@@ -185,12 +185,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -185,12 +185,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
LOG_D(PHY, "[gNB %d] Frame %d slot %d \ LOG_D(PHY, "[gNB %d] Frame %d slot %d \
Calling nr_generate_dci_top (number of DCI %d)\n", gNB->Mod_id, frame, slot, num_dci); Calling nr_generate_dci_top (number of DCI %d)\n", gNB->Mod_id, frame, slot, num_dci);
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_vars.dci_alloc[i], nr_generate_dci_top(gNB->pdcch_vars.dci_alloc[i],
gNB->nr_gold_pdcch_dmrs[slot], gNB->nr_gold_pdcch_dmrs[slot],
gNB->common_vars.txdataF[0], gNB->common_vars.txdataF[0],
AMP, *fp, *cfg); AMP, *fp, *cfg);
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<num_pdsch_rnti; i++) { for (int i=0; i<num_pdsch_rnti; i++) {
...@@ -207,7 +207,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -207,7 +207,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_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);
} }
...@@ -352,6 +352,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -352,6 +352,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
nfapi_nr_ul_tti_request_t *UL_tti_req = &gNB->UL_tti_req; nfapi_nr_ul_tti_request_t *UL_tti_req = &gNB->UL_tti_req;
int num_pusch_pdu = UL_tti_req->n_pdus; int num_pusch_pdu = UL_tti_req->n_pdus;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,1);
LOG_I(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d, num_pusch_pdu %d\n",frame_rx,slot_rx,num_pusch_pdu); LOG_I(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d, num_pusch_pdu %d\n",frame_rx,slot_rx,num_pusch_pdu);
for (int i = 0; i < num_pusch_pdu; i++) { for (int i = 0; i < num_pusch_pdu; i++) {
...@@ -370,11 +371,17 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -370,11 +371,17 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
uint8_t symbol_end = symbol_start + pusch_pdu->nr_of_symbols; uint8_t symbol_end = symbol_start + pusch_pdu->nr_of_symbols;
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1);
nr_rx_pusch(gNB, UE_id, frame_rx, slot_rx, symbol, harq_pid); nr_rx_pusch(gNB, UE_id, frame_rx, slot_rx, symbol, harq_pid);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,1);
nr_ulsch_procedures(gNB, frame_rx, slot_rx, UE_id, harq_pid); nr_ulsch_procedures(gNB, frame_rx, slot_rx, UE_id, harq_pid);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,0);
nr_fill_rx_indication(gNB, frame_rx, slot_rx, UE_id, harq_pid); // indicate SDU to MAC nr_fill_rx_indication(gNB, frame_rx, slot_rx, UE_id, harq_pid); // indicate SDU to MAC
} }
} }
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
} }
...@@ -309,7 +309,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -309,7 +309,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
NR_COMMON_channels_t *cc = RC.nrmac[module_idP]->common_channels; NR_COMMON_channels_t *cc = RC.nrmac[module_idP]->common_channels;
start_meas(&RC.nrmac[module_idP]->eNB_scheduler); 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);
RC.nrmac[module_idP]->frame = frame_rxP; RC.nrmac[module_idP]->frame = frame_rxP;
RC.nrmac[module_idP]->slot = slot_rxP; RC.nrmac[module_idP]->slot = slot_rxP;
...@@ -387,5 +387,5 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -387,5 +387,5 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
stop_meas(&RC.nrmac[module_idP]->eNB_scheduler); 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);
} }
[*] [*]
[*] GTKWave Analyzer v3.3.61 (w)1999-2014 BSI [*] GTKWave Analyzer v3.3.86 (w)1999-2017 BSI
[*] Sat May 18 17:25:11 2019 [*] Mon Oct 14 17:19:14 2019
[*] [*]
[dumpfile] "/tmp/openair_dump_gNB40.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Sat May 18 17:11:31 2019" [dumpfile_mtime] "Mon Oct 14 12:36:08 2019"
[dumpfile_size] 53148516 [dumpfile_size] 655399
[savefile] "/home/caracal/raymond/openairinterface5g/targets/RT/USER/gNB_usrp.gtkw" [savefile] "/home/rakesh/nr_fapi_for_push/openairinterface5g/targets/RT/USER/gNB_usrp.gtkw"
[timestart] 11552775390 [timestart] 0
[size] 1840 795 [size] 1840 795
[pos] -1 -1 [pos] -1 -1
*-13.848083 11552814436 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 *-30.415869 243000000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 386 [sst_width] 386
[signals_width] 344 [signals_width] 344
[sst_expanded] 1 [sst_expanded] 1
...@@ -24,44 +24,53 @@ variables.frame_number_TX1_UE[63:0] ...@@ -24,44 +24,53 @@ variables.frame_number_TX1_UE[63:0]
functions.ue_gain_control functions.ue_gain_control
@420 @420
variables.frame_number_RX1_UE[63:0] variables.frame_number_RX1_UE[63:0]
@25
variables.trx_ts_ue[63:0]
@24 @24
variables.trx_ts_ue[63:0]
variables.trx_ts[63:0] variables.trx_ts[63:0]
variables.trx_tst[63:0] variables.trx_tst[63:0]
@22
variables.frame_number_RX0_UE[63:0]
@24
variables.frame_number_RX0_RU[63:0] variables.frame_number_RX0_RU[63:0]
variables.tti_number_RX0_RU[63:0] variables.tti_number_RX0_RU[63:0]
variables.frame_number_TX0_RU[63:0] variables.frame_number_TX0_RU[63:0]
variables.tti_number_TX0_RU[63:0] variables.tti_number_TX0_RU[63:0]
@28 @28
functions.mac_schedule_dlsch functions.mac_schedule_dlsch
functions.macxface_eNB_dlsch_ulsch_scheduler functions.macxface_gNB_dlsch_ulsch_scheduler
functions.gNB_thread_rxtx1
functions.phy_eNB_dlsch_encoding_w
functions.generate_dlsch
functions.phy_procedures_ru_feprx0
functions.phy_procedures_ru_feprx1
functions.phy_procedures_ru_feptx_ofdm0
functions.phy_procedures_ru_feptx_ofdm1
functions.phy_procedures_ru_feptx_prec0
functions.phy_procedures_ru_feptx_prec1
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_gNB_uespec_rx
functions.nr_rx_pusch
functions.nr_ulsch_procedures_rx
functions.gNB_ulsch_decoding
@24 @24
variables.frame_number_RX0_gNB[63:0] variables.frame_number_RX0_gNB[63:0]
variables.slot_number_RX0_gNB[63:0] variables.frame_number_RX1_gNB[63:0]
variables.frame_number_TX0_gNB[63:0] variables.frame_number_TX0_gNB[63:0]
@421
variables.frame_number_RX0_UE[63:0]
@24
variables.slot_number_RX0_gNB[63:0]
variables.slot_number_TX0_gNB[63:0] variables.slot_number_TX0_gNB[63:0]
@28 @28
functions.gNB_thread_rxtx0 functions.gNB_thread_rxtx0
@24 @24
variables.frame_number_RX1_gNB[63:0]
variables.slot_number_RX1_gNB[63:0] variables.slot_number_RX1_gNB[63:0]
variables.frame_number_TX1_gNB[63:0] variables.frame_number_TX1_gNB[63:0]
variables.slot_number_TX1_gNB[63:0] variables.slot_number_TX1_gNB[63:0]
@28
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_ru_feptx_ofdm0
functions.phy_procedures_ru_feptx_ofdm1
functions.phy_procedures_ru_feptx_prec0
functions.phy_procedures_ru_feptx_prec1
[pattern_trace] 1 [pattern_trace] 1
[pattern_trace] 0 [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