350 likes | 520 Views
Blocks Resolved Signals Signal GUARDs Tri-State Buses. Sequential versus Concurrent Statement in Simulation Cycle. Blocks. Blocks are used for hierarchical partitioning. Blocks. Nested Blocks. Blocks. Guarded Blocks. Guard. Signal GUARD.
E N D
Blocks • Resolved Signals • Signal GUARDs • Tri-State Buses
Blocks Blocks are used for hierarchical partitioning
Signal GUARD • A block statement may have a guard expression. Latch: block(CK'EVENT and CK='1') begin Q <= guarded Dafter 10ns; end block latch;
Latch: block(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) Latch: block(CK'EVENT and CK='1') begin Q <= guarded D after 10ns; end block latch; • The equivalent description to the above is the following:
Resolved Signals • 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 We define the wired and logic here See explanation
Resolution function wand is declared 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 Resolved signal use work.wired_logic.all;
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
Sources • Krzysztof Kuchcinski • California State University Northridge