Floating Point Multipliers: Simulation & Synthesis Using VHDL
Floating Point Multipliers: Simulation & Synthesis Using VHDL
Floating Point Multipliers: Simulation & Synthesis Using VHDL
By:
BITS, PILANI
Outline
Introduction
- Multipliers
- VHDL & Design Flow
Various Architectures (Multipliers)
-Simulation
-Synthesis
-Analysis
Conclusion
Real Numbers
Numbers with fractions
3/5 , 4/7
Pure binary
1001.1010 = 24 + 20 +2-1 + 2-3 =9.625
Fixed point
Very limited
Moving or floating point
(almost universal)
Widely used in computations
Which base do we use?
Decimal: great for humans, especially when doing
arithmetic
Rounding is important
Small errors can save the huge storage
FP rounding hardware helps
Finally, keep sticky bit that is set whenever „1‟
bits are “lost” to the right
Differentiates between 0.5 and 0.500000000001
= 16 + 8 + 2
#s often written = 26
0b… Here 5 digit binary # turns into a 2 digit decimal #
And in Conclusion...
We represent “things” in computers as particular bit
patterns: N bits 2N
1‟s complement - mostly abandoned
00000 00001 ... 01111
10000 ... 11110 11111
2‟s complement - universal in computing:
simulate independent of
Simulation
FPGA type
no timing Synthesis
Timing simulation:
Place & Route
simulate after place and
routing also (back-
Simulation
annotation part)
detailed timing Program device & test
Terminology
Behavioral modeling
Describes the functionality of a component/system
For the purpose of simulation and synthesis
Structural modeling
A component is described by the interconnection of lower level
components/primitives
For the purpose of synthesis and simulation
Synthesis:
Translating the HDL code into a circuit, which is then optimized
Register Transfer Level (RTL):
Type of behavioral model used for instance for synthesis
RTL Synthesis
Input is RTL code Design Entry
Compilation & translation
Generates technology independent netlist Simulation
RTL schematic (HDL code analysis)
Technology mapping Synthesis
Mapping to technology specific structures:
Look-up tables (LUT) Place & Route
Registers
RAM/ROM Simulation
DSP blocks
Other device specific
components/features Program device & test
Logic optimization
Implementation analysis (technology view)
Digital Circuits and VHDL Primitives
OS
Application
Add Add/Subtract
Sub Unit
Accumulator CCR
Condition Code Register
a
Zero
ALU Result
Overflow
b
CarryOut
FP Arithmetic x / (Steps)
flowchart
1. Test
Product0
1 0 0 0
x 1 0 0 1 2. Shift the Product register right 1 bit
1 0 0 0
0 0 0 0
No: < 32 repetitions
0 0 0 0 32nd repetition?
1 0 0 0 Yes: 32 repetitions
1 0 0 1 0 0 0
Done
Step By Step Analysis
MULTIPLY (unsigned)
Paper and pencil example (unsigned):
1000
Multiplicand 1001
1000
Multiplier 0000
0000
1000
01001000
Product
m bits x n bits = m+n bit product
Binary makes it easy:
0 => place 0 ( 0 x multiplicand)
1 => place a copy ( 1 x multiplicand)
successive refinement
1. Simultaneous Multiplication
X2 X1 X0
Y2 Y1 Y0
X2*Y0 X1*Y0 X0*Y0
X2*Y1 X1*Y1 X0*Y1
X2*Y2 X1*Y2 X0*Y2
P4 P3 P2 P1 P0
Multiplier Schematic : Hardware
How would we
develop this logic?
Multiplying Negative Numbers
0-> 1 1 0 Binary
+1 0 -1 0 1-bit Booth
+2 -2 2-bit Booth
Booth‟s Algorithm
Current Bit to Explanation Example Operation
bit right
1 0 Begins run of „1‟ 00001111000 Subtract
Multiplication algorithm
Sequential version are more efficient than combinational in
terms of Hardware, Synchronization, speed
Can use carry save adders instead of ripple adder
A Wallace tree structure to combine the partial products is
another excellent enhancement in Architecture
Multiplication Using Recursive
Subtraction