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

From: Jonathan Bromley <jonathan.bromley_at_.....>
Date: Thu Jan 11 2007 - 03:43:02 PST
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.
Received on Thu Jan 11 03:45:06 2007

This archive was generated by hypermail 2.1.8 : Thu Jan 11 2007 - 03:45:40 PST