Subject: Re: Begin-End / { } / < > ? + Assert
From: Kevin Cameron x3251 (dkc@galaxy.nsc.com)
Date: Mon Mar 18 2002 - 11:05:35 PST
> From owner-assertion@eda.org Mon Mar 18 10:27:52 2002
>
> Hi Kevin;
>
>
> Your example assertion statement is a common one. I agree that
> we be able to easily check for ideas like this. We write
> that assertion like this:
>
>
> assert (delay(b,1) == c) @@ (posedge clk);
>
>
> Once you understand the delay() functionality, the assertion
> is simple.
>
> The usage of the comma operator while valid does provide for
> some confusion when others try to read the code.
>
> It also works when you have more than 1 cycle of delay which
> is also very typical:
>
> assert (request triggers delay(addr_in, 2) == addr_out)
> @@( posedge clk);
>
> I'm not stuck on names, but on common and useful functionality.
I agree my simple example could be rewritten as above, but I'm
sure I could come up with a more complex one - maybe with
multiple interacting asserts - which would make the point better.
I was merely suggesting that the C "(,,,)" syntax could be used
as an alternative to "begin...end" usefully in the context of
assertions - i.e. it's not ugly and saves doing an out-of-context
rountine call to evaluate a compound statement.
Kev.
This archive was generated by hypermail 2b28 : Mon Mar 18 2002 - 11:06:56 PST