Commit fc2bbeef authored by Khalid Ahmed's avatar Khalid Ahmed Committed by Thomas Schlichter

Adding VCD liberaries to nr-softmodem/nr-uesoftmodem

parent 69abec3d
...@@ -244,6 +244,7 @@ add_boolean_option(TEST_OMG False "???") ...@@ -244,6 +244,7 @@ add_boolean_option(TEST_OMG False "???")
add_boolean_option(DEBUG_OMG False "???") add_boolean_option(DEBUG_OMG False "???")
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status") add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ) add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" )
add_boolean_option(ENABLE_VCD True "always true now, time measurements of proc calls and var displays")
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs") add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
...@@ -1032,7 +1033,7 @@ set(UTIL_SRC ...@@ -1032,7 +1033,7 @@ set(UTIL_SRC
${OPENAIR2_DIR}/UTIL/LISTS/list.c ${OPENAIR2_DIR}/UTIL/LISTS/list.c
${OPENAIR2_DIR}/UTIL/LISTS/list2.c ${OPENAIR2_DIR}/UTIL/LISTS/list2.c
${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/utils/LOG/log.c
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c ${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/MATH/oml.c ${OPENAIR2_DIR}/UTIL/MATH/oml.c
# ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c # ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
...@@ -2537,6 +2538,7 @@ add_executable(nr-uesoftmodem ...@@ -2537,6 +2538,7 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE_NR} ${XFORMS_SOURCE_NR}
${T_SOURCE} ${T_SOURCE}
${UTIL_SRC}
${CONFIG_SOURCES} ${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
) )
......
...@@ -343,6 +343,7 @@ const char* eurecomFunctionsNames[] = { ...@@ -343,6 +343,7 @@ const char* eurecomFunctionsNames[] = {
"phy_procedures_ue_tx", "phy_procedures_ue_tx",
"phy_procedures_ue_rx", "phy_procedures_ue_rx",
"phy_procedures_ue_tx_ulsch_uespec", "phy_procedures_ue_tx_ulsch_uespec",
"phy_procedures_nr_ue_tx_ulsch_uespec",
"phy_procedures_ue_tx_pucch", "phy_procedures_ue_tx_pucch",
"phy_procedures_ue_tx_ulsch_common", "phy_procedures_ue_tx_ulsch_common",
"phy_procedures_ue_tx_prach", "phy_procedures_ue_tx_prach",
......
...@@ -324,6 +324,7 @@ typedef enum { ...@@ -324,6 +324,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_NR_UE_TX_ULSCH_UESPEC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH,
...@@ -549,12 +550,20 @@ extern int ouput_vcd; ...@@ -549,12 +550,20 @@ extern int ouput_vcd;
#include "T.h" #include "T.h"
#define VCD_SIGNAL_DUMPER_INIT(x) /* nothing */
#define VCD_SIGNAL_DUMPER_CLOSE() /* nothing */
#define VCD_SIGNAL_DUMPER_CREATE_HEADER() /* nothing */
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val) T_VCD_VARIABLE(var, val) #define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val) T_VCD_VARIABLE(var, val)
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val) T_VCD_FUNCTION(var, val) #define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val) T_VCD_FUNCTION(var, val)
#else
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val) #else /* T_TRACER */
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val)
#define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT) vcd_signal_dumper_init(aRgUmEnT)
#define VCD_SIGNAL_DUMPER_CLOSE() vcd_signal_dumper_close()
#define VCD_SIGNAL_DUMPER_CREATE_HEADER() vcd_signal_dumper_create_header()
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_variable_by_name(vAr1,vAr2)
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_function_by_name(vAr1,vAr2)
#endif /* T_TRACER */ #endif /* T_TRACER */
......
...@@ -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 (231) #define VCD_NUM_FUNCTIONS (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)
......
...@@ -2493,6 +2493,11 @@ ID = VCD_FUNCTION_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC ...@@ -2493,6 +2493,11 @@ ID = VCD_FUNCTION_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = phy_procedures_ue_tx_ulsch_uespec VCD_NAME = phy_procedures_ue_tx_ulsch_uespec
ID = VCD_FUNCTION_PHY_PROCEDURES_NR_UE_TX_ULSCH_UESPEC
DESC = VCD function PHY_PROCEDURES_NR_UE_TX_ULSCH_UESPEC
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_procedures_nr_ue_tx_ulsch_uespec
ID = VCD_FUNCTION_PHY_PROCEDURES_UE_TX_PUCCH ID = VCD_FUNCTION_PHY_PROCEDURES_UE_TX_PUCCH
DESC = VCD function PHY_PROCEDURES_UE_TX_PUCCH DESC = VCD function PHY_PROCEDURES_UE_TX_PUCCH
GROUP = ALL:VCD:UE:VCD_FUNCTION GROUP = ALL:VCD:UE:VCD_FUNCTION
......
...@@ -121,6 +121,7 @@ int threequarter_fs=0; ...@@ -121,6 +121,7 @@ int threequarter_fs=0;
uint32_t downlink_frequency[MAX_NUM_CCs][4]; uint32_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern int16_t nr_dlsch_demod_shift; extern int16_t nr_dlsch_demod_shift;
int UE_scan = 0; int UE_scan = 0;
...@@ -398,7 +399,7 @@ int16_t dlsch_demod_shift; ...@@ -398,7 +399,7 @@ int16_t dlsch_demod_shift;
static void get_options(void) { static void get_options(void) {
int CC_id; int CC_id;
int tddflag=0, nonbiotflag; int tddflag=0, nonbiotflag, vcdflag=0;
char *loopfile=NULL; char *loopfile=NULL;
int dumpframe=0; int dumpframe=0;
uint32_t online_log_messages; uint32_t online_log_messages;
...@@ -467,6 +468,9 @@ static void get_options(void) { ...@@ -467,6 +468,9 @@ static void get_options(void) {
frame_parms[CC_id]->frame_type = TDD; frame_parms[CC_id]->frame_type = TDD;
} }
if (vcdflag > 0)
ouput_vcd = 1;
/*if (frame_parms[0]->N_RB_DL !=0) { /*if (frame_parms[0]->N_RB_DL !=0) {
if ( frame_parms[0]->N_RB_DL < 6 ) { if ( frame_parms[0]->N_RB_DL < 6 ) {
frame_parms[0]->N_RB_DL = 6; frame_parms[0]->N_RB_DL = 6;
...@@ -704,6 +708,10 @@ int main( int argc, char **argv ) { ...@@ -704,6 +708,10 @@ int main( int argc, char **argv ) {
LOG_E(OPT,"failed to run OPT \n"); LOG_E(OPT,"failed to run OPT \n");
} }
if (ouput_vcd) {
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
}
#ifdef PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK
netlink_init(); netlink_init();
#if defined(PDCP_USE_NETLINK_QUEUES) #if defined(PDCP_USE_NETLINK_QUEUES)
...@@ -799,5 +807,8 @@ int main( int argc, char **argv ) { ...@@ -799,5 +807,8 @@ int main( int argc, char **argv ) {
while(true) while(true)
sleep(3600); sleep(3600);
if (ouput_vcd)
vcd_signal_dumper_close();
return 0; return 0;
} }
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \ {"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \ {"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/modulation_common.h" #include "PHY/MODULATION/modulation_common.h"
#include "common/utils/assertions.h" #include "common/utils/assertions.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h" #include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
#include "PHY/defs_nr_common.h" #include "PHY/defs_nr_common.h"
......
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