Commit aa232879 authored by Wang Tsu-Han's avatar Wang Tsu-Han

adding VCD log in file

parent b1a4d4ea
...@@ -189,7 +189,17 @@ const char* eurecomVariablesNames[] = { ...@@ -189,7 +189,17 @@ const char* eurecomVariablesNames[] = {
"ue0_trx_write_ns_missing", "ue0_trx_write_ns_missing",
"enb_thread_rxtx_CPUID", "enb_thread_rxtx_CPUID",
"ru_thread_CPUID", "ru_thread_CPUID",
"ru_thread_tx_CPUID" "ru_thread_tx_CPUID",
/*signal for NR*/
"frame_number_TX0_gNB",
"frame_number_TX1_gNB",
"frame_number_RX0_gNB",
"frame_number_RX1_gNB",
"subframe_number_TX0_gNB",
"subframe_number_TX1_gNB",
"subframe_number_RX0_gNB",
"subframe_number_RX1_gNB"
}; };
const char* eurecomFunctionsNames[] = { const char* eurecomFunctionsNames[] = {
...@@ -408,6 +418,10 @@ const char* eurecomFunctionsNames[] = { ...@@ -408,6 +418,10 @@ const char* eurecomFunctionsNames[] = {
"pdcch_interleaving", "pdcch_interleaving",
"pdcch_tx", "pdcch_tx",
/*NR softmodem signal*/
"gNB_thread_rxtx0",
"gNB_thread_rxtx1"
}; };
struct vcd_module_s vcd_modules[] = { struct vcd_module_s vcd_modules[] = {
......
...@@ -167,6 +167,17 @@ typedef enum { ...@@ -167,6 +167,17 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX, VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD, VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX, VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,
/*signal for NR*/
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_GNB,
VCD_SIGNAL_DUMPER_VARIABLES_END VCD_SIGNAL_DUMPER_VARIABLES_END
} vcd_signal_dump_variables; } vcd_signal_dump_variables;
...@@ -389,6 +400,10 @@ typedef enum { ...@@ -389,6 +400,10 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_INTERLEAVING, VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_INTERLEAVING,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_TX, VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_TX,
/*NR softmodem signal*/
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1,
VCD_SIGNAL_DUMPER_FUNCTIONS_END VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions; } vcd_signal_dump_functions;
......
...@@ -41,10 +41,10 @@ typedef struct { ...@@ -41,10 +41,10 @@ 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 190 #define VCD_NUM_FUNCTIONS 192//190
/* 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 128 #define VCD_NUM_VARIABLES 136//128
/* first VCD function (to be kept up to date! see in T_messages.txt) */ /* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP) #define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
...@@ -1680,6 +1680,48 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX ...@@ -1680,6 +1680,48 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX
FORMAT = ulong,value FORMAT = ulong,value
VCD_NAME = ru_thread_tx_CPUID VCD_NAME = ru_thread_tx_CPUID
#variable for gNB
ID = VCD_VARIABLE_FRAME_NUMBER_TX0_GNB
DESC = VCD variable FRAME_NUMBER_TX0_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = frame_number_TX0_gNB
ID = VCD_VARIABLE_FRAME_NUMBER_TX1_GNB
DESC = VCD variable FRAME_NUMBER_TX1_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = frame_number_TX1_gNB
ID = VCD_VARIABLE_FRAME_NUMBER_RX0_GNB
DESC = VCD variable FRAME_NUMBER_RX0_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = frame_number_RX0_gNB
ID = VCD_VARIABLE_FRAME_NUMBER_RX1_GNB
DESC = VCD variable FRAME_NUMBER_RX1_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = frame_number_RX1_gNB
ID = VCD_VARIABLE_SUBFRAME_NUMBER_TX0_GNB
DESC = VCD variable SUBFRAME_NUMBER_TX0_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = subframe_number_TX0_gNB
ID = VCD_VARIABLE_SUBFRAME_NUMBER_TX1_GNB
DESC = VCD variable SUBFRAME_NUMBER_TX1_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = subframe_number_TX1_gNB
ID = VCD_VARIABLE_SUBFRAME_NUMBER_RX0_GNB
DESC = VCD variable SUBFRAME_NUMBER_RX0_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = subframe_number_RX0_gNB
ID = VCD_VARIABLE_SUBFRAME_NUMBER_RX1_GNB
DESC = VCD variable SUBFRAME_NUMBER_RX1_GNB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = subframe_number_RX1_gNB
#functions #functions
ID = VCD_FUNCTION_RT_SLEEP ID = VCD_FUNCTION_RT_SLEEP
...@@ -2637,3 +2679,15 @@ ID = VCD_FUNCTION_PDCCH_TX ...@@ -2637,3 +2679,15 @@ ID = VCD_FUNCTION_PDCCH_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = pdcch_tx VCD_NAME = pdcch_tx
#function for gNB
ID = VCD_FUNCTION_gNB_PROC_RXTX0
DESC = VCD function gNB_PROC_RXTX0
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_thread_rxtx0
ID = VCD_FUNCTION_gNB_PROC_RXTX1
DESC = VCD function gNB_PROC_RXTX1
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = gNB_thread_rxtx1
...@@ -3004,8 +3004,10 @@ int RCconfig_nr_parallel(void) { ...@@ -3004,8 +3004,10 @@ int RCconfig_nr_parallel(void) {
} }
if(parallel_config == NULL) set_parallel_conf(parallel_conf); if(parallel_config == NULL) set_parallel_conf(parallel_conf);
if(parallel_config == NULL)printf("~~~~~~~~~~~~~~~~~~~~parallel_conf = %s\n",parallel_conf);
if(worker_config == NULL) set_worker_conf(worker_conf); if(worker_config == NULL) set_worker_conf(worker_conf);
if(worker_config == NULL)printf("~~~~~~~~~~~~~~~~~~~~worker_conf = %s\n",worker_conf);
return 0; return 0;
} }
......
...@@ -259,6 +259,15 @@ RUs = ( ...@@ -259,6 +259,15 @@ RUs = (
} }
); );
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_DISABLE";
}
);
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
......
...@@ -291,6 +291,8 @@ static void* gNB_L1_thread_tx(void* param) { ...@@ -291,6 +291,8 @@ static void* gNB_L1_thread_tx(void* param) {
gNB_L1_rxtx_proc_t *proc = &gNB_proc->L1_proc_tx; gNB_L1_rxtx_proc_t *proc = &gNB_proc->L1_proc_tx;
PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id]; PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
printf("~~~~~~~~~~~~~~~~~~~~gNB_L1_thread_tx is created\n");
char thread_name[100]; char thread_name[100];
sprintf(thread_name,"TXnp4_%d\n",&gNB->proc.L1_proc == proc ? 0 : 1); sprintf(thread_name,"TXnp4_%d\n",&gNB->proc.L1_proc == proc ? 0 : 1);
thread_top_init(thread_name,1,470000,500000,500000); thread_top_init(thread_name,1,470000,500000,500000);
...@@ -299,8 +301,9 @@ static void* gNB_L1_thread_tx(void* param) { ...@@ -299,8 +301,9 @@ static void* gNB_L1_thread_tx(void* param) {
while (!oai_exit) { while (!oai_exit) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1, 0 );
if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break; if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1, 1 );
if (oai_exit) break; if (oai_exit) break;
// ***************************************** // *****************************************
// TX processing for subframe n+4 // TX processing for subframe n+4
...@@ -308,6 +311,11 @@ static void* gNB_L1_thread_tx(void* param) { ...@@ -308,6 +311,11 @@ static void* gNB_L1_thread_tx(void* param) {
// (may be relaxed in the future for performance reasons) // (may be relaxed in the future for performance reasons)
// ***************************************** // *****************************************
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_GNB,proc->subframe_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_GNB,proc->subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_GNB,proc->frame_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_GNB,proc->frame_rx);
phy_procedures_gNB_TX(gNB, proc, 1); phy_procedures_gNB_TX(gNB, proc, 1);
pthread_mutex_lock( &proc->mutex ); pthread_mutex_lock( &proc->mutex );
...@@ -337,6 +345,8 @@ static void* gNB_L1_thread( void* param ) { ...@@ -337,6 +345,8 @@ static void* gNB_L1_thread( void* param ) {
gNB_L1_rxtx_proc_t *proc = &gNB_proc->L1_proc; gNB_L1_rxtx_proc_t *proc = &gNB_proc->L1_proc;
PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id]; PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
printf("~~~~~~~~~~~~~~~~~~~~gNB_L1_thread_tx is created\n");
char thread_name[100]; char thread_name[100];
...@@ -349,8 +359,14 @@ static void* gNB_L1_thread( void* param ) { ...@@ -349,8 +359,14 @@ static void* gNB_L1_thread( void* param ) {
while (!oai_exit) { while (!oai_exit) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 );
if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break; if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 1 );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_GNB,proc->subframe_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_GNB,proc->subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_GNB,proc->frame_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_GNB,proc->frame_rx);
if (oai_exit) break; if (oai_exit) break;
...@@ -769,7 +785,9 @@ void init_gNB_proc(int inst) { ...@@ -769,7 +785,9 @@ void init_gNB_proc(int inst) {
LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag); LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag);
printf("~~~~~~~~~~~~~~~~~~~thread_parallel = %d",get_thread_parallel_conf());
if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) {
printf("~~~~~~~~~~~~~~~~~~~~~~~creating gNB_L1_thread and gNB_L1_thread_tx \n");
pthread_create( &L1_proc->pthread, attr0, gNB_L1_thread, proc ); pthread_create( &L1_proc->pthread, attr0, gNB_L1_thread, proc );
pthread_create( &L1_proc_tx->pthread, attr1, gNB_L1_thread_tx, proc); pthread_create( &L1_proc_tx->pthread, attr1, gNB_L1_thread_tx, proc);
} }
...@@ -1046,6 +1064,7 @@ void init_eNB_afterRU(void) { ...@@ -1046,6 +1064,7 @@ void init_eNB_afterRU(void) {
//init_transport(gNB); //init_transport(gNB);
//init_precoding_weights(RC.gNB[inst][CC_id]); //init_precoding_weights(RC.gNB[inst][CC_id]);
} }
printf("~~~~~~~~~~~~~~~~~~~~~~~start init gNB proc\n");
init_gNB_proc(inst); init_gNB_proc(inst);
} }
......
...@@ -1408,7 +1408,6 @@ static void* ru_thread_tx( void* param ) { ...@@ -1408,7 +1408,6 @@ static void* ru_thread_tx( void* param ) {
printf( "ru_thread_tx ready\n"); printf( "ru_thread_tx ready\n");
while (!oai_exit) { while (!oai_exit) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,sched_getcpu());
if (oai_exit) break; if (oai_exit) break;
...@@ -1430,7 +1429,7 @@ static void* ru_thread_tx( void* param ) { ...@@ -1430,7 +1429,7 @@ static void* ru_thread_tx( void* param ) {
} }
else else
{ {
if(proc->frame_tx == print_frame) /*if(proc->frame_tx == print_frame)
{ {
for (i=0; i<ru->nb_tx; i++) for (i=0; i<ru->nb_tx; i++)
{ {
...@@ -1454,7 +1453,7 @@ static void* ru_thread_tx( void* param ) { ...@@ -1454,7 +1453,7 @@ static void* ru_thread_tx( void* param ) {
} }
}//if(proc->subframe_tx == 9) }//if(proc->subframe_tx == 9)
}//for (i=0; i<ru->nb_tx; i++) }//for (i=0; i<ru->nb_tx; i++)
}//if(proc->frame_tx == print_frame) }//if(proc->frame_tx == print_frame)*/
}//else emulate_rf }//else emulate_rf
release_thread(&proc->mutex_gNBs,&proc->instance_cnt_gNBs,"ru_thread_tx"); release_thread(&proc->mutex_gNBs,&proc->instance_cnt_gNBs,"ru_thread_tx");
for(i = 0; i<ru->num_gNB; i++) for(i = 0; i<ru->num_gNB; i++)
......
...@@ -179,8 +179,8 @@ ...@@ -179,8 +179,8 @@
{"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}, \
{"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}, \
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \ {"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"fepw" , CONFIG_HLP_FEPW, PARAMFLAG_BOOL, iptr:&fepw, defintval:0, TYPE_INT, 0}, \ {"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 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