6.0 Introduction to Hardware Description Languages (HDLs)
Hardware Description Languages (HDLs) are specialized, high-level programming languages used to model and describe the structure and behavior of digital electronic systems. In modern VLSI design, HDLs like VHDL and Verilog are the primary input for synthesis and simulation tools, allowing engineers to describe complex circuits at a much higher level of abstraction than schematic diagrams or transistor-level layouts.
6.1 VHDL (VHSIC Hardware Description Language)
VHDL, which stands for Very High-Speed Integrated Circuit Hardware Description Language, is a powerful language used to model digital systems. A hardware module in VHDL is described using two fundamental constructs:
- Entity Declaration: Defines the “black box” view of the module, specifying its name and its input/output ports.
- Architecture: Describes the internal implementation of the entity, detailing either its behavior or its structure.
VHDL supports three distinct modeling styles that can be used within an architecture:
- Dataflow: Describes the system in terms of how data flows between signals, primarily using concurrent signal assignment statements.
- Behavioral: Describes the algorithmic behavior of a module using sequential statements (like IF, CASE, LOOP) contained within a PROCESS block.
- Structural: Describes a module as a hierarchical set of interconnected components or sub-modules.
6.2 Verilog
Verilog is another widely used HDL for describing digital hardware. It supports design at multiple levels of abstraction, allowing for a flexible approach to modeling complex systems.
The three major levels of abstraction in Verilog are:
- Behavioral: Describes a system using high-level, concurrent algorithms.
- Register-Transfer Level (RTL): Describes the circuit in terms of data transfer between registers and the logical operations performed on that data. This is the most common level for synthesis.
- Gate Level: Describes the system as an interconnection of predefined logic primitives (gates).
Verilog uses two core data types to represent circuit elements:
- wire: Represents a physical connection between components. It cannot store a value and must be continuously driven.
- reg: Represents a data storage object, like a flip-flop or latch, that holds its value until the next procedural assignment.
A critical distinction in Verilog is between its two primary types of procedural assignments, which dictate how reg variables are updated:
- Blocking assignments (=): Are executed sequentially. In a block of code, a blocking assignment must complete before the execution of the next statement can begin.
- Nonblocking assignments (<=): Are scheduled to occur at the end of the current simulation time step. This allows all right-hand-side expressions in a block to be evaluated concurrently before any left-hand-side variables are updated. This distinction is critical for accurately modeling synchronous hardware, where multiple flip-flops must sample their inputs simultaneously on a clock edge. Using blocking assignments can create simulation artifacts and incorrect logic, as the model behaves sequentially rather than in parallel.
Common Verilog Operators
Verilog provides a rich set of operators for modeling hardware behavior, which can be categorized as follows:
| Category | Operators |
| Arithmetic | +, -, *, /, % |
| Relational | ==, !=, >, >=, <, <= |
| Bit-wise | &, ` |
| Logical | !, &&, ` |
| Shift | <<, >> |
| Conditional | (condition) ? true_expression : false_expression |
HDLs like VHDL and Verilog are indispensable tools in the modern VLSI design lifecycle, providing the abstract language needed to design, simulate, and synthesize complex digital hardware efficiently and accurately.