RE: [sv-ac] type of error

From: Korchemny, Dmitry <dmitry.korchemny_at_.....>
Date: Thu Nov 30 2006 - 06:23:20 PST
Hi Soumya,

The LRM does not always prescribe explicitly at which stage the error
should be issued, though in all your examples these errors are
statically detectable. Many simulators first build the entire model
(compilation stage), and only then perform the simulation. Such
simulators should detect the problems at the compilation stage.

Some rules may be definitely checkable at the sequence level, as in your
second example. Usually it is better to report problems as close to
their origin as possible, but the LRM does not prescribe the exact stage
when the error message should be issued, as I mentioned above.

Strictly speaking, from the written in the LRM it follows that even when
a sequence is not instantiated, it should still be semantically correct.
But in practice it is often a matter of the common sense and the
implementation ease. E.g., it makes sense to check that the local
variable names are not hierarchical when the compiler analyzes the
sequence definition, but checking for the cyclical dependency (as in
your fourth example) is usually performed at the assertion level.

Regards,
Dmitry

-----Original Message-----
From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On
Behalf Of Soumya Jyoti Wadader
Sent: Thursday, November 30, 2006 12:06 PM
To: sv-ac@server.eda.org
Subject: [sv-ac] type of error

Hi Everyone, 
I have some quarries. Based on LRM following 4 
cases of "sequences"  are not valid. 
But I like to get your views to know, 

a) whether a tool should detect these errors in 
   compilation or elaboration / simulation phase ?

b) Some tool raises error only when these 
   sequences/properties are called through 'assert' statement. 
   Is that a correct behavior based on LRM ?


Case 1. :

In LRM section 17.8 page 262 one example 
is given as :
   
sequence s5;
   int x,y;
  ((a ##1 (b, x = data, y = data1) ##1 c) 
   or (d ##1 ( true, x = data) 
   ##0 (e==x))) ##1 (y==data2); 
      // illegal because y is not in the intersection
endsequence

sequence s7;
int x,y;
((a ##1 (b, x = data, y = data1) ##1 c) 
 and (d ##1 ( true, x = data) ##0 
 (e==x))) ##1 (x==data2); 
  // illegal because x is common to both threads
endsequence


Case 2.  
17.8 Manipulating data in a sequence
" Hierarchical references to a local variable 
are not allowed."

sequence s;
  int x;
  ..........
endsequence

sequence s1;
  (a ##1, s.x = 0)  ##1 ......
endsequence

Case 3.        
sequence s1;
   ##2 in2;
endsequence
sequence s2;
  in1 ##3 s1(in1);
endsequence


In this case sequence 's1' does not have any 
argument in its defination but when this sequence 
's1' is used in boolean expression of sequence 
's2' then argument is used, so this is defenately 
an error.

Case 4. 
LRM section 17.6:
Any form of syntactic cyclic dependency of the 
sequence names is disallowed. The example below 
illustrates an illegal dependency of s1 on 
s2 and s2 on s1 because it creates a cyclic 
dependency.

sequence s1;
@(posedge sysclk)
(x ##1 s2);
endsequence

sequence s2;
@(posedge sysclk)
(y ##1 s1);
endsequence




Thanks & Regards
Soumya
Received on Thu Nov 30 06:23:26 2006

This archive was generated by hypermail 2.1.8 : Thu Nov 30 2006 - 06:23:35 PST