diff --git a/vpi/sys_lxt.c b/vpi/sys_lxt.c index 2ceaa383e..ef1f93927 100644 --- a/vpi/sys_lxt.c +++ b/vpi/sys_lxt.c @@ -683,7 +683,7 @@ static int draw_scope(vpiHandle item) { int depth; const char *name; - char *type; +// char *type; // Not needed, see below. vpiHandle scope = vpi_handle(vpiScope, item); if (!scope) @@ -692,15 +692,20 @@ static int draw_scope(vpiHandle item) depth = 1 + draw_scope(scope); name = vpi_get_str(vpiName, scope); - switch (vpi_get(vpiType, item)) { +#if 0 /* The type information is not needed by the LXT dumper. */ + switch (vpi_get(vpiType, scope)) { case vpiNamedBegin: type = "begin"; break; case vpiTask: type = "task"; break; case vpiFunction: type = "function"; break; case vpiNamedFork: type = "fork"; break; - default: type = "module"; break; + case vpiModule: type = "module"; break; + default: + vpi_mcd_printf(1, "LXT Error: $dumpvars: Unsupported scope " + "type (%d)\n", vpi_get(vpiType, item)); + assert(0); } +#endif - /* keep in type info determination for possible future usage */ push_scope(name); return depth; diff --git a/vpi/sys_lxt2.c b/vpi/sys_lxt2.c index bdaebc885..5e28fc077 100644 --- a/vpi/sys_lxt2.c +++ b/vpi/sys_lxt2.c @@ -696,7 +696,7 @@ static int draw_scope(vpiHandle item) { int depth; const char *name; - char *type; +// char *type; // Not needed, see below. vpiHandle scope = vpi_handle(vpiScope, item); if (!scope) return 0; @@ -704,15 +704,20 @@ static int draw_scope(vpiHandle item) depth = 1 + draw_scope(scope); name = vpi_get_str(vpiName, scope); +#if 0 /* The type information is not needed by the LXT2 dumper. */ switch (vpi_get(vpiType, item)) { case vpiNamedBegin: type = "begin"; break; case vpiTask: type = "task"; break; case vpiFunction: type = "function"; break; case vpiNamedFork: type = "fork"; break; - default: type = "module"; break; + case vpiModule: type = "module"; break; + default: + vpi_mcd_printf(1, "LXT2 Error: $dumpvars: Unsupported scope " + "type (%d)\n", vpi_get(vpiType, item)); + assert(0); } +#endif - /* keep in type info determination for possible future usage */ push_scope(name); return depth; diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index a4f4d1e5d..ffb86f06b 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -682,12 +682,16 @@ static int draw_scope(vpiHandle item) depth = 1 + draw_scope(scope); name = vpi_get_str(vpiName, scope); - switch (vpi_get(vpiType, item)) { + switch (vpi_get(vpiType, scope)) { case vpiNamedBegin: type = "begin"; break; case vpiTask: type = "task"; break; case vpiFunction: type = "function"; break; case vpiNamedFork: type = "fork"; break; - default: type = "module"; break; + case vpiModule: type = "module"; break; + default: + vpi_mcd_printf(1, "VCD Error: $dumpvars: Unsupported scope " + "type (%d)\n", vpi_get(vpiType, item)); + assert(0); } fprintf(dump_file, "$scope %s %s $end\n", type, name);