RE: [sv-ec]E-mail Vote: Closes 12am PST October 26th 2007

From: Steven Sharp <sharp_at_.....>
Date: Sat Oct 27 2007 - 09:35:14 PDT
>I can't find anywhere in the LRM that forbids
>ports of type "ref event"; the BNF definitely
>admits it, though of course that is not very
>strong evidence.  The little example below 
>works in at least one simulator, with either
>"ref" or "input" direction; another simulator
>reports both cases as an error.  Is it illegal?

I don't know whether it is supposed to be legal.

But I will point out that you wouldn't need to use a ref port to
pass the original event object, and wait on or trigger it.  The
event is already a reference to the synchronizing object, and
passing it to an input port should give access to that object,
just like any assignment of one event to another.  The only reason
you would need to pass it by reference is if you wanted to be able
to make an assignment to the ref arg inside the subroutine, and
have that affect what synchronizing object the actual argument
pointed to.

Note that this would mean it was illegal to pass a clocking block
as a ref arg, since that would allow assigning to it.  At most,
you could pass it as a const ref arg, though I don't see any
advantage that would give over passing it as an input.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sat Oct 27 09:35:53 2007

This archive was generated by hypermail 2.1.8 : Sat Oct 27 2007 - 09:36:29 PDT