Unit 1 - LP1
Unit 1 - LP1
INTRODUCTION
OBJECTIVE
HDL.
entity RC5_core is
Functional simulation
port(
clock, reset, encr_decr: in std_logic;
data_input: in std_logic_vector(31 downto 0);
data_output: out std_logic_vector(31 downto 0);
out_full: in std_logic;
key_input: in std_logic_vector(31 downto 0);
key_read: out std_logic;
);
end AES_core;
HDL is a formal notation intended for use in all phases of the creation of
electronic systems.
HDL has constructs to handle the parallelism inherent in hardware designs
HDL, when used for systems design, is that it allows the behavior of the required
system to be described (modeled) and verified (simulated) before synthesis
tools translate the design into real hardware (gates and wires).
It also allows for the compilation of an HDL program into a lower level
specification of physical electronic components, such as the set of masks used
to create an integrated circuit.
One important difference between most programming languages and HDLs is
that HDLs explicitly include the notion of time.
Difference Between Programming and
HDL Language
Programming Language HDL
•Middle level language •High level language
•Can only handle sequential instructions •Allows both sequential and concurrent
executions.
•Successfully written with pure logical or •Successful VHDL programmer needs
algorithmic thinking thorough working knowledge of the
hardware circuits
•Don't care about resource usage in C. •Memory and other logic elements are
limited in a FPGA.
•C program is usually ran on a computer •That’s why it is very difficult to implement
which uses a powerful processor with high image processing algorithms in VHDL than
speed. We also don't care about the memory in C.
usage.
Programming Language Vs Verilog
Types of HDL
HDLs for analog circuit design
Name Description
Analog Hardware Descriptive an open analog hardware
Language description language
a proprietary analog hardware
SpectreHDL
description language
an open standard extending Verilog
Verilog-AMS (Verilog for Analog
for analog and mixed analog/digital
and Mixed-Signal)
simulation
VHDL-AMS (VHDL with a standardized language for mixed
Analog/Mixed-Signal extension) analog/digital simulation
a proprietary analog hardware
HDL-A
description language
HDL - Digital
The two most widely-used and well-supported HDL varieties used in industry are Verilog and VHDL.
Name Description
Advanced Boolean Expression Language (ABEL) basic HDL
Altera Hardware Description Language (AHDL) a proprietary language from Altera
AHPL A Hardware Programing language
Bluespec high-level HDL based on Haskell
Bluespec SystemVerilog (BSV) based on Bluespec, with Verilog HDL like syntax.
C-to-Verilog Converter from C to Verilog
JHDL based on Java
M A HDL from Mentor Graphics
My HDL based on Python (embedded DSL)
PALASM for Programmable Array Logic (PAL) devices
ROCCC (Riverside Optimizing Compiler for
Free and open-source C to HDL tool
Configurable Computing)
RHDL - Ruby (hardware description language) based on the Ruby programming language
a standardized class of C++ libraries for high-level
SystemC
behavioral and transaction modeling of digital hardware
a superset of Verilog, with enhancements to address system-
SystemVerilog
level design and verification
Verilog One of the most widely-used and well-supported HDLs
VHDL (VHSIC HDL) One of the most widely-used and well-supported HDLs
Popular HDL Language
The two most widely-used and well-supported HDL varieties used in industry are
1. Verilog HDL
2. VHDL. (Very High Speed Integrated Circuit HDL)
HDL Modeling Capability
General Properties
Purpose of VHDL and Verilog HDL are same but they differ in
their syntax and the levels of circuit descriptions.
Supports Digital only doesn’t support analog circuits.
Purpose is to create a Digital IC.
Basic Requirement to learn the language – Digital Electronic
Circuits
Tools Support: Xilinx ISE , Cadence
Verilog HDL
Based on C, originally Cadence proprietary, now an IEEE Standard.
File Extension .v
Used to describe the functionality, timing and simulate the digital hardware.
Verilog HDL is a formal notation intended for use in all phases of the creation of
electronic systems. Because it is both machine readable and human readable.
Cadence
– Verilog XL – simulator
– NC Verilog – simulator
– Simvision–waveform viewer and environment
Mentor Graphics
- Leonardo Spectrum-Simulator
- Precision Synthesizer- Simulator
- Modelsim-Simulator,Waveform viewer
Xilinx ISE
Altera Quartus II
Hierarchy
Applications
Tool Flow
Design Methodologies
There are 2 types of design methodologies:
1. Top-down design methodology
2. Bottom-up design methodology
in1
out1
in2
out2
33
Module (cont)
Name: arith module arith (out1, out2, in1, in2);
output out1, out2;
input in1, in2;
…
…
endmodule
34
Module Port
Name: arith1
3 types of module port
in1
bi_out ► input
in2
► output
out
in3
► inout
35
Module Port (cont)
Name: arith1 module arith1 (bi_out, out, in1,
in2, in3);
in1 inout bi_out;
bi_out
output out;
input in1, in2;
in2
input in3;
…
out
…
in3
endmodule
36
Comments in Verilog
/* Block Comment */
Data Types Value Levels
Logical (0,1,x,z) Operation
Verilog Number
Format:
<number of bit><base><number>
<base> ‘b, ‘B, ‘d, ‘D, ‘o, ‘O, ‘h, ‘H. Default is ‘d
40
Representation of Number in Verilog
What do you infer from this picture ?
Logical (0,1,x,z) Operation
Sized Number
Unsized Number
43
X or Z Values
X – Unknown Value
Underscore Characters:
Behavioral Modeling
Can use only reg data type (within initial and always
constructs)
Cannot use wire data type
47
Vectors
Reg datatypes can be declared as vectors (multiple bit widths).
49
Try Yourself
Contd..,
Integer, Real, Time Register Data Types
Integer
It is a general purpose data types used for manipulating quantities.
Keyword – integer.
Default width for an integer is the host machine word size, but it is
at least 32 bits
Keyword – real.
When a real value is assigned to an integer , the real number is rounded off to
the nearest integer.
Time
Used to Store the simulation time.
Keyword – time.
• Keyword – parameter.