[sv-ec] FW: [sv-bc] quary about semaphore

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon Aug 14 2006 - 01:57:11 PDT
Forwarding to sv-ec

-----Original Message-----
From: owner-sv-bc@server.eda-stds.org
[mailto:owner-sv-bc@server.eda-stds.org] On Behalf Of Soumya Jyoti
Wadader
Sent: Monday, August 14, 2006 10:05 AM
To: sv-bc@server.eda.org
Subject: [sv-bc] quary about semaphore

Hi,
I have query regarding the following testcase::

module semaphore16 (input [7:0] in1,in2, output reg [7:0] 
out1,out2,out3,out4);
class semaExtend extends semaphore;
real r;
shortreal sr;
time t;
function bit [1:0] func(input reg [15:0] rg);
r = rg;
sr = rg;
t = rg;
func = ++rg;
endfunction
endclass
semaExtend p = new(-11);
always @(in1,in2)
begin
  out1 = p.func(in1^in2);
  out2 = p.r;
  out3 = p.sr;
  out4 = p.t;
end
endmodule
Is it necessary to define new() method : function new (int keycount =
0);
                                                                       
super.new(keycount);
                                                                       
endfunction
in derived class.

Thanx
Soumya
Received on Mon Aug 14 05:06:26 2006

This archive was generated by hypermail 2.1.8 : Mon Aug 14 2006 - 05:06:49 PDT