VHDL Programming

(C. Jardin) #1

Subprograms and Packages 123


Driver Values

Initial
Value

Z HZL

H

H

X Resultant Value

Figure 5-3
Four State Resolution
with Three Values.


Because there are two drivers, the loop is executed twice. The first time
through, the loop variable result contains the initial value Z. The first
driver value is also a Zvalue. Value Zcompared with value Zproduces a
resulting value Z.
The next iteration through the loop retrieves the next driver value,
which is H. The value Hcompared with value Zreturns value H. The
function therefore returns the value Has the resolved value of the signal.
Another case is shown in Figure 5-3. In this example, there are three
drivers, and the resolution function executes the loop three times. In the
first iteration of the loop, the initial value of result (Z) is compared with
the first driver value (H). The value His assigned to result. In the next
iteration, result (H) is compared with the second driver (Z). The value H
remains in resultbecause the value Zis weaker. Finally, the last itera-
tion result (H) is compared with the last driver value (L). Because these
values are of the same strength, the value Xis assigned to result. The
value Xis returned from the function as the resolved value for the signal.

NINE-VALUE RESOLUTION FUNCTION Some simulators use
more complex types to represent the value of a signal. For instance, what
might a resolution function look like for a nine-value system, typical of
most workstation-based simulators in use currently? Following are the
nine values in the value system:
Free download pdf