An Introduction To VHDL: What Is VHDL Basic Design Methodology Synthesis Design Flow FPGA Architecture Simulation and Synthesis Signal Values
An Introduction To VHDL: What Is VHDL Basic Design Methodology Synthesis Design Flow FPGA Architecture Simulation and Synthesis Signal Values
An introduction to VHDL: What is VHDL Basic design methodology Synthesis design flow FPGA architecture Simulation and Synthesis Signal Values
An Introduction to VHDL
What is VHDL?
VHDL is a hardware description language that can be used to model a digital system VHDL is often quoted to be an acronym for Very Hard Description Language or for VHSIC Hardware Description Language VHDL is an IEEE standard as well as an ANSI standard for describing digital systems The standard revised every five years: IEEE Std 1076-1987 IEEE Std 1076-1993 IEEE Std 1164-1993
Note: The material on slides 2-21 can be found in Chapter 4 of the text book
An Introduction to VHDL
Major Capabilities
It contains elements that can be used to describe the behavior, dataflow, and structure of the digital systems It provides support for modeling the system hierarchically and also supports top-down and bottom-up design methodologies Models written by this language can be verified using a VHDL simulator. The language is not technology-specific It supports both synchronous and asynchronous timing models Test benches can be written using the same language to test other VHDL models
Ali Elkateeb, 2004 Computer Hardware Organization/Design 3
Geometric
The source of this slide is The Students Guid to VHDL by P. Ashenden
Ali Elkateeb, 2004
Geometric
The source of this slide is The Students Guide to VHDL by P. Ashenden
Ali Elkateeb, 2004
Functional
Geometric
The source of this slide is The Students Guide to VHDL by P. Ashenden
Ali Elkateeb, 2004
Geometric
The source of this slide is The Students Guide to VHDL by P. Ashenden
Ali Elkateeb, 2004
Hardware Abstraction
VHDL is used to describe a model for a digital hardware device Each model specifies the external view of the device and one or more internal views Internal view: specifies the functionality or structure of the device External view: specifies the interface of the device through which it communicates with the other models in its environment
Hardware Abstraction
External view
Digital System
Model
Device
Internal view
Device model
Hardware Abstraction
Device model 1
Device model 2
Device model N
VHDL view
Entity declaration
Architecture bodies
punctuation
SUM
Half-adder circuit
B CARRY
CARRY
architecture HA_STRUCTURE of HALF_ADDER is component XOR2 port (X, Y: in BIT; Z: out BIT); end component; component AND2 port (L, M: in BIT; N: out BIT); end component; begin X1: XOR2 port map (A, B, SUM); A1: AND2 port map (A, B, CARRY); end HA_STRUCTURE;
Ali Elkateeb, 2004 Computer Hardware Organization/Design 16
Signal assigned a value always After a certain Delay This example is not good!!
Architecture dec_sequential of Decoder2x4 is Begin process (A, B, Enable) -- sensitivity list variable Abar, Bbar:Bit; begin Abar := not A; -- variable is always assigned a value Bbar := not B; -- instantaneously (assignment use := compound symbol) If Enable = 1 then Z(3) <= not (A and B); Z(0) <= not (Abar and Bbar); Z(2) <= not (A and Bbar); Z(1) <= not (Abar and B); else Z <= 1111; end if; end process; End dec_sequential; Computer Hardware Organization/Design 18
Signal assigned a value always After a certain Delay This example is good!
The material on slides 22 and up can be found in Chapter 1 and 2 of the text book Ali Elkateeb, 2004 Computer Hardware Organization/Design 21
FPGA Architecture
CLB CLB
CLB CLB
CLB CLB
Switch Matrix
Switch Matrix
CLB CLB
CLB CLB
CLB CLB
FPGA Architecture
Slew Rate Control Passive Pull-Up, Pull-Down Vcc
CLB
CLB
D Q Output Buffer Pad
Switch Matrix
CLB
CLB
Programmable Interconnect
C1 C2 C3 C4 H1 DIN S/R EC
S/R Control
G4 G3 G2 G1
SD D Q
EC RD
F4 F3 F2 F1
SD D Q
1 H' F'
EC RD
2 Four-input function generators (Look Up Tables) - 16x1 RAM or Logic function 2 Registers - Each can be configured as Flip Flop or Latch - Independent clock polarity - Synchronous and asynchronous Set/Reset
C1 C2 C3 C4 H1 DIN S/R EC
S/R Control
G4 G3 G2 G1
SD D Q
YQ
EC RD
F4 F3 F2 F1
SD D Q
XQ
1 H' F'
EC RD
Look Up Tables
Combinatorial Logic is stored in 16x1 SRAM Look Up Tables (LUTs) in a CLB Example:
Combinatorial Logic
A B C D 0 0 0 0 0 0 1 1 1 1
G Func. Gen.
Z 0 0 0 1 1 1 0 0 0 1
A B C D Z
Capacity is limited by number of inputs, not complexity Choose to use each function generator as 4 input logic (LUT) or as high speed sync.dual port RAM WE
G4 G3 G2 G1
Ali Elkateeb, 2004
0 0 0 0 1 1 1 1 1 1
0 0 1 1 0 0 0 0 1 1
0 1 0 1 0 1 0 1 0 1
. . .
Chip Structure
Programmable Interconnect Points, PIPs (White)
CLB (Red)
Simulation
Why Simulation: To study the properties of the circuit Discrete Event Simulation: A programming-based methodology for accurately modeling the generation of events in physical systems Timestamp: The time at which an event is to occur Timestep: Simulator clock Simulation state: Frozen the system at a timestep and took a snapshot of the values of all of the signals in the system
Simulation
SUM
CARRY
A
event
S C
0ns Ali Elkateeb, 2004 5ns 10ns 15ns 20ns 25ns
Synthesis Synthesis A Process of constructing a physical system from a model VHDL Model
A SU M
CARRY
A Process that operates on three types of information 1. The model of the circuit (e.g. VHDL model) 2. Set of constraints on the resulting circuit, such as speed and area 3. Set of components that are to be used to construct the circuit Synthesis compilers must infer a single hardware implementation from a VHDL description
Ali Elkateeb, 2004 Computer Hardware Organization/Design 30
Signal Values Signal values are normally associated with the output of gates 0 or 1 values to voltage levels at the output of a device For 5V TTL logic circuit
0 : from 0 to 0.4V 1 : from 2.4 to 5V
High-impedance state (Z) Unknown values (X) Initial value of a signal is unknown (U)
Signal Values Dont care value (-) Signal strength Weak 0 (L) [signal go to 0 slowly] Weak 1 (H) Weak unknown (W) Note: Synthesis of Weak unknown (W) and initialized values (U) do not have meaning for a signal (no physical implementations for W and U) This nine-value system used in IEEE 1164 standard