ISSUE 394

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 394
Category errata
Synopsis 17.10.2: Meaning of special characters in $value$plusargs
State open
Class errata-discuss
Arrival-DateJul 14 2003
Originator Gordon Vreugdenhil <gvreugde@Synopsys.COM>
Release 2001b: 17.10.2
Environment
Description

$value$plusargs makes the assumption that leading nulls are ignored
in a string variable provided for the match string. The current
example in the LRM has (in part):

reg [64*8:1] pstring;
...
pstring = "TEST%d";
if ($value$plusargs(pstring, testname))

The representation of "pstring" has 58 nulls followed by the
6 characters "TEST%d". There is an assumption that $value$plusargs
skips leading nulls in the match string. This should be
clarified.

In addition, consider other leading characters (whitespace,
etc). For example:

pstring = " TEST%d";
if ($value$plusargs(pstring, testname))

Is this equivalent to the "TEST%d" for matching purposes?

I suggest that we either say something like:
1) The string searched for by $value$plusargs is the sequence
of characters which would be found by
$sscanf(search_string, "%s", ...).
or
2) $value$plusargs ignores leading nulls in the search string
provided.

The argument in benefit of (2) is that it is necessary to deal with
Verilog string assignment semantics but doesn't otherwise change
search semantics. It may be reasonable to distinguish between
a search for "TEST%d" and " TEST%d"; assumably the command line
would have to look like '+ TEST10' to allow the latter, but that
is a shell/tool interaction question that we shouldn't worry about.

I think that adopting (2) makes the most sense and is minimally
restrictive.

Gord.

--
----------------------------------------------------------------------
Gord Vreugdenhil gvreugde@synopsys.com
Staff Engineer, VCS (Verification Tech. Group) (503) 547-6054
Synopsys Inc., Beaverton OR
Fix
Audit-Trail
Unformatted



Hosted by Boyd Technology