Chapter 7 Virtex Arithmetic Structures
description
Transcript of Chapter 7 Virtex Arithmetic Structures
![Page 1: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/1.jpg)
Chapter 7 Virtex Arithmetic Structures
![Page 2: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/2.jpg)
Overview
• Addition and subtraction
• Multiplication
• DSP48
• DSP48E
![Page 3: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/3.jpg)
Basic Adder Equations
Si = Ai XOR Bi XOR Ci
Ci+1 = Ai Bi + (Ai XOR Bi) Ci
Note: not unique expression for Ci+1
![Page 4: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/4.jpg)
Basic Ripple Adder
![Page 5: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/5.jpg)
Fast Carry Chains
Bi
Ai
COUT
CIN
LUT
Si
0 1
![Page 6: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/6.jpg)
Tracing Carry Chain
SUMSSUMS
![Page 7: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/7.jpg)
Counters Built from Adders
![Page 8: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/8.jpg)
Multiplication Review
A3A2A1A0 X B1B0 -------------------------------------------------
A3B0 A2 B0 A1B0 A0B0 A3B1 A2B1 A1 B1 A0 B1
------------------------------------------------- P5 P4 P3 P2 P1 P0
Just like in the third grade . . .
![Page 9: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/9.jpg)
Fabric Based Multiplier
(comment: should be COUT)
![Page 10: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/10.jpg)
Mult/AND Identification
![Page 11: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/11.jpg)
Block Multipliers
• Xilinx Spartan 3/E and Virtex II = 18 bit
• Applications needing fewer bits can tie off higher order bits appropriately
• Applications needing more bits must either:– Cascade block multipliers– Combine blocks with fabric multipliers
• Other uses for block multipliers
![Page 12: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/12.jpg)
Virtex II/Spartan 3/E Block Multipliers
Combinational 2’s Complement Sequential 2’s Complement
![Page 13: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/13.jpg)
Spartan 3 Multiplier Mix
With this many multipliers, better be something we can do with them if weDon’t need this many. Also, must be other sizes we can create – somehow.See XAPP 467
![Page 14: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/14.jpg)
22 X 16 Bit MultiplierBlock
Fabric
Fabric
![Page 15: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/15.jpg)
Other Uses
• Multiply several small numbers with one block multiplier
• Division by repeated multiplication
• Barrel shift using multiplier
• Take two’s complement of a number
• Get the magnitude of a two’s complement number
• There are others
![Page 16: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/16.jpg)
DSP 48
• Introduced for Virtex 4
• Designed to efficiently cascade
• Xilinx teamed with outside arithmetic specialists to get best speed/area blocks
• Supports multiple rounding formats
• Not present in all V4 families
![Page 17: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/17.jpg)
Two Slice DSP 48
TopSlice
BottomSlice
![Page 18: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/18.jpg)
Simplified DSP 48
Adder Out = Z +/- (X + Y + CIN)
Adder Out = C +/- (A X B + CIN)
![Page 19: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/19.jpg)
The DSP 48 Instruction Set
![Page 20: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/20.jpg)
DSP 48 Primitive Symbol
![Page 21: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/21.jpg)
DSP 48 Timing
![Page 22: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/22.jpg)
Doing Other Things - SQRT
![Page 23: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/23.jpg)
Important to Do Other Things with DSP 48
• Divider
• Large multiplexer
• Barrel shifters
• Two’s Complement converters
• Large counters
• Etc.
DSP 48 Handbook available on Xilinx website
![Page 24: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/24.jpg)
Virtex 5 DSP48E
![Page 25: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/25.jpg)
Simpler DSP48E
![Page 26: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/26.jpg)
Other Useful Functions
• Building up “word wise” logic– AND,OR
• Same list as for the DSP48
![Page 27: Chapter 7 Virtex Arithmetic Structures](https://reader035.fdocuments.us/reader035/viewer/2022062221/56813acb550346895da2e5e9/html5/thumbnails/27.jpg)
Support
• Xilinx offers an elaborate (read:$) set of tools that interface to the MatLab toolchain
• Focused on DSP algorithm development
• Permits “hardware in the loop” simulation
• Also working on higher level compile tools as DSP developers tend to be more mathematicians and less “hardware designers” (read: C, C++ oriented)