Presentation on theme: "Blocks Resolved Signals Signal GUARDs Tri-State Buses."— Presentation transcript:
Blocks Resolved Signals Signal GUARDs Tri-State Buses
Sequential versus Concurrent Statement in Simulation Cycle
Blocks Blocks are used for hierarchical partitioning
Signal GUARD A block statement may have a guard expression. bloc k Latch: bloc k(CK'EVENT and CK='1') begin Q <= guarded D after 10ns; end block latch;
Latch: bloc k(CK'EVENT and CK='1') begin Q <= guarded D after 10ns; end block latch; A block statement with guard expression implicitly declares a signal named GUARD. The value of GUARD is always updated to the current value of the guard expression. Guarded signal assignments implicitly reference to the signal GUARD. Signal GUARD may also be explicitly referenced like other signals.
Signal GUARD (cont’d) The equivalent description to the above is the following: Latch: bloc k(CK'EVENT and CK='1') begin Q <= guarded D after 10ns; end block latch;
Guarded Signal Assignments
Guarded Signal Kinds
A signal which has more than one source is called a resolved signal (outputs can be tied together). Such signals are used to model wired-logic or tri-state busses. A resolved signal must have a resolution function associated with it.
Resolution Function A resolution function takes a one-dimensional, unconstrained array of values of the resolved type and returns a value of the resolved type. You can associate the resolution function with a signal in: – the type declaration –or the signal declaration.
An example of resolved signals We add resolution function wand to the package wired_logic See explanation We define the wired and logic here
Resolved signal Now that my signal wand is resolved, I am using S1 without conflict because the system knows how to interpret several assignments on one signal use work.wired_logic.all; Resolution function wand is declared
Tri-State Bus Example Another example of resolution function and resolved signals
Tri-State Function Definition Resolution function Resolved variable This slide shows how to define resolution function tri_state in package four_valued_logic
Definition and use of resolution function in Tri-State Bus Example (cont’d) Now that it is defined, we can use it Because we know system_bus is tri_state fvl we can have many assignments on it
Using Resolution Function for Three State Bus
Driver Resolution Conflict
Example of Bus Resolution Function
Example of Bus Resolution Function Continued
Resolution Function for Subtype
Summary on Resolution Functions
Sources Krzysztof Kuchcinski California State University Northridge