Add a warning message for some array words when dumping.

When dumping an array word the name is implicitly converted to
an escaped identifier. If this implicit name conflicts with an
explicitly created escaped identifier this patch will print a
warning message warning that the array word will conflict with
an escaped identifier.
This commit is contained in:
Cary R 2009-04-28 14:57:46 -07:00 committed by Stephen Williams
parent d25f689f55
commit 80f74d0d24
3 changed files with 27 additions and 0 deletions

View File

@ -563,6 +563,15 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
case vpiTimeVar:
case vpiReg: type = "reg"; }
/* An array word is implicitly escaped so look for an
* escaped identifier that this could conflict with. */
if (vpi_get(vpiType, item) == vpiMemoryWord &&
vpi_handle_by_name(vpi_get_str(vpiFullName, item), 0)) {
vpi_printf("LXT warning: dumping array word %s will "
"conflict with an escaped identifier.\n",
vpi_get_str(vpiFullName, item));
}
if (skip || vpi_get(vpiAutomatic, item)) break;
name = vpi_get_str(vpiName, item);

View File

@ -575,6 +575,15 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
case vpiTimeVar:
case vpiReg: type = "reg"; }
/* An array word is implicitly escaped so look for an
* escaped identifier that this could conflict with. */
if (vpi_get(vpiType, item) == vpiMemoryWord &&
vpi_handle_by_name(vpi_get_str(vpiFullName, item), 0)) {
vpi_printf("LXT2 warning: dumping array word %s will "
"conflict with an escaped identifier.\n",
vpi_get_str(vpiFullName, item));
}
if (skip || vpi_get(vpiAutomatic, item)) break;
name = vpi_get_str(vpiName, item);

View File

@ -539,6 +539,15 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
break;
}
/* An array word is implicitly escaped so look for an
* escaped identifier that this could conflict with. */
if (vpi_get(vpiType, item) == vpiMemoryWord &&
vpi_handle_by_name(vpi_get_str(vpiFullName, item), 0)) {
vpi_printf("VCD warning: dumping array word %s will "
"conflict with an escaped identifier.\n",
vpi_get_str(vpiFullName, item));
}
if (skip || vpi_get(vpiAutomatic, item)) break;
name = vpi_get_str(vpiName, item);