blocks resolved signals signal guards tri-state buses
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
•Blocks
•Resolved Signals
•Signal GUARDs
•Tri-State Buses
Sequential versus Concurrent Sequential versus Concurrent Statement in Simulation CycleStatement in Simulation Cycle
BlocksBlocks Blocks are used for Blocks are used for hierarchical hierarchical partitioningpartitioning
BlocksBlocks
Nested BlocksNested Blocks
BlocksBlocks
Guarded BlocksGuarded Blocks
GuardGuard
Signal GUARDSignal GUARD
• A block statement may have a guard expression.
Latch: blocblockk(CK'EVENT and CK='1')
begin
Q <= guarded D after 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)Signal GUARD (cont’d)
• The equivalent description to the above is the following:
Latch: block(CK'EVENT and CK='1') begin Q <= guarded D after 10ns; end block latch;
Guard ExpressionGuard Expression
Guarded Signal Guarded Signal AssignmentsAssignments
Guarded Signal KindsGuarded Signal Kinds
DisconnectsDisconnects
DriversDrivers
Resolved Resolved SignalsSignals
Resolved SignalsResolved 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 FunctionResolution 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 An example of example of
resolved resolved signalssignals
We add resolution We add resolution function wand to the function wand to the package wired_logicpackage wired_logic
See See explanationexplanation
We define theWe define the wired andwired and logic logic herehere
Resolved Resolved signalsignal
Now that my Now that my signal wand is signal wand is resolved, I am resolved, I am using S1 without using S1 without conflict because conflict because the system the system knows how to knows how to interpret interpret several several assignments on assignments on one signalone signal
use work.wired_logic.all;use work.wired_logic.all;
Resolution function wand is declared Resolution function wand is declared
Tri-State Bus ExampleTri-State Bus Example
• Another example of resolution function and resolved signals
Tri-State Tri-State Function Function DefinitionDefinition
Resolution Resolution functionfunction
Resolved Resolved variablevariable
This slide shows how to This slide shows how to define resolution function tri_statedefine resolution function tri_state
in package four_valued_logicin package four_valued_logic
Definition and use of resolution function in Definition and use of resolution function in Tri-State Bus Example (cont’d)Tri-State Bus Example (cont’d)
Now that it is defined, we Now that it is defined, we can use itcan use it
Because we Because we know know system_bus system_bus is tri_state is tri_state fvl we can fvl we can have many have many assignments assignments on iton it
Resolution FunctionResolution Function
Resolution FunctionResolution Function
Using Resolution Function for Three Using Resolution Function for Three State BusState Bus
Driver ResolutionDriver Resolution
Driver Resolution ConflictDriver Resolution Conflict
Example of Bus Resolution FunctionExample of Bus Resolution Function
Example of Bus Resolution Function Example of Bus Resolution Function ContinuedContinued
Example of Bus Resolution Function Example of Bus Resolution Function ContinuedContinued
Resolution Function Resolution Function for Subtypefor Subtype
Summary on Resolution Summary on Resolution FunctionsFunctions
SourcesSources• Krzysztof Kuchcinski
• California State University Northridge