[sv-ac] type of error

From: Soumya Jyoti Wadader <soumya_at_.....>
Date: Thu Nov 30 2006 - 02:06:01 PST
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 02:07:36 2006

This archive was generated by hypermail 2.1.8 : Thu Nov 30 2006 - 02:08:02 PST