5.0 Data Type Declarations
Verilog HDL constructs that represent hierarchy scope are:
Each scope has its own name space. An identifier name defined within a scope is unique to that scope. References to an identifier name will search first in the local scope, and then search upward through the scope hierarchy up to a module boundary.
trireg (capacitance_strength) [size
size is a range from
](most-significant-bit to least-significant-bit).
- The msb and lsb must be integers, integer parameters or an expression that resolves to an integer constant.
- Either little-endian convention (the lsb is the smallest bit number) or big-endian convention (the lsb is the largest bit number) may be used.
- The maximum vector size is at least 65,536 bits (216).
array_size is from
first_address and last_address must be integers, integer parameters, or an expression that resolves to integer.
- Either ascending or descending address order may be used.
- The maximum array size is at least 16,777,216 words (224).
decay_time (optional) specifies the amount of time a trireg net will store a charge after all drivers turn-off, before decaying to logic X. The syntax is
). The default decay is infinite.
Register Data Types
Keyword Functionality Register data types are used as variables in procedural blocks. TOP
Data Types Keyword Functionality Net data types connect structural components together. TOP
Types Other Types Functionality TOP Data Type Declaration
Examples Data Type Examples Notes
unsigned variable of any bit size
signed 32-bit variable
unsigned 64-bit variable
double-precision floating point
Simple interconnecting wire
Wired outputs OR together
Wired outputs AND together
Pulls down when tri-stated
Pulls up when tri-stated
Constant logic 0 (supply strength)
Constant logic 1 (supply strength)
Stores last value when tri-stated (capacitance
Run-time constant for storing integers, real
numbers, time, delays, or ASCII strings. Parameters may be redefined for each instance of a
Specify block constant for storing integers, real
numbers, time, delays or ASCII strings
A momentary flag with no logic value or data
storage. Often used for synchronizing concurrent activities within
wire a, b,
3 scalar nets
8-bit net, pulls-up when tri-stated
an 8-bit unsigned variable
reg [7:0] RAM
a memory array; 8-bits wide, with 1K of
a net with rise, fall delays
wire (strong1,pull0) sum
net with drive strength and a continuous
trireg (small) #(0,0,35)
net with small capacitance and 35 time unit decay
Register Data Types
Register data types are used as variables in procedural blocks.
New Data Types
Net data types connect structural components together.
Other Data Types
Data Type Declaration Examples
Data Type Examples