On Mon, 26 Jul 2004, Jonathan Bromley wrote:
> I don't really follow this. Why is it any different from
> the entirely reasonable example...
>
> always @(b,c,e) begin
> a = b & c;
> d = a & e;
> end
>
> Note that, in this case, the absence of 'a' from the
> sensitivity list is entirely reasonable and probably
> desirable.
Agreed.
> Granted, if I were doing this intentionally for the right
> reasons, I would have declared 'a' locally; but even so,
> presumably if I force 'a' then the process will not
> execute, and 'd' will not follow the forced value?
> And presumably I would then kick myself and say "silly
> me, for trying to force the value of a local variable".
> So I don't see how always_comb has changed anything here.
True. A good argument.
> Forcing the value of an intermediate variable can get
> you into all kinds of trouble, and perhaps should be
> outlawed by tools if possible. For example, what could
> it mean to force 'a' in the following example?
>
> always @(b,c,e) begin
> a = ~b;
> a = a & c;
> d = a & e;
> end
Forcing a would mean I make it independent of its normal dependencies.
But since I have written d as a function of a and not directly as a
function of b and c, then changing a should affect everything which is
dependent on the value of a. In this case, since a is not in the
sensitivity list, then forcing a will not affect d until the next time
b,c, or e changes, when d will update according to the forced value of
a.
I agree that I would like to see a tool not necessarily forbid it,
but at least issue a warning.
-- Shalom Bresticker Shalom.Bresticker @freescale.com Design & Reuse Methodology Tel: +972 9 9522268 Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890 POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478 [ ]Freescale Internal Use Only [ ]Freescale Confidential ProprietaryReceived on Mon Jul 26 01:40:33 2004
This archive was generated by hypermail 2.1.8 : Mon Jul 26 2004 - 01:40:37 PDT