From dc0e66ab90b848142d9747f370fa42c2a10b60d5 Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 5 Sep 2011 17:11:40 -0700 Subject: [PATCH] Update $clog2() to add support for two-state variables. The $clog2() routine can consider any two state variable argument as numeric. --- vpi/sys_clog2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vpi/sys_clog2.c b/vpi/sys_clog2.c index ee29c6105..e19aeecc4 100644 --- a/vpi/sys_clog2.c +++ b/vpi/sys_clog2.c @@ -20,6 +20,7 @@ #include #include #include "vpi_user.h" +#include "sv_vpi_user.h" /* * This routine returns 1 if the argument supports has a numeric value, @@ -42,6 +43,11 @@ static unsigned is_numeric_obj(vpiHandle obj) /* These can have a valid numeric value. */ case vpiIntegerVar: + case vpiBitVar: + case vpiByteVar: + case vpiShortIntVar: + case vpiIntVar: + case vpiLongIntVar: case vpiMemoryWord: case vpiNet: case vpiPartSelect: