From 77ed1036829ca1e25e266244f8273ae30610e0ce Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 8 Nov 2007 09:56:18 -0800 Subject: [PATCH] Add vpiTopModule This patch adds functionality for vpiTopModule. --- vpi_user.h | 1 + vvp/vpi_scope.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/vpi_user.h b/vpi_user.h index c7662f85..6df2bada 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 6815dcfc..fd1278bd 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; -- 2.11.4.GIT