Date post: | 07-Apr-2018 |
Category: |
Documents |
Upload: | deepak-kumar-singh |
View: | 215 times |
Download: | 0 times |
of 16
8/6/2019 DPRtutorial
1/16
A M o d u l e - B a s e d D y n a m i c P a r t i a l R e c o n g u r a t i o n
t u t o r i a l
G r g o r y M e r m o u d
{g r e g o r y . m e r m o u d @ e p . c h }
L o g i c S y s t e m s L a b o r a t o r y
E c o l e P o l y t e c h n i q u e F d r a l e d e L a u s a n n e
1 N o v e m b e r 2 0 0 4
1 A b o u t t h i s t u t o r i a l
I d e c i d e d t o w r i t e t h i s t u t o r i a l c o n c e r n i n g D y n a m i c P a r t i a l R e c o n g u r a t i o n
( D P R ) d u r i n g m y s e m e s t e r p r o j e c t a t S w i s s F e d e r a l I n s t i t u t e o f T e c h n o l o g y .
T o a c h i e v e t h a t , I n e e d e d t h e d y n a m i c p a r t i a l r e c o n g u r a t i o n , b u t I s p e n t
a l m o s t 4 w e e k s o n l y t o u n d e r s t a n d h o w i t w o r k s . I h o p e t o a v o i d y o u w a s t i n g
a l o t o f t i m e b y p r o v i d i n g t h i s t u t o r i a l .
I w r o t e i t f o r X i l i n x I S E 6 . 3 i a n d a S p a r t a n 2 ( x c 2 s 2 0 0 - p q 2 0 8 ) . I f y o u
u s e a n o t h e r v e r s i o n o f I S E o r a n o t h e r F P G A , y o u s h o u l d e x p e c t t o l o o k
f o r s o l u t i o n s t o s o m e p r o b l e m s t h a t a r e n o t d e s c r i b e d i n t h i s t u t o r i a l . I n -
d e e d , e v e n t h o u g h X i l i n x t r i e s t o p r o v i d e a g o o d a s c e n d i n g c o m p a t i b i l i t y ,
y o u ' l l q u i c k l y n o t i c e t h a t e a c h v e r s i o n h a s i t s c h a r a c t e r i s t i c s , t h a t m a k e t h e
b e h a v i o u r o f t h e I S E v e r y c h a o t i c . M o r e o v e r , I a d v i s e y o u t o r e s p e c t t h e
m e t h o d o l o g y d e s c r i b e d b o t h i n t h i s t u t o r i a l a n d i n t h e X i l i n x A p p l i c a t i o n
N o t e c o n c e r n i n g D y n a m i c P a r t i a l R e c o n g u r a t i o n [ 3 ] . M o r e o v e r , y o u s h o u l d
u s e a p r e c i s e d i r e c t o r y s t r u c t u r e t h a t w e w i l l d e t a i l l a t e r i f y o u w a n t t o a v o i d
t o g e t c o m p l e t e l y l o s t w i t h a i n c r e d i b l e a m o u n t o f d i e r e n t l e s t h a t g e t
o f t e n t h e s a m e n a m e a n d a r e l i k e l y t o b e c r u s h e d . G e n e r a l l y s p e a k i n g , y o u
s h o u l d s t a y r i g o r o u s , e s p e c i a l l y i f y o u a r e a b e g i n n e r i n t h e m a t t e r . W i t h o u t
r i g o u r a n d p r e c i s e n e s s , y o u r d e s i g n w i l l l i k e l y n o t w o r k a t a l l .
1 . 1 P r e r e q u i s i t e s
T h i s t u t o r i a l i s i n t e n d e d f o r c o m p l e t e b e g i n n e r s i n d y n a m i c p a r t i a l r e c o n g -
u r a t i o n a n d m o d u l a r F P G A d e s i g n , b u t i t r e q u i r e s s o m e b a s i c s a b o u t F P G A .
M o r e o v e r , w e w i l l c o n s i d e r V H D L a s k n o w n a n d w e w o n ' t p r o v i d e a n y e x p l a -
n a t i o n s a b o u t V H D L c o d e , e x c e p t i t d i r e c t l y c o n c e r n s m o d u l a r d e s i g n . W e
1
mailto:[email protected]8/6/2019 DPRtutorial
2/16
8/6/2019 DPRtutorial
3/16
F i g u r e 1 : M o d u l a r d e s i g n o w s c h e m a t i c
F i g u r e 2 : D i r e c t o r y s t r u c t u r e u s e d f o r a m o d u l a r d e s i g n p r o j e c t .
3
8/6/2019 DPRtutorial
4/16
i n t h i s t u t o r i a l , b e c a u s e t h e y d e p e n d o n t h e s y n t h e s i s t o o l . F o r i n s t a n c e ,
L e o n a r d o S p e c t r u m g e n e r a t e s . e d n l e s w h i l e X S T g e n e r a t e s . n g c l e s . I n
t h e e n d , y o u ' l l b a s i c a l l y g e t t h e s a m e r e s u l t .
2 . 3 F i l e s f o r m a t
T h i s s e c t i o n p r o v i d e s a l i s t o f t h e u s e f u l l e t h a t y o u w i l l h a v e t o h a n d l e
d u r i n g y o u r p a r t i a l r e c o n g u r a b l e d e s i g n . F o r a n y f u r t h e r i n f o r m a t i o n , p l e a s e
r e p o r t t o [ 2 ] .
. v h d V H D L o r V e r i l o g d e s i g n l e . T h i s d e s i g n l e w i l l s e r v e a s i n p u t f o r a
s y n t h e s i s t o o l l i k e X i l i n x X S T o r L e o n a r d o S p e c t r u m .
. n g c X S T N e t l i s t . T h i s l e i s t h e r e s u l t o f a s y n t h e s i s u s i n g X S T .
. e d n E D I F N e t l i s t . T h i s l e i s t h e r e s u l t o f a s y n t h e s i s u s i n g L e o n a r d o S p e c -
t r u m b y d e f a u l t .
. e d f E D I F N e t l i s t . T h i s l e i s t h e r e s u l t o f a s y n t h e s i s u s i n g a n o t h e r t o o l .
. n g d D e s i g n l e . T h i s b i n a r y l e c o n t a i n s a l o g i c a l d e s c r i p t i o n o f t h e d e s i g n
i n t e r m s o f b o t h i t s o r i g i n a l c o m p o n e n t s a n d h i e r a r c h y a n d t h e N G D
p r i m i t i v e s t o w h i c h t h e d e s i g n i s r e d u c e d .
. p c f P h y s i c a l C o n s t r a i n t s F i l e . A n A S C I I t e x t l e c o n t a i n i n g t h e c o n s t r a i n t s
s p e c i e d d u r i n g d e s i g n e n t r y e x p r e s s e d i n t e r m s o f p h y s i c a l e l e m e n t s .
T h e p h y s i c a l c o n s t r a i n t s i n t h e P C F l e a r e e x p r e s s e d i n X i l i n x s c o n -
s t r a i n t l a n g u a g e .
. n c d N a t i v e C i r c u i t D e s c r i p t i o n . A p h y s i c a l d e s c r i p t i o n o f t h e d e s i g n i n
t e r m s o f t h e c o m p o n e n t s i n t h e t a r g e t X i l i n x d e v i c e .
. p a r P A R r e p o r t i n c l u d i n g s u m m a r y i n f o r m a t i o n o f a l l p l a c e m e n t a n d r o u t -
i n g i t e r a t i o n s .
. p a d A l e c o n t a i n i n g I / O p i n a s s i g n e m e n t s i n a p a r s a b l e d a t a b a s e f o r m a t .
. b i t A b i n a r y l e t h a t c o n t a i n s p r o p r i e t a r y h e a d e r i n f o r m a t i o n a s w e l l a s
c o n g u r a t i o n d a t a . M e a n t f o r i n p u t t o o t h e r X i l i n x t o o l s , s u c h a s
P R O M G e n a n d i M P A C T .
. m s k A b i n a r y l e t h a t c o n t a i n s t h e s a m e c o n g u r a t i o n c o m m a n d s a s a . b i t
l e , b u t h a s m a s k d a t a w h e r e t h e c o n g u r a t i o n d a t a i s . I t i s u s e d f o r
v e r i c a t i o n p u r p o s e . T h i s l e s h o u l d N O T b e u s e d t o c o n g u r e t h e
d e v i c e .
4
8/6/2019 DPRtutorial
5/16
F i g u r e 3 : A b a s i c s c h e m a t i c o f t h e d e s i g n .
3 T h e t u t o r i a l
3 . 1 D e s c r i p t i o n o f t h e d e s i g n
T h e d e s i g n t h a t w i l l b e u s e d i n t h i s t u t o r i a l i s v e r y s i m p l e . I t i s a 8 - b i t s
r e c o n g u r a b l e c o u n t e r c o n s i s t i n g o f t w o m o d u l e s :
1 . A r e g i s t e r k e e p i n g t h e v a l u e b e t w e e n t w o c l o c k e v e n t s . T h i s m o d u l e i s
c a l l e d m y R e g i s t e r .
2 . A n 8 - b i t s a d d e r p r o v i d i n g t h e n e w v a l u e t o t h e r e g i s t e r . T h i s m o d u l e i s
c a l l e d i n c r e m e n t e r a n d e x i s t s i n t w o v e r s i o n s s i n c e i t i s r e c o n g u r a b l e .
T h e r s t o n e i s a n a d d e r w h i l e t h e s e c o n d o n e i s a s u b t r a c t e r .
W e a d d e d t w o i d e n t i c a l m o d u l e s p r o v i d i n g a n i n t e r f a c e t h a t m e r g e s t w o
b u s m a c r o s . T h e s e m o d u l e s a r e u s e f u l s i n c e t h e X i l i n x b u s m a c r o a r e l i m i t e d
t o 4 b i t s . A s y o u w i l l l e a r n l a t e r , t h e b u s m a c r o s a r e u n i d i r e c t i o n a l a n d
t h e r e f o r e t h e s e m o d u l e s a r e e i t h e r l e f t - t o - r i g h t o r r i g h t - t o - l e f t o r i e n t e d . T h e
g u r e 3 p r o v i d e s a b a s i c s c h e m a t i c o f t h i s d e s i g n w h i l e t h e g u r e 4 s h o w s
w h a t y o u s h o u l d g e t f r o m L e o n a r d o S p e c t r u m .
Y o u c a n g e t t h e c o m p l e t e V H D L s o u r c e o f t h i s d e s i g n h e r e :
h t t p : / / i c 2 . e p . c h / g m e r m o u d / D P R t u t o r i a l . z i p
3 . 2 S y n t h e s i s
A c o r r e c t d e s i g n i s o n e o f t h e k e y e l e m e n t s t o a s u c c e s s f u l p a r t i a l r e c o n g u r a -
t i o n . T h e r e f o r e , y o u s h o u l d p a y a p a r t i c u l a r a t t e n t i o n t o t h i s s t e p , e s p e c i a l l y
5
http://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.ziphttp://ic2.epfl.ch/~gmermoud/DPRtutorial.zip8/6/2019 DPRtutorial
6/16
F i g u r e 4 : R T L S c h e m a t i c s o f o u r d e s i g n p r o v i d e d b y L e o n a r d o S p e c t r u m .
i f y o u r d e s i g n i s l a r g e . I p a r t i c u l a r l y a d v i s e y o u t o c r e a t e o n e d i e r e n t p r o j e c t
p e r m o d u l e , t h e t o p l e v e l i n c l u d e d . T h u s , i n o u r p a r t i c u l a r c a s e , y o u s h o u l d
c r e a t e 4 p r o j e c t s : m y R e g i s t e r , i n c r e m e n t e r , i n c r e m e n t e r 2 a n d t o p , t h a t i s t h e
t o p l e v e l d e s i g n c o n t a i n i n g a l l t h e o t h e r m o d u l e s . P l e a s e n o t e t h a t t h e f o l -
l o w i n g s t e p s ( 1 t o 8 ) a r e a l r e a d y d o n e i f y o u u s e t h e s o u r c e p r o v i d e d w i t h
t h i s t u t o r i a l , b u t I s t i l l d e s c r i b e t h e m f o r b e i n g e x h a u s t i v e . T h u s y o u s h o u l d
o n l y h a v e t o o p e n e a c h p r o j e c t w i t h t h e X i l i n x I S E P r o j e c t N a v i g a t o r b y
d o u b l e - c l i c k i n g t h e . n p l l e s .
1 . L a u n c h t h e X i l i n x I S E P r o j e c t N a v i g a t o r . T h i s a p p l i c a t i o n a l l o w s
y o u t o l a u n c h a l l t h e p r o c e s s e s o f a t y p i c a l F P G A p r o g r a m m i n g o w
t h r o u g h a g r a p h i c a l u s e r i n t e r f a c e . U n f o r t u n a t e l y , t h e M o d u l a r D e s i g n
o w i s n o t c o m p l e t e l y s u p p o r t e d b y t h i s a p p l i c a t i o n .
2 . L a u n c h t h e w i z a r d f o r c r e a t i n g a n e w p r o j e c t ( F i l e > N e w P r o j e c t ) .
3 . E n t e r a n a m e f o r y o u r p r o j e c t , e . g . t o p . C h o o s e t h e p r o j e c t l o c a t i o n ,
e . g . s y n t h e s i s / t o p . S e t t h e T o p - L e v e l M o d u l e T y p e t o H D L a n d c l i c k
o n N e x t .
4 . T h e n , s e l e c t t h e d e v i c e a n d t h e d e s i g n o w f o r t h e p r o j e c t , a s t h a t
s h o w n i n g u r e 5 . T h e n , c l i c k o n N e x t .
5 . Y o u c a n n o w c h o o s e a n e w s o u r c e f o r y o u r d e s i g n , b u t s i n c e t h i s t u t o r i a l
a l r e a d y p r o v i d e s d e s i g n l e s , s i m p l y c l i c k a g a i n o n N e x t .
6 . T h e f o l l o w i n g w i n d o w a l l o w s y o u t o a d d e x i s t i n g s o u r c e s t o y o u r p r o j e c t .
S i m p l y c l i c k o n A d d s o u r c e a n d s e l e c t t h e t o p . v h d l e . T h e n , c l i c k o n
N e x t .
6
8/6/2019 DPRtutorial
7/16
8/6/2019 DPRtutorial
8/16
A b o u t b u s m a c r o d u r i n g d e s i g n s t e p
T w o m o d u l e s n e e d a b u s m a c r o t o c o m m u n i c a t e . T h e c u r r e n t i m p l e m e n t a t i o n o f
t h e b u s m a c r o u s e s e i g h t 3 - s t a t e b u e r s ( T B U F s ) h o o k e d u p i n a n a r r a n g e m e n t
t h a t a l l o w s o n e b i t o f i n f o r m a t i o n t o t r a v e l e i t h e r l e f t - t o - r i g h t o r r i g h t - t o - l e f t , u s i n g
o n e T B U F l o n g l i n e p e r b i t . A b u s m a c r o h a s 5 I / O s : L I a n d R I a r e t h e l e f t a n d
r e s p . r i g h t 4 - b i t s i n p u t b u s e s , O i s t h e 4 - b i t s o u t p u t b u s a n d L T a n d R T a r e t h e l e f t
a n d r e s p . r i g h t 4 - b i t s c o n g u r a t i o n b u s e s t h a t s e t u p t h e d i r e c t i o n f o r e a c h w i r e o f
t h e b u s m a c r o . O f c o u r s e , L T a n d R T h a v e t o b e o p p o s i t e f o r t h e s a m e b i t : i f i t i s
n o t t h e c a s e , a s h o r t - c i r c u i t m a y o c c u r . F o r e x a m p l e , i f y o u w a n t t h e b u s m a c r o t o
p r o v i d e r i g h t - t o - l e f t c o m m u n i c a t i o n f o r b i t 0 , y o u h a v e t o s e t L T ( 0 ) t o 1 a n d R T ( 0 )
t o 0 . T h e n , c o n n e c t y o u r e m i t t i n g m o d u l e t o R I ( 0 ) a n d y o u r r e c e i v i n g m o d u l e t o
O ( 0 ) .
I n t h i s t u t o r i a l , I u s e e x t e r n a l p i n s a n d m a k e e a c h c o n t r o l s i g n a l p a s s t h r o u g h t h e
a d e q u a t e m o d u l e . F o r e x a m p l e , i n o u r c a s e , L T p a s s e s t h r o u g h i n c r e m e n t e r s i n c e
t h i s m o d u l e i s l o c a t e d o n t h e l e f t o f t h e b u s m a c r o . B u t i t i s a l s o p o s s i b l e t o c o n n e c t
L T a n d R T t o L U T s d e l i v e r i n g c o n s t a n t v a l u e s .
O n c e y o u h a v e n i s h e d y o u r t o p l e v e l d e s i g n , y o u c a n l a u n c h t h e s y n t h e s i s
b y u s i n g e i t h e r X S T o r L e o n a r d o S p e c t r u m w i t h o u t s p e c i a l c o n g u r a t i o n .
R i g h t - c l i c k o n S y n t h e s i s a n d s e l e c t R u n . W h e n n i s h e d , y o u s h o u l d h a v e
a n e t l i s t f o r t h e c o n t r o l l e r m o d u l e ( t o p . e d n b y u s i n g L e o n a r d o S p e c t r u m o r
t o p . n g c b y u s i n g X S T ) i n s y n t h e s i s / t o p .
3 . 2 . 2 T h e r e c o n g u r a b l e m o d u l e s
C o n c e r n i n g t h e r e c o n g u r a b l e m o d u l e s , y o u h a v e t o r e s p e c t t h e e n t i t y o f t h e
m o d u l e d e c l a r e d i n t h e t o p l e v e l . T h e V H D L d e s i g n l e s u s e d i n t h i s e x a m p l e
a r e i n c r e m e n t e r / i n c r e m e n t e r . v h d , i n c r e m e n t e r 2 / i n c r e m e n t e r . v h d a n d m y R e g i s -
t e r . v h d . T h e r e i s t w o i n c r e m e n t e r m o d u l e v e r s i o n s s i n c e w e w a n t t o r e c o n -
g u r e i t . N e v e r t h e l e s s , t h e p r e l i m i n a r y d e s i g n w i l l u s e i n c r e m e n t e r / i n c r e m e n t e r . v h d .
M o r e o v e r , y o u h a v e t o u n c h e c k t h e A d d I / O B u e r s b o x o n t h e X i l i n x S p e -
c i c O p t i o n s t a b i n t h e P r o c e s s P r o p e r t i e s w i n d o w o f t h e S y n t h e s i s p r o c e s s
i n t h e P r o j e c t N a v i g a t o r ( g u r e 6 ) . L a u n c h t h e s y n t h e s i s f o r e a c h r e c o n g -
u r a b l e m o d u l e s a s e x p l a i n e d b e f o r e .
3 . 3 I n i t i a l b u d g e t i n g
T h e g o a l o f t h e i n i t i a l b u d g e t i n g p h a s e i s t o a s s i g n t o p l e v e l c o n s t r a i n t s t o t h e
d e s i g n . T h i s i n c l u d e s a s s i g n i n g a r e a c o n s t r a i n t s t o t h e m o d u l e a n d e s p e c i a l l y
t o t h e b u s m a c r o . F o r t h i s p a r t o f t h e d e s i g n , w e w a n t t o c o p y t h e t o p - l e v e l
n e t l i s t ( . e d f , . e d n o r . n g c ) t o a w o r k i n g d i r e c t o r y .
1 . C o p y t h e t o p - l e v e l n e t l i s t ( . e d n , . e d f o r . n g c ) f r o m s y n t h e s i s / t o p t o
i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l
2 . C o p y t h e b u s m a c r o p r o v i d e d b y t h i s t u t o r i a l f r o m i m p l e m e n t a t i o n / m a c r o s
t o i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l a n d i m p l e m e n t a t i o n / t o p _ l e v e l _ n a l .
8
8/6/2019 DPRtutorial
9/16
F i g u r e 6 : M o d u l e s y n t h e s i s p r o p e r t i e s
W e d o n o t u s e t h e b u s m a c r o s p r o v i d e d b y X i l i n x s i n c e t h e y u s e a n -
o t h e r b u s d e l i m i t e r t h a n t h o s e u s e d b y L e o n a r d o S p e c t r u m . I f y o u u s e
X S T , y o u c a n c o n g u r e t h e t y p e o f b u s d e l i m i t e r i n t h e s y n t h e s i s p r o -
c e s s o p t i o n s i n t h e I S E . F o r a n y f u r t h e r i n f o r m a t i o n , p l e a s e r e p o r t t o
t h e F A Q l o c a t e d i n t h e e n d o f t h i s t u t o r i a l . I f y o u u s e a n o t h e r F P G A
t h a n S p a r t a n 2 , y o u c a n s t i l l g e t t h e o r i g i n a l X i l i n x b u s m a c r o l e s i n
t h e . z i p p r o v i d e d w i t h [ 3 ] a t t h i s a d r e s s :
h t t p : / / w w w . x i l i n x . c o m / b v d o c s / a p p n o t e s / x a p p 2 9 0 . z i p
3 . A s m e n t i o n e d b e f o r e , t h e M o d u l a r D e s i g n o w i s r u n v i a t h e c o m -
m a n d l i n e i n t e r f a c e . S o l a u n c h a c o m m a n d p r o m p t a n d c h a n g e t o t h e
i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l d i r e c t o r y .
4 . B e f o r e w e c a n a s s i g n a r e a c o n s t r a i n t s , t h e d e s i g n m u s t b e t u r n e d i n t o
a f o r m a t a c c e s s i b l e t o t h e X i l i n x t o o l s t h a t c a n h e l p u s . T h i s c a n b e
a c c o m p l i s h e d b y u s i n g n g d b u i l d :
n g d b u i l d - m o d u l a r i n i t i a l t o p . e d n
D o n o t w o r r y i f t h e r e i s s o m e w a r n i n g s a b o u t u n e x p a n d e d m o d u l e s
s i n c e t h e r e c o n g u r a b l e m o d u l e s a r e n o t i n c l u d e d y e t i n t h e t o p l e v e l
d i r e c t o r y .
5 . N o w w e c a n a p p l y t h e l o c a t i o n c o n s t r a i n t s t o e a c h e l e m e n t s o f t h e t o p
l e v e l . T h e v e t h i n g s t h a t w e n e e d t o c o n s t r a i n a t t h i s p o i n t a r e :
A r e a c o n s t r a i n t s f o r e a c h m o d u l e . T h e m o d u l e a r e a s c a n b e d e - n e d b y u s i n g t h e F l o o r p l a n n e r , b u t t h e y m u s t f o l l o w s o m e
s t r i c t g u i d e l i n e s : ( 1 ) t h e y m u s t h a v e a f o u r - s l i c e m i n i m u m w i d t h ,
( 2 ) t h e i r w i d t h i s a l w a y s a m u l t i p l e o f f o u r s l i c e s ( e . g . 4 , 8 , 1 2 , . . . ) ,
9
http://www.xilinx.com/bvdocs/appnotes/xapp290.zip8/6/2019 DPRtutorial
10/16
( 3 ) t h e y a r e a l w a y s t h e f u l l h e i g h t o f t h e d e v i c e , ( 4 ) t h e b o u n d a r y
b e t w e e n t w o m o d u l e s i s p l a c e d o n a n e v e n c o l u m n ( e . g . C 1 9 -
> C 2 0 ) , ( 5 ) t h e a r e a g r o u p s d e n e d i n t h e . u c f l e a r e d e n e d a s
r e c o n g u r a b l e t h a n k t o s p e c i c p r o p e r t i e s . T h e s e p r o p e r t i e s h a v e
t o b e a d d e d m a n u a l l y t o t h e . u c f l e a s f o l l o w s :
A R E A _ G R O U P " m y M o d u l e A r e a " M O D E = R E C O N F I G ;
T h e o o r p l a n n i n g o f a l l I O B s . E a c h I O B s h a s t o b e w h o l l y
c o n t a i n e d w i t h i n t h e c o l u m n a r s p a c e o f t h e i r a s s o c i a t e d r e c o n -
g u r a b l e m o d u l e . N o i n t e r m i x i n g b e t w e e n c o l u m n a r r e g i o n s i s
a l l o w e d .
T h e o o r p l a n n i n g o f a l l g l o b a l l o g i c . L o g i c t h a t i s n o t p a r t o f a
l o w e r l e v e l m o d u l e m u s t b e c o n s t r a i n e d t o s p e c i c s i t e s i n t h e
d e v i c e v i a L O C c o n s t r a i n t s . T h e r e m u s t b e n o u n c o n s t r a i n e d
t o p - l e v e l l o g i c .
C o n s t r a i n i n g b u s m a c r o s p o s i t i o n . L O C c o n s t r a i n t s a r e m a n u a l l y
i n s e r t e d f o r e a c h b u s m a c r o i n t o t h e . u c f l e b e c a u s e t h e c u r -
r e n t v e r s i o n o f F l o o r p l a n n e r d o e s n o t s u p p o r t t h e p l a c e m e n t o f
b u s m a c r o e l e m e n t s . L o c a t e t h e b u s m a c r o t o e x a c t l y s t r a d d l e
t h e b o u n d a r y b e t w e e n t h e m o d u l e s f o r m i n g t h e c o m m u n i c a t i o n
b r i d g e . E a c h b u s m a c r o w i l l o c c u p y a 1 - r o w b y 8 - c o l u m n s e c t i o n
o f T B U F s i t e s p a c e . P l e a s e r e p o r t t o t h e A b o u t b u s m a c r o L O C
c o n s t r a i n t s s e c t i o n f o r a n y f u r t h e r e x p l a n a t i o n .
C h e c k f o r p s e u d o l o g i c . P s e u d o l o g i c i s c r e a t e d w h e n a n e t c o n - n e c t s o n e m o d u l e t o a n o t h e r . I f a n e t c o n n e c t s a m o d u l e t o s o m e
p i e c e o f t o p l e v e l l o g i c , t h e n n o p s e u d o l o g i c i s c r e a t e d s i n c e t h e
t o p l e v e l l o g i c c a n b e u s e d . Y o u h a v e t o k n o w t h a t p s e u d o l o g i c i s
s t r i c t l y f o r b i d d e n i n d y n a m i c p a r t i a l r e c o n g u r a t i o n a l t h o u g h i t
a p p e a r s e v e n i n t h e x a p p 2 9 0 d e s i g n . T h e r e f o r e , y o u s h o u l d n e v e r
a d d L O C c o n s t r a i n t f o r s u c h l o g i c .
I n o r d e r t o d o t h a t , l a u n c h t h e F l o o r p l a n n e r :
f l o o r p l a n n e r t o p . n g d
6 . D e n e a r e a c o n s t r a i n t s f o r e a c h m o d u l e a c c o r d i n g t o t h e r u l e s t h a t w e
d e s c r i b e d p r e v i o u s l y . T o d o t h a t , s e l e c t t h e m o d u l e i n D e s i g n H i e r a r -
c h y M e n u . S e l e c t F l o o r p l a n > A s s i g n A r e a C o n s t r a i n t s . U s i n g t h e m o u s e
p o i n t e r d e n e t h e a r e a . T h e n , p l a c e e a c h I O B s w i t h i n t h e c o l u m n a r
s p a c e o f e a c h m o d u l e . T h e I O B s t o p l a c e a r e f r o m t o p ' s p r i m a t i v e s .
D r a g e a c h o f t h e I O B s t o a n a p p r o p r i a t e I O B d e n i t i o n . W h e n n -
i s h e d , y o u s h o u l d o b t a i n a v i e w s u c h a s t h a t s h o w n i n F i g u r e 7 . T o
w r i t e t h e c o n s t r a i n t l e , F i l e > W r i t e C o n s t r a i n t s . T h e n , c l o s e t h e
F l o o r p l a n n e r a n d a d d m a n u a l l y L O C c o n s t r a i n t s f o r b u s m a c r o t o
t h e t o p . u c f l e l o c a t e d i n i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l a s f o l l o w s :
1 0
8/6/2019 DPRtutorial
11/16
F i g u r e 7 : A F l o o r p l a n n e r v i e w a f t e r a p p l y i n g m a j o r p l a c e m e n t a n d a r e a c o n -
s t r a i n t s .
I N S T " b u s R e g T o I n c _ b u s 2 " L O C = " T B U F _ R 1 9 C 1 6 . 0 " ;
7 . A s s o o n a s y o u n i s h w i t h t h e e d i t i o n o f t o p . u c f , y o u c a n l a u n c h
n g d b u i l d o n e m o r e t i m e i n o r d e r t o a n n o t a t e t h e n e w c o n s t r a i n t s
t o t h e d e s i g n :
n g d b u i l d - m o d u l a r i n i t i a l t o p . e d n
A b o u t b u s m a c r o L O C c o n s t r a i n t s
T h e b u s m a c r o c o n t a i n s a n i n t e r n a l a x i s s y s t e m . T h e o r i g i n i s l o c a t e d i n t h e l e f t m o s t
e l e m e n t , a T B U F i n o u r c a s e , i d e n t i e d b y t h e f o l l o w i n g L O C c o n s t r a i n t :
L O C = " T B U F _ R 1 C 1 . 0 "
I n f a c t , w h e n w e c o n s t r a i n t t h e b u s m a c r o , w e t e l l t h e m a p p e r w h e r e i t h a s t o p l a c e
t h e o r i g i n o f t h e b u s m a c r o . S i n c e i t s s h a p e i s s t r i c t l y d e n e d b y t h e h a r d m a c r o ,
w e d o n o t n e e d t o s p e c i f y a n a r e a . O n t h e o t h e r h a n d , i t i s v e r y i m p o r t a n t t o p l a c e
t h e o r i g i n w h e r e o n t h e s a m e T B U F t h a n i n t h e m a c r o . I n d e e d , t h e r e i s t w o T B U F s
p e r s i t e , i n d i c a t e d b y e i t h e r 1 o r 0 . S i n c e t h e m a c r o u s e s t h e T B U F 0 a s o r i g i n , w e
h a v e t o p l a c e t h e b u s m a c r o o n a T B U F l a b e l e d 0 .
T h e w i d t h o f t h e b u s m a c r o i s 8 c o l u m n s a n d i t m u s t e x a c t l y s t r a d d l e t h e b o u n d a r y
b e t w e e n t h e m o d u l e s . T h e r e f o r e , y o u m u s t p l a c e i t 4 c o l u m n s b e f o r e t h e b o u n d a r y
( C 1 6 i n o u r e x a m p l e ) . O n t h e o t h e r h a n d , t h e r e i s n o p a r t i c u l a r c o n s t r a i n t s f o r t h e
r o w s : y o u c a n c h o o s e t h e m a r b i t r a r i l y .
3 . 4 A c t i v e m o d u l e i m p l e m e n t a t i o n
I n t h i s s e c t i o n , w e w a n t y o u t o d e s c r i b e a n c o m p l e t e a c t i v e m o d u l e i m p l e -
m e n t a t i o n , b u t o n l y f o r o n e m o d u l e ( e . g . i n c r e m e n t e r ) . Y o u m a y p r o c e e d
1 1
8/6/2019 DPRtutorial
12/16
e x a c t l y t h e s a m e w a y a s f o l l o w s f o r t h e o t h e r m o d u l e s .
T o b e g i n t h e A c t i v e m o d u l e i m p l e m e n t a t i o n , t h e n e t l i s t f o r e a c h m o d u l e
n e e d s t o b e c o p i e d i n t o a s e p a r a t e d i r e c t o r y . T h e n , t h e t o p - l e v e l c o n s t r a i n t s
l e t o p . u c f t h a t w e g e n e r a t e d i n t h e I n i t i a l b u d g e t i n g n e e d s t o b e c o p i e d i n
e a c h o f t h e m o d u l e d i r e c t o r i e s . T h a n k t o t h i s l o c a l c o p y , e a c h m o d u l e w i l l
b e a b l e t o a d d t h e i r o w n m o d u l e s p e c i c c o n s t r a i n t s .
1 . C o p y i n c r e m e n t e r . e d n f r o m s y n t h e s i s / i n c r e m e n t e r i n t o i m p l e m e n t a t i o n / i n c r e m e n t e r .
2 . C o p y t o p . u c f f r o m t h e I n i t i a l b u d g e t i n g d i r e c t o r y i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l
i n t o i m p l e m e n t a t i o n / i n c r e m e n t e r a n d i n t o e a c h o f t h e m o d u l e d i r e c t o -
r i e s .
3 . C h a n g e t o t h e m o d u l e d i r e c t o r y i m p l e m e n t a t i o n / i n c r e m e n t e r .
4 . F i r s t w e n e e d t o r u n n g d b u i l d t o a n n o t a t e c o n s t r a i n t s c o n t a i n e d i n
t h e l o c a l t o p . u c f l e t o t h e d e s i g n . I n o u r c a s e , t h i s s t e p i s n o t r e a l l y
n e c e s s a r y b e c a u s e w e h a v e n o l o c a l c o n s t r a i n t , b u t f o r a n o t h e r d e s i g n
i t w o u l d b e u s e f u l .
n g d b u i l d - m o d u l a r m o d u l e - a c t i v e i n c r e m e n t e r
. .\
t o p _ l e v e l _ i n i t i a l \
t o p . e d n
5 . I n f a c t , e a c h t i m e y o u a d d a c o n s t r a i n t , y o u n e e d t o r u n n g d b u i l d i n
o r d e r t o a n n o t a t e i t t o t h e d e s i g n . S i n c e y o u w i l l a d d m o d u l e - s p e c i c
c o n s t r a i n t s t o t h e l o c a l . u c f , y o u h a v e t o t e l l n g d b u i l d t h a t y o u w a n t
i t t o u s e t h i s l e . T h i s c a n b e d o n e b y u s i n g t h e - u c o p t i o n :
n g d b u i l d - m o d u l a r m o d u l e - a c t i v e i n c r e m e n t e r - u c t o p . u c f
. .\
t o p _ l e v e l _ i n i t i a l \
t o p . e d n
6 . T h e f o l l o w i n g s t e p i s t h e m a p p i n g o f l o g i c o f t h i s m o d u l e . W e a r e g o -
i n g t o u s e t h e . n g d p r e v i o u s l y g e n e r a t e d . T h e m a p p r o g r a m p r o d u c e s
a n . m r p l e ( m a p r e p o r t ) t h a t w i l l b r i n g y o u a l o t o f i n t e r e s t i n g i n f o r -
m a t i o n , e s p e c i a l l y a b o u t a r e a s a n d r e s o u r c e s , t h a t c a n b e h e l p f u l t o
n e - t u n e t h e a r e a g r o u p s i n t h e t o p - l e v e l o o r p l a n .
m a p t o p . n g d
7 . W e c o m e n o w t o t h e p o i n t w i t h t h e p l a c e a n d r o u t e o f t h e t o p - l e v e l
d e s i g n w i t h o n l y t h i s m o d u l e e x p a n d e d . I n d o i n g t h i s y o u s h o u l d n o t
w o r r y i f s o m e s i g n a l s s t a y u n r o u t e d , s i n c e o n l y t h e m o d u l e i n c r e -
m e n t e r i s e x p a n d e d a t t h i s s t a g e . T h e - w o p t i o n i s u s e d t o a l l o w t h e
t o o l s t o o v e r w r i t e a n y p r e v i o u s t o p 1 . n c d l e s .
p a r - w t o p . n c d t o p 1 . n c d
1 2
8/6/2019 DPRtutorial
13/16
8 . T h e n a l s t e p , b u t c e r t a i n l y t h e m o s t t r i v i a l , o f t h e a c t i v e m o d u l e
i m p l e m e n t a t i o n i s t o p u b l i s h t h e m o d u l e l e s b a c k t o a c e n t r a l l y l o c a t e d
P i m ( P h y s i c a l l y I m p l e m e n t e d M o d u l e ) d i r e c t o r y t h a t w i l l b e u s e d i n
o r d e r t o p e r f o r m t h e n a l a s s e m b l y . T h e p i m c r e a t e u t i l i t y i s u s e d f o r
t h a t p u r p o s e .
p i m c r e a t e - n c d t o p 1 . n c d . . \P i m
9 . R e p e a t t h i s p r o c e d u r e a s m a n y t i m e s a s r e q u i r e d .
3 . 5 A s s e m b l i n g t h e m o d u l e s
O u r w o r k i n g d i r e c t o r y w i l l b e i m p l e m e n t a t i o n / t o p _ l e v e l _ n a l i n t h i s s e c t i o n .
W e a r e g o i n g t o u s e t h e p u b l i s h e d m o d u l e i m p l e m e n t e d l e s i n t h e P i m
d i r e c t o r y a s w e l l a s t h e t o p - l e v e l l e s .
1 . A f t e r c o p y i n g t o p . n g o a n d t o p . u c f l e s f r o m i m p l e m e n t a t i o n / t o p _ l e v e l _ i n i t i a l
t o i m p l e m e n t a t i o n / t o p _ l e v e l _ n a l , a n e x t s t e p i s t o r u n n g d b u i l d ,
s p e c i f y i n g e a c h o f t h e m o d u l e s i n t h e P i m d i r e c t o r y . O f c o u r s e , a t t h i s
p o i n t a l l o f t h e m o d u l e s h a v e t o b e p u b l i s h e d b y u s i n g p i m c r e a t e .
T h e - p o p t i o n s p e c i f y w h i c h t y p e o f F P G A w e a r e g o i n g t o u s e .
n g d b u i l d - p x c 2 s 2 0 0 - 6 p q 2 0 8 - m o d u l a r a s s e m b l e - p i m p a t h
. . \P i m - u s e _ p i m i n c r e m e n t e r - u s e _ p i m m y R e g i s t e r t o p . n g o
2 . N o w w e c a n m a p t h e l o g i c o f t h e f u l l d e s i g n .
m a p t o p . n g d
3 . T h e f o l l o w i n g s t e p i s t h e p l a c e a n d r o u t e o f t h e l o g i c o f t h e c o m p l e t e l y
e x p a n d e d d e s i g n . A g a i n , t h e p l a c e m e n t a n d r o u t i n g o f t h e r e s o u r c e s
u s e d b y e a c h m o d u l e w i l l b e c o m p l e t e d u s i n g t h e l e s i n t h e p i m d i -
r e c t o r y . Y o u c a n r e v i e w t h e t o p _ r o u t e d . p a r l e i f i t s e e m s t h a t t h e r e
i s e r r o r s i n y o u r d e s i g n .
p a r - w t o p . n c d t o p _ r o u t e d . n c d
4 . W e c o m e n o w t o o n e o f t h e m o s t i m p o r t a n t s t e p s . L o a d t h e d e s i g n b y
u s i n g F P G A E d i t o r t o v i e w t h e n a l p l a c e d a n d r o u t e d r e s u l t :
f p g a _ e d i t o r t o p _ r o u t e d . n c d
Y o u s h o u l d o b t a i n a v i e w s u c h a s t h a t s h o w n i n F i g u r e 8 . V e r i f y
t h a t s i g n a l s a r e w h o l l y c o n t a i n e d w i t h i n m o d u l e b o u n d a r y e x c e p t t h o s e
t r a v e r s i n g t h e b o u n d a r y v i a t h e b u s m a c r o . M o r e o v e r , v e r i f y t h a t e a c h
b u s m a c r o i s w e l l - s h a p e d a n d a l i g n e d ( t i p : o p e n t o p . n c d t h a t c o n t a i n s
o n l y b u s m a c r o i n o r d e r t o h a v e a m o r e c l e a r v i e w ) .
1 3
8/6/2019 DPRtutorial
14/16
3 . 6 C r e a t i n g b i t s t r e a m s a n d c o n g u r i n g t h e F P G A
F i r s t o f a l l , y o u h a v e t o c r e a t e t h e b i t s t r e a m f o r t h e i n i t i a l F P G A c o n g u -
r a t i o n . T h i s s t e p c a n b e d o n e i n a t r a d i t i o n a l w a y :
b i t g e n - w t o p _ r o u t e d . n c d t o p _ r o u t e d . b i t
N o w , y o u h a v e a l s o t o c r e a t e t h e p a r t i a l r e c o n g u r a t i o n b i t s t r e a m s , f o r
w h i c h t h e - g A c t i v e R e c o n f i g : Y e s s w i t c h i s r e q u i r e d , m e a n i n g t h a t t h e d e -
v i c e r e m a i n s i n f u l l o p e r a t i o n w h i l e t h e n e w p a r t i a l b i t s t r e a m i s b e i n g u p -
l o a d e d . M o r e o v e r , t h e - g P e r s i s t : Y e s s w i t c h i s r e q u i r e d w h e n u t i l i z i n g
S e l e c t M A P m o d e , t h a t i s n o t t h e c a s e i n t h i s t u t o r i a l . A n y o t h e r B i t G e n
o p t i o n i s a l l o w e d i n p a r t i a l r e c o n g u r a t i o n m o d e , e x c e p t e n c r y p t i o n . A d e -
v i c e t h a t h a s b e e n c o n g u r e d w i t h a n e n c r y p t e d b i t s t r e a m c a n n o t b e p a r -
t i a l l y r e c o n g u r e d . S i m i l a r l y , a d e v i c e c a n n o t b e p a r t i a l l y r e c o n g u r e d w i t h
a n e n c r y p t e d b i t s t r e a m . T h u s , y o u c a n r u n t h e B i t G e n p r o g r a m w i t h i n
e a c h m o d u l e d i r e c t o r y :
b i t g e n - g A c t i v e R e c o n f i g : Y e s - d t o p 1 . n c d t o p _ p a r t i a l . b i t
W h e n d o w n l o a d i n g t h i s l e , t h e f u l l b i t s t r e a m c o n g u r a t i o n m u s t a l r e a d y
b e p r o g r a m m e d i n t o t h e d e v i c e . P a r t i a l r e c o n g u r a t i o n s u p p o r t s e i t h e r t h e
p a r a l l e l s l a v e S e l e c t M A P o r s e r i a l J T A G p r o g r a m m i n g o p t i o n s . T h e X i l i n x
c o n g u r a t i o n a p p l i c a t i o n , i M P A C T , c a n b e u s e d i n c o n j u n c t i o n w i t h a n y
X i l i n x d o w n l o a d c a b l e t o i n t e r f a c e t o t a r g e t d e v i c e f o r c o n g u r a t i o n . P a y a
p a r t i c u l a r a t t e n t i o n t o t h e c o n g u r a t i o n s s e q u e n c i n g s i n c e t h e X i l i n x t o o l s
w i l l n o t w a r n y o u a g a i n s t a p a r t i a l r e c o n g u r a t i o n a t t e m p t p e r f o r m e d o n
n o n p r o g r a m m e d d e v i c e .
4 S o m e F r e q u e n t l y A s k e d Q u e s t i o n s
1 . W h a t a b o u t t h e D i e r e n c e - B a s e d D P R ? I f e l t n o n e e d t o t a l k
a b o u t t h i s p a r t i c u l a r o w o f D P R i n t h i s t u t o r i a l s i n c e i t i n v o l v e s n o n e
o f t h e d i c u l t i e s e n c o u n t e r e d d u r i n g t h e M o d u l e - B a s e d o w . A l l t h a t
i s r e q u i r e d i s a g o o d u n d e r s t a n d i n g o f h o w t o m a k e l o g i c c h a n g e s u s i n g
t h e F P G A e d i t o r a p p l i c a t i o n , a n d t h e p e r t i n e n t o p t i o n s t o s e l e c t i n
B i t G e n . A n y f u r t h e r i n f o r m a t i o n c a n b e f o u n d b y r e a d i n g [ 3 ] .
2 . I s i t p o s s i b l e t o u s e r e c o n g u r a b l e m o d u l e s w i t h g e n e r i c e n t i t y
? I t r i e d i t , b u t i t s e e m s t h a t i t i s i m p o s s i b l e . O n t h e o t h e r h a n d , y o u
c a n s t i l l u s e g e n e r i c c o m p o n e n t s i n y o u r r e c o n g u r a b l e m o d u l e s , b u t
t h e m o d u l e s t h e m s e l v e s h a v e t o b e c o m p l e t e l y d e n e d d u r i n g t h e r s t
n g d b u i l d . O t h e r w i s e t h e y a r e n o t r e c o g n i z e d .
3 . W h a t a b o u t m o d u l e - s p e c i c c o n s t r a i n t s ? A l l s p e c i c c o n s t r a i n t s
m u s t b e a d d e d t o t h e l o c a l . u c f t h a t e a c h m o d u l e d i r e c t o r y s h o u l d
1 4
8/6/2019 DPRtutorial
15/16
F i g u r e 8 : T h e F P G A e d i t o r v i e w i n t h e e n d o f t h e t u t o r i a l . P a y a t t e n t i o n t o
t h e f a c t t h a t a l l s i g n a l s a r e w h o l l y c o n t a i n e d w i t h i n m o d u l e a r e a . O n l y b u s m a c r o s
t r a v e r s e t h e b o u n d a r y .
c o n t a i n . T h e i n s t a n c e s n a m e s h o u l d b e c o m p l e t e l y d e n e d e v e n t h o u g h
t h e c o n s t r a i n t l e i s l o c a l ( e . g . m o d u l e n a m e / i n s t a n c e n a m e ) .
4 . P A R f a i l s w i t h t h i s m e s s a g e : T h i s a p p l i c a t i o n h a s r e q u e s t e d
t h e R u n t i m e t o t e r m i n a t e i t i n a n u n u s u a l w a y . P l e a s e c o n -
t a c t t h e a p p l i c a t i o n ' s s u p p o r t t e a m f o r m o r e i n f o r m a t i o n , b u t
t h e r e i s a p p a r e n t l y n o e r r o r i n m y d e s i g n . T h i s i s a b u g o f t h e
X i l i n x s o f t w a r e t h a t a p p e a r e d i n t h e v e r s i o n 6 . 3 S P 3 . I f o u n d t w o w a y s
o f s o l v i n g t h i s p r o b l e m : ( 1 ) u n i n s t a l l S P 3 o r ( 2 ) u s e F P G A e d i t o r
i n s t e a d o f P A R i n o r d e r t o p e r f o r m t h e p l a c e a n d r o u t e . N e v e r t h e l e s s ,
y o u m a y e n c o u n t e r a n o t h e r p r o b l e m s s i n c e i t s e e m s i m p o s s i b l e t o m a k e
F P G A e d i t o r r e s p e c t t h e a r e a c o n s t r a i n t s . I h a v e n o i d e a w h e t h e r
X i l i n x h a s p l a n n e d a x o r n o t .
5 . D o e s i t e x i s t o t h e r b u s m a c r o s , m a y b e l a r g e r , t h a n t h o s e p r o -
v i d e d b y X i l i n x ? Y e s , i t e x i s t s s o m e t h i n g e v e n b e t t e r t h a n t h a t : a
s c r i p t a b l e t o c r e a t e a n y s o r t o f b u s m a c r o . Y o u w i l l l e a r n m o r e a b o u t
i t b y v i s i t i n g t h e w e b i s t e o f i t s c r e a t o r , J e n s T h o r v i n g e r : h t t p : / / -
j e n s . t h o r v i n g e r . s e . Y o u s h o u l d r e a d h i s m a s t e r t h e s i s [ 1 ] d e a l i n g w i t h
D P R , t o o .
6 . T h e r s t n g d b u i l d f a i l s w i t h e r r o r s . T h e b u s m a c r o l e . n m c
c a n n o t b e m e r g e d i n t o t h e d e s i g n b e c a u s e o n e o r m o r e p i n s o n
t h e b l o c k w e r e n o t f o u n d i n t h e l e . T h i s p r o b l e m i s d u e t o t h e b u s
d e l i m i t e r s t h a t c a n b e o f d i e r e n t t y p e . F o r e x a m p l e , X i l i n x u s e s < >
i n t h e b u s m a c r o s n e t l i s t s w h i l e L e o n a r d o S p e c t r u m u s e s ( ) . F o r t h i s
t u t o r i a l , w e m o d i e d t h e b u s m a c r o t o m a k e i t u s e t h e s a m e d e l i m i t e r
1 5
8/6/2019 DPRtutorial
16/16