RE: [sv-ec] Re: Mailbox - null return

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed May 10 2006 - 12:35:07 PDT
Arturo,

 

OK, 'gross user error in simulation' would have been a better choice of
words.

 

You, Steve, and I all seem to be in agreement that a mailbox is just a
class and there's no reason to treat its allocation any differently. So
any text about new does not belong in the section about mailboxes (and I
now see the same text in semaphores that should also be removed). It
belongs in section 7.7 class constructors. 

 

If you want new to return null, then you must also add the ability to
test the result of super.new, which you can't do right now. 

 

And what is the point of returning null? What assurances would the user
have in continuing to execute code beyond that point?

 

Dave

 

 

________________________________

From: Arturo Salz [mailto:Arturo.Salz@synopsys.com] 
Sent: Wednesday, May 10, 2006 11:56 AM
To: Rich, Dave; sv-ec@eda.org
Subject: RE: [sv-ec] Re: Mailbox - null return

 

Dave,

 

You write in this item:

It would be a gross simulation error if there are not enough resources
to allocate an object.

I disagree. Running out of memory is not a simulation error. A trivial
user coding error can cause the system to run out of memory, and the
simulator cannot guarantee that it will always have enough resources to
satisfy the request. For example, the following snippet will eventually
cause the system to run out of memory:

 

   mailbox m[$];

   always @(clk) begin

      mailbox m1 = new();

      m.insert( 0, m1);

   end

 

As Steve Sharp pointed out, a mailbox is a class and there is no reason
why its allocation should be handled differently from any other
dynamically allocated object. The only alternative would be to turn
allocation failures into a hard error for all dynamic objects, and I'm
not sure that is warranted.

 

            Arturo

 

________________________________

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Rich, Dave
Sent: Wednesday, May 10, 2006 9:00 AM
To: sv-ec@eda.org
Subject: RE: [sv-ec] Re: Mailbox - null return

 

Mehdi,  Now you do need to take action.

 

Submitted as http://www.eda.org/svdb/bug_view_page.php?bug_id=0001459
with a proposal.

 

________________________________

From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On
Behalf Of Brad Pierce
Sent: Tuesday, May 09, 2006 6:38 PM
To: sv-ec@server.eda.org
Cc: Maidment, Matthew R
Subject: [sv-ec] Re: Mailbox - null return

 

In http://www.eda.org/sv-bc/hm/4469.html , Dave explains to the SV-BC
about an apparent mailbox erratum found by Cliff.  But mailboxes are an
SV-EC issue.

 

Could the SV-EC please look into this issue, and if, as Dave
convincingly argues, it is truly an erratum, take ownership of it?

 

Thanks,

 

-- Brad
Received on Wed May 10 12:35:14 2006

This archive was generated by hypermail 2.1.8 : Wed May 10 2006 - 12:35:21 PDT