Chapter 4 - Behavioral Descriptions
Section 3 - Signals and Processes
This section is short, but contains important information about the use
of signals in the process statement. The issue of concern is to avoid
confusion about the difference between how a signal assignment and variable
assignment behave in the process statement. Remember a signal assignment,
if anything, merely schedules an event to occur on a signal and does not
have an immediate effect. When a process is resumed, it executes from
top to bottom and no events are processed until after the process is complete.
This means, if an event is scheduled on a signal during the execution of a
process, that event can be processed after the process has
completed at the earliest. Let's examine an example of this behavior. In the
process two events are scheduled on signals x and z.
signal x,y,z : bit;
If the signal y changes then an event will be scheduled on
x to make it the same as y. Also, an event is scheduled
on z to make it the opposite of x. The question is,
will the value of z be the opposite of y? Of course, the
answer is no, because when the second statement is executed, the event
on x has not been processed yet, and the event scheduled on z
will be the opposite of the value of x before the process begins.
This is pointed out because this is not necessarily the intuitive behavior
and because variables operate differently. For example, in
variable x,z : bit;
The value of the variable z would be the opposite of the value
of y because the value of the variable x is changed
The previous section is Behavioral Descriptions -
The next section is Behavioral Descriptions - Input and
Copyright 1995, Green Mountain Computing Systems.
Copying this document is strictly prohibited. Making any non-volatile or
semi-permanent copies of this document is a violation of international