Re: [sv-ec] Testbench clocking note


Subject: Re: [sv-ec] Testbench clocking note
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Fri Dec 13 2002 - 18:36:39 PST


Adam,

You raise excellent points.

1) Allowing the default keyword as a prefix to the clocking domain
   definition is allowed. The documentation may not make that point
   clear. I'll pass the corresponding clarification to Stu and David so
   that it can be incorporated into the LRM.

2) As far as the cycle-delay operator, we are coordinating with the
   asssertions sub-committee to come up with the same operator for
   both test-bench and assertions, so the exact syntax may change
   a bit. The current proposal with sv-ac is to use ## [n].
   Requiring the square brackets [] reduces the likelihood of an error.
   Using your example:
     ## [5];
     send_out = 1;

3) We did consider @ for this purpose, but, unfortunately, @ will does
    not work. The reason is that the delay needs to be an expression
    and not just a constant. For example:
        task cwait ( integer n );
            @ n;
        endtask
    In the above task, the statement @n already has a meaning in
    Verilog, namely the change in variable 'n'.

    Arturo

----- Original Message -----
From: "Adam Krolnik" <krolnik@lsil.com>
To: <sv-ec@eda.org>
Sent: Wednesday, December 11, 2002 9:05 AM
Subject: [sv-ec] Testbench clocking note

Good morning;

I have two comments about the section 13.10 and 13.11

For the default clocking specification, why not allow the keyword 'default'
to be a prefix of a clocking domain definition.

E.g.

default clocking bus @(posedge clk)
   ...
endclocking

The reader thus knows the default domain once they have viewed all the domains.

On the cycle delay operator, "##". It seems to me that this operator is too
visually close to the '#' (delay) operator.

We have seen several cases where users expected to use the identity operator
"==="
and ended up with the comparison operator "==" simply because read almost
the same.

The proposed "##" operator also is visually similar to the delay operation and
could easily be mistyped. Thus one who intended a cycle delay
will receive a timestep delay.

E.g.

     ##5;
     send_out = 1;

     #5;
     check_results();

As an alternative, what about using the event control operator '@' which more
naturally
matches counting clocking events. E.g.

     @5;
     send_out = 1;

     @5;
     check_result();

Note that this currently is a syntax error - you can't use a constant with event
control.

    Thanks.

    Adam Krolnik
    Verification Mgr.
    LSI Logic Corp.
    Plano TX. 75074



This archive was generated by hypermail 2b28 : Fri Dec 13 2002 - 18:30:46 PST