RE: [sv-ec] creating object in constant function call

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Thu Mar 19 2009 - 02:55:17 PDT
maybe LRM should be more explicit on that?
 
DANiel

  _____  

From: Bresticker, Shalom [mailto:shalom.bresticker@intel.com] 
Sent: 19 marca 2009 10:29
To: Daniel Mlynek; sv-ec@server.eda.org
Subject: RE: [sv-ec] creating object in constant function call


Since constant functions are evaluated at elaboration time, I would assume
that it is forbidden.
 
Shalom


  _____  

From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On
Behalf Of Daniel Mlynek
Sent: Thursday, March 19, 2009 10:54 AM
To: sv-ec@server.eda.org
Subject: [sv-ec] creating object in constant function call


LRM is not explicit about creating an object in constant funcion call -
should it be allowed? Should it be forbidden - see below example:
 

module top;
 parameter p=10;
 
 int j;      
 
 class C;
  int i;
  function new;
   $display("constructor");
  endfunction
 endclass
 
 function int f7(int i);
  C c = new;
  return i;
 endfunction
 
   
 reg [f7(10):0] r7;
 
endmodule


 
DANiel

-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 

---------------------------------------------------------------------

Intel Israel (74) Limited



This e-mail and any attachments may contain confidential material for

the sole use of the intended recipient(s). Any review or distribution

by others is strictly prohibited. If you are not the intended

recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Mar 19 02:58:42 2009

This archive was generated by hypermail 2.1.8 : Thu Mar 19 2009 - 02:58:53 PDT