From 1872652019f6979399cfa43bf40417f2363617a1 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 15 Sep 2009 17:09:24 -0700 Subject: [PATCH] Don't check the scope for array words. We do not want to check an array word scope to see if the scope was already included since a scope does not include array words. They must be explicitly specified. (cherry picked from commit 0b6bd343e8bbbf391f72d4def9c88381c2fc6961) --- vpi/sys_vcd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 904a80056..53f24e48c 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -782,10 +782,11 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name) const char *fullname; int add_var = 0; int dep; + PLI_INT32 item_type = vpi_get(vpiType, item); /* If this is a signal make sure it has not already * been included. */ - switch (vpi_get(vpiType, item)) { + switch (item_type) { case vpiIntegerVar: case vpiMemoryWord: case vpiNamedEvent: @@ -796,11 +797,13 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name) case vpiTimeVar: /* Warn if the variables scope (which includes the * variable) or the variable itself was already - * included. */ + * included. A scope does not automatically include + * memory words so do not check the scope for them. */ scname = strdup(vpi_get_str(vpiFullName, vpi_handle(vpiScope, item))); fullname = vpi_get_str(vpiFullName, item); - if (vcd_names_search(&vcd_tab, scname) || + if (((item_type != vpiMemoryWord) && + vcd_names_search(&vcd_tab, scname)) || vcd_names_search(&vcd_var, fullname)) { vpi_printf("VCD warning: skipping signal %s, " "it was previously included.\n",