Professional Documents
Culture Documents
26 October - 20 November, 2009: VHDL & FPGA Architectures Design Verification & Timing Concepts
26 October - 20 November, 2009: VHDL & FPGA Architectures Design Verification & Timing Concepts
Nizar Abdallah
ACTEL Corp.2061 Stierlin Court Mountain View
CA 94043-4655
U.S.A.
VHDL & FPGA Architectures
Nizar Abdallah, Ph.D.
nizar@ieee.org
Outline
Introduction to FPGA & FPGA Design Flow
Synthesis I – Introduction
Synthesis II - Introduction to VHDL
Synthesis III - Advanced VHDL
Design verification & timing concepts
Programmable logic & FPGA architectures
Actel ProASIC3 FPGA architecture
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 2
Design Verification and
Timing Concepts
Timing in the Design Flow
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 4
Simulators versus Verifiers
Simulators
Circuit-Level
Timing
Switch-Level
Logic-Level
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 5
Timing Driven Methodology
Barto's Law:
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 6
Timing Driven Methodology
Golden Rule:
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 7
What are Timing Constraints?
Maximum or minimum limits
placed on timing paths
Usually expressed in ns. or ps.
There are basically 4 types of timing paths in a
synthesized digital design:
Input to registers
Registers to output
Input to output
Registers to registers
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 8
Timing Paths
These basic timing paths can apply to:
A module within an ASIC/FPGA
A whole ASIC/FPGA
A system with multiple chips
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 9
Flip-Flop Timing
D Q
CLK
INFER:
INFER: process
process (CLK)
(CLK) begin
begin
if
if (CLK’event and CLK =‘1’)
(CLK’event and CLK =‘1’) then
then
QQ <=<= D;
D;
end
end if
if ;;
end
end process
process INFER;
INFER;
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 10
Flip-Flop Timing Parameters
D Q
CLK
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 11
Flip-Flop Timing Parameters (cont’d)
D Q
CLK
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 12
Flip-Flop Timing Parameters (cont’d)
D Q
CLK
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 13
Flip-Flop Timing Parameters (cont’d)
D Q
CLK
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 14
Flip-Flop Timing Parameters (cont’d)
D Q
CLK
Clock Parameters
Clock cycle time (tCYC), minimum
Clock pulse width high (tCH), minimum
Clock pulse width low (tCL), minimum
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 15
Constraining Designs @ Board-Level
create_clock
set_input_delay
set_multicycle_path
set_false_path
set_output_delay
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 16
Constraining Designs
Design Environment
Operating conditions (Process / Voltage / Temperature)
Worst: to fix the setup violations
Typical: mostly ignored
Best: to fix the hold violations
Timing Exceptions
False Paths
Maximum Path Delay
Minimum Path Delay
Multi-cycle Paths
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 17
Timing Analysis: Setup/Hold Check
Create Clock: reg-to-reg requirement
in1 D D
regA regB
clk
Clk at
regA
setup
Clk at
regB hold
Arrival/Required FF1
FF1 D FF2
FF2
20
2
10 CP
CK CP
15
Ck
0 20 40
FF1:CP FF2:CP
10 35
FF2:D Arrival Time CK–FF1:CP FF1:CP – FF2:D = 30
FF2:D Required Time CK-FF2:CP -STP = 33
= +3
slack
Arrival/Required FF1
FF1 D FF2
FF2
10 4
CP CP
CK
5 10
CK
0 20
FF1:CP
5
FF2:CP
15
FF2:D Arrival Time from CK FF1:CP FF1:CP-FF2:D = 19
FF2:D Required Time from CK FF2:CP 1 = 16
= +3
slack
Slack = ArrivalTime – RequiredTime (Violation if < 0)
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 20
Timing Analysis: Multi-cycle
set_multicycle_path: reg-to-reg exception
in1 D D
regA regB
clk
Clk at
regA
setup
Clk at
regB
IN
Clock CK
Generator
2.0ns 3.0ns
Option “-min” for hold check
CK Option “-max” for setup check
0 15 30
clk
23 ns 7 ns
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 23
Output Delay Constraint
OUT
CK
2.0ns 3.0ns
Option “-min” for hold check
CK Option “-max” for setup check
0 15 30
clk
11 ns 19 ns
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 25
Cross-Domain Analysis
common
period
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 26
Design Overview
Block Diagram
FPGA 3
Local Bus
FPGA 1
128K x 8
SRAM
Shared
SRAM 128K x 8
SRAM
1553 BC
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 27
Design Overview
System Timing Requirements
PCI
33 MHz Clock
External set up time – 7 ns
Clock to output – 10 ns
Local Bus
Reg - Reg
24 MHz Clock
I/O is asynchronous
External Setup
Clock to Out
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 28
Design Overview
Timing Closure Loop
clock I/O false paths multicycle
Enter synthesis
constraints via SDC Improve
results
Results If timing closure
OK Not achieved in p/r
Back annotated
Timing Simulation PASS FAIL
VHDL & FPGA Architectures © 2006 Nizar Abdallah / Actel Corp. November, 2006 29