[sv-ec] compilation unit - class static variables

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Tue Jul 15 2008 - 07:03:56 PDT
Consider the code:
<c.svh)
class C;
    static int i;
endclass
 
<top.v>
`include "c.svh"
module top;
    initial C::i=123;
endmodule
 
<top1.v>
`include "c.svh"
module top1;
    initial #0 $display(C::i);
endmodule
 
Both file are compiled in separate compilation - so class C is compiled
twice into two separate compilation units. As far as i undertand the
description - we get two separate class C definition with two separate sets
of statics?
 
This way user cannot divide his design to part to compile them separetely
(ie if he has stucks on some lack of memory problems in sinngle compilation)
because C::i in first compilation and C::i in 2nd are totally different.
There is no way to workaround the problem... Why IEEE have decided to
describe it this way???
 
Am I right?
 
 
 
DANiel

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jul 15 07:04:43 2008

This archive was generated by hypermail 2.1.8 : Tue Jul 15 2008 - 07:05:24 PDT