Suppress unnecessary VCD/LXT/LXT2 warnings about packages.
Only output a warning if a package contains dumpable items. This is mainly to avoid the warning about the $unit scope when a design has been compiled for a SV generation (issue #710).
This commit is contained in:
parent
fa2dfe690c
commit
96df251c95
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002-2023 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2002-2024 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -501,6 +501,23 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name)
|
||||||
|
|
||||||
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
{
|
{
|
||||||
|
static int dumpable_types[] = {
|
||||||
|
/* Value */
|
||||||
|
/* vpiNamedEvent, */
|
||||||
|
vpiNet,
|
||||||
|
/* vpiParameter, */
|
||||||
|
vpiReg,
|
||||||
|
vpiVariables,
|
||||||
|
/* Scope */
|
||||||
|
vpiFunction,
|
||||||
|
vpiGenScope,
|
||||||
|
vpiModule,
|
||||||
|
vpiNamedBegin,
|
||||||
|
vpiNamedFork,
|
||||||
|
vpiTask,
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
struct t_cb_data cb;
|
struct t_cb_data cb;
|
||||||
struct vcd_info* info;
|
struct vcd_info* info;
|
||||||
|
|
||||||
|
|
@ -629,23 +646,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
|
|
||||||
if (depth > 0) {
|
if (depth > 0) {
|
||||||
const char* fullname = vpi_get_str(vpiFullName, item);
|
const char* fullname = vpi_get_str(vpiFullName, item);
|
||||||
/* list of types to iterate upon */
|
|
||||||
static int types[] = {
|
|
||||||
/* Value */
|
|
||||||
/* vpiNamedEvent, */
|
|
||||||
vpiNet,
|
|
||||||
/* vpiParameter, */
|
|
||||||
vpiReg,
|
|
||||||
vpiVariables,
|
|
||||||
/* Scope */
|
|
||||||
vpiFunction,
|
|
||||||
vpiGenScope,
|
|
||||||
vpiModule,
|
|
||||||
vpiNamedBegin,
|
|
||||||
vpiNamedFork,
|
|
||||||
vpiTask,
|
|
||||||
-1
|
|
||||||
};
|
|
||||||
int i;
|
int i;
|
||||||
int nskip = (vcd_names_search(&lxt_tab, fullname) != 0);
|
int nskip = (vcd_names_search(&lxt_tab, fullname) != 0);
|
||||||
|
|
||||||
|
|
@ -665,9 +665,9 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
|
|
||||||
push_scope(name);
|
push_scope(name);
|
||||||
|
|
||||||
for (i=0; types[i]>0; i++) {
|
for (i=0; dumpable_types[i]>0; i++) {
|
||||||
vpiHandle hand;
|
vpiHandle hand;
|
||||||
vpiHandle argv = vpi_iterate(types[i], item);
|
vpiHandle argv = vpi_iterate(dumpable_types[i], item);
|
||||||
while (argv && (hand = vpi_scan(argv))) {
|
while (argv && (hand = vpi_scan(argv))) {
|
||||||
scan_item(depth-1, hand, nskip);
|
scan_item(depth-1, hand, nskip);
|
||||||
}
|
}
|
||||||
|
|
@ -678,8 +678,10 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case vpiPackage: /* Skipped */
|
case vpiPackage: /* Skipped */
|
||||||
vpi_printf("LXT warning: $dumpvars: Package (%s) is not dumpable "
|
// Don't print a warning for empty packages.
|
||||||
"with LXT.\n", vpi_get_str(vpiFullName, item));
|
if (vcd_instance_contains_dumpable_items(dumpable_types, item))
|
||||||
|
vpi_printf("LXT warning: $dumpvars: Package (%s) is not dumpable "
|
||||||
|
"with LXT.\n", vpi_get_str(vpiFullName, item));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2023 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2024 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -561,6 +561,23 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name)
|
||||||
|
|
||||||
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
{
|
{
|
||||||
|
static int dumpable_types[] = {
|
||||||
|
/* Value */
|
||||||
|
/* vpiNamedEvent, */
|
||||||
|
vpiNet,
|
||||||
|
/* vpiParameter, */
|
||||||
|
vpiReg,
|
||||||
|
vpiVariables,
|
||||||
|
/* Scope */
|
||||||
|
vpiFunction,
|
||||||
|
vpiGenScope,
|
||||||
|
vpiModule,
|
||||||
|
vpiNamedBegin,
|
||||||
|
vpiNamedFork,
|
||||||
|
vpiTask,
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
struct t_cb_data cb;
|
struct t_cb_data cb;
|
||||||
struct vcd_info* info;
|
struct vcd_info* info;
|
||||||
|
|
||||||
|
|
@ -681,23 +698,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
|
|
||||||
if (depth > 0) {
|
if (depth > 0) {
|
||||||
const char* fullname = vpi_get_str(vpiFullName, item);
|
const char* fullname = vpi_get_str(vpiFullName, item);
|
||||||
/* list of types to iterate upon */
|
|
||||||
static int types[] = {
|
|
||||||
/* Value */
|
|
||||||
/* vpiNamedEvent, */
|
|
||||||
vpiNet,
|
|
||||||
/* vpiParameter, */
|
|
||||||
vpiReg,
|
|
||||||
vpiVariables,
|
|
||||||
/* Scope */
|
|
||||||
vpiFunction,
|
|
||||||
vpiGenScope,
|
|
||||||
vpiModule,
|
|
||||||
vpiNamedBegin,
|
|
||||||
vpiNamedFork,
|
|
||||||
vpiTask,
|
|
||||||
-1
|
|
||||||
};
|
|
||||||
int i;
|
int i;
|
||||||
int nskip = vcd_scope_names_test(fullname);
|
int nskip = vcd_scope_names_test(fullname);
|
||||||
|
|
||||||
|
|
@ -717,9 +717,9 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
|
|
||||||
push_scope(name);
|
push_scope(name);
|
||||||
|
|
||||||
for (i=0; types[i]>0; i++) {
|
for (i=0; dumpable_types[i]>0; i++) {
|
||||||
vpiHandle hand;
|
vpiHandle hand;
|
||||||
vpiHandle argv = vpi_iterate(types[i], item);
|
vpiHandle argv = vpi_iterate(dumpable_types[i], item);
|
||||||
while (argv && (hand = vpi_scan(argv))) {
|
while (argv && (hand = vpi_scan(argv))) {
|
||||||
scan_item(depth-1, hand, nskip);
|
scan_item(depth-1, hand, nskip);
|
||||||
}
|
}
|
||||||
|
|
@ -730,8 +730,10 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case vpiPackage:
|
case vpiPackage:
|
||||||
vpi_printf("LXT2 warning: $dumpvars: Package (%s) is not dumpable "
|
// Don't print a warning for empty packages.
|
||||||
"with LXT2.\n", vpi_get_str(vpiFullName, item));
|
if (vcd_instance_contains_dumpable_items(dumpable_types, item))
|
||||||
|
vpi_printf("LXT2 warning: $dumpvars: Package (%s) is not dumpable "
|
||||||
|
"with LXT2.\n", vpi_get_str(vpiFullName, item));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2023 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2024 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -485,6 +485,23 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name)
|
||||||
|
|
||||||
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
{
|
{
|
||||||
|
static int dumpable_types[] = {
|
||||||
|
/* Value */
|
||||||
|
vpiNamedEvent,
|
||||||
|
vpiNet,
|
||||||
|
vpiParameter,
|
||||||
|
vpiReg,
|
||||||
|
vpiVariables,
|
||||||
|
/* Scope */
|
||||||
|
vpiFunction,
|
||||||
|
vpiGenScope,
|
||||||
|
vpiModule,
|
||||||
|
vpiNamedBegin,
|
||||||
|
vpiNamedFork,
|
||||||
|
vpiTask,
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
struct t_cb_data cb;
|
struct t_cb_data cb;
|
||||||
struct vcd_info* info;
|
struct vcd_info* info;
|
||||||
|
|
||||||
|
|
@ -694,23 +711,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
case vpiNamedFork:
|
case vpiNamedFork:
|
||||||
|
|
||||||
if (depth > 0) {
|
if (depth > 0) {
|
||||||
/* list of types to iterate upon */
|
|
||||||
static int types[] = {
|
|
||||||
/* Value */
|
|
||||||
vpiNamedEvent,
|
|
||||||
vpiNet,
|
|
||||||
vpiParameter,
|
|
||||||
vpiReg,
|
|
||||||
vpiVariables,
|
|
||||||
/* Scope */
|
|
||||||
vpiFunction,
|
|
||||||
vpiGenScope,
|
|
||||||
vpiModule,
|
|
||||||
vpiNamedBegin,
|
|
||||||
vpiNamedFork,
|
|
||||||
vpiTask,
|
|
||||||
-1
|
|
||||||
};
|
|
||||||
int i;
|
int i;
|
||||||
int nskip = (vcd_names_search(&vcd_tab, fullname) != 0);
|
int nskip = (vcd_names_search(&vcd_tab, fullname) != 0);
|
||||||
|
|
||||||
|
|
@ -726,9 +726,9 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
name = vpi_get_str(vpiName, item);
|
name = vpi_get_str(vpiName, item);
|
||||||
fprintf(dump_file, "$scope %s %s $end\n", type, name);
|
fprintf(dump_file, "$scope %s %s $end\n", type, name);
|
||||||
|
|
||||||
for (i=0; types[i]>0; i++) {
|
for (i=0; dumpable_types[i]>0; i++) {
|
||||||
vpiHandle hand;
|
vpiHandle hand;
|
||||||
vpiHandle argv = vpi_iterate(types[i], item);
|
vpiHandle argv = vpi_iterate(dumpable_types[i], item);
|
||||||
while (argv && (hand = vpi_scan(argv))) {
|
while (argv && (hand = vpi_scan(argv))) {
|
||||||
scan_item(depth-1, hand, nskip);
|
scan_item(depth-1, hand, nskip);
|
||||||
}
|
}
|
||||||
|
|
@ -740,8 +740,10 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case vpiPackage:
|
case vpiPackage:
|
||||||
vpi_printf("VCD warning: $dumpvars: Package (%s) is not dumpable "
|
// Don't print a warning for empty packages.
|
||||||
"with VCD.\n", vpi_get_str(vpiFullName, item));
|
if (vcd_instance_contains_dumpable_items(dumpable_types, item))
|
||||||
|
vpi_printf("VCD warning: $dumpvars: Package (%s) is not dumpable "
|
||||||
|
"with VCD.\n", vpi_get_str(vpiFullName, item));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2023 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2024 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -51,6 +51,16 @@ int is_escaped_id(const char *name)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int vcd_instance_contains_dumpable_items(int dumpable_types[], vpiHandle item)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; dumpable_types[i] > 0; i++) {
|
||||||
|
if (vpi_iterate(dumpable_types[i], item))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
struct stringheap_s name_heap = {0, 0};
|
struct stringheap_s name_heap = {0, 0};
|
||||||
|
|
||||||
struct vcd_names_s {
|
struct vcd_names_s {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_vcd_priv_H
|
#ifndef IVL_vcd_priv_H
|
||||||
#define IVL_vcd_priv_H
|
#define IVL_vcd_priv_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2023 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2024 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
EXTERN int is_escaped_id(const char *name);
|
EXTERN int is_escaped_id(const char *name);
|
||||||
|
|
||||||
|
EXTERN int vcd_instance_contains_dumpable_items(int dumpable_types[], vpiHandle item);
|
||||||
|
|
||||||
struct vcd_names_s;
|
struct vcd_names_s;
|
||||||
EXTERN struct stringheap_s name_heap;
|
EXTERN struct stringheap_s name_heap;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue