Professional Documents
Culture Documents
Lecture-4 PVL109
Lecture-4 PVL109
Types
Composite
Access
Scalar
Array Record
• In the above example, the first two variable assignments are valid
since they assign integers to variables of type integer.
‘0’ : logic 0
‘1’ : logic 1
‘-’ : Don’t care
'U': uninitialized,
'X': unknown
'Z': High Impedance
'W': Weak signal, can't tell if it should be 0 or 1.
'L': Weak signal that should probably go to 0
‘H': Weak signal that should probably go to 1
VHDL Data Types: Enumerated data type
• The enumerated data type allows a user to specify the list of legal
values that a variable or signal of the defined type may be assigned.
VHDL Data Types: Physical data type
• Example of physical type declaration:
• The physical data type is used for values which have associated units.
• The designer first declares the name and range of the data type and then
specifies the units of the type.
• Notice there is no semicolon separating the end of the TYPE statement and the
UNITS statement.
• The line after the UNITS line states the base unit of the type. The units after the
base unit statement may be in terms of the base unit or another already
defined unit.
• The VHDL access type will not be discussed in detail in this module.
VHDL Data Types: Subtype
• Declaration example:
VHDL Objects: Signal
• Used for communication between components
• Declaration Syntax:
• Declaration example:
VHDL Objects: Variable vs. Signal
• A key difference between variables and signal is the
assignment delay
VHDL Objects: Variable vs. Signal
• In this example, variables are used to achieve the same functionality as
the example in the previous slide
• Files provide the way for a VHDL design to communicate with host
environment
• The package TEXTIO defines powerful routine handling I/O of test files