optimizing fpga-based vector product designs
TRANSCRIPT
-
8/14/2019 Optimizing FPGA-based vector product designs
1/10
O p t i m i z i n g F P G A - b a s e d v e c t o r p r o d u c t d e s i g n s
D a n i e l B e n y a m i n
1
, W a y n e L u k
2
, a n d J o h n V i l l a s e n o r
1
1
E l e c t r i c a l E n g i n e e r i n g D e p a r t m e n t , U C L A , L o s A n g e l e s , C A , 9 0 0 9 5
f b e n y a m i n , v i l l a g @ i c s l . u c l a . e d u
2
D e p a r t m e n t o f C o m p u t i n g , I m p e r i a l C o l l e g e
1 8 0 Q u e e n ' s G a t e , L o n d o n , E n g l a n d S W 7 2 B Z
A b s t r a c t
T h i s p a p e r p r e s e n t s a m e t h o d , c a l l e d m u l t i p l e c o n -
s t a n t m u l t i p l i e r t r e e s M C M T s , f o r p r o d u c i n g o p t i -
m i z e d r e c o n g u r a b l e h a r d w a r e i m p l e m e n t a t i o n s o f v e c -
t o r p r o d u c t s . A n a l g o r i t h m f o r g e n e r a t i n g M C M T s
h a s b e e n d e v e l o p e d a n d i m p l e m e n t e d , w h i c h i s b a s e d
o n a n o v e l r e p r e s e n t a t i o n o f c o m m o n s u b e x p r e s s i o n s
i n c o n s t a n t d a t a p a t t e r n s . O u r o p t i m i z a t i o n f r a m e -
w o r k c o v e r s a w i d e r s o l u t i o n s p a c e t h a n p r e v i o u s a p -
p r o a c h e s ; i t a l s o s u p p o r t s e x p l o i t a t i o n o f f u l l a n d p a r -
t i a l r u n - t i m e r e c o n g u r a t i o n a s w e l l a s t e c h n o l o g y -
s p e c i c c o n s t r a i n t s , s u c h a s f a n o u t l i m i t s a n d r o u t i n g .
W e d e m o n s t r a t e t h a t w h i l e d i s t r i b u t e d a r i t h m e t i c t e c h -
n i q u e s r e q u i r e s t o r a g e s i z e e x p o n e n t i a l i n t h e n u m b e r
o f c o e c i e n t s , t h e r e s o u r c e u t i l i z a t i o n o f M C M T s u s u -
a l l y g r o w s l i n e a r l y w i t h p r o b l e m s i z e . M C M T s h a v e
b e e n i m p l e m e n t e d i n X i l i n x 4 0 0 0 a n d V i r t e x F P G A s ,
a n d t h e i r s i z e a n d s p e e d e c i e n c y a r e c o n r m e d i n
c o m p a r i s o n s w i t h X i l i n x L o g i C o r e a n d A S I C i m p l e -
m e n t a t i o n s o f F I R l t e r d e s i g n s . P r e l i m i n a r y r e s u l t s
s h o w t h a t t h e s i z e o f M C M T c i r c u i t s i s l e s s t h a n h a l f
o f t h a t o f c o m p a r a b l e d i s t r i b u t e d a r i t h m e t i c c o r e s .
1 I n t r o d u c t i o n
T h e v e c t o r d o t p r o d u c t o r s u m o f p r o d u c t s " i s
o n e o f t h e m o s t c o m m o n a l g o r i t h m i c k e r n e l s i n s i g n a l
p r o c e s s i n g . I t s u s e r a n g e s f r o m l t e r s a n d c o r r e l a t o r s
t o c o m p l e t e t w o - d i m e n s i o n a l i m a g e t r a n s f o r m s s u c h a s
t h e D i s c r e t e C o s i n e T r a n s f o r m D C T .
T h e m o j a v e P r o j e c t a t U C L A 1 h a s s h o w n
t h a t F P G A s c a n b e h i g h l y e e c t i v e i n c o m p u t i n g
t w o - d i m e n s i o n a l c o r r e l a t i o n s u s i n g 1 - b i t a d d e r t r e e s .
S p e c i c a l l y , t h e a u t h o r s i n d i c a t e a n i m p o r t a n t w a y o f
l e v e r a g i n g t h e r e c o n g u r a b i l i t y o f F P G A s : a n F P G A
c i r c u i t d e s i g n e r c a n a o r d t o i m p l e m e n t c i r c u i t s b a s e d
o n p a r a m e t e r s t h a t r a r e l y o r n e v e r c h a n g e ; t h e s e c i r -
c u i t s c a n b e d e s i g n e d v e r y e c i e n t l y d u e t o t h e a v a i l -
a b i l i t y o f a p r i o r i k n o w l e d g e . V a r i a b l e - o p e r a n d c i r -
c u i t s a r e p r e f e r r e d o v e r c o n s t a n t - o p e r a n d c i r c u i t s i n
A S I C d e s i g n s , d u e t o t h e h i g h n o n - r e c u r r i n g e n g i n e e r -
i n g c o s t r e q u i r e d t o c h a n g e t h e c o n s t a n t o p e r a n d s .
I n d e e d , c o n s t a n t - o p e r a n d c i r c u i t s o n l y n d t h e i r w a y
i n t o A S I C s w h e n t h e y a r e w i d e l y a p p l i c a b l e ; t h e 8 x 8
m a t r i x o f D C T c o e c i e n t s i s o n e s u c h e x a m p l e .
U n l e s s t h e p r o b l e m s i z e i s s m a l l , h o w e v e r , i m p l e -
m e n t i n g e e c t i v e c o n s t a n t - o p e r a n d F P G A c i r c u i t s b y
h a n d c a n b e v e r y t e d i o u s . T h i s p a p e r p r e s e n t s a
h a r d w a r e i m p l e m e n t a t i o n o f v e c t o r p r o d u c t s c a l l e d
m u l t i p l e c o n s t a n t m u l t i p l i e r t r e e s M C M T s . T h e
c o r e o f t h e M C M T a l g o r i t h m i s o u r n o v e l r e p r e s e n t a -
t i o n o f c o m m o n s u b e x p r e s s i o n s c o n t a i n e d i n c o n s t a n t
d a t a p a t t e r n s , w h i c h p r o v i d e s f o r s e v e r a l o p t i m i z a -
t i o n c a p a b i l i t i e s n o t p r e s e n t i n p r e v i o u s d e s i g n s t r a t e -
g i e s . F i r s t , w e a d o p t a g l o b a l o p t i m i z a t i o n s t r a t e g y
t o c o v e r a w i d e s o l u t i o n s p a c e , t h u s g e n e r a t i n g s o l u -
t i o n s n o t c o n s i d e r e d b y p r e v i o u s a p p r o a c h e s . S e c o n d ,
o u r m e t h o d i s a b l e t o e x p l o i t t h e r u n - t i m e r e c o n g -
u r a b i l i t y o f F P G A s , w h i c h c a n p r o f o u n d l y r e d u c e t h e
e e c t i v e c i r c u i t s i z e . T h i r d , t e c h n o l o g y - s p e c i c c o n -
s t r a i n t s , s u c h a s f a n o u t l i m i t s a n d r o u t i n g , c a n b e
t a k e n i n t o a c c o u n t b y o u r o p t i m i z a t i o n p r o c e d u r e .
2 O v e r v i e w a n d R e l a t e d W o r k
A n u m b e r o f h a r d w a r e i m p l e m e n t a t i o n s e x i s t f o r
c o m p u t i n g v e c t o r p r o d u c t s . T h e r e a r e s t r a i g h t f o r -
w a r d d e s i g n s , w h e r e t h e v e c t o r p r o d u c t i s c o m p u t e d
u s i n g c o n s t a n t c o e c i e n t m u l t i p l i e r s K C M s a n d
a d d e r s . O t h e r t e c h n i q u e s , s u c h a s d i s t r i b u t e d a r i t h -
m e t i c D A , d i r e c t l y c o m p u t e v e c t o r p r o d u c t s i n a l e s s
o b v i o u s m a n n e r . I n s e c t i o n 8 w e p r o v i d e c o m p a r i s o n s
o f M C M T s t o D A a n d o t h e r t r a d i t i o n a l a r c h i t e c t u r e s .
O u r a p p r o a c h i s t o b r e a k d o w n m u l t i p l e c o n s t a n t s
t o t h e b i t l e v e l a n d r e p r e s e n t t h e m i n a m a n n e r t h a t
-
8/14/2019 Optimizing FPGA-based vector product designs
2/10
i s e c i e n t f o r o p t i m i z i n g t h e r e q u i r e d n u m b e r o f a d -
d i t i o n s . W h i l e m u l t i p l i c a t i o n s w i t h a c o n s t a n t v a l u e
a r e c o m m o n l y p e r f o r m e d u s i n g s h i f t s a n d a d d i t i o n s ,
r e s e a r c h o n t h e j o i n t o p t i m i z a t i o n o f m u l t i p l e c o n -
s t a n t s i s r e l a t i v e l y n e w . P o t k o n j a k 4 p r e s e n t s a g e n -
e r a l i z e d s y s t e m n a m e d m u l t i p l e c o n s t a n t m u l t i p l i e r s
M C M s . T h i s a p p r o a c h c a n b e a p p l i e d t o a n y p r o b -
l e m w h e r e a n u n k n o w n i s m u l t i p l i e d b y m o r e t h a n o n e
c o n s t a n t v a l u e , a n d c a n o p t i m i z e f o r b o t h t h e n u m b e r
o f a d d i t i o n s a n d t h e n u m b e r o f r e q u i r e d s h i f t s . F e -
h e r 6 c o n c e n t r a t e s o n g e n e r a t i n g v e c t o r p r o d u c t c i r -
c u i t s f o r F P G A s , a n d a p p l i e s t h e t e c h n i q u e s t o t h e
t w o - d i m e n s i o n a l D C T . F e h e r ' s w o r k i m p l e m e n t s o n l y
b i t - s e r i a l d e s i g n s , w h i c h n o t o n l y s i m p l i e s t h e p r o b -
l e m o f h i g h f a n o u t n o d e s , b u t , d u e t o t h e n e c e s s a r y
p a r a l l e l - s e r i a l c o n v e r s i o n , i s o n l y o f i n t e r e s t w h e n t h e
a p p l i c a t i o n c a n a o r d a l o w t h r o u g h p u t . F u r t h e r m o r e ,
F e h e r ' s a l g o r i t h m u t i l i z e s a p a i r w i s e g r e e d y a p p r o a c h ,
w h i c h p r o v i d e s p o o r r e s u l t s f o r m a n y p r o b l e m c a s e s .
A d d i t i o n a l w o r k i n c l u d e s r e c o d i n g f o r m u l t i p l e c o e -
c i e n t s 5 a n d o p t i m i z a t i o n s f o r D S P a r c h i t e c t u r e s 3 .
T h e s e t e c h n i q u e s , h o w e v e r , d o n o t e x p l o i t t h e f u l l p o -
t e n t i a l o f F P G A s , e s p e c i a l l y i n r e g a r d s t o r u n - t i m e
r e c o n g u r a t i o n R T R .
3 C o n s t a n t M u l t i p l i e r T r e e s
F o r t h i s p a p e r w e w i l l a p p l y t h e M C M T t e c h n i q u e
t o p r o b l e m s i n v o l v i n g t h e v e c t o r p r o d u c t ,
Y =
K , 1
X
k = 0
A
k
X
k
1
w h e r e X i s a n u n k n o w n v e c t o r , b u t t h e v e c t o r A
i s k n o w n a t c o m p i l e t i m e . A l t h o u g h w e d e v e l o p a
m e t h o d o l o g y b a s e d o n t h i s s i m p l e v e c t o r p r o d u c t , t h e
s a m e t e c h n i q u e s a r e a p p l i c a b l e t o a n y m u l t i p l e c o n -
s t a n t m u l t i p l i c a t i o n p r o b l e m .
W e b e g i n b y d e c o m p o s i n g t h e v e c t o r p r o d u c t i n a
m a n n e r t h a t t a k e s a d v a n t a g e o f o u r a p r i o r i k n o w l e d g e
o f t h e c o n s t a n t v e c t o r A . S p e c i c a l l y , w e w r i t e
A
k
=
L , 1
X
l = 0
a
l k
2
l
;
w h e r e a
l k
i s a s i n g l e b i t a n d L i s t h e p r e c i s i o n o f t h e
c o e c i e n t s . W e a s s u m e f o r s i m p l i c i t y t h a t A
k
i s a
p o s i t i v e i n t e g e r , b u t t h e d e r i v a t i o n c a n b e a p p l i e d t o
s i g n e d x e d - p o i n t s y s t e m s a s w e l l . S u b s t i t u t i n g t h i s
i n t o 1 g i v e s
Y =
K , 1
X
k = 0
X
k
L , 1
X
l = 0
a
l k
2
l
!
;
a n d a f t e r e x c h a n g i n g t h e o r d e r o f s u m m a t i o n s , w e
h a v e
Y =
L , 1
X
l = 0
K , 1
X
k = 0
X
k
a
l k
!
2
l
: 2
N o t e t h a t a
L , 1 ; k
d e n o t e s t h e m o s t s i g n i c a n t b i t o f
t h e c o e c i e n t A
k
.
T h e r e a r e s o m e i m p o r t a n t f e a t u r e s o f 2 t h a t
s h o u l d b e n o t e d . F i r s t , n o h a r d w a r e m u l t i p l i e r s a r e
n e e d e d , s i n c e a
l k
t a k e s o n v a l u e s 0 o r 1 , l e a v i n g o n l y
s h i f t s t o i m p l e m e n t t h e 2
l
m u l t i p l i c a t i o n . S e c o n d ,
t h e d e c o m p o s i t i o n o f A i n t o b i t - p l a n e s b y e q u a t i o n
2 a l l o w s f o r s i m p l e e x p l o i t a t i o n o f t h e s y m m e t r i e s
a n d c o m m o n s u b e x p r e s s i o n s c o n t a i n e d i n t h e c o e -
c i e n t d a t a . M o r e o v e r , s i n c e a
l k
i s k n o w n a t c o m p i l e
t i m e , w e p e r f o r m o n l y t h e a d d i t i o n s t h a t a r e n e c e s s a r y
d u r i n g r u n t i m e .
I n o r d e r t o g e n e r a t e t r e e s f r o m a v e c t o r p r o d u c t , i t
i s u s e f u l t o r e p r e s e n t 2 i n t h e f o l l o w i n g m a n n e r :
2
4
Y
0
Y
1
Y
L , 1
3
5
=
2
4
a
0 ; 0
a
0 ; 1
: : : a
0 ; K , 1
a
1 ; 0
: : : : : :
a
L , 1 ; 0
a
L , 1 ; K , 1
3
5
2
4
X
0
X
1
X
K , 1
3
5
;
w i t h t h e d e s i r e d r e s u l t
Y = Y
0
+ Y
1
2
1
+ : : : + Y
L , 1
2
L , 1
:
D e n o t e t h e c o e c i e n t m a t r i x o f a
l k
e l e m e n t s f o r o u t -
p u t Y a s a
Y
. T h i s m a t r i x w i l l b e t h e b a s i s o f a l l o p -
t i m i z a t i o n s a n d t r a n s f o r m a t i o n s i n t h i s p a p e r . N o t e
t h a t a
Y
c o n s i s t s o f b i n a r y d a t a o n l y , w i t h t h e t o p r o w
c o n t a i n i n g t h e l e a s t s i g n i c a n t b i t s o f t h e K e l e m e n t s
o f A , a n d t h e b o t t o m r o w c o n t a i n i n g t h e i r m o s t s i g -
n i c a n t b i t s .
T h e p r o d u c t o f e a c h r o w o f a
Y
w i t h X i s c o m p u t e d
u s i n g a b i n a r y t r e e ; i f a r o w o f a
Y
c o n t a i n s o n e o r m o r e
0 ' s , t h e n t h e c o r r e s p o n d i n g t r e e w i l l b e a p r u n e d t r e e .
R e g a r d l e s s , t h e L t r e e s Y
0
, Y
1
, . . . Y
L , 1
a r e s u m m e d t o -
g e t h e r u s i n g o n e n a l a d d e r t r e e c o m b i n e d w i t h s h i f t s
t o p r o d u c e t h e v a l u e o f Y . F o r s i m p l i c i t y , o u r g u r e s
s h o w a l i n e a r i z e d v e r s i o n o f t h i s n a l t r e e ; i n p r a c t i c e
a b i n a r y t r e e w i l l o f t e n b e u s e d 3 .
A s a n e x a m p l e u s e d t h r o u g h o u t t h i s s e c t i o n , s u p -
p o s e w e w i s h t o c o m p u t e
Y = X
0
+ 2 X
1
+ 3 X
2
+ 4 X
3
+ 5 X
4
+ 6 X
5
+ 7 X
6
+ 8 X
7
I n t h i s c a s e A = 1 2 3 4 5 6 7 8 , a n d a
Y
i s
2
6
4
1 0 1 0 1 0 1 0
0 1 1 0 0 1 1 0
0 0 0 1 1 1 1 0
0 0 0 0 0 0 0 1
3
7
5
: 3
-
8/14/2019 Optimizing FPGA-based vector product designs
3/10
++ + + + +
++
+
+
+
+
F i g u r e 1 : A n u n o p t i m i z e d a d d e r t r e e f o r c o m p u t i n g
a v e c t o r p r o d u c t . S h a d e d r e g i o n s r e p r e s e n t 1 ' s i n a
c o e c i e n t ' s b i t p l a n e .
F i g u r e 1 i l l u s t r a t e s t h e u n o p t i m i z e d t r e e s t r u c t u r e t o
c o m p u t e t h i s e x p r e s s i o n f o r a n a r b i t r a r y v e c t o r X . T h e
c o e c i e n t s f o r t h e f o u r s u b t r e e s f r o m l e f t t o r i g h t c o r -
r e s p o n d t o t h e r o w s o f 3 f r o m t o p t o b o t t o m .
T h e l e a v e s o f F i g u r e 1 a r e r e g i s t e r s t o h o l d t h e v e c -
t o r X ; a s i l l u s t r a t e d t h e r e a r e f o u r c o p i e s o f X , o n e
f o r e a c h b i t p l a n e o f c o e c i e n t d a t a . T h e t r e e i s c o n -
s t r u c t e d s u c h t h a t t h e s h i f t - a d d s o c c u r i n o r d e r o f s i g -
n i c a n c e : r e c a l l t h a t t h e d a t a ' s m o s t s i g n i c a n t b i t s ,
i n o u r r e p r e s e n t a t i o n , a r e l o c a t e d a t t h e b o t t o m r o w
o f a
Y
. T h i s r o w i s s h i f t e d l e f t o n e b i t a n d a d d e d t o
t h e n e x t r o w a b o v e i t , w i t h t h e p r o c e s s r e p e a t i n g f o r
e a c h r o w . T h u s , F i g u r e 1 c o m p u t e s
Y = X
0
+ X
2
+ X
4
+ X
6
+
2 X
1
+ X
2
+ X
5
+ X
6
+
2 X
3
+ X
4
+ X
5
+ X
6
+ 2 X
7
N o t e t h a t t h e t r e e i s c o m p l e t e l y s p e c i e d b y t h e
d a t a c o n t a i n e d i n a
Y
; t h i s a l l o w s u s t o o p t i m i z e t h e
t r e e s t r u c t u r e s i m p l y b y a p p l y i n g t r a n s f o r m a t i o n s t o
t h e m a t r i x a
Y
.
4 O p t i m i z a t i o n s
M C M T s r e l y h e a v i l y o n c o m m o n s u b e x p r e s s i o n
e l i m i n a t i o n C S E t o o p t i m i z e t h e a d d e r t r e e s . C S E
i s i m p l e m e n t e d e a s i l y i n t r e e s , s i n c e a c o m m o n s u b e x -
p r e s s i o n i s a s u b t r e e c o m m o n t o t w o o r m o r e d i e r -
e n t t r e e s , a n d i s e l i m i n a t e d " b y s h a r i n g o n e s u b t r e e ' s
o u t p u t a n d r e m o v i n g t h e o t h e r s . W h i l e n o n - t r i v i a l
f o r r a n d o m l o g i c , t h e f o r m u l a t i o n o f a
Y
a l l o w s f o r t h e
f o l l o w i n g , s y s t e m a t i c a p p r o a c h .
4 . 1 S h a r i n g c o m m o n s u b e x p r e s s i o n s
S i n c e t h e f o u r s e t s o f e i g h t l e a v e s i n F i g u r e 1 c o n t a i n
i d e n t i c a l v a l u e s , a h a r d w a r e v e c t o r m u l t i p l i e r w o u l d
c o m b i n e t h e f o u r s u b t r e e s c o r r e s p o n d i n g t o Y
0
, Y
1
,
Y
2
, a n d Y
3
i n t o a s i n g l e t r e e . A c l o s e i n s p e c t i o n o f
F i g u r e 1 r e v e a l s r e d u n d a n c i e s i n t h e s u b t r e e s , s u c h a s
t h e v e r t e x c o n n e c t e d t o X
5
a n d X
6
i n b o t h Y
1
a n d
Y
2
; c l e a r l y , o n l y o n e a d d e r i s n e c e s s a r y , a n d t h u s w e
l a b e l X
5
+ X
6
a s a c o m m o n s u b e x p r e s s i o n . T h i s c a n
b e s e e n i n t h e m a t r i x a
Y
i n F i g u r e 2 , w i t h t h e f o u r
1 ' s m a r k e d
2
. S i n c e a d d e r s a r e u s e d t o c o m p u t e e a c h
r o w , w h e n e v e r t w o o r m o r e 1 ' s m a t c h , t h e r e i s a p o s -
s i b i l i t y o f a c o m m o n s u b e x p r e s s i o n .
I n g e n e r a l , a s u b e x p r e s s i o n i s a s e t o f l o c a t i o n s o f
1 ' s i n a
Y
, w h e r e t h e r o w a n d c o l u m n s i z e i s a t l e a s t t w o
s i n c e a n a d d e r n e e d s a t l e a s t t w o o p e r a n d s . A f o r m a l
d e n i t i o n o f s u b e x p r e s s i o n s i s n o w p r o v i d e d , c o n c l u d -
i n g w i t h t h e d e n i t i o n o f a v a l i d g r o u p o f s u b e x p r e s -
s i o n s .
D e n e t h e d o t p r o d u c t o f t w o s e t s A a n d B a s
A B = f a ; b : a 2 A a n d b 2 B g :
G i v e n t h a t a
Y
i s o f s i z e L K , d e n e C t o b e t h e s e t
o f c o l u m n s o f a
Y
,
C = f 0 ; 1 ; : : : ; K , 1 g ;
a n d R t o b e t h e s e t o f r o w s o f a
Y
,
R = f 0 ; 1 ; : : : ; L , 1 g :
G i v e n t h a t 2
R
a n d 2
C
a r e r e s p e c t i v e l y t h e p o w e r s e t s
o f R a n d C , t h e i - t h c o m m o n s u b e x p r e s s i o n
i
o f a
Y
i s d e n e d a s
i
= R
i
C
i
; w h e r e R
i
a n d C
i
a r e s e t s
t h a t m e e t t h e f o l l o w i n g c o n d i t i o n s :
1 . R
i
2 2
R
a n d C
i
2 2
C
2 . a
r ; c
a
r
0
; c
0
= 1 f o r a l l r ; r
0
2 R
i
a n d c ; c
0
2 C
i
3 . j R
i
j 2 a n d j C
i
j 2
I n F i g u r e 2 , f o r e x a m p l e , R
1
= f 0 , 1 g a n d C
1
= f 2 , 6 g .
T w o e x a m p l e C S E s a r e i l l u s t r a t e d i n F i g u r e 2 .
B o t h
1
a n d
2
c o n t a i n f o u r e l e m e n t s , a n d j R j = j C j =
2 f o r b o t h a s w e l l . N o t e a l s o t h a t
1
T
2
= f 1 ; 6 g .
I n g e n e r a l , i n t e r s e c t i n g ' s p r o d u c e v a l i d c i r c u i t s , b u t
i n t h i s c a s e i t d o e s n o t s i n c e a
1 ; 6
w o u l d b e a d d e d
t w i c e . T h u s , w e m u s t a l t e r t h e d e n i t i o n o f i n t e r -
s e c t i o n s l i g h t l y i n o r d e r t o g u a r a n t e e a c o r r e c t r e s u l t .
-
8/14/2019 Optimizing FPGA-based vector product designs
4/10
=
L
N
MMMM
O
Q
PPPP
= l q
= l q
F i g u r e 2 : A n e x a m p l e o f a n i n v a l i d s e t , s i n c e t h e
s u b e x p r e s s i o n s
1
a n d
2
o v e r l a p .
S p e c i c a l l y , w e d e n e t h e i n t e r s e c t i o n o f t w o c o m m o n
s u b e x p r e s s i o n s a s
i
j
=
R
i j
C
i j
i f C
i
C
j
_ C
j
C
i
; o t h e r w i s e
w h e r e R
i j
= R
i
T
R
j
a n d C
i j
= C
i
T
C
j
. O f c o u r s e ,
i f R
i j
= ; t h e n
i
T
j
= ; , w h i c h m e a n s
i
j
i
j
: 4
A s e t o f c o m m o n s u b e x p r e s s i o n s i s v a l i d i f e a c h p a i r o f
' s i n t h e s e t a c h i e v e s e q u a l i t y i n 4 . F o r e x a m p l e , t h e
t w o c o m m o n s u b e x p r e s s i o n s i n F i g u r e 2 d o n o t f o r m
a v a l i d s e t s i n c e
1
T
2
= f 1 ; 6 g 6= ; =
1
T
2
.
I n o t h e r w o r d s ,
1
T
2
i s e q u i v a l e n t t o
1
T
2
i f
a l l o f t h e c o l u m n s o f o n e s u b e x p r e s s i o n i s c o n t a i n e d
i n t h e o t h e r ; t h i s c o n d i t i o n c o r r e s p o n d s t o o n e ' s
e x p r e s s e d a s a s u b t r e e t r e e o f a n o t h e r . A n e x a m p l e
o f t h i s c a s e i s g i v e n i n F i g u r e 3 a , w h e r e
3
T
4
=
f 0 ; 2 ; 0 ; 3 ; 1 ; 2 ; 1 ; 3 g =
3
T
4
, a n d i s t h u s a
v a l i d s e t . T h e c o l u m n s o f
3
a r e C
3
= f 0 ; 1 ; 2 ; 3 g
a n d t h e c o l u m n s o f
4
a r e C
4
= f 2 ; 3 g . C l e a r l y , t h e
c o l u m n s o f
4
a r e c o n t a i n e d i n t h e c o l u m n s o f
3
,
w h i c h d i c t a t e s t h a t
4
b e c o m e s a s u b t r e e o f
3
, a s
i l l u s t r a t e d i n F i g u r e 3 b .
4 . 2 S i z e o f M C M T s
A t t h i s p o i n t w e a r e a b l e t o e v a l u a t e t h e n u m b e r o f
a d d i t i o n s s u b t r a c t i o n s o r s i m p l y , t h e n u m b e r o f v e r -
t i c e s r e q u i r e d i n a n M C M T , a m e t r i c w h i c h i s d e v i c e
i n d e p e n d e n t .
G i v e n a v a l i d s e t o f c o m m o n s u b e x p r e s s i o n s f o r a
Y
,
1
,
2
, . . . ,
Z
, a n d t h e n u m b e r o f 1 ' s i n a
Y
a s I , t h e n
1 1 1 1
1 1 1 1
0 0 1 1
3
4
++
+3
4
F i g u r e 3 : a A n e x a m p l e o f a v a l i d s e t o f c o m m o n
s u b e x p r e s s i o n s . b T h e c o r r e s p o n d i n g h a r d w a r e i m -
p l e m e n t a t i o n , w i t h
4
a s a s u b t r e e o f
3
.
t h e n u m b e r o f v e r t i c e s i n t h e M C M T f o r a
Y
i s
s i z e
1
= I , 1 ,
Z
X
i = 1
j R
i
j , 1 j C
i
j , 1 +
Z
X
i = 1
Z
X
j = 1
j 6= i
j R
i j
j , 1 j C
i j
j , 1 5
f o r a l l i ; j s u c h t h a t
i
T
j
6= ; . T h e d o u b l e s u m -
m a t i o n i n 5 a c c o u n t s f o r t h e o v e r l a p b e t w e e n p a i r s
o f ' s . T h e n o t a t i o n s i z e
1
i n d i c a t e s t h e s i z e o f t h e
t r e e f o r o n e p r o b l e m i n s t a n c e ; w e w i l l d i s c u s s m u l t i p l e
p r o b l e m i n s t a n c e s i n a l a t e r s e c t i o n .
I f w e c h o o s e t o r e d u c e t h e p r o b l e m r e p r e s e n t e d b y
F i g u r e 2 w i t h e i t h e r
1
o r
2
, t h e s i z e o f t h e c i r c u i t
b e c o m e s :
1 3 , 1 , 2 , 1 2 , 1 + 0 = 1 1 ;
w h i c h i s o n e l e s s v e r t e x t h a n a
Y
w i t h o u t C S E . A n
e x a m p l e o f a t r e e r e d u c e d b y s h a r i n g
1
i s g i v e n i n
F i g u r e 4 , w h e r e t h e s h a d e d v e r t e x h a s a n o u t d e g r e e
o f 2 . T h u s , w e h a v e e l i m i n a t e d o n e v e r t e x b e t w e e n
l e a v e s X
2
a n d X
6
.
4 . 3 S h i f t i n g c o e c i e n t s
T h e o p t i m i z a t i o n s o f t h e p r e v i o u s s e c t i o n s h o w h o w
v e r t i c e s i n t h e a d d e r t r e e c a n b e e l i m i n a t e d . W e n o w
d i s c u s s a t r a n s f o r m a t i o n t o t h e m a t r i x a
Y
w h i c h m a y
i n c r e a s e t h e e e c t i v e n e s s o f t h e o p t i m i z a t i o n t e c h -
n i q u e s .
F o r a n a r b i t r a r y n u m b e r x , i t i s p o s s i b l e t o w r i t e
x = 2
s
,
2
, s
x
w h e r e s i s c o n s i d e r e d a s h i f t v a l u e . T h i s i m p l i e s r e p l a c -
i n g a v a l u e x b y a s h i f t e d v e r s i o n , o r e q u i v a l e n t l y , s h i f t -
i n g t h e c o l u m n o f a
Y
t h a t r e p r e s e n t s x b y a n i n t e g e r
-
8/14/2019 Optimizing FPGA-based vector product designs
5/10
++ ++ +
++ +
+
+
+
F i g u r e 4 : T h e t r e e s t r u c t u r e w i t h o n e r e m o v e d v e r t e x .
T h e s h a d e d v e r t e x i s r e u s e d i n t w o s u b e x p r e s s i o n s .
a m o u n t s . F o r e x a m p l e , 6 c a n b e w r i t t e n : 5 2 6 ,
w h e r e s = , 1 . T h u s , o u r p r e v i o u s e x a m p l e t r a n s f o r m s
a
Y
i n t o
2
6
4
1 0 1 0 1 1 1 0
0 1 1 0 0 1 1 0
0 0 0 1 1 0 1 0
0 0 0 0 0 0 0 1
3
7
5
;
w h e r e t h e s i x t h c o l u m n i s s h i f t e d u p o n e p l a c e .
C l e a r l y , t h i s c h a n g e s t h e a r r a n g e m e n t a n d a v a i l a b i l -
i t y o f c o m m o n s u b e x p r e s s i o n s i n a
Y
. A f t e r s h i f t -
i n g t h e c o l u m n c o r r e s p o n d i n g t o t h e c o e c i e n t 6 , w e
c a n h a v e t h e v a l i d s e t
1
= f 0 , 2 , 0 , 5 , 1 , 2 , 1 , 5 g a n d
2
= f 0 , 4 , 0 , 6 , 2 , 4 , 2 , 6 g . T h i s r e s u l t s i n t w o r e -
m o v e d n o d e s , a s s h o w n i n F i g u r e 5 . T h e r e s u l t i n g
c i r c u i t n o w h a s o n l y 1 0 a d d i t i o n s ; n o t e t h a t t h e o r i g i -
n a l e x p r e s s i o n h a s 7 a d d i t i o n s , s o o n l y t h r e e a d d i t i o n a l
a d d e r s g i v e s u s t h e v e c t o r m u l t i p l i e r .
4 . 4 T e c h n o l o g y M a p p i n g
C l e a r l y , c o m m o n s u b e x p r e s s i o n e l i m i n a t i o n c o m e s
a t a p r i c e w h e n h a r d w a r e i m p l e m e n t a t i o n i s c o n -
c e r n e d . E v e r y t i m e a n a d d e r i s e l i m i n a t e d , t h e f a n o u t
o f a n o t h e r a d d e r i s i n c r e a s e d . T h e s h a d e d n o d e s i n
F i g u r e 5 , f o r e x a m p l e , e a c h d r i v e t w o a d d e r s . N o t o n l y
d o e s i n c r e a s e d f a n o u t s l o w c i r c u i t s d u e t o i n c r e a s e d
g a t e c a p a c i t a n c e , t h e x e d r o u t i n g a r c h i t e c t u r e i n F P -
G A s m a k e s h i g h f a n o u t n e t s e v e n l e s s a t t r a c t i v e . F o r
e x a m p l e , i n t h e X i l i n x X C 4 0 0 0 X s e r i e s F P G A t h e r e
a r e t w o d i r e c t c o n n e c t l i n e s a n d 8 s i n g l e l e n g t h l i n e s
b e t w e e n C L B s . S i n c e t h e t w o t y p e s o f r o u t i n g e x h i b i t
d r a s t i c a l l y d i e r e n t r o u t i n g d e l a y s , i f t h e f a n o u t o f a n
++ +
+
+
+
+
+
+
+
F i g u r e 5 : T h e n a l t r e e s t r u c t u r e w i t h t w o r e m o v e d
v e r t i c e s , a s i n d i c a t e d b y t h e t w o s h a d e d v e r t i c i e s .
a d d e r i s i n c r e a s e d t o e x c e e d t h e n u m b e r o f d i r e c t c o n -
n e c t l i n e s , t h e p r o p a g a t i o n d e l a y i s a e c t e d i n a g r o s s l y
n o n - l i n e a r f a s h i o n .
W i t h o u t e x p r e s s i n g t h e t e c h n o l o g y s p e c i c f a n o u t
c h a r a c t e r i s t i c s , a n o p t i m i z i n g a l g o r i t h m w o u l d f a v o r
h i g h f a n o u t c i r c u i t s d u e t o t h e r e d u c e d n u m b e r o f
a d d e r s . F o r t u n a t e l y , t h e f a n o u t o f a n o d e i n a n M C M T
i s s i m p l y t h e n u m b e r o f r o w s o f t h e t h a t c o v e r s i t .
T h u s , o u r o p t i m i z a t i o n s t r a t e g y m a y d e c i d e t o e x c l u d e
' s w h o s e r o w d i m e n s i o n j R j i s g r e a t e r t h a n a d e v i c e ' s
f a n o u t c o n s t r a i n t s .
5 T h e M C M T P r o b l e m
W e a r e n o w r e a d y t o f o r m u l a t e t h e m u l t i p l e c o n -
s t a n t m u l t i p l i e r t r e e p r o b l e m : G i v e n a m a t r i x a
Y
,
w i t h a p p l i e d s h i f t s , p i c k a s e t o f c o m m o n s u b e x p r e s -
s i o n s s u c h t h a t t h e s e t i s v a l i d a n d t h e c o s t i n 5 i s
m i n i m i z e d .
T h i s f o r m u l a t i o n o f M C M T s a l l o w s f o r a s e a r c h
s t r a t e g y t h a t i s m o r e c a p a b l e t h a n p r e v i o u s t e c h -
n i q u e s . W e h a v e a l r e a d y n o t e d t h a t p a i r w i s e m a t c h -
i n g m i s s e s m a n y m a j o r o p p o r t u n i t i e s f o r o p t i m i z a t i o n .
T h i s i s d u e t o M C M T ' s l a c k o f a n o p t i m a l s u b s t r u c -
t u r e , w h e r e o p t i m a l d e c i s i o n s a t o n e s t e p m a y h a v e a
n e g a t i v e i m p a c t o n t h e n a l r e s u l t . T h u s , a n y g r e e d y
a l g o r i t h m m a y f a i l t o p r o d u c e o p t i m a l r e s u l t s . M o r e -
o v e r , t h e a l g o r i t h m s i n 4 o p e r a t e o n t h e e n t i r e b i t
v e c t o r o f a c o n s t a n t . O u r d e n i t i o n o f ' s d o e s n o t
i m p o s e a n y s u c h r e s t r i c t i o n : a c o m m o n s u b e x p r e s s i o n
m a y b e a n y p o r t i o n o f a n y n u m b e r o f c o n s t a n t s . I t i s
i n t e r e s t i n g t o n o t e t h e s i m i l a r i t y o f t h e M C M T p r o b -
-
8/14/2019 Optimizing FPGA-based vector product designs
6/10
l e m t o t h e w e i g h t e d s e t c o v e r i n g p r o b l e m , w h i c h i s
k n o w n t o b e N P - c o m p l e t e 7 .
T h e a l g o r i t h m t h a t w e h a v e d e v e l o p e d i s b a s e d o n
S i m u l a t e d A n n e a l i n g , a n d i s d e s c r i b e d b y t h e f o l l o w i n g
p s e u d o c o d e :
R e p r e s e n t c o n s t a n t s i n b i n a r y o r c a n o n i c a l s i g n e d d i g i t
C S D f o r m a t s
U n i q u e l y l a b e l a l l p o s s i b l e ' s
D e n e S O L U T I O N t o b e a s e t o f ' s , s t a r t i n g w i t h a n
e m p t y s e t
D e n e t = S T A R T T E M P
W h i l e I T E R A T I O N M A X I T E R A T I O N S f
R a n d o m l y p i c k a f r o m t h e s e t o f a l l p o s s i b l e ' s
a n d p l a c e i n t o t h e S O L U T I O N s e t
I f t h e S O L U T I O N s e t i s a v a l i d s e t f
D e t e r m i n e t h e s i z e f r o m 5
I f s i z e p r e v i o u s s i z e o r
I f X e x p p r e v i o u s s i z e , s i z e = t , w h e r e X
i s a u n i f o r m l y d i s t r i b u t e d r a n d o m v a r i a b l e f
S a v e t h e n e w S O L U T I O N s e t
g
E l s e
R e s t o r e t h e p r e v i o u s S O L U T I O N s e t
g
R e d u c e t
I n c r e m e n t I T E R A T I O N
g
I n o u r c u r r e n t i m p l e m e n t a t i o n , t h e r a t e a t w h i c h
t i s r e d u c e d i s a f u n c t i o n o f t h e n u m b e r o f c o m m o n
s u b e x p r e s s i o n s f o u n d .
6 M u l t i p l e I n d e p e n d e n t P r o b l e m s
W e n o w t u r n o u r a t t e n t i o n t o a p p l i c a t i o n s w h e r e
m o r e t h a n o n e v e c t o r p r o d u c t i s r e q u i r e d , a n d t h e m u l -
t i p l e p r o d u c t s c a n t a k e p l a c e i n d e p e n d e n t l y . A c o m -
m o n e x a m p l e o f m u l t i p l e i n d e p e n d e n t v e c t o r p r o d u c t s
i s t h e m a t r i x p r o d u c t . C o n s i d e r t h e N N m a t r i x B
a n d t h e N 1 v e c t o r Z ,
Y = A Z
=
2
6
4
a
0 ; 0
a
0 ; 1
: : : a
0 ; N , 1
a
1 ; 0
: : :
: : : : : :
a
N , 1 ; 0
a
N , 1 ; N , 1
3
7
5
2
6
4
z
0
z
1
: : :
z
N , 1
3
7
5
=
2
6
4
Y
0
Y
1
: : :
Y
N , 1
3
7
5
;
w h e r e e a c h Y
i
i s t h e r e s u l t o f a v e c t o r p r o d u c t a s i n
1 ; n o t e t h a t t h e r e i s n o d e p e n d e n c e b e t w e e n t h e Y
i
' s .
B e c a u s e o f t h i s i n d e p e n d e n c e , t h e r e i s n o c o m m u n i c a -
t i o n b e t w e e n e a c h v e c t o r m u l t i p l i e r , w h i c h a l l o w s f o r
r u n - t i m e r e c o n g u r a t i o n o f t h e h a r d w a r e w i t h m i n i -
m a l o v e r h e a d . B e f o r e p r o c e e d i n g t o t h e t o p i c o f R T R ,
h o w e v e r , w e n e e d t o a d d s u p p o r t f o r m u l t i p l e i n d e p e n -
d e n t p r o b l e m s i n t h e p r e c e d i n g M C M T r e p r e s e n t a t i o n .
F o r e a c h v e c t o r p r o d u c t Y
i
=
N , 1
P
k = 0
a
i ; k
z
k
, f o r m u l a t e
e a c h m a t r i x a
Y
i
a s b e f o r e , a n d t h e n c o m p o s e t h e b l o c k
m a t r i x
a
Y
=
2
6
4
a
Y
0
a
Y
1
: : :
a
Y
N , 1
3
7
5
:
F o r e x a m p l e , c o n s i d e r t h e p r o d u c t
1 2 3 4 5 6 7 8
8 7 6 5 4 3 2 1
2
6
6
6
6
6
6
6
6
4
Z
0
Z
1
Z
2
Z
3
Z
4
Z
5
Z
6
Z
7
3
7
7
7
7
7
7
7
7
5
T h e m a t r i x a
Y
w o u l d t h e n b e
2
6
6
6
6
6
6
6
4
1
0
0
0
0
1
0
0
1
1
0
0
0
0
1
0
1
0
1
0
0
1
1
0
1
1
1
0
0
0
0
1
0
0
0
1
1
1
1
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
1
0
0
0
3
7
7
7
7
7
7
7
5
G i v e n t h i s r e p r e s e n t a t i o n , w e c a n a p p l y t h e o p t i -
m i z a t i o n s o f t h e p r e v i o u s s e c t i o n t o s h a r e ' s a c r o s s
t h e m u l t i p l e v e c t o r p r o d u c t s , w i t h t h e n u m b e r o f v e r -
t i c e s g i v e n b y
s i z e
N
= s i z e
1
, N , 1
f o r N 1 i n d e p e n d e n t p r o b l e m i n s t a n c e s .
7 R u n - t i m e R e c o n g u r a t i o n
R e c o n g u r i n g a n F P G A a t r u n t i m e a l l o w s a d e -
s i g n e r t o e e c t i v e l y i m p l e m e n t c i r c u i t s l a r g e r t h a n t h e
d e v i c e i t s e l f b y t i m e - d i v i s i o n m u l t i p l e x i n g . T h i s n e c e s -
s i t a t e s , h o w e v e r , t h e o v e r h e a d o f r e c o n g u r a t i o n t i m e
a n d s t o r a g e t o a l l o w c o m m u n i c a t i o n b e t w e e n s u c c e s -
s i v e c o n g u r a t i o n s . T w o d i e r e n t f o r m s o f R T R a r e
p r o v i d e d b y F P G A s t o d a y : f u l l r e c o n g u r a t i o n a n d
p a r t i a l r e c o n g u r a t i o n .
-
8/14/2019 Optimizing FPGA-based vector product designs
7/10
-
8/14/2019 Optimizing FPGA-based vector product designs
8/10
t i m e
1
. W e c a n r e p h r a s e t h i s i n t o t h e c l a s s i c t r a v e l i n g
s a l e s m a n p r o b l e m 7 , w h e r e t h e s a l e s m a n m u s t v i s i t
e a c h o f N c i t i e s o n c e b e f o r e r e t u r n i n g t o t h e r s t , a n d
w i t h t h e s h o r t e s t p o s s i b l e r o u t e . W e m e a s u r e t h e d i s -
t a n c e b e t w e e n t w o c o n g u r a t i o n s a s
d
,
a
Y
i
; a
Y
j
=
L , 1
X
l = 0
K , 1
X
k = 0
1 , a
i
l ; k , a
j
l ; k 6
w h e r e t h e l , k - t h e l e m e n t o f a
Y
i
i s d e n o t e d a
i
l ; k .
T h u s t h e d i s t a n c e b e t w e e n t w o c o n g u r a t i o n s i s a
m e a s u r e o f t h e n u m b e r o f a d d e r s t h a t d i e r b e t w e e n
t h e l e a v e s o f t h e i r c o r r e s p o n d i n g M C M T s . C l e a r l y , w e
w i s h t o m i n i m i z e t h e t o t a l d i s t a n c e
N , 1
X
i = 0
N , 1
X
j = 0
j 6= i
d
,
a
Y
i
; a
Y
j
:
T h e o p t i m a l r e c o n g u r a t i o n s e q u e n c e c a n b e d e -
t e r m i n e d u s i n g t h i s c o s t m e t r i c a n d a n a p p r o p r i a t e
t r a v e l i n g s a l e s m a n a l g o r i t h m . A g i v e n r e c o n g u r a t i o n
s e q u e n c e , h o w e v e r , p l a c e s a c o n s t r a i n t s i m i l a r t o w h a t
w e h a v e p r e v i o u s l y e n c o u n t e r e d i n f u l l y r e c o n g u r e d
d e s i g n s : s u b e x p r e s s i o n s c o m m o n t o t w o d i e r e n t c o n -
g u r a t i o n s c a n n o t b e e l i m i n a t e d i f t h e y a r e n o t c o n -
s e c u t i v e c o n g u r a t i o n s i n t h e c h o s e n r e c o n g u r a t i o n
p a t h .
8 R e s u l t s a n d C o m p a r i s o n s
T h i s s e c t i o n p r o v i d e s s o m e p e r f o r m a n c e r e s u l t s o f
M C M T c i r c u i t s , w i t h a p p r o p r i a t e c o m p a r i s o n s a g a i n s t
t r a d i t i o n a l a p p r o a c h e s . A l t h o u g h t h e s i z e e s t i m a t e s
c o n c e r n X i l i n x 4 0 0 0 s e r i e s F P G A s , t h e s a m e r e a s o n i n g
c a n b e a p p l i e d t o o t h e r t e c h n o l o g i e s .
D i s t r i b u t e d a r i t h m e t i c
D A i s a p o p u l a r m e t h o d o f i m p l e m e n t i n g v e c t o r
p r o d u c t s i n h a r d w a r e . I n d e e d , D A i s t h e d e s i g n s t y l e
o f c h o i c e f o r X i l i n x ' s L o g i C O R E F I R l t e r s . S y n t h e -
s i z i n g a D A c i r c u i t i s s t r a i g h t f o r w a r d : p r e - c o m p u t e a l l
c o m b i n a t i o n s o f t h e c o n s t a n t s u m m a t i o n o v e r A , s t o r e
t h e v a l u e s i n a L U T , a n d u s e X a s a d d r e s s b i t s . T h i s
m e c h a n i s m m a k e s D A a p a r t i c u l a r l y a t t r a c t i v e c h o i c e
f o r L U T - b a s e d F P G A s . U n f o r t u n a t e l y , s t o r i n g t h e s e
1
O f c o u r s e , p a r t i a l r e c o n g u r a t i o n t i m e s v a r y b e t w e e n d i e r -
e n t t e c h n o l o g i e s . F o r s i m p l i c i t y , w e a s s u m e t h a t c h a n g i n g o n e
c i r c u i t e l e m e n t a n d o r a s s o c i a t e d r o u t i n g c o n s u m e s o n e u n i t o f
t i m e .
10
100
1000
10000
100000
1000000
4 6 8 10 12 14
Number of filter taps
NumberofCLBs
DA
MCMT
4-bit
8-bit
F i g u r e 8 : C o m p a r i s o n o f D A a n d M C M T C L B u s a g e
f o r F I R l t e r s . 4 - b i t a n d 8 - b i t w o r d l e n g t h s a r e i l l u s -
t r a t e d .
s u m m a t i o n s c a n b e c o m e q u i t e u n w i e l d y . T h e s i z e o f
f u l l y p a r a l l e l D A L U T s t o r a g e i n b i t s i s 2
2
K
K N + d l o g
2
K e ;
w h e r e N i s t h e m a x i m u m b i t w i d t h o f X
k
, a n d K i s
t h e n u m b e r o f c o e c i e n t s .
S i n c e t h e r e q u i r e d m e m o r y s i z e g r o w s e x p o n e n t i a l l y
w i t h K , i m p l e m e n t i n g n o n - s y m m e t r i c l t e r s w i t h a
l a r g e n u m b e r o f t a p s b e c o m e s i m p r a c t i c a l w i t h D A .
C l e a r l y , t h e d a t a i n s i d e t h e L U T c a n b e c o m p a c t e d
s i n c e t h e w o r d s a t t h e l o w e r a d d r e s s e s c o n t a i n f e w e r
s i g n i c a n t b i t s t h a n t h e w o r d s a t h i g h e r a d d r e s s e s .
A s a n i l l u s t r a t i o n , t h e m a x i m u m L U T s i z e f o r a
s i n g l e X C 4 0 0 0 C L B i s 3 2 b i t s , s o t h e L U T s i z e o f a
p a r a l l e l D A c i r c u i t i n C L B s i s s i m p l y
2
K
K N + d l o g
2
K e
3 2
:
F i g u r e 8 s h o w s a n e s t i m a t e o f t h e n u m b e r o f C L B s
u s e d b y t h e t w o i m p l e m e n t a t i o n s w h i l e v a r y i n g t h e
n u m b e r o f F I R l t e r t a p s , f o r b o t h 4 - b i t a n d 8 - b i t
w o r d l e n g t h s . N o t e h o w t h e D A c i r c u i t s i z e f o r s m a l l
l t e r s i s d o m i n a t e d b y a n a d d e r t r e e t o s u m t h e K
L U T s . S i n c e t h e s i z e o f t h e M C M T c i r c u i t d e p e n d s o n
t h e c o e c i e n t s , t h e M C M T c u r v e s i n F i g u r e 8 r e p r e -
s e n t a n a v e r a g e o f 1 0 0 r a n d o m l y g e n e r a t e d c o e c i e n t
v e c t o r s . W e c h o o s e s i m p l e r i p p l e - c a r r y a d d e r s i n t h e
a d d e r t r e e s t o m i n i m i z e C L B u s a g e .
C o n s t a n t c o e c i e n t m u l t i p l i e r s
O n e c a n a l w a y s d e s i g n v e c t o r p r o d u c t e x p l i c i t l y
w i t h m u l t i p l i e r s a n d a d d e r s , w h e r e t h e m u l t i p l i e r s a r e
-
8/14/2019 Optimizing FPGA-based vector product designs
9/10
-
8/14/2019 Optimizing FPGA-based vector product designs
10/10
, P S O H P H Q W D W L R Q 6 W \ O H
; L O L Q [ / R J L & 2 5 (
3 D U D O O H O ' $ ) , 5
0 & 0 7
3 L S H O L Q H G 5 L S S O H & D U U \ $ G G H U 7 U H H
' H V L J Q
7 \ S L F D O ) , 5
W D S Q R Q V \ P P H W U L F E Z R U G O H Q J W K
& / % V
& / % V
6 / , & ( V
6 L ] H
0 + ]
0 + ]
0 + ]
6 S H H G
6 L Q F & R P S H Q V D W L R Q ) , 5
W D S V \ P P H W U L F E Z R U G O H Q J W K
; L O L Q [ / R J L & 2 5 (
3 D U D O O H O ' $ ) , 5
7 U D Q V S R V H G ) R U P ) , 5
Z L W K & 6 ' P X O W L S O L H U V
; & ; / ) 3 * $
; & ; / ) 3 * $
; & 9 ) 3 * $
7 H F K Q R O R J \
& / % V 0 + ]; & ; / ) 3 * $
X P & 0 2 6 $ 6 , & W U D Q V L V W R U V 0 + ]
0 & 0 7
3 L S H O L Q H G 5 L S S O H & D U U \ $ G G H U 7 U H H
& / % V
6 / , & ( V
0 + ]
0 + ]
; & ; / ) 3 * $
; & 9 ) 3 * $
T a b l e 1 : C o m p a r i s o n o f d i e r e n t d e s i g n s , i m p l e m e n t a t i o n s , a n d t e c h n o l o g i e s .
9 C o n c l u d i n g R e m a r k s
W e h a v e p r e s e n t e d a n o v e l d e s i g n m e t h o d o l o g y
a n d i t s i m p l e m e n t a t i o n f o r c o m p u t i n g v e c t o r p r o d -
u c t s i n h a r d w a r e . O u r o p t i m i z a t i o n p r o c e d u r e c o v -
e r s a w i d e r s o l u t i o n s p a c e t h a n p r e v i o u s a p p r o a c h e s ,
a n d c a n t a k e a d v a n t a g e o f r u n - t i m e r e c o n g u r a b i l i t y
a n d t e c h n o l o g y - s p e c i c f e a t u r e s o f a d v a n c e d F P G A s .
I n t h e f u t u r e w e p l a n t o e x p l o r e p a r t i a l r e c o n g u r a -
t i o n f o r M C M T d e s i g n s s t i l l f u r t h e r , a n d e x p r e s s b e t -
t e r c o n t r o l o v e r c i r c u i t r o u t a b i l i t y . C o n t i n u e d w o r k
o n m a p p i n g v a r i o u s a p p l i c a t i o n s t o n e w a r c h i t e c t u r e s ,
s u c h a s X i l i n x ' s V i r t e x p a r t s , s h o u l d p r o v i d e g r e a t e r
i m p r o v e m e n t s i n c i r c u i t u t i l i z a t i o n a n d p e r f o r m a n c e .
A c k n o w l e d g m e n t s
T h i s w o r k i s s u p p o r t e d b y D A R P A I T O u n d e r c o n t r a c t
n u m b e r D A B T 6 3 - 9 5 - C - 0 1 0 2 a n d b y t h e U K E n g i n e e r i n g
a n d P h y s i c a l S c i e n c e s R e s e a r c h C o u n c i l G r a n t n u m b e r
G R 2 4 3 6 6 , G R 5 4 3 5 6 a n d G R 5 9 6 5 8 .
R e f e r e n c e s
1 J . V i l l a s e n o r , B . S c h o n e r , K . C h i a , C . Z a p a t a ,
H . J . K i m , C . J o n e s , S . L a n s i n g a n d W . M a n g i o n e -
S m i t h , C o n g u r a b l e c o m p u t i n g s o l u t i o n s f o r a u t o -
m a t i c t a r g e t r e c o g n i t i o n , " i n P r o c . F C C M 9 6 , 1 9 9 6 ,
p p . 7 0 7 9 .
2 A . S i n h a a n d M . M e h e n d a l e , I m p r o v i n g a r e a e -
c i e n c y o f F I R l t e r s i m p l e m e n t e d u s i n g d i s t r i b u t e d
a r i t h m e t i c , " i n P r o c . E l e v e n t h I n t e r n a t i o n a l C o n f e r -
e n c e o n V L S I D e s i g n , 1 9 9 7 , p p . 1 0 4 1 0 9 .
3 M . M e h e n d a l e , G . V e n k a t e s h a n d S . D . S h e r l e k a r ,
O p t i m i z e d c o d e g e n e r a t i o n o f m u l t i p l i c a t i o n - f r e e l i n -
e a r t r a n s f o r m s , " i n 3 3 r d D e s i g n A u t o m a t i o n C o n f e r -
e n c e , 1 9 9 6 , p p . 4 1 4 6 .
4 M . P o t k o n j a k , M . B . S r i v a s t a v a a n d A . P . C h a n -
d r a k a s a n , M u l t i p l e c o n s t a n t m u l t i p l i c a t i o n s : e -
c i e n t a n d v e r s a t i l e f r a m e w o r k a n d a l g o r i t h m s f o r e x -
p l o r i n g c o m m o n s u b e x p r e s s i o n e l i m i n a t i o n , " I E E E
T r a n s a c t i o n s o n C o m p u t e r - A i d e d D e s i g n o f I n t e g r a t e d
C i r c u i t s a n d S y s t e m s , v o l . 1 5 , n o . 2 , 1 9 9 6 , p p . 1 5 1
1 6 5 .
5 A . G . D e m p s t e r a n d M . D . M a c l e o d , U s e o f m i n i m u m -
a d d e r m u l t i p l i e r b l o c k s i n F I R d i g i t a l l t e r s , " I E E E
T r a n s a c t i o n s o n C i r c u i t s a n d S y s t e m s I I : A n a l o g a n d
D i g i t a l S i g n a l P r o c e s s i n g , v o l . 4 2 , n o . 9 , 1 9 9 5 , p p . 5 6 9
5 7 7 .
6 B . F e h e r , E c i e n t s y n t h e s i s o f d i s t r i b u t e d v e c t o r
m u l t i p l i e r s , " i n P r o c . E u r o m i c r o ' 9 3 , 1 9 t h S y m p o s i u m
o n M i c r o p r o c e s s i n g a n d M i c r o p r o g r a m m i n g , v o l . 3 8 ,
n o . 1 5 , 1 9 9 3 , p p . 3 4 5 3 5 0 .
7 T . H . C o r m e n e t . a l . , I n t r o d u c t i o n t o A l g o r i t h m s , C a m -
b r i d g e : M I T P r e s s , 1 9 9 0 .
8 C O R E S o l u t i o n s D a t a B o o k , X i l i n x , I n c . , S a n J o s e ,
1 9 9 8 .
9 R . J a i n , P . T . Y a n g a n d T . Y o s h i n o , F I R G E N : a
c o m p u t e r - a i d e d d e s i g n s y s t e m f o r h i g h p e r f o r m a n c e
F I R l t e r i n t e g r a t e d c i r c u i t s , " I E E E T r a n s a c t i o n s o n
S i g n a l P r o c e s s i n g , v o l . 3 9 , n o . 7 , 1 9 9 1 , p p . 1 6 5 5 1 6 6 8 .