ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design
description
Transcript of ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design
![Page 1: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/1.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
ECE 697F
Reconfigurable Computing
Lecture 11
FPGA-Based System Design
![Page 2: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/2.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Topics
° Basics of sequential machines.
° Sequential machine specification.
° Sequential machine design processes for FPGAs
![Page 3: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/3.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
FSM structure
![Page 4: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/4.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Constraints on structure
° No combinational cycles.
° All components must have bounded delay
° FPGAs benefit from many flip flops and predictable timing
° Asynchronous circuits difficult to implement in FPGAs
![Page 5: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/5.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Synchronous design
° Controlled by clock(s).• State changes at time determined by the clock.
• Inputs to registers settle in time for state change.
• Primary inputs settle in time for combinational delay through logic.
° Machine state is determined solely by registers.• Don’t have to worry about timing constraints, events outside the registers.
![Page 6: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/6.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Non-functional requirements and optimization
° Performance:• Clock period is determined by combinational logic delay.
° Area:• Combinational logic size usually dominates area.
° Energy/power:• Often dominated by combinational logic.
• May be improved by latching values.
![Page 7: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/7.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Register-transfer structure
° Registers fed by combinational logic:
Combinationallogic
D Q
D Q
D Q
D Q
D Q
D Q
![Page 8: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/8.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Counter state transition graph
° Cyclic structure:
01/1
11/2
61/7
7
1/0
…
![Page 9: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/9.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Example: 01 string recognizer
° Recognize 01 sequence in input string:
recognizer
0
0
1
1
0
1
0
0
1
0
0
1
![Page 10: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/10.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Sequential machine definition
° Machine computes next state N, primary outputs O from current state S, primary inputs I.
° Next-state function:• N = (I,S).
° Output function (Mealy):• O = (I,S).
![Page 11: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/11.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Reachability° State is reachable if there is a path from given
state.
° May be created by state encoding:
s0 s1
s2 s3
![Page 12: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/12.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Networks of FSMs
° Functions can be built up from interconnected FSMs:
M1 M2
x
y
I1
O1
I2
O2
External connectionsInternal connections
![Page 13: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/13.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Illegal composition of Mealy machines
Com
bina
tion
allo
gic
DQ
Com
binationallogic
DQ
![Page 14: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/14.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Communicating FSM states s1
s2
M1
0/0
1/0-/1
s3
s4
M2
0/0
-/01/1
![Page 15: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/15.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Product machine
° Two connected machines:
R Si1 o1 i2 o2
![Page 16: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/16.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Behavior of connected machines
R Si1 o1 i2 o2
R1 S10 0 1
R2 S20 1 0
R3 S10 0 0
R3 S10 0 0
![Page 17: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/17.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Forming product machine
° Form Cartestian product of states:• R1S1, R1S2, R2S1, R2S2, R3S1, R3S2.
° For each product state, determine the combined behavior of each product transition:• Required inputs.
• Produced output.
• Next product state.
![Page 18: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/18.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Encoding a shift register
° Symbolic state transition table for shift register:
0 S00 S00 01 S00 S10 00 S01 S00 11 S01 S10 10 S10 S01 01 S10 S11 00 S11 S01 11 S11 S11 1
![Page 19: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/19.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Bad encoding° Let S00 = 00, S01 = 01, S10 = 11, S11 = 10.
° Logic:• Output = S1 S0’ + S1’ S0
• N1 = I
• N0 = I S1’ + I’ S1
![Page 20: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/20.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Good encoding
° Let S00 = 00, S01 = 01, S10 = 10, S11 = 11.
° Logic:• Output = S0
• N1 = I
• N0 = S1
![Page 21: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/21.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Bus interfaces° Requirements:
• High performance.
• Variable signal environment.
° Techniques:• Asynchronous logic.
• Handshaking-oriented protocols.
![Page 22: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/22.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Timing diagrams
a
b
c
stable
0 1
changing
Timing constraint
![Page 23: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/23.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Asynchronous logic
° Distribute timing information with values.• No global clock.
° Clock signal paths must have the same delay as data values.
![Page 24: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/24.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Latching an asynchronous signal D Qadrs
adrs_ready
adrs
![Page 25: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/25.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Asynchronous timing constraints
° Must satisfy setup, hold times.
adrs
Setup timeHold time
![Page 26: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/26.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Bus system design
° Requirements:• Imposed by the other side of the system.
° Constraints:• Imposed by this side of the system.
a b
requirements
constraints
![Page 27: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/27.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
ba
Views of the bus
° Hardware:
D Q D Q
Combinationallogic
![Page 28: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/28.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Views of bus system, cont’d.
° Timing diagram:
ba
D Q D Q
Combinationallogic
x
y
x y
![Page 29: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/29.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Bus protocols° Basic transaction:
• four-cycle handshake.
a
b
![Page 30: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/30.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Handshake machine
° Each side is an FSM (possibly asynchronous):
a b0 1
Go
ackack
enq
0 1
enq
ack
![Page 31: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/31.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Advanced transactions
° Multi-cycle transfers:• Several values on one handshake.
• May use implicit addressing.
![Page 32: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/32.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
PCI bus
° Used for box-level system interconnect.
° Two versions:• 33 MHz.
• 66 MHz.
° Supports advanced transactions.
![Page 33: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/33.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Platform FPGAs
° Put all the logic for a system on one FPGA.
° Requires large FPGAs plus:• Specialized logic:
- I/O support;
- memory interface.
• CPUs.
![Page 34: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/34.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Example: Virtex II Pro
° Major features:• Large FPGA fabric.
• High-speed I/O.
• PowerPC.
![Page 35: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/35.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Virtex II Pro High-speed I/O
° Rocket I/O:• parallel/serial or serial/parallel transceiver.
° Clock recovery circuitry.
° Transceivers for multiple standards: Gigabit Ethernet, Fibre Channel, etc.
° Programmable decoding features.
° Interface to FPGA fabric.
![Page 36: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/36.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Virtex II Pro CPUs
° Up to 4 PowerPC 405s per chip:• 5 stage pipe, static branch prediction, etc.
° Separate instruction, data caches.
° MMU.
° Timers.
° Scan-based debug support.
![Page 37: ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design](https://reader036.fdocuments.us/reader036/viewer/2022062304/56813a0e550346895da1e35d/html5/thumbnails/37.jpg)
Lecture 11: FPGA-Based System Design October 18, 2004
Summary
° Understanding design styles is important for FPGA based design• Synchronous design forms an important role
° Various interfaces allow FPGAs to communicate with the outside world• Bus timing forms a key component
° State machine interaction allows for complex testing and debugging• Verification plays an important role in FPGA test
• Both logic and delay testing have roles