Hardware Description Language
Hardware Description Language
LANGUAGE
HARDWARE DESCRIPTION LANGUAGE
• Manual methods for designing logic circuits are feasible only when the
circuit is small.
• For example, an HDL description of an AND gate describes how the logic
value of the gate’s output is determined by the logic values of its inputs.
HARDWARE DESCRIPTION LANGUAGE
• As a documentation language, an HDL is used to represent and
document digital systems in a form that can be read by both
humans and computers and is suitable as an exchange language
between designers.
• The simulation of a circuit predicts how the hardware will behave before it is actually
fabricated. Simulation detects functional errors in a design without having to physically
create and operate the circuit.
• Errors that are detected during a simulation can be corrected by modifying the
appropriate HDL statements. The stimulus (i.e., the logic values of the inputs to a
circuit) that tests the functionality of the design is called a test bench.
• Thus, to simulate a digital system, the design is first described in an HDL and then
verified by simulating the design and checking it with a test bench, which is also written
in the HDL. An alternative and more complex approach relies on formal mathematical
methods to prove that a circuit is functionally correct. We will focus exclusively on
simulation.
Logic Synthesis
• Logic synthesis is the process of deriving a list of physical components and their
interconnections (called a netlist ) from the model of a digital system described in
an HDL.
• The netlist can be used to fabricate an integrated circuit or to lay out a printed
circuit board with the hardware counterparts of the gates in the list. Logic
synthesis is similar to compiling a program in a conventional high-level language.
• This step is done after logic synthesis specifies the actual devices that
will compose a circuit and before the circuit is released for production.
Fault Simulation
• In VLSI circuit design, fault simulation compares the behavior of an ideal
circuit with the behavior of a circuit that contains a process-induced flaw.
Dust and other particulates in the atmosphere of the clean room can cause a
circuit to be fabricated with a fault.
• A circuit with a fault will not exhibit the same functionality as a fault-free
circuit. Fault simulation is used to identify input stimuli that can be used to
reveal the difference between the faulty circuit and the fault-free circuit.
• These test patterns will be used to test fabricated devices to ensure that only
good devices are shipped to the customer. Test generation and fault
simulation may occur at different steps in the design process, but they are
always done before production in order to avoid the disaster of producing a
circuit whose internal logic cannot be tested.
VHDL and Verilog
• Companies that design integrated circuits use proprietary and
public HDLs. In the public domain, there are two standard HDLs
that are supported by the IEEE: VHDL and Verilog. VHDL is a
Department of Defense–mandated language. (The V in VHDL
stands for the first letter in VHSIC, an acronym for very high-
speed integrated circuit.)
• Blank spaces are ignored, but they may not appear within the text of a
keyword, a user-specified identifier, an operator, or the representation
of a number.
• The term module refers to the text enclosed by the keyword pair
module . . . endmodule. A module is the fundamental descriptive unit
in the Verilog language. It is declared by the keyword module and must
always be terminated by the keyword endmodule.
Circuit to demonstrate an HDL
• The event control expression specifies when the statements will execute. The
target output of a procedural assignment statement must be of the reg data
type.
• Contrary to the wire data type, whereby the target output of an assignment
may be continuously updated, a reg data type retains its value until a new
value is assigned.
Behavioral: Two-to-One Line Multiplexer
Gate-Level Modeling
• In this type of representation, a circuit is specified by its logic gates and
their interconnections. Gatelevel modeling provides a textual description
of a schematic diagram.
• They are all declared with the lowercase keywords and, nand, or, nor, xor,
xnor, not, and buf . Primitives such as and are n -input primitives.
• They can have any number of scalar inputs (e.g., a three-input and
primitive). The buf and not primitives are n -output primitives. A single
input can drive multiple output lines distinguished by their identifiers.
Gate-Level Modeling
Combinational Logic Modeled with Boolean Equations
F=(A’C)AB+BCD’
• module Circuit_A (A, B, C, D, F);
• input A, B, C, D;
• output F;
• wire w, x, y, z, a, d;
• or (x, B, C, d);
• and (y, a ,C);
• and (w, z ,B);
• and (z, y, A);
• or (F, x, w);
• not (a, A);
• not (d, D);
• endmodule
• module Circuit_C (y1, y2, y3, a, b);
• output y1, y2, y3;
• input a, b;
• assign y1 = a || b;
• and (y2, a, b);
• assign y3 = a && b;
• endmodule