RE: [sv-ec] assigning string literal to parameter

From: Francoise Martinolle <fm_at_.....>
Date: Tue Nov 21 2006 - 17:17:51 PST
 
It is true that VPI can distinguish constants such as:
  string constants, decimal constants, binary constants, integer
constants etc...
There is a property vpiConstType which one can query on:
   parameters,
   specparams,
   constants
Assigning a string constant does not change the type of the parameter to
a string type. 
If the parameter was untyped, its type is determined by the length in
bits of the value
assigned to it. If the parameter had an explicit datatype, the constant
value is assigned 
to the parameter in the context of its datatype
(it may be truncated or sign extended if the parameter was signed).

Francoise
    '

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Steven Sharp
Sent: Tuesday, November 21, 2006 4:59 PM
To: sv-ec@eda.org; Neil.Korpusik@Sun.com; Arturo.Salz@synopsys.com
Cc: yulik.feldman@intel.com
Subject: RE: [sv-ec] assigning string literal to parameter


>From: Steven Sharp <sharp>

>The PLI layer can also distinguish 1+1 from 2 as an argument.  That 
>does not prevent them from both being integral expressions.

As a better analogy, I believe the PLI layer can distinguish 32'd1 from
32'h1, even though they are both integral constants with the same value
and have identical behavior in all situations in Verilog.

Steven Sharp
sharp@cadence.com
Received on Tue Nov 21 17:18:00 2006

This archive was generated by hypermail 2.1.8 : Tue Nov 21 2006 - 17:18:18 PST