[sv-ec] Upward referencing rules question

From: danielm <danielm_at_.....>
Date: Wed Feb 06 2008 - 03:39:54 PST
I cannot find rules for below reference in SV.I'm using reference to a1.num
in named block "oo". In this block there is object variable named a1 but it
has no "num" funcion 
The question is: Should seraching for matching function be stopped at this
level or should the search be continued into module scope - where is "a1"
instance which have "num" function.
So below case should return error, or it should compile and return "5" in
simulation?
 
 
module M;
 function integer num();
  num= 5;
 endfunction
endmodule
 
class C;
        reg r;
endclass
 
module top;
 M a1();
 
 initial begin : oo
 C a1;
 $display(a1.num());
 end
endmodule

 
DANiel

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Feb 6 03:40:22 2008

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2008 - 03:41:04 PST