[sv-ac] Parameter passing - EXT 7


Subject: [sv-ac] Parameter passing - EXT 7
From: Surrendra Dudani (Surrendra.Dudani@synopsys.com)
Date: Mon Nov 17 2003 - 11:14:11 PST


Hi Joseph,
It seems to me that your example is legal, and should be parsed correctly, with the exception of the declaration of types. The formal arguments of property/sequence definitions do not allow type specification. An actual argument can be an identifier that is a parameter declared outside of the property/sequence.
[Y] 7 parameter in properties
Based on the formal syntax definition of the current version (SV3.1),
any cycle_delay_const_range_expression and range expression has
to be a constant expression or a parameter identifier.
However, a parameter identifier has to be an identifier proceeded with
the keyword "parameter" used by SV to define a compile time constant.
Based on the BNF in Annex A, it seems that any identifier defined in the
property_formal_list is an identifier that can not be associated with an identifier that is latter used to define a compile-time constant. For example, the following property definitions
are illegal. The solution can be found in this proposal.
property follow(en, clk, leader, follower,  sample_clock_edge = posedge ck or negedge ck, sint min_lat = 0, int max_lat = 0);
        @(sample_clock_edge) en |->
                (`true [*0:$] ##1 leader ##[min_lat:max_lat] follower) [*1:$] ;
endproperty
property foo(en, clk, width = 5);
int temp [width];
...
endproperty

Surrendra



**********************************************
Surrendra A. Dudani
Synopsys, Inc.
377 Simarano Drive, Suite 300
Marlboro, MA 01752

Tel:   508-263-8072
Fax:   508-263-8123
email: Surrendra.Dudani@synopsys.com 
**********************************************



This archive was generated by hypermail 2b28 : Mon Nov 17 2003 - 11:14:42 PST