diff --git a/vpi_user.h b/vpi_user.h index c7662f853..6df2bada6 100644 --- a/vpi_user.h +++ b/vpi_user.h @@ -308,6 +308,7 @@ typedef struct t_vpi_delay { #define vpiName 2 #define vpiFullName 3 #define vpiSize 4 +#define vpiTopModule 7 #define vpiDefName 9 #define vpiTimeUnit 11 #define vpiTimePrecision 12 diff --git a/vvp/vpi_scope.cc b/vvp/vpi_scope.cc index 6815dcfc6..fd1278bd3 100644 --- a/vvp/vpi_scope.cc +++ b/vvp/vpi_scope.cc @@ -66,8 +66,12 @@ static int scope_get(int code, vpiHandle obj) switch (code) { case vpiTimeUnit: return ref->time_units; + case vpiTimePrecision: return ref->time_precision; + + case vpiTopModule: + return 0x0 == ref->scope; } return 0;