Subject: Re: [sv-ec] LRM syntax for calls to randomize.
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Mon Feb 02 2004 - 10:51:59 PST
Ray,
The randomize call is defined only by rule A.6.2. The rule in A.8.2 refers to the array
manipulation methods (section 4.15)in which the "with" clause is followed by an
expression in parenthesis and not a constraint block in curly braces.
The production name 'blocking_statement' is in contrast to non-blocking assignments,
which, unfortunately, have very little to do with the blocking nature of the assignment. I
don't think this merits changing, it's simply legacy Verilog language.
I agree that there are a few errors that can be fixed by the following change:
blocking_assignment ::=
...
| variable_lvalue = class_variable_identifier . randomize [ ( ) ] [ with { { constraint_block } } ]
This also takes care of the attribute confusion.
Arturo
----- Original Message -----
From: "Ryan, Ray" <Ray_Ryan@mentorg.com>
To: <sv-ec@eda.org>
Sent: Monday, February 02, 2004 9:49 AM
Subject: [sv-ec] LRM syntax for calls to randomize.
In the LRM syntax, I believe a call to the randomize() method is defined by
two different rules, depending on whether there is a with-clause. The
two productions are:
A.6.2
blocking_assignment ::=
...
| class_variable_identifier . randomize [ ( ) ] with
constraint_block ;
A.8.2
method_call ::=
...
| method_call_root . method_identifier { attribute_instance } [ (
list_of_arguments ) ]
Why is a randomize call that includes a with-clause a blocking_assignment?
As
a result I believe that a randomize that does not include a with-clause is
an expression, while a randomize that includes a with-clause is a statement.
That is:
status = x.randomize() with { a<b; }; // This is NOT legal
status = x.randomize(); // This is legal.
Also, is it significant that "{ attribute_instance }" is only allowed if
there is not a with-clause?
Also, in the 'blocking_assignment' rule above, the constraint_block should
be
enclosed in braces '{' '}'. That is
| class_variable_identifier . randomize [ ( ) ] with {
constraint_block };
- Ray
This archive was generated by hypermail 2b28 : Mon Feb 02 2004 - 10:57:19 PST