Académique Documents
Professionnel Documents
Culture Documents
Introduction
Jim Duckworth
ECE Department, WPI
Module 1
Topics
Background to VHDL
Introduction to language
Programmable Logic Devices
CPLDs and FPGAs
FPGA architecture
Nexys 2 Board
Module 1
Documentation
Flexibility (easier to make design changes or mods)
Portability (if HDL is standard)
One language for modeling, simulation (test benches), and
synthesis
Let synthesis worry about gate generation
Engineer productivity
Module 1
VHDL
VHSIC Hardware Description Language
Very High Speed Integrated Circuit
Module 1
VHDL References
FPGA Prototyping by VHDL Examples Xilinx Spartan-3 Version,
by Pong P. Chu, 2008, Wiley
RTL Hardware Design using VHDL Coding for Efficiency,
Portability, and Scalability by Pong P. Chu, 2008, Wiley.
IEEE Standard VHDL Language Reference Manual
(1076 - 1993) (1076-2002)
Module 1
ENTITY mux IS
PORT (a, b, sel : IN std_logic;
y : OUT std_logic);
END mux;
ARCHITECTURE behavior OF mux IS
BEGIN
y <= a WHEN sel = 0 ELSE
b;
END behavior;
Module 1
Module 1
Basic Terminology
Note: VHDL is case insensitive, free format.
Comments are preceded by two consecutive dashes.
comment ends at end of current line
Module 1
U unitialized
X forcing unknown
0 forcing logic 0
1 forcing logic 1
Z high impedance
W weak unknown
L weak logic 0
H weak logic 1
- dont care
-- library
-- package
Module 1
Entity
The ENTITY defines the external view of the
component
PORTS are the communication links between
entities or connections to the device pins
Note the use of libraries before entity description
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY mux IS
PORT (a, b, sel : IN std_logic;
y : OUT std_logic);
END mux;
10
Module 1
Architecture
The ARCHITECTURE defines the function or behavior or
structure of the ENTITY
Consists of concurrent statements, e.g.
Process statements
Concurrent Signal Assignment statements
Conditional Signal Assignment statements
11
Module 1
VHDL Notes
There is no explicit reference to actual hardware
components
There are no D-type flip-flops, mux, etc
Required logic is inferred from the VHDL description
Same VHDL can target many different devices
12
Module 1
13
Module 1
Logic
Standard
Logic
Programmable
Logic Devices
(PLDs)
SPLDs
(PALs)
ASIC
Gate
Arrays
Cell-Based
ICs
CPLDs
Acronyms
SPLD = Simple Prog. Logic Device
PAL = Prog. Array of Logic
CPLD = Complex PLD
FPGA = Field Prog. Gate Array
FPGAs
Common Resources
Configurable Logic Blocks (CLB)
Interconnect or Routing
Full Custom
ICs
14
Module 1
Architecture
PAL/22V10-like
More Combinational
Gate array-like
More Registers + RAM
Density
Low-to-medium
0.5-10K logic gates
Medium-to-high
1K to 3.2M system gates
Performance
Predictable timing
Up to 250 MHz today
Application dependent
Up to 200 MHz today
Interconnect
Crossbar Switch
15
Incremental
Module 1
Configurable
Logic Blocks (CLBs)
Tristate
Buffers
Global
Resources
Jim Duckworth, WPI
16
Module 1
System CLBs
CLB
Block
Gates (4 slices) flip-flops Ram (bits)
User
IO
Price
(250K)
XC3S200
200K
480
3,840
216K
173
$2.95
XC3S1000
1M
1,920
15,360
432K
391
$12
XC3S4000
4M
6,912
55,296
1,728K
712
$100
17
Module 1
System CLBs
CLB
Block
User
Gates (4 slices) flip-flops Ram (bits) IO
Price
(250K)
XC3S100E
100K
240
1,920
72K
108
<$2
XC3S500E
500K
1,164
9,312
360K
232
$25 1-off
XC3S1600E
1.6M
3,688
29,504
648K
376
<$9
18
Module 1
CLBs
slices
XC6LX4
600
4,800
XC6LX16
2,278
XC6LX150
23,038
CLB
DSP48A
slices
flip-flops
Block
Ram
(18 Kb)
User
IO
Price
(1 off)
12
132
$10
18,224
32
32
232
$30
184,304
180
268
576
$180
19
Module 1
Input/Output Blocks
20
Module 1
COUT
COUT
BUFT
BUF T
Slice S3
Slice S2
Switch
Matrix
SHIFT
Slice S1
Slice S0
CIN
21
Local Routing
CIN
Module 1
Slice 0
LUT
Carry
PRE
D
Q
CE
CLR
Two independent
carry chains per CLB
LUT
Carry
D PRE
Q
CE
CLR
22
Module 1
23
Module 1
A
B
C
D
24
A B C D Z
0
Module 1
FDRSE _1
D
CE
R
FDCPE
D PRE
CE
CLR
Can be synchronous or
asynchronous
25
LDCPE
D PRE
CE
G
CLR
Module 1
IOB
Output path
Input
Reg DDR MUX
OCK1
ICK1
Reg
OCK2
3-state
Reg
ICK2
Reg
OCK2
Reg
26
PAD
Output
Module 1
27
Module 1
DCI advantages
Improves signal integrity by eliminating stub reflections
Reduces board routing complexity and component count by
eliminating external resistors
Internal feedback circuit eliminates the effects of temperature,
voltage, and process variations
28
Module 1
29
Module 1
4 x 4 signed
8 x 8 signed
18 x 18
Multiplier
Output
(36 bits)
12 x 12 signed
18 x 18 signed
Data_B
(18 bits)
30
Module 1
31
Module 1
32
Module 1
Logic Synthesis
A process which takes a digital circuit description and
translates it into a gate level design, optimized for a
particular implementation technology.
33
Module 1
HDL code
Schematic
Step1: Design
Two design entry methods: HDL(Verilog or
VHDL) or schematic drawings
Synthesis
Synthesize
Step 2: Synthesize to create Netlist
CONSTRAINTS
Translates V, VHD, SCH files into an industry
Netlist
standard format EDIF file
Step 3: Implement design (netlist)
Implementation
Translate, Map, Place & Route
CONSTRAINTS
Implement
Step 4: Configure FPGA
Download BIT file into FPGA
BIT File
34
Module 1
Create Code/
Schematic
HDL RTL
Simulation
Implement
Translate
Functional
Simulation
Synthesize
to create netlist
Map
Place & Route
Attain Timing
Closure
Timing
Simulation
35
Create
Bit File
Module 1
36
Module 1
y0
y1
sel0
y2
sel1
y3
sel2
y4
y5
y6
y7
37
Module 1
38
Module 1
=========================================================================
*
HDL Synthesis
*
=========================================================================
Synthesizing Unit <decoder>.
Related source file is "C:/ee574/nexsys2/decoder/decoder.vhd".
Found 1-of-8 decoder for signal <y>.
Summary:
inferred
1 Decoder(s).
Unit <decoder> synthesized.
39
Module 1
40
Module 1
41
Module 1
42
Module 1
43
Module 1
44
Module 1
Verilog Background
1983: Gateway Design Automation released Verilog HDL
Verilog and simulator
1985: Verilog enhanced version Verilog-XL
1987: Verilog-XL becoming more popular (same year
VHDL released as IEEE standard)
1989: Cadence bought Gateway
1995: Verilog adopted by IEEE as standard 1364
Verilog HDL, Verilog 1995
45
Module 1
46
Module 1
Module Created
No separate entity and arch
just module
Ports can be input, output, or
inout
Note: Verilog 2001 has
alternative port style:
47
Module 1
48
Module 1
49
Module 1
Verilog Logic
Number formats
50
Module 1
51
Module 1