RE: [sv-ec] How do I make a "Virtual Port"

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sat Oct 04 2008 - 10:01:40 PDT
Jonathan,

> illegal to access a ref argument in a fork...join_none

I don't know if it's relevant to your test case, but according to the
LRM via ballot issue 232 (Mantis 652)

   "Within a fork-join block, it shall be illegal to refer to formal
arguments passed by reference other than in the initialization value
expressions of variables declared in a block_item_declaration of the
fork."

-- Brad

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
jonathan.bromley@doulos.com
Sent: Saturday, October 04, 2008 1:01 AM
To: Rich, Dave
Cc: sv-ec@eda.org; Alsop, Thomas R
Subject: RE: [sv-ec] How do I make a "Virtual Port"

[Dave Rich]
> Having said all that, I do have a register probe class (attached) 
> that may do what you are looking for. You can pass a hierarchical 
> signal to the constructor, and it forks off two threads that keep 
> the signal in sync with the class property.

I suggested something very similar to Tom Alsop in a 
separate email:  spawn, as an independent thread, 
a long-running task that has the signal of interest 
as a ref argument.  It's potentially a very useful
idea, I believe.

Unfortunately, one of the three mainstream simulators
I can try reports this as an error, asserting that it
is illegal to access a ref argument in a fork...join_none.
This seems odd to me, but I can't really find LRM
evidence to back up the legality of such usage.

Yet another simulator allows it, but infers a 
procedural driver on the signal from the fact
that it is passed to a task as a ref argument;
this prevents you from using the technique
to monitor the state of any signal that has
a continuous driver on it.

I'm sure someone else has a clearer idea than I do
about whether all this is truly legal and reasonable...
-- 
Jonathan Bromley
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW, 
UK
Tel: +44 (0)1425 471223                   Email: 
jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573                           Web: 
http://www.doulos.com

This message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sat Oct 4 10:04:10 2008

This archive was generated by hypermail 2.1.8 : Sat Oct 04 2008 - 10:05:05 PDT