Note:
The text Ben quoted does not say that dynamic variables may not be referenced. It says that elements of dynamic variables may not be referenced. There is a difference.
Suppose you have a (static) dynamic array d[]. d will always exist. However, d[0] may or may not exist. It may exist only part of the time. Thus, d could be referenced, but not d[0].
Shalom
From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Korchemny, Dmitry
Sent: Monday, May 28, 2012 09:54
To: hdlcohen@gmail.com
Cc: sv-ac@eda-stds.org; Eduard Cerny; Seligman, Erik
Subject: RE: [sv-ac] checker : quick confirmation question on types allowed/disallowed
I think this should be legal.
Dmitry
From: Ben Cohen [mailto:hdlcohen@gmail.com]<mailto:[mailto:hdlcohen@gmail.com]>
Sent: Sunday, May 27, 2012 04:37
To: Korchemny, Dmitry
Cc: sv-ac@eda-stds.org<mailto:sv-ac@eda-stds.org>; Eduard Cerny; Seligman, Erik
Subject: Re: [sv-ac] checker : quick confirmation question on types allowed/disallowed
Dmitry,
Thus, dynamic arrays, etc.. can be declared inside a checker as checker variables,and as random checker variables? Example:
checker c(input logic x[], ...);
logic b[];
...
assert property(b[data] ...); // Legal ? (ignore syntax for now)
endchecker
Thanks,
Ben Cohen
On Wed, May 23, 2012 at 5:13 AM, Korchemny, Dmitry <dmitry.korchemny@intel.com<mailto:dmitry.korchemny@intel.com>> wrote:
Hi Ben,
According to my understanding formal arguments to a checker and checker variables may be dynamic arrays, etc. You cannot reference dynamic arrays from the enclosing scope.
E.g., check mycheck(a, ...); is legal, even if a is a dynamic array.
But in
module m(...);
logic b[];
...
checker check (...);
assert property(...b...); // Illegal to reference dynamic array from here
endchecker
endmodule
Regards,
Dmitry
From: Ben Cohen [mailto:hdlcohen@gmail.com<mailto:hdlcohen@gmail.com>]
Sent: Wednesday, May 23, 2012 00:47
To: sv-ac@eda-stds.org<mailto:sv-ac@eda-stds.org>; Korchemny, Dmitry; Eduard Cerny; Seligman, Erik
Subject: [sv-ac] checker : quick confirmation questionon types allowed/disallowed
Below are some LRM extractions. Thus, I am correct in stating that
1) formal arguments of a checker and variable of a checker can also be of type real, time, string
2) formal arguments of a checker and variable of a checker canot be of type dynamic array, queue, associative array
LRM states that "Automatic variables and members or elements of dynamic variables" shall not be referenced; thus, if no reference, what's the use of declaring them if legal?
.
Anything else that is illegal in a checker?
Thanks,
Ben
17.2 Checker declaration
... The legal data types for checker formal arguments are those legal for a property
...The following elements from the scope enclosing the checker declaration shall not be referenced in a
checker:
- Automatic variables and members or elements of dynamic variables (see 6.21).
- Elements of fork...join, fork...join_any, or fork...join_none blocks.
16.6 Boolean expressions
... An expression shall result in a type that is cast compatible with an integral type. Subexpressions
need not meet this requirement as long as the overall expression is cast compatible with an integral
type.
- Elements of dynamic arrays, queues, and associative arrays that are sampled for assertion expression
evaluation may get removed from the array or the array may get resized before the assertion expression
is evaluated. These specific array elements sampled for assertion expression evaluation shall
continue to exist within the scope of the assertion until the assertion expression evaluation completes.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon May 28 04:52:44 2012
This archive was generated by hypermail 2.1.8 : Mon May 28 2012 - 04:53:02 PDT