Module 1 - Introduction To Hardware Description Language
Module 1 - Introduction To Hardware Description Language
Description Language
Possible reactions:
1. Large circuit /PCB size will be
needed
3. Time consuming
Our Wish
• Limitations:
1. Only for purely
combinational logic circuit
2. Sequential Operations are not possible
Solution: Digital Programmable
Integrated Circuit
Field Programmable Gate Array (FPGA)
FPGA Development Board
How to program the FPGA
• One way is to wire a digital schematic
circuit
• Eventually, download the design onto
the FPGA
How to Program the FPGA
Disadvantages of Schematic
Design Approach
1. Time consuming
2. Difficult to debug errors found
in simulation
3. Digging through a “spaghetti of
wires” to look for faults requires a
lot of patience
4. Large designs means large
circuit size to deal with
5. Likely to be suited only for ECEs
How to Program the FPGA
A Better way to program the FPGA is to use the HDL
approach
else
cntout <= cntout + 4'b0001;
end
endmodule
Synthesis of the HDL Code
Implementation
Synthesis Tool
• Synthesis converts the HDL code to a hardware equivalence
using a specified Library
• Target Library can be
• standard Cell –for mask production or
• FPGA for design verification
• A code that passes syntax check does not guarantee
synthesizability
• When writing the code, designer should be conscious of the
hardware implementation rather than a software solution
Advantage of using HDL
• The code is human readable
• The code can merely represent the behavior of the
intended project (you don’t necessarily have to think
gate level)
• Debugging is a lot easier than having to sift through a
spaghetti of wires
• Converting the code to circuit is easy and fast. (Note:
this depends on the user’s ability to write the code
properly)
Popular HDL
•Verilog
•VHDL
•System C
Learning Verilog
• Verilog- Adopted by the Japanese companies. Chosen
by others due to its simpler structure.
[http://www.xilinx.com/itp/xilinx7/help/iseguide/mergedProjects/hdledit/html/he_verilog_reserved_words.htm ]
Verilog Reserve Words
Example:
module ha ( a, b, s, c);
Port Declaration
input a, b;
output s, c;
Variable / Wire Declaration
assign s1 = a ^ b; Wire/Variable
assign c1 = a & b;
assign s = s1 ^ c;
assign c2 = s1 & c; Body
endmodule
Verilog Syntax
signal Assignment Statement
This is used in concurrent area.
e.g. assign c = b;
As a general rule: