Commit 309ca066 authored by Cedric Roux's avatar Cedric Roux

fix vcd

several problems were present:
- there was no comma after "ue0_trx_write_ns_missing" in the array
  eurecomVariablesNames;
  comma was put, and also commas for the last element in the array,
  which doesn't hurt and will prevent future problems
- bad order of values in eurecomVariablesNames, which
  was different from the enum vcd_signal_dump_variables;
  order was checked and fixed
- strange/wrong use of VCD_SIGNAL_DUMPER_MODULE_END/LAST;
  the whole logic was removed/simplified
parent f7466b0e
......@@ -175,16 +175,16 @@ const char* eurecomVariablesNames[] = {
"ue0_SFN5",
"ue0_SFN6",
"ue0_SFN7",
"send_if4_symbol",
"recv_if4_symbol",
"send_if5_pkt_id",
"recv_if5_pkt_id",
"ue_pdcp_flush_size",
"ue_pdcp_flush_err",
"ue0_trx_read_ns",
"ue0_trx_write_ns",
"ue0_trx_read_ns_missing",
"ue0_trx_write_ns_missing"
"send_if4_symbol",
"recv_if4_symbol",
"send_if5_pkt_id",
"recv_if5_pkt_id"
"ue0_trx_write_ns_missing",
};
const char* eurecomFunctionsNames[] = {
......@@ -382,10 +382,10 @@ const char* eurecomFunctionsNames[] = {
"recv_if5",
"compress_if",
"decompress_if"
"decompress_if",
};
struct vcd_module_s vcd_modules[VCD_SIGNAL_DUMPER_MODULE_END] = {
struct vcd_module_s vcd_modules[] = {
{ "variables", VCD_SIGNAL_DUMPER_VARIABLES_END, eurecomVariablesNames, VCD_WIRE, 64 },
{ "functions", VCD_SIGNAL_DUMPER_FUNCTIONS_END, eurecomFunctionsNames, VCD_WIRE, 1 },
// { "ue_procedures_functions", VCD_SIGNAL_DUMPER_UE_PROCEDURES_FUNCTIONS_END, eurecomUEFunctionsNames, VCD_WIRE, 1 },
......@@ -686,7 +686,7 @@ void vcd_signal_dumper_create_header(void)
fprintf(vcd_fd, "$timescale 1 ns $end\n");
/* Initialize each module definition */
for(i = 0; i < VCD_SIGNAL_DUMPER_MODULE_END; i++) {
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
struct vcd_module_s *module;
module = &vcd_modules[i];
fprintf(vcd_fd, "$scope module %s $end\n", module->name);
......@@ -711,7 +711,7 @@ void vcd_signal_dumper_create_header(void)
/* Init variables and functions to 0 */
fprintf(vcd_fd, "$dumpvars\n");
for(i = 0; i < VCD_SIGNAL_DUMPER_MODULE_END; i++) {
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
struct vcd_module_s *module;
module = &vcd_modules[i];
......
......@@ -157,8 +157,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS,
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING,
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING,
VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END
} vcd_signal_dump_variables;
typedef enum {
......@@ -361,8 +360,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
} vcd_signal_dump_functions;
typedef enum {
......@@ -371,8 +369,6 @@ typedef enum {
VCD_SIGNAL_DUMPER_MODULE_VARIABLES,
VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS,
// VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
VCD_SIGNAL_DUMPER_MODULE_LAST,
VCD_SIGNAL_DUMPER_MODULE_END = VCD_SIGNAL_DUMPER_MODULE_LAST,
} vcd_signal_dumper_modules;
typedef enum {
......
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