Add support for vpiInstance as the type code in calls to vpi_iterate().
This is needed for the waveform dumpers now that vpi_iterate(vpiModule, NULL) has been ficed to only return modules. This includes recognising vpiProgram and vpiInterface, although the compiler and vvp currently incorrectly classify them as modules.
This commit is contained in:
parent
7d7aa0604c
commit
d2521878d7
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SV_VPI_USER_H
|
||||
#define SV_VPI_USER_H
|
||||
/*
|
||||
* Copyright (c) 2010-2020 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2010-2021 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -44,6 +44,8 @@ EXTERN_C_START
|
|||
|
||||
/********* OBJECT TYPES ***********/
|
||||
#define vpiPackage 600
|
||||
#define vpiInterface 601
|
||||
#define vpiProgram 602
|
||||
#define vpiArrayType 606
|
||||
#define vpiStaticArray 1
|
||||
#define vpiDynamicArray 2
|
||||
|
|
@ -72,6 +74,9 @@ EXTERN_C_START
|
|||
/********* Many-to-One ***********/
|
||||
#define vpiMember 742
|
||||
|
||||
/********* One-to-One and One-to-Many ***********/
|
||||
#define vpiInstance 745
|
||||
|
||||
/********* generic object properties ***********/
|
||||
#define vpiNullConst 11
|
||||
|
||||
|
|
|
|||
|
|
@ -1240,8 +1240,14 @@ static vpiHandle vpip_make_udp_iterator()
|
|||
static vpiHandle vpi_iterate_global(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case vpiInstance:
|
||||
// fallthrough
|
||||
case vpiModule:
|
||||
// fallthrough
|
||||
case vpiProgram:
|
||||
// fallthrough
|
||||
case vpiInterface:
|
||||
// fallthrough
|
||||
case vpiPackage:
|
||||
return vpip_make_root_iterator(type);
|
||||
|
||||
|
|
|
|||
|
|
@ -278,6 +278,13 @@ static int compare_types(int code, int type)
|
|||
type == vpiNamedFork) )
|
||||
return 1;
|
||||
|
||||
if ( code == vpiInstance &&
|
||||
(type == vpiModule ||
|
||||
type == vpiProgram ||
|
||||
type == vpiInterface ||
|
||||
type == vpiPackage) )
|
||||
return 1;
|
||||
|
||||
if ( code == vpiVariables &&
|
||||
(type == vpiIntegerVar ||
|
||||
type == vpiBitVar ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue