Re: LRM 5.x: Unclear about when block refires on same event that changed


Subject: Re: LRM 5.x: Unclear about when block refires on same event that changed
From: VhdlCohen@aol.com
Date: Wed Feb 14 2001 - 11:38:14 PST


Mike,
If I understand you correctly, with the following example:
 always @ (a) begin : P1
      a = ~a;
   end
   
 always @ ( a or b or c) begin : P2
      if (b) a = c ^ a;
   end

From LRM (and I may be wrong in the interpretation) if when "a" changes, P1
becomes sensitized, and executes once at time T (becuase LRM states the
"other"). P2 then fires, and could cause a change in "a". That should then
cause (maybe?) P1 to refire bcause "(LRM) .. the occurrence of an
explicitly named event that is triggered from other procedures (an explicit
event)." P2 causes event on "a" should refire P1, which previously may or
may not have fired yet (depending on execution order). To prevent this
misunderstanding, what you are saying makes sense:
"the event control expression is sensitized only while the behavior is
suspended at that location in the procedural block." In other words, all
processes that are sensititized on an event become scheduled to fire because
of that event, and will not refire in that time because of a change in the
the same event.
Thus, in the above example, when "a" changes at time T, P1 and P2 become
scheduled to fire at time T, and will fire only once because of a change in
"a".
Another way of saying it is "all blocks sentitive to an event on a net or reg
will be scheduled to to executed when there is an event on that net or reg.
Once a block is executed because of that event, it will not be rexecuted
because of a change in that same event."

In above example, what happens if you have multiple blocks sensitive to "a",
and "a" transitions from 1 to 0 (event). P1 causes "a" to transition from 0
to 1.
Will P2 fire if executed after P1 as a result of an event on "a". By the time
P2 sees "a" there was no event (was a 1, is now a 1)?
    
Ben

In a message dated 2/14/01 10:11:10 AM Pacific Standard Time,
eagle64@email.msn.com writes:
> Ben - You've raised some questions that are intriguing, because the passage
> I cited does not deal with the possibiity that an event on 'a" could
> trigger an event in another behavior which triggers a change of "a." The
> circular feedback through one or more other behaviors back to teh event
> control expression of the behavior n which 'a" was first changed does not
> seem to be covered explicitly by the statement. Maybe what really needs to
> be said is that the event control expression is sensitized only while the
> behavior is suspended at that location in the procedural block.
>
> Mike
>
> ----- Original Message -----
> From: <A HREF="mailto:VhdlCohen@aol.com">VhdlCohen@aol.com</A>
> To: <A HREF="mailto:eagle64@email.msn.com">eagle64@email.msn.com</A>
> Sent: Wednesday, February 14, 2001 10:11 AM
> Subject: Re: LRM 5.x: Unclear about when block refires on same event that
> changed
>
>
> Mike,
> Many thanks for the explanation.
> Sincerely,
> Ben
>
> In a message dated 2/13/01 8:27:47 PM Pacific Standard Time,
> <A HREF="mailto:eagle64@email.msn.com">eagle64@email.msn.com</A> writes:
>
>
> >> Ben - Section 9.7 of the LRM for IEEE-1364 says: "The second type of
>> timing
>> control is the event expression, which allows execution to be delayed
>> until
>> the occurrence of some simulation event occuring in a procedure executing
>> concurrently with this procedure. A simulation event can be a change of
>> value on a net or register (an implicit event) or the occurrence of an
>> explicitly named event that is triggered from other procedures (an
>> explicit
>> event)." The key word here is "other."
>>
>> Mike Ciletti
>>
>

------------------------------------------------------------------------------

--------------------------------------
Ben Cohen     Publisher, Trainer, Consultant    (310) 721-4830
http://www.vhdlcohen.com/                 vhdlcohen@aol.com  
Author of following textbooks:
* Component Design by Example ... a Step-by-Step Process Using
  VHDL with UART as Vehicle",  2001 isbn  0-9705394-0-1
* VHDL Coding Styles and Methodologies, 2nd Edition, 1999 isbn 0-7923-8474-1
* VHDL Answers to Frequently Asked Questions, 2nd Edition, isbn 0-7923-8115
------------------------------------------------------------------------------

--------------------------------------



This archive was generated by hypermail 2b28 : Wed Feb 14 2001 - 11:43:56 PST