From: Michael McNamara (mac@surefirev.com)
Date: Tue Aug 17 1999 - 21:56:30 PDT
Steven Sharp writes:
> While reviewing Draft 3, I looked back at this e-mail. Mac's answers are
> off in a couple of places.
>
> > > repeat (3) @(posedge clk) y = a + 1; // execute y = a+1 three times on the
> > > next three posedge clks
> > Sorry. It's legal, but Nope, you have the meaning
> > wrong. Correct meaning is:
> > evaluate a + 1 into a temp. block until the occurance of 3
> > posedges on clk. Assign temp to y.
>
> Mac is describing
> y = repeat (3) @(posedge clk) a + 1;
>
> Cliff's description was correct.
I stand corrected.
>
> > > repeat (3) @(*) y = a + 1; // execute y = a+1 three times on the next
> > > three changes on "a"??
> > Nope. Right answer is:
> > Evaluate a+1 into a temp.
> > Wait for three changes on 'a'.
> > Assign temp to y.
>
> Mac is describing
> y = repeat (3) @(*) a + 1;
>
> Cliff's description was correct.
>
I stand corrected.
> >
> > > repeat (3) @*; y = a + 1; // No wait (wasted repeat statement with @*) but
> > > execute y = a+1 ????
> > Yeap.
>
> There is no direct equivalent to @(). However, a continuous assignment with
> only constants on the RHS is analogous. Such an assignment never wakes up
> again after the initial evaluation. So the correct behavior would not be
> "no wait", but "wait forever". It means wait until one of the signals on my
> list changes, which never happens because there are no signals on the list.
>
I agree; in truth, trying repeat (3) @(); gives one a syntax error.
Perhaps repeat (3) @*; should also give a syntax error?
You are drawing the analogy to repeat (3) @(2); which does block
forever, but I believe this is different than blocking on nothing at all.
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:29 PDT
and
sponsored by Boyd Technology, Inc.