Professional Documents
Culture Documents
Lecture 17 Multipliers
Lecture 17 Multipliers
In decimal: In binary:
input_2
01100
12 x01101
x13 01100 01101
36 00000 01101
+12 01100 01101
x 1_ 01100 01101
156 + 00000____ 01101
010011100
When multiplying binary numbers, the multiplicand is either copied or not copied to the
partial products for addition. Therefore, a serial multiplier can be implemented with an
array of additions and shifting.
Multiplication Architecture
zeros input_2
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
00000 0110 1
product_reg LSB of product_reg
In this cycle, it’s also the
LSB of input_2
Multiplication Architecture
From our example earlier…
00000 01101
01100 00000
+
sum
1 0 select
multiplexor
00000 0110 1
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
00000 01101
01100 00000
+
sum
1 0 select
multiplexor
01100 01101
00000 0110 1
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
00000 01101
01100 00000
+
sum
1 0 select
multiplexor
01100 01101
Next iteration!
00110 00110
01100 00000
+
sum
1 0 select
multiplexor
01100 01101
00110 0011 0
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
00110 00110
01100 00000
+
sum
1 0 select
multiplexor
00110 00110
00110 0011 0
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
00110 00110
01100 00000
+
sum
1 0 select
multiplexor
00110 00110
00110 0011 0
product_reg LSB of
product_reg
Multiplication Architecture
From our example earlier…
And so on…
00110 00110
01100 00000
+
sum
1 0 select
multiplexor
00110 00110
00011 0001 1
product_reg LSB of
product_reg
Serial Multiplication: Example
# iterations = # bits of input_2
start_mult = ‘1’
start = ‘0’
count = maxcount
start
D Q D Q
clk Q clk Q
rst rst not(start_mult_follow)
clk start_mult is
triggered at beginning of
start occurs next clock cycle
in middle of
start_mult clock cycle
start
clk
mult_1.vhd
Define intermediate
signals and registers
mult_1.vhd
State machine moves to the
next state at clock edge
Control signals
‘add_and_shift’
and ‘shift’ are used
to determine whether
or not we ‘add and
shift’ or just ‘shift’,
respectively
mult_1.vhd
product
data_ready
reset