RE: [sv-ec] Using a clocking block's pseudo-event

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Thu Jan 11 2007 - 10:32:40 PST
Jonathan,

I believe that extending the triggered method to a clocking block is a
natural extension that makes a lot of sense. The only issue may be
backward compatibility with clockvars named triggered, which is probably
a low probability occurrence.

However, I don't believe that allowing a clocking block to be assigned
to an event handle is as coherent. After all a clocking block is not an
event; it may support some of the same methods, but that doesn't change
its type. 

	Arturo

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Jonathan Bromley
Sent: Thursday, January 11, 2007 3:43 AM
To: sv-ec@eda.org
Subject: [sv-ec] Using a clocking block's pseudo-event

I've been trying to mock-up the proposed ##0 procedural 
delay (=align with current or upcoming clocking event) 
and encountered a minor issue that might be worth a look.

The problem is that I don't have access to the .triggered
property of the clocking block event.

Given a clocking block such as 
  clocking cb @(posedge clk);
I can wait for the clocking event using @(cb).
However, in order to imitate ##0 I would like to be
able to do
    wait (cb.triggered);

But this doesn't work because 'triggered' is not a 
reserved word, and cb isn't the name of an event.
The compiler thinks I'm referencing an input clockvar
called "triggered".

I have a workaround - please don't laugh:
    clocking cb @(...);
      sequence sync; 1; endsequence
    endclocking

I can now write
    wait (cb.sync.triggered);
which gives me the required ##0-like behaviour.

Should we consider making .triggered a built-in 
property of every clocking block, so that we can
preserve the fiction that the clocking block's 
name does duty as an event?  And, as a related
issue, would it not be a good idea to allow
the clocking block's event to be referenced by
an event handle, thus?
  event E = cb;
-- 
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

The contents of 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 Thu Jan 11 10:33:01 2007

This archive was generated by hypermail 2.1.8 : Thu Jan 11 2007 - 10:33:27 PST