RE: [sv-bc] Mailbox - null return

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed May 03 2006 - 22:49:13 PDT
Cliff, Arturo,

I believe this is leftover wording from Vera's alloc() system function
that was used to create mailboxes and should be removed from
SystemVerilog. It had a number of arguments and there were other reasons
it could return null (like, the mailbox id was already allocated).
Mailboxes and semaphores in Vera are not built-in data types like they
are in SystemVerilog. In Vera, were implemented using special system
functions that had to set aside a separate heap of memory.

If someone were to extend the built-in mailbox class in SystemVerilog,
there's no way to pass the result of super.new() to the extended class's
new because SystemVerilog has no way for the user to define their own
return value on a constructor.

Dave


> -----Original Message-----
> From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
On
> Behalf Of Clifford E. Cummings
> Sent: Wednesday, May 03, 2006 4:17 PM
> To: sv-bc@server.eda.org
> Subject: RE: [sv-bc] Mailbox - null return
> 
> Thanks, Arturo -
> 
> At 03:47 PM 5/3/2006, Arturo Salz wrote:
> > > Under what circumstances could creating a mailbox fail and return
> >null?
> >
> >     Insufficient resources.
> 
> Is this equivalent to an impending crash?
> 
> >     Most likely insufficient memory, or perhaps a user/application
> >defined limit on the number of mailboxes.
> 
> Makes sense. So the standard added a capability that is not likely to
> occur with a compliant simulator but a separate tool could impose a
> limit and monitor it through failure to create a mailbox. Interesting
> and forward thinking.
> 
> Regards - Cliff
> 
> 
> >         Arturo
> >
> >-----Original Message-----
> >From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> >Clifford E. Cummings
> >Sent: Wednesday, May 03, 2006 3:36 PM
> >To: sv-bc@eda.org
> >Subject: [sv-bc] Mailbox - null return
> >
> >Hi, All -
> >
> >This question came up in a class last week and I could not think of a
> >good answer.
> >
> >14.3.1 New()
> >Mailboxes are created with the new() method.
> >...
> >The new() function returns the mailbox handle or, if the mailbox
> >cannot be created, null. ...
> >
> >Under what circumstances could creating a mailbox fail and return
null?
> >
> >Regards - Cliff
> >
> >----------------------------------------------------
> >Cliff Cummings - Sunburst Design, Inc.
> >14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
> >Phone: 503-641-8446 / FAX: 503-641-8486
> >cliffc@sunburst-design.com / www.sunburst-design.com
> >Expert Verilog, SystemVerilog, Synthesis and Verification Training
> 
> ----------------------------------------------------
> Cliff Cummings - Sunburst Design, Inc.
> 14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
> Phone: 503-641-8446 / FAX: 503-641-8486
> cliffc@sunburst-design.com / www.sunburst-design.com
> Expert Verilog, SystemVerilog, Synthesis and Verification Training
Received on Wed May 3 22:49:26 2006

This archive was generated by hypermail 2.1.8 : Wed May 03 2006 - 22:49:39 PDT