Title: Xilinx FPGA Design Flow
1Xilinx FPGA Design Flow
Digital System????
2Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
3Project Navigator ???? (1/2)
Multi-document Interface
Source ??
Process Source ??
Transcript ??
4Project Navigator ???? (2/2)
- Source ??
- Sources Tab
- ?? (Project) ???????????FPGA/CPLD
????????????????? Design View???????? - Snapshot Tab
- ????????? Snapshot,?? Snapshot ???????????
Project? - Library Tab
- ???????? Project ????? Library?
- Processes Source ??
- ?????????????
- Transcript ??
- Console, Error, Warning, Tcl Console, and Find in
Files.
5Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
6?????? (1/8)
- Step 1 File ? New Project
1
3
2
7?????? (2/8)
- ??? FPGA ???? Spartan 3 XC3S200-FT256
8?????? (3/8)
- Step 2 ?????? Source ?,?? Schematic ????
1
2
3
4
9?????? (4/8)
1
10?????? (5/8)
- We only need one Source, so Next.
1
11?????? (6/8)
- We dont need and have any Existing Sources, so
Next.
1
12?????? (7/8)
13?????? (8/8)
1. ?? Source ?,? Device ?
2. ???????
14Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
15Schematic ????? (1/5)
Add I/O Maker
Add wire
Add Symbol
Add Net Name
16Schematic ????? (2/5)
- Step 3 Add ? Symbol and Wire.
17Schematic ????? (3/5)
18Schematic ????? (4/5)
19Schematic ????? (5/5)
- Step 6 Tool ? Check schematic, and check no
error and Save.
1
3
2
20Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
21??????? (1/12)
- Step 7 Source for Behavioral Simulation,?? fa
(fa.sch),add new source,??? fa_tbw?
1
2
3
4
22??????? (2/12)
- We only have one source, so Next.
1
2
23??????? (3/3)
1
24??????? (4/12)
1
2
3
25??????? (5/12)
- Step 8 ?? input ?????,n inputs ? 2n input
combinations.
26??????? (6/12)
- Step 9 Modelsim Simulator ? Simulate Behavioral
Model (Double click mouse left key 2 times).
1
2
27??????? (7/12)
- ?? Modelsim Simulator?,You can see Error
Loading .
28??????? (8/12)
- Step 10 Select work ? Compiler AND2, OR3, and
XOR2. (file path C//Xilinx/9.2i/ISE/verilog/src/
unisims)
1
2
3
4
5
29??????? (9/12)
- Step 11 In fa_tbw, Right click ? Simulate
1
2
3
30??????? (10/12)
- Step 12 Right Click fa_tbw to select Add ? To
Wave ? All items in region.
1
3
4
2
31??????? (11/12)
- Behavioral Waveform Window
32??????? (12/12)
- Step 14 Run all, and Step 15 Zoom fit.
1
2
33Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
34Implementation Constraints File ??? (1/8)
- Step16 Sources for Synthesis/Implementation
- Step 17 ?? fa.sch,Project ? New Source
1
2
3
4
35Implementation Constraints File ??? (2/8)
36Implementation Constraints File ??? (3/8)
- Step 18 ?? fa.ucf,User Constraints ? Assign
Package Pins.
1
2
3
37Implementation Constraints File ??? (4/8)
38Implementation Constraints File ??? (5/8)
- Step 19 ??Package View,??Design Browser ? I/O
Pins
2
1
39Implementation Constraints File ??? (6/8)
- Step 20 ?? Spartan-3 FPGA XC3S200-FT256 ?
Datasheet - Slide Switches
- LEDs
40Implementation Constraints File ??? (7/8)
41Implementation Constraints File ??? (8/8)
- ?? Edit Constraints (Text)
1
2
42Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
43Implement Design (1/6)
1
2
44Implement Design (2/6)
45Implement Design (3/6)
- ???Place Route ? View/Edit Routed Design (FPGA
Editor),?????? LUT ??????
2
1
46Implement Design (4/6)
- FPGA ???????? (Design Summary ? Summary)
47Implement Design (5/6)
- Pinoout Report (Design Summary ? Pinout Report)
1
2
48Implement Design (6/6)
- ??????? Generate Post-Place Route Static
Timing ? Analyze Post-Place Route Static Timing.
1
49Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
50???? (Timing Simulation)
- ? Functional Simulation ??????
1
2
51Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
52Configuration ??? (1/2)
- Step 22 Generate Programming File
53Configuration ??? (2/2)
- ?? Configure Device (iMPACT)
- Step 22 iMPACT ??,?? Configure devices using
Boundary-Scan (JTAG) ? Automatically
2
3
1
4
54Outline of FPGA Design Flow
- Project Navigator ????
- ???? I? Schematic ????
- ?????? (Project)
- ????? (Schematic) ????
- ???? (Functional Simulation) ???
- Testbench ???
- ???? ?? Modelsim Simulator
- ????
- Implementation Constraints File ???
- Implementation Design
- ???? (Timing Simulation) ??? ?? Modelsim
Simulator - Configuration ???
- ????
- ???? II ? Verilog ????
55???? II ? Verilog ????
- From Step 2 to choose a Verilog Module, and
repeat Step3 Step 22. - Design example 4-bit Ripple Carry Counter
564-bit Ripple Carry Counter
q0
q1
q2
q3
Ripple Carry Counter
q
q
q
q
clock
T_FF
T_FF
T_FF
T_FF
reset
q
T_FF
d
q
clock
D_FF
reset
57Design Block
Ripple Carry Counter Top Block (ripple_carry_count
er.v)
module ripple_carry_counter (q, clk, reset)
output 30 q input clk, reset T_FF
tff0 (q0, clk, reset) T_FF tff1 (q1, q0,
reset) T_FF tff3 (q2, q1, reset) T_FF
tff4 (q3, q2, reset) endmodule
Flip-flop D_FF (dff.v)
module D_FF (q, d, clk, reset) output q
input d input clk input reset reg
q always _at_ (posedge reset or negedge clk)
if (reset) q 1'b0 else q d endmodule
Flip-flop T_FF (tff.v)
module T_FF (q, clk, reset) output q
input clk, reset wire d D_FF dff0 (q, d,
clk, reset) not n1 (d, q) endmodule
Example
58Stimulus Block
module rcc_testbench reg clk reg reset wire
30 q ripple_carry_counter r1 (q, clk,
reset) initial clk 1'b0 always 5 clk
clk initial begin reset 1'b1 15 reset
1'b0 180 reset 1'b1 10 reset 1'b0 20
finish end initial monitor(time, "Output q
d", q) endmodule
59Design Block and Stimulus Block
- Two styles of stimulus application
- Stimulus block instantiates design block
- Dummy top-level module
Top-Level Block
(Stimulus block)
clk
reset
clk
d_clk
d_reset
reset
Design Block
q
c_q
q
Design Block
Stimulus Block
Fig. 1. Stimulus block instantiates design block
Fig. 2. Stimulus and design blocks instantiated
in a Dummy top-level module