specification and design of embedded software and hardware systems
TRANSCRIPT
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
1/29
S p e c i c a t i o n a n d D e s i g n o f E m b e d d e d
S o f t w a r e / H a r d w a r e S y s t e m s
D a n i e l D . G a j s k i
*
a n d F r a n k V a h i d
* *
T e c h n i c a l R e p o r t C S - 9 4 - 0 8
O c t o b e r 2 4 , 1 9 9 4
* D e p a r t m e n t o f I n f o r m a t i o n a n d C o m p u t e r S c i e n c e
U n i v e r s i t y o f C a l i f o r n i a
I r v i n e , C A 9 2 7 1 7
g a j s k i @ u c i . e d u
* * D e p a r t m e n t o f C o m p u t e r S c i e n c e
U n i v e r s i t y o f C a l i f o r n i a
R i v e r s i d e , C A 9 2 5 2 1
v a h i d @ c s . u c r . e d u
A b s t r a c t
S y s t e m s p e c i c a t i o n a n d d e s i g n c o n s i s t s o f d e s c r i b i n g a s y s t e m ' s d e s i r e d f u n c t i o n a l i t y , a n d o f
m a p p i n g t h a t f u n c t i o n a l i t y f o r i m p l e m e n t a t i o n o n a s e t o f s y s t e m c o m p o n e n t s , s u c h a s p r o c e s s o r s ,
A S I C ' s , m e m o r i e s , a n d b u s e s . I n t h i s a r t i c l e , w e d e s c r i b e t h e k e y p r o b l e m s o f s y s t e m s p e c i c a t i o n
a n d d e s i g n , i n c l u d i n g s p e c i c a t i o n c a p t u r e , d e s i g n e x p l o r a t i o n , h i e r a r c h i c a l m o d e l i n g , s o f t w a r e a n d
h a r d w a r e s y n t h e s i s , a n d c o s i m u l a t i o n . W e h i g h l i g h t e x i s t i n g t o o l s a n d m e t h o d s f o r s o l v i n g t h o s e
p r o b l e m s , a n d w e d i s c u s s i s s u e s t h a t r e m a i n t o b e s o l v e d .
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
2/29
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
3/29
C o n t e n t s
1 I n t r o d u c t i o n 1
2 S p e c i c a t i o n c a p t u r e 5
2 . 1 M o d e l c r e a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6
2 . 2 D e s c r i p t i o n g e n e r a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7
3 E x p l o r a t i o n 8
3 . 1 A l l o c a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8
3 . 2 P a r t i t i o n i n g : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9
3 . 3 T r a n s f o r m a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1
3 . 4 E s t i m a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 2
4 S p e c i c a t i o n r e n e m e n t 1 4
4 . 1 M e m o r i e s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 5
4 . 2 I n t e r f a c i n g : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 5
4 . 3 A r b i t r a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 6
4 . 4 G e n e r a t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 6
5 S o f t w a r e s y n t h e s i s 1 8
6 H a r d w a r e s y n t h e s i s 1 8
7 S i m u l a t i o n a n d C o s i m u l a t i o n 1 9
8 C o n c l u s i o n s 2 1
9 A c k n o w l e d g e m e n t s 2 2
L i s t o f F i g u r e s
1 I T V P e n v i r o n m e n t : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1
2 I T V P s y s t e m - l e v e l d e s i g n o p t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2
3 S y s t e m - l e v e l d e s i g n u s i n g h i e r a r c h i c a l m o d e l i n g : : : : : : : : : : : : : : : : : : : : : 4
4 I T V P s p e c i c a t i o n : ( a ) P S M m o d e l , ( b ) m o d e l d e s c r i b e d i n a l a n g u a g e , ( c ) s i m u l a t i o n
t e s t b e n c h : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5
5 L a n g u a g e s u p p o r t f o r c o n c e p t u a l m o d e l c h a r a c t e r i s t i c s o f e m b e d d e d s y s t e m s : : : : : 7
6 I T V P a l l o c a t i o n a n d p a r t i t i o n e x a m p l e : : : : : : : : : : : : : : : : : : : : : : : : : : 9
7 I T V P e s t i m a t e s e x a m p l e : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 4
8 I T V P r e n e d s p e c i c a t i o n e x a m p l e : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 7
i
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
4/29
i i
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
5/29
1 I n t r o d u c t i o n
E m b e d d e d s y s t e m s h a v e b e c o m e c o m m o n p l a c e i n r e c e n t y e a r s . E x a m p l e s i n c l u d e a u t o m o b i l e c r u i s e -
c o n t r o l , f u e l - i n j e c t i o n s y s t e m s , a i r c r a f t a u t o p i l o t s , t e l e c o m m u n i c a t i o n p r o d u c t s , i n t e r a c t i v e t e l e v i s i o n
p r o c e s s o r s , n e t w o r k s w i t c h e s , v i d e o f o c u s i n g u n i t s , r o b o t c o n t r o l l e r s , a n d n u m e r o u s m e d i c a l d e v i c e s .
W h i l e t h e r e i s n o w i d e s p r e a d a g r e e m e n t o f w h a t d e n e s a n e m b e d d e d s y s t e m , w e n o t e t h a t s u c h s y s -
t e m s p o s s e s s a f e w k e y c h a r a c t e r i s t i c s . T h e d e s i g n o f a n e m b e d d e d s y s t e m i s v e r y h e a v i l y i n u e n c e d
b y t h e s y s t e m ' s i n t e r a c t i o n s w i t h i t s e n v i r o n m e n t . E m b e d d e d s y s t e m s a l s o o f t e n h a v e n u m e r o u s
m o d e s o f o p e r a t i o n , m u s t r e s p o n d r a p i d l y t o e x c e p t i o n s , a n d o f t e n p o s s e s s a g r e a t d e a l o f c o n c u r -
r e n c y . U n f o r t u n a t e l y , t h e r e a r e f e w t o o l s a n d m e t h o d o l o g i e s t o a s s i s t a d e s i g n e r t a c k l e t h e d i c u l t
p r o b l e m o f d e s i g n i n g a c o m p l e x e m b e d d e d s y s t e m .
T o i l l u s t r a t e t h e e m b e d d e d - s y s t e m d e s i g n t a s k , c o n s i d e r t h e d e s i g n o f a n i n t e r a c t i v e T V p r o c e s s o r
s y s t e m u s e d t o s u p p o r t i n t e r a c t i v e m u l t i m e d i a . T h e s y s t e m s t o r e s v i d e o f r a m e s , a n d d i s p l a y s t h e m
a s s t i l l p i c t u r e s w i t h a c c o m p a n y i n g t e x t a n d a u d i o . T h e s y s t e m r e s i d e s i n a s e t - t o p b o x s i m i l a r t o a
c a b l e T V b o x , a n d a u s e r i n t e r a c t s b y s e l e c t i n g m e n u i t e m s w i t h a k e y p a d . A d i a g r a m o f t h e o v e r a l l
s y s t e m i s s h o w n i n F i g u r e 1 . D e s i g n o f t h e D i g i t a l s u b s y s t e m i n v o l v e s r s t c r e a t i n g a s p e c i c a t i o n
o f t h e s u b s y s t e m ' s f u n c t i o n a l i t y , c a l l e d a f u n c t i o n a l s p e c i c a t i o n , a n d t h e n m a p p i n g i t t o a s y s t e m -
l e v e l a r c h i t e c t u r e , a s s h o w n i n F i g u r e 2 . T h e s u b s y s t e m i s i m p l e m e n t e d w i t h s i x c o m p o n e n t s : t h r e e
m e m o r i e s , t w o A S I C s a n d a p r o c e s s o r . T h e M e m o r y 1 c o m p o n e n t s t o r e s t w o a r r a y s u s e d t o h o l d
a u d i o b y t e s , w h i l e M e m o r y 2 s t o r e s a v i d e o a r r a y . M e m o r y 3 s t o r e s a f o n t s a r r a y a n d a n a r r a y o f
c h a r a c t e r s t o b e d i s p l a y e d o n t h e s c r e e n . T h e A S I C 1 c o m p o n e n t i m p l e m e n t s t h e f u n c t i o n s t h a t s t o r e
i n c o m i n g a u d i o , a n d t h a t g e n e r a t e t h e a u d i o o n d e m a n d . A S I C 2 i m p l e m e n t s t h e f u n c t i o n s t h a t s t o r e
a n d g e n e r a t e v i d e o f r a m e s , a n d a l s o t h a t s t o r e s p e c i a l c o m m a n d b y t e s t h a t m a y b e e n c o d e d i n t h e
a u d i o - v i d e o ( A V ) i n p u t . F i n a l l y , t h e P r o c e s s o r c o m p o n e n t i m p l e m e n t s t h e f u n c t i o n s t h a t p r o c e s s
t h e s p e c i a l A V c o m m a n d s , t h e m a i n c o m p u t e r c o m m a n d s , a n d u s e r c o m m a n d s , a n d t h a t o v e r l a y s
c h a r a c t e r s o n t h e s c r e e n .
audio_in
video_in
audio_out
video_out
InteractiveTvProcessor
Analogsubsystem
Analogsubsystem
av_cmd
button
Digitalsubsystem
Main computer
video audio video
keypadreceiver
IC
audio +commands
F i g u r e 1 : I T V P e n v i r o n m e n t
1
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
6/29
ASIC1 ASIC2
Processor
Memory1 Memory2
Memory3
GenerateAudio
av_cmd
video_in
audio_in audio_out
video_out
main_cmds button
fonts[128][16][16]
screen_chars[30][30[]8]
ProcessAVCmd
ProcessMainCmds
ProcessRemoteButtons
OverlayCharacters
Digital subsystem
audio1[100k][8]
audio2[100k][8]
video[500k][8]
StoreGenerateVideo
StoreAVCmd
StoreAudio
av_cmd[8]
F i g u r e 2 : I T V P s y s t e m - l e v e l d e s i g n o p t i o n
T h e r e a r e s e v e r a l t a s k s t h a t m u s t b e p e r f o r m e d t o c r e a t e a s y s t e m - l e v e l d e s i g n , a s i l l u s t r a t e d i n
F i g u r e 3 . F i r s t , w e p e r f o r m s p e c i c a t i o n c a p t u r e , w h e r e b y w e s p e c i f y t h e d e s i r e d s y s t e m f u n c t i o n -
a l i t y . T o d o t h i s , w e r s t d e c o m p o s e t h e f u n c t i o n a l i t y i n t o p i e c e s b y c r e a t i n g a c o n c e p t u a l m o d e l o f
t h e s y s t e m . W e g e n e r a t e a d e s c r i p t i o n o f t h i s m o d e l i n a l a n g u a g e . W e v a l i d a t e t h i s d e s c r i p t i o n u s i n g
s i m u l a t i o n o r v e r i c a t i o n t e c h n i q u e s . T h e r e s u l t o f s p e c i c a t i o n c a p t u r e i s a f u n c t i o n a l s p e c i c a t i o n ,
w h i c h i s v o i d o f a n y i m p l e m e n t a t i o n d e t a i l .
S e c o n d , w e p e r f o r m e x p l o r a t i o n , i n w h i c h w e e x p l o r e n u m e r o u s d e s i g n a l t e r n a t i v e s i n o r d e r t o
n d o n e t h a t b e s t s a t i s e s o u r c o n s t r a i n t s . T o d o t h i s , w e t r a n s f o r m t h e i n i t i a l d e s c r i p t i o n i n t o o n e
m o r e s u i t a b l e f o r i m p l e m e n t a t i o n . W e a l l o c a t e a s e t o f s y s t e m c o m p o n e n t s a n d s p e c i f y t h e i r p h y s i c a l
a n d p e r f o r m a n c e c o n s t r a i n t s , a s i n t h e e x a m p l e w h e r e w e a l l o c a t e d t h r e e m e m o r i e s , t w o A S I C s , o n e
p r o c e s s o r , a n d s e v e r a l b u s e s . W e p a r t i t i o n t h e f u n c t i o n a l s p e c i c a t i o n a m o n g a l l o c a t e d c o m p o n e n t s .
T o g u i d e t h e s e t h r e e s u b - p r o b l e m s , w e e s t i m a t e t h e q u a l i t y o f e a c h a l t e r n a t i v e d e s i g n .
2
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
7/29
T h i r d , w e p e r f o r m s p e c i c a t i o n r e n e m e n t , w h e r e b y w e r e n e t h e i n i t i a l s p e c i c a t i o n i n t o
a n e w d e s c r i p t i o n t h a t r e e c t s t h e d e c i s i o n s t h a t w e m a d e . T o d o t h i s , w e m o v e e a c h v a r i a b l e i n t o
a m e m o r y , i n s e r t i n t e r f a c e p r o t o c o l s b e t w e e n c o m p o n e n t s , a n d a d d a r b i t e r s t o l i n e a r i z e c o n c u r r e n t
a c c e s s e s t o a s i n g l e r e s o u r c e . W e g e n e r a t e a s y s t e m d e s c r i p t i o n w i t h t h e a b o v e d e t a i l s , c o n s i s t i n g o f
a d e s c r i p t i o n o f t h e s y s t e m ' s p r o c e s s o r s , m e m o r i e s , a n d b u s e s . W e v e r i f y t h a t t h i s r e n e d d e s c r i p t i o n
i s e q u i v a l e n t t o t h e i n i t i a l s p e c i c a t i o n u s i n g c o s i m u l a t i o n . T h e r e s u l t o f s p e c i c a t i o n r e n e m e n t i s
t h u s a s y s t e m - l e v e l d e s c r i p t i o n , t h a t p o s s e s s e s s o m e i m p l e m e n t a t i o n d e t a i l r e l a t e d t o t h e s y s t e m - l e v e l
a r c h i t e c t u r e t h a t w e h a v e d e v e l o p e d , b u t o t h e r w i s e i s s t i l l l a r g e l y f u n c t i o n a l .
F o u r t h , w e p e r f o r m s o f t w a r e a n d h a r d w a r e d e s i g n , w h e r e b y w e c r e a t e a n i m p l e m e n t a t i o n
f o r e a c h c o m p o n e n t , u s i n g s o f t w a r e a n d h a r d w a r e d e s i g n t e c h n i q u e s . A s t a n d a r d p r o c e s s o r c o m -
p o n e n t r e q u i r e s s o f t w a r e s y n t h e s i s , w h i c h d e t e r m i n e s s o f t w a r e e x e c u t i o n o r d e r t o s a t i s f y r e s o u r c e
a n d p e r f o r m a n c e c o n s t r a i n t s . A c u s t o m p r o c e s s o r c o m p o n e n t ' s a r c h i t e c t u r e a n d d e s i g n c a n b e o b -
t a i n e d t h r o u g h h i g h - l e v e l ( b e h a v i o r a l ) s y n t h e s i s 1 ] , w h i c h c o n v e r t s t h e b e h a v i o r a l d e s c r i p t i o n i n t o a
s t r u c t u r e o f c o m p o n e n t s f r o m a r e g i s t e r - t r a n s f e r ( R T ) l i b r a r y c o n t a i n i n g m i c r o a r c h i t e c t u r a l c o m p o -
n e n t s , s u c h a s A L U s , r e g i s t e r s , c o u n t e r s , r e g i s t e r l e s a n d m e m o r i e s . T h e c o n t r o l l o g i c a n d s o m e R T
c o m p o n e n t s a r e s y n t h e s i z e d w i t h n i t e - s t a t e m a c h i n e a n d l o g i c s y n t h e s i s t e c h n i q u e s 2 ] . T h e r e s u l t
o f s o f t w a r e a n d h a r d w a r e d e s i g n i s a n R T - l e v e l d e s c r i p t i o n , w h i c h c o n t a i n s o p t i m i z e d C c o d e f o r
s o f t w a r e a n d R T - l e v e l n e t l i s t s f o r c u s t o m c o m p o n e n t s .
F i n a l l y , d u r i n g p h y s i c a l d e s i g n , w e g e n e r a t e m a n u f a c t u r i n g d a t a f o r e a c h c o m p o n e n t . F o r s o f t -
w a r e , t h i s i s a s s i m p l e a s c o m p i l i n g s o f t w a r e i n t o a n i n s t r u c t i o n s e t s e q u e n c e , w h e r e a s f o r h a r d w a r e ,
w e c o n v e r t a n R T L n e t l i s t i n t o l a y o u t d a t a f o r g a t e a r r a y s , F P G A ' s , o r c u s t o m A S I C ' s u s i n g p h y s i c a l
d e s i g n t o o l s f o r p l a c e m e n t , r o u t i n g a n d t i m i n g
T h e a b o v e v e t a s k s r o u g h l y d e n e e m b e d d e d s y s t e m - d e s i g n m e t h o d o l o g y f r o m p r o d u c t c o n c e p -
t u a l i z a t i o n t o m a n u f a c t u r i n g . A f t e r e a c h t a s k , w e g e n e r a t e d a m o r e r e n e d d e s c r i p t i o n o f t h e s y s t e m ,
r e e c t i n g t h e d e c i s i o n s m a d e b y e a c h t a s k . S u c h a h i e r a r c h i c a l m o d e l i n g m e t h o d o l o g y p r e s e r v e s
c o n s i s t e n c y t h r o u g h a l l l e v e l s , a n d o e r s h i g h p r o d u c t i v i t y g a i n b y a v o i d i n g u n n e c e s s a r y i t e r a t i o n
w h e n i n c o n c i s t e n c i e s a r e d i s c o v e r e d l a t e i n t h e d e s i g n c y c l e . E a c h m o d e l i s u s e d t o v e r i f y d i e r e n t
p r o p e r t i e s o f t h e s y s t e m . T h e f u n c t i o n a l s p e c i c a t i o n s e r v e s t o v e r i f y t h e c o m p l e t e n e s s a n d c o r r e c t -
n e s s o f t h e s y s t e m f u n c t i o n s . T h e s y s t e m - l e v e l d e s c r i p t i o n i s u s e d t o v e r i f y s y s t e m p e r f o r m a n c e a n d
c o m m u n i c a t i o n p r o t o c o l s . T h e R T - l e v e l d e s c r i p t i o n i s u s e d t o v e r i f y t h e d e v e l o p e d s o f t w a r e c o d e a n d
o p e r a t i o n o f t h e c u s t o m d e s i g n d u r i n g e a c h c l o c k c y c l e . T h e p h y s i c a l d e s c r i p t i o n i s u s e d t o v e r i f y
d e t a i l e d t i m i n g a n d e l e c t r i c a l c h a r a c t e r i s t i c s o f t h e s y s t e m . T h i s h i e r a r c h i c a l m o d e l i n g t e c h n i q u e
d i s t i n g u i s h e s m o d e r n s y s t e m - l e v e l m e t h o d o l o g i e s f r o m p a s t o n e s , w h e n o n l y t h e p h y s i c a l m o d e l w a s
c a p t u r e d , l a t e i n t h e d e s i g n c y c l e , m a k i n g s p e c i c a t i o n o r a r c h i t e c t u r e c h a n g e s i m p o s s i b l e .
T o d a y ' s s y s t e m d e s i g n e r h a s l i t t l e a s s i s t a n c e a v a i l a b l e t o h e l p p e r f o r m s y s t e m - d e s i g n t a s k s . T h e r e
i s n o w i d e l y a c c e p t e d m e t h o d o l o g y o r t o o l t o h e l p w i t h s p e c i c a t i o n c a p t u r e , e x p l o r a t i o n , s p e c i c a -
t i o n r e n e m e n t a n d h a r d w a r e / s o f t w a r e d e s i g n . A s s u c h , m o s t s y s t e m d e s i g n i s d o n e i n a n a d - h o c
m a n n e r , r e l y i n g h e a v i l y o n i n f o r m a l a n d m a n u a l t e c h n i q u e s , a n d e x p l o r i n g o n l y a h a n d f u l o f p o s s i b i l -
i t i e s . I n t h i s a r t i c l e , w e d e s c r i b e t h e r s t t h r e e s y s t e m - l e v e l t a s k s i n m o r e d e t a i l , d e s c r i b i n g p o s s i b l e
s o l u t i o n s t h a t h a v e r e c e n t l y e v o l v e d . W e o n l y b r i e y s k e t c h t h e t a s k s o f h a r d w a r e , s o f t w a r e a n d
p h y s i c a l d e s i g n , s i n c e s e v e r a l e x c e l l e n t r e f e r e n c e s e x i s t o n t h o s e s u b j e c t s . F u r t h e r m o r e , w e d i s c u s s
t h e t a s k s o f s i m u l a t i o n a n d c o s i m u l a t i o n . W e c o n c l u d e w i t h t h e s t a t u s a n d f u t u r e o f s y s t e m d e s i g n
t o o l s a n d m e t h o d o l o g y a n d t h e i r a c c e p t a b i l i t y f o r p r o d u c t i o n u s e . F u r t h e r d e t a i l s a r e f o u n d i n 3 ] .
3
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
8/29
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
9/29
2 S p e c i c a t i o n c a p t u r e
S p e c i c a t i o n c a p t u r e u n a m b i g u o u s l y d e n e s d e s i r e d s y s t e m f u n c t i o n a l i t y ; i n o t h e r w o r d s , g i v e n a n y
s e q u e n c e o f i n p u t v a l u e s t o t h e s y s t e m , a s p e c i c a t i o n t e l l s u s w h a t t h e s y s t e m ' s r e s p o n s e w o u l d b e .
S p e c i c a t i o n c a p t u r e i s a d i c u l t p r o b l e m , b e c a u s e ( a ) t o d a y ' s s y s t e m s a r e c o m p l e x , ( b ) t h e s y s t e m ' s
f u n c t i o n a l i t y i s n o t e x a c t l y k n o w n a t t h e o u t s e t , a n d ( c ) s p e c i c a t i o n t e c h n i q u e s a r e o f t e n i m p r e c i s e .
T o m a k e t h e p r o b l e m w o r s e , t h e s p e c i c a t i o n c a p t u r e s t a g e d o e s n o t r e c e i v e n e a r l y a s m u c h a t t e n t i o n
a s s u b s e q u e n t i m p l e m e n t a t i o n s t a g e s , a n d t h u s m a n y f u n c t i o n a l e r r o r s a r e n o t d e t e c t e d u n t i l a l o w -
l e v e l i m p l e m e n t a t i o n i s a v a i l a b l e . U n f o r t u n a t e l y , f u n c t i o n a l e r r o r s a r e f a r m o r e d i c u l t t o c o r r e c t
a t t h e l a t e s t a g e s o f p r o d u c t d e v e l o p m e n t t h a n d u r i n g t h e s p e c i c a t i o n s t a g e 4 ] . T o r e m e d y t h i s
s i t u a t i o n , m o s t r e s e a r c h e r s p r o p o s e t h e u s e o f a f o r m a l , s i m u l a t a b l e s p e c i c a t i o n l a n g u a g e , w h i c h
a l l o w s c r e a t i o n o f a p r e c i s e s p e c i c a t i o n t h a t c a n b e s i m u l a t e d , t h u s h e l p i n g u s t o d e t e c t a n d c o r r e c t
f u n c t i o n a l e r r o r s a t a n e a r l y s t a g e , a n d r e d u c i n g o v e r a l l d e s i g n t i m e .
C a p t u r i n g a p r e c i s e s p e c i c a t i o n , a s r e q u i r e d b y a f o r m a l l a n g u a g e , c a n b e d i c u l t f o r c o m p l e x
s y s t e m s . S p e c i c a t i o n c a p t u r e i s n o t a s i m p l e p r o c e s s o f \ w r i t i n g d o w n " a w e l l - u n d e r s t o o d f u n c t i o n -
a l i t y ; i n c o n t r a s t , i t i s t h e p r o c e s s o f l e a r n i n g , u n d e r s t a n d i n g , o r g a n i z i n g a n d d e n i n g a f u n c t i o n a l i t y .
S p e c i c a t i o n c a p t u r e c o n s i s t s o f t h r e e t a s k s : m o d e l c r e a t i o n , d e s c r i p t i o n g e n e r a t i o n , a n d s i m u l a t i o n .
W e u s u a l l y m u s t i t e r a t e t h r o u g h t h e s e t a s k s s e v e r a l t i m e s b e f o r e w e o b t a i n a c o m p l e t e a n d c o r r e c t
f u n c t i o n a l s p e c i c a t i o n .
audio1[100k][8]video[500k][8]
Itv
StoreAudio
GenerateAudio
OverlayCharacters
MainControl
Initialize TvMode
ItvMode
ProcAVCmd ProcRemButs
port audio_in[8]
port audio_out[8]
entity ItvE is port (audio_in : in byte;audio_out : out byte;.... ); end;
architecture ItvA of ItvE is begin
behavior Itv typeconcurrent subbehaviors is
type audiomemtype is array ...signal audio1 : audiomemtype;
beginStoreAudio : ;GenerateAudio : ;OverlayCharacters : ;MainControl : ;
behavior GenerateAudiotype code is begin
wait until gen_audio;for i in 1 to num_audio loop
audio_out
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
10/29
2 . 1 M o d e l c r e a t i o n
I n o r d e r t o s p e c i f y a s y s t e m ' s f u n c t i o n a l i t y , w e m u s t r s t d e c o m p o s e t h a t f u n c t i o n a l i t y i n t o p i e c e s ,
a n d d e s c r i b e t h e r e l a t i o n s h i p s b e t w e e n t h o s e p i e c e s . F o r e x a m p l e , t h e I T V P f u n c t i o n a l i t y w a s d e -
c o m p o s e d i n t o v a r i o u s f u n c t i o n s , s u c h a s v i d e o s t o r i n g , a u d i o s t o r i n g , v i d e o g e n e r a t i o n a n d a u d i o
g e n e r a t i o n , a n d t h e r e l a t i o n s h i p s b e t w e e n t h o s e f u n c t i o n s w o u l d b e e x p r e s s e d i n t e r m s o f t h e o r d e r
i n w h i c h t h e y a r e e x e c u t e d a n d t h e d a t a p a s s e d b e t w e e n t h e m . I n g e n e r a l , a m o d e l i s a f o r m a l i z a t i o n
o f a l l o w a b l e p i e c e s a n d t h e i r r e l a t i o n s h i p s . T h e r e a r e m a n y m o d e l s t h a t w e c a n u s e t o d e s c r i b e a s y s -
t e m ' s f u n c t i o n a l i t y . O n e m o d e l i s t h e d a t a o w g r a p h 1 , 5 , 6 ] , i n w h i c h f u n c t i o n a l i t y i s d e c o m p o s e d
i n t o a c t i v i t i e s t h a t t r a n s f o r m d a t a ( s u c h a s a p i e c e o f a p r o g r a m ) , a n d t h e o w s o f d a t a b e t w e e n
t h o s e a c t i v i t i e s . A n o t h e r m o d e l i s t h e n i t e - s t a t e m a c h i n e ( F S M ) , w h i c h r e p r e s e n t s t h e s y s t e m a s
a s e t o f s t a t e s , a n d a s e t o f a r c s b e t w e e n t h o s e s t a t e s t h a t i n d i c a t e t r a n s i t i o n o f t h e s y s t e m f r o m
o n e s t a t e t o a n o t h e r w h e n c e r t a i n e v e n t s o c c u r . T h i s m o d e l h a s b e e n e x t e n d e d t o i n c l u d e h i e r a r c h y
a n d c o n c u r r e n c y 7 ] . A t h i r d m o d e l i s c o m m u n i c a t i n g s e q u e n t i a l p r o c e s s e s ( C S P ) 8 ] . I n t h i s m o d e l ,
t h e s y s t e m i s d e c o m p o s e d i n t o a s e t o f c o n c u r r e n t l y - e x e c u t i n g p r o c e s s e s , e a c h o f w h i c h e x e c u t e s a
s e q u e n c e o f p r o g r a m i n s t r u c t i o n s t h a t i n c l u d e v a r i a b l e a s s i g n m e n t s , l o o p s , b r a n c h e s , a n d p r o c e d u r e
c a l l s . A f o u r t h m o d e l , t h e p r o g r a m - s t a t e m a c h i n e ( P S M ) 9 ] , c o m b i n e s t h e p r e v i o u s t w o m o d e l s b y
p e r m i t t i n g e a c h s t a t e o f a h i e r a r c h i c a l / c o n c u r r e n t F S M t o c o n t a i n a c t i o n s d e s c r i b e d u s i n g p r o g r a m
i n s t r u c t i o n s . O t h e r m o d e l s i n c l u d e P e t r i - n e t s 1 0 ] , o w c h a r t s 6 , 1 1 ] , e n t i t y - r e l a t i o n s h i p d i a g r a m s
1 2 ] , J a c k s o n d i a g r a m s 1 3 ] , c o n t r o l - d a t a o w g r a p h s 1 4 ] , o b j e c t - o r i e n t e d m o d e l s 1 5 ] , a n d q u e u e i n g
m o d e l s 1 6 ] .
N o o n e m o d e l i s i d e a l f o r a l l c l a s s e s o f s y s t e m s . F o r e x a m p l e , t h e d a t a o w m o d e l m a y b e m o s t
n a t u r a l t o u s e f o r a s y s t e m t h a t r e p e a t s t h e s a m e d a t a t r a n s f o r m a t i o n s o v e r t i m e o n s t r e a m s o f
d a t a , s u c h a s a d i g i t a l - s i g n a l p r o c e s s i n g s y s t e m . T h e F S M m o d e l m a y b e m o s t a p p r o p r i a t e f o r a
s y s t e m t h a t d o e s n ' t p e r f o r m c o m p l e x c o m p u t a t i o n s , b u t t h a t m u s t r e s p o n d t o c o m p l e x s e q u e n c e s o f
e x t e r n a l e v e n t s , s u c h a s a c o n t r o l - d o m i n a t e d s y s t e m . T h e C S P m o d e l i s m o s t a p p r o p r i a t e f o r s y s t e m s
t h a t p e r f o r m c o m p l e x d a t a t r a n s f o r m a t i o n s , p o s s i b l y i n p a r a l l e l , s u c h a s m a n y s o f t w a r e a p p l i c a t i o n s .
T h e P S M m o d e l i n m a n y w a y s s u b s u m e s t h e F S M a n d C S P m o d e l s , s o i t i s a p p r o p r i a t e n o t o n l y
f o r c o n t r o l - d o m i n a t e d s y s t e m s , b u t a l s o f o r d a t a - d o m i n a t e d s y s t e m s s u c h a s s o f t w a r e a p p l i c a t i o n s .
H o w e v e r , t h e b e s t m o d e l f o r a n y a p p l i c a t i o n i s t h e o n e t h a t m a t c h e s c l o s e l y t h e c h a r a c t e r i s t i c s o f t h e
s y s t e m i t m o d e l s . F o r t h i s r e a s o n , w e m u s t d e n e c h a r a c t e r i s t i c s o f e m b e d d e d s o f t w a r e / h a r d w a r e
s y s t e m s . T h e y a r e : ( 1 ) h i e r a r c h y , ( 2 ) c o n c u r r e n c y , ( 3 ) s t a t e - t r a n s i t i o n s , ( 4 ) e x c e p t i o n s , a n d ( 5 )
p r o g r a m i n s t r u c t i o n s .
F o r e x a m p l e , F i g u r e 4 ( a ) i l l u s t r a t e s a p a r t i a l P S M m o d e l f o r t h e I T V P . W e d e c o m p o s e t h e I T V P
i n t o c o n c u r r e n t p r o c e s s e s ( f o u r a r e s h o w n ) . W e d e s c r i b e t h e G e n e r a t e A u d i o p r o c e s s a s p r o g r a m
i n s t r u c t i o n s , w h e r e a s w e d e s c r i b e t h e M a i n C o n t r o l p r o c e s s a s a s t a t e m a c h i n e , w h i c h t r a n s i t i o n s
b a s e d o n c e r t a i n e x c e p t i o n s . E a c h s t a t e i s f u r t h e r d e s c r i b e d a s c o n c u r r e n t p r o c e s s e s , a s t a t e m a c h i n e ,
o r a s p r o g r a m i n s t r u c t i o n s . B e c a u s e t h i s s y s t e m w a s m o s t e a s i l y d e s c r i b e d u s i n g a c o m b i n a t i o n o f
h i e r a r c h y , c o n c u r r e n c y , s t a t e - t r a n s i t i o n s , e x c e p t i o n s , a n d s e q u e n t i a l i n s t r u c t i o n s , i t i s m o s t e a s i l y
c a p t u r e d u s i n g t h e P S M m o d e l i n t h i s c a s e .
6
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
11/29
2 . 2 D e s c r i p t i o n g e n e r a t i o n
T h e c h o i c e o f a m o d e l i s t h e m o s t i m p o r t a n t f a c t o r t h a t i n u e n c e s o u r a b i l i t y t o u n d e r s t a n d a n d
d e n e s y s t e m f u n c t i o n a l i t y d u r i n g s p e c i c a t i o n . O n c e w e ' v e c h o s e n t h e a p p r o p r i a t e m o d e l , t h e
s y s t e m f u n c t i o n a l i t y m u s t b e c a p t u r e d i n a f u n c t i o n a l s p e c i c a t i o n . S u c h a s p e c i c a t i o n m a y b e
c a p t u r e d i n m a n y d i e r e n t l a n g u a g e s . A f u n c t i o n a l s p e c i c a t i o n i s e a s y t o g e n e r a t e i f t h e r e i s a
o n e - t o - o n e c o r r e s p o n d e n c e b e t w e e n m o d e l c h a r a c t e r i s t i c s a n d l a n g u a g e c o n s t r u c t s . I f a l a n g u a g e
c o n s t r u c t d o e s n o t e x i s t f o r a p a r t i c u l a r c h a r a c t e r i s t i c , t h e n w e m u s t a p p l y s o m e e o r t t o u s e a s e t
o f c o n s t r u c t s t h a t d e s c r i b e s t h a t c h a r a c t e r i s t i c , w h i c h i n t u r n l e a d s t o a l e s s r e a d a b l e d e s c r i p t i o n ,
p o s s i b l y w i t h m o r e f u n c t i o n a l e r r o r s .
T h e r e a r e s e v e r a l l a n g u a g e s t h a t a r e c o m m o n l y u s e d t o s p e c i f y a s y s t e m ' s f u n c t i o n a l i t y . V H D L
1 7 ] a n d V e r i l o g 1 8 ] a r e p o p u l a r s t a n d a r d s t h a t , t h r o u g h t h e i r p r o c e s s a n d s e q u e n t i a l s t a t e m e n t
c o n s t r u c t s , s u p p o r t e a s y d e s c r i p t i o n o f a C S P m o d e l . T h e y a r e a l s o c o m m o n l y u s e d t o d e s c r i b e
F S M s , a l t h o u g h n e i t h e r l a n g u a g e p o s s e s s e s e x p l i c i t c o n s t r u c t s t o d i r e c t l y s u p p o r t s t a t e t r a n s i t i o n s .
E s t e r e l 1 9 ] i s s i m i l a r t o t h o s e l a n g u a g e s , a d d i n g c o n s t r u c t s t o s u p p o r t e x c e p t i o n s . S t a t e c h a r t s 2 0 ]
s u p p o r t s d e s c r i p t i o n o f h i e r a r c h i c a l a n d c o n c u r r e n t F S M s , i n c l u d i n g e x c e p t i o n s . S p e c C h a r t s 2 1 ]
s u p p o r t s c a p t u r e o f t h e C S P m o d e l , h i e r a r c h i c a l / c o n c u r r e n t F S M s , a n d t h e P S M m o d e l . S D L 2 2 ] , a
s t a n d a r d o f t h e C C I T T , s u p p o r t s d e s c r i p t i o n o f h i e r a r c h i c a l d a t a o w d i a g r a m s w i t h a n F S M a t t h e
l e a f l e v e l . F i n a l l y , S i l a g e 2 3 ] s u p p o r t s e a s y d e s c r i p t i o n o f d a t a o w m o d e l s t h r o u g h i t d a t a s t r e a m
a n d r e c u r r e n c e c o n s t r u c t s . T h e t a b l e i n F i g u r e 5 s u m m a r i z e s s e v e r a l l a n g u a g e s w i t h r e s p e c t t o t h e i r
a b i l i t y t o c a p t u r e c h a r a c t e r i s t i c s c o m m o n l y f o u n d i n m o d e l s f o r e m b e d d e d s y s t e m s .
ConcurrencyBehavioralCompletionExceptions
VHDL
Verilog
HardwareC
CSP
Statecharts
SDL
Silage
Esterel
SpecCharts
BehavioralHierarchy
StateTransitions
ProgramConstructs
Embedded System Features
Language
Feature fullysupported
Feature partiallysupported
Feature notsupported
Not applicable
F i g u r e 5 : L a n g u a g e s u p p o r t f o r c o n c e p t u a l m o d e l c h a r a c t e r i s t i c s o f e m b e d d e d s y s t e m s
A s a n e x a m p l e , F i g u r e 4 ( b ) s h o w s t h e P S M m o d e l o f t h e I T V P c a p t u r e d w i t h t h e S p e c C h a r t s
7
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
12/29
l a n g u a g e . S i n c e S p e c C h a r t s i s i n t e n d e d t o c a p t u r e t h e P S M m o d e l , t h e r e i s a n e a r l y o n e - t o - o n e
c o r r e s p o n d e n c e b e t w e e n t h e m o d e l c o n s t r u c t s a n d t h e S p e c C h a r t s c o n s t r u c t s . A l a n g u a g e t h a t d o e s
n o t s u p p o r t a l l P S M c o n s t r u c t s , s u c h a s V H D L , w i l l r e q u i r e m o r e e o r t a n d m o r e l i n e s o f c o d e .
3 E x p l o r a t i o n
G i v e n a f u n c t i o n a l s p e c i c a t i o n f o r a s y s t e m , w e m u s t p r o c e e d t o c r e a t e a s y s t e m - l e v e l d e s i g n o f
i n t e r c o n n e c t e d c o m p o n e n t s , e a c h c o m p o n e n t i m p l e m e n t i n g a p o r t i o n o f t h a t s p e c i c a t i o n . A d e s i g n ' s
a c c e p t a b i l i t y i s e v a l u a t e d b y h o w w e l l i t s a t i s e s c o n s t r a i n t s o n d e s i g n m e t r i c s , s u c h a s p e r f o r m a n c e ,
s i z e , p o w e r a n d c o s t . S i n c e s u b s t a n t i a l t i m e a n d e o r t a r e n e e d e d t o e v a l u a t e a p o t e n t i a l d e s i g n ,
d e s i g n e r s u s u a l l y e x a m i n e o n l y a f e w p o t e n t i a l d e s i g n s , o f t e n t h o s e t h a t t h e y c a n e v a l u a t e q u i c k l y
b e c a u s e o f p r e v i o u s e x p e r i e n c e .
B y u s i n g a f o r m a l s p e c i c a t i o n , w e c a n a u t o m a t i c a l l y e x p l o r e l a r g e n u m b e r s o f p o t e n t i a l d e s i g n s
r a p i d l y . E x p l o r a t i o n o f p o t e n t i a l d e s i g n s c a n b e d e c o m p o s e d i n t o f o u r i n t e r d e p e n d e n t s u b p r o b l e m s :
a l l o c a t i o n , p a r t i t i o n i n g , t r a n s f o r m a t i o n a n d e s t i m a t i o n . W e n e e d n o t s o l v e t h e s e p r o b l e m s i n t h e
g i v e n o r d e r ; i n f a c t , w e w i l l u s u a l l y n e e d t o i t e r a t e m a n y t i m e s b e f o r e w e a r e s a t i s e d w i t h o u r
s y s t e m - l e v e l d e s i g n . W e s h a l l n o w d e s c r i b e e a c h e x p l o r a t i o n s u b p r o b l e m s e p a r a t e l y .
3 . 1 A l l o c a t i o n
A l l o c a t i o n i s t h e p r o b l e m o f n d i n g a s e t o f s y s t e m c o m p o n e n t s t o i m p l e m e n t t h e s y s t e m ' s f u n c t i o n s .
A n e x a m p l e i s s h o w n i n F i g u r e 6 , w h i c h p r o v i d e s a n a l l o c a t i o n o f t w o m e m o r i e s o f t y p e V 1 0 0 a n d
V 5 0 0 , o n e A S I C o f t y p e X i l i n x X C 4 0 2 0 , o n e I n t e l 8 0 8 6 p r o c e s s o r , a n d t w o b u s e s f o r t h e I T V P
e x a m p l e .
T h e r e a r e u s u a l l y h u n d r e d s o f c o m p o n e n t s t o c h o o s e f r o m . A t o n e e x t r e m e , w e h a v e v e r y f a s t b u t
e x p e n s i v e c u s t o m - h a r d w a r e c o m p o n e n t s , s u c h a s A S I C s . A t t h e o t h e r e x t r e m e , w e h a v e c h e a p e r b u t
s l o w e r g e n e r a l - p u r p o s e p r o g r a m m a b l e m i c r o p r o c e s s o r s . B e t w e e n t h e s e t w o e x t r e m e s l i e i n n u m e r a b l e
c o m p o n e n t s t h a t v a r y i n c o s t , p e r f o r m a n c e , m o d i a b i l i t y , p o w e r , s i z e , r e l i a b i l i t y , a n d d e s i g n e o r t ,
i n c l u d i n g a v a r i e t y o f m i c r o p r o c e s s o r s , m i c r o c o n t r o l l e r s , e l d - p r o g r a m m a b l e g a t e a r r a y s , p a r a l l e l p r o -
c e s s o r s , t h e n e w l y - e v o l v i n g a p p l i c a t i o n - s p e c i c i n s t r u c t i o n - s e t p r o c e s s o r s ( A S I P s ) 2 4 ] , a n d h u n d r e d s
o f p r e d e s i g n e d c o m p o n e n t s t h a t i m p l e m e n t a p a r t i c u l a r f u n c t i o n , s u c h a s m e m o r i e s , a r b i t e r s , D M A
c o n t r o l l e r s , o a t i n g - p o i n t m u l t i p l i e r s , a n d f a s t F o u r i e r t r a n s f o r m s . A d d i n g t o t h e n u m b e r o f c h o i c e s
a r e c o r e s o r m e g a c e l l s , i n w h i c h p r o c e s s o r s o r o t h e r p r e d e s i g n e d c o m p o n e n t s c a n b e e m b e d d e d w i t h i n
a n A S I C c o m p o n e n t . N e w c o m p o n e n t s s u r f a c e e v e r y y e a r . T h e s e c o m p o n e n t s c a n b e c h a r a c t e r i z e d
b y : ( 1 ) i n s t r u c t i o n s e t s , ( 2 ) p a r a m e t r i z e d d e s c r i p t i o n s , o r ( 3 ) h a r d w a r e o b j e c t n u m b e r . G e n e r a l
p u r p o s e p r o c e s s o r s a r e c h a r a c t e r i z e d b y i n s t r u c t i o n s e t s . A n y p a r t o f a s p e c i c a t i o n i m p l e m e n t e d
w i t h a p r o c e s s o r m u s t b e c o n v e r t e d t o a s e q u e n c e o f i n s t r u c t i o n s . M a n y s p e c i a l p u r p o s e c o m p o n e n t s ,
s u c h a s o a t i n g - p o i n t m u l t i p l i e r s , F o u r i e r t r a n s f o r m s , a n d D M A c o n t r o l l e r s , a r e c h a r a c t e r i z e d w i t h a
p a r a m e t r i z e d f u n c t i o n . T h o s e c o m p o n e n t s e x e c u t e t h e s a m e p r o g r a m w i t h s l i g h t v a r i a t i o n s d e n e d
b y t h e p a r a m e t e r s . A n y p a r t o f a s p e c i c a t i o n e x e c u t e d o n t h e s e c o m p o n e n t s m u s t b e t r a n s f o r m e d t o
m a t c h e x a c t l y t h e p a r a m e t r i z e d d e s c r i p t i o n s . F i n a l l y , A S I C ' s , F P G A ' s a n d g a t e a r r a y s a r e c h a r a c -
t e r i z e d b y t h e n u m b e r s o f h a r d w a r e o b j e c t s , s u c h a s t r a n s i s t o r s , c o m b i n a t i o n a l - l o g i c b l o c k s o r g a t e s ,
t h a t t h e y c a n c o n t a i n . A n y p a r t o f a s p e c i c a t i o n i m p l e m e n t e d o n a n A S I C m u s t b e c o n v e r t e d t o
8
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
13/29
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
14/29
T h e r e a r e t w o v e r y d i e r e n t a p p r o a c h e s t o s y s t e m p a r t i t i o n i n g . I n s t r u c t u r a l p a r t i t i o n i n g ,
t h e s y s t e m i s r s t i m p l e m e n t e d w i t h n e - g r a i n e d s t r u c t u r a l o b j e c t s , s u c h a s g a t e s , a n d t h o s e o b j e c t s
a r e t h e n p a r t i t i o n e d a m o n g s e v e r a l c u s t o m c o m p o n e n t s . W h i l e e a s y t o a u t o m a t e , t h i s a p p r o a c h d o e s
n o t c o n s i d e r s o f t w a r e i m p l e m e n t a t i o n s . I t a l s o d o e s c o n s i d e r i n t e r - c o m p o n e n t d e l a y i n t h e d e s i g n
s i n c e t h e d e s i g n i s c o m p l e t e d b e f o r e p a r t i t i o n i n g . I n a v e r y d i e r e n t a p p r o a c h , c a l l e d f u n c t i o n a l
p a r t i t i o n i n g , t h e v a r i o u s s y s t e m f u n c t i o n s a r e r s t p a r t i t i o n e d i n t o g r o u p s o f f u n c t i o n s , w h e r e
e a c h g r o u p i s a s s i g n e d t o a s y s t e m c o m p o n e n t . E a c h g r o u p i s t h e n i m p l e m e n t e d a s s o f t w a r e ( f o r a
p r o c e s s o r c o m p o n e n t ) o r a s h a r d w a r e ( f o r a n A S I C c o m p o n e n t ) .
I n d e v e l o p i n g a f u n c t i o n a l p a r t i t i o n i n g t e c h n i q u e , w e m u s t c o n s i d e r s e v e r a l i s s u e s . F i r s t , w e m u s t
d e n e o b j e c t g r a n u l a r i t y , w h i c h d e n e s t h e s m a l l e s t i n d i v i s i b l e f u n c t i o n a l o b j e c t s u s e d d u r i n g
p a r t i t i o n i n g , s u c h a s j o b s , p r o c e s s e s , s u b r o u t i n e s , l o o p s , b l o c k s o f s t a t e m e n t s , s t a t e m e n t s , a r i t h m e t i c -
l e v e l o p e r a t i o n s o r b o o l e a n e x p r e s s i o n s . H i g h e r g r a n u l a r i t y m e a n s f e w e r o b j e c t s , w h i c h i n t u r n
e n a b l e s e a s i e r i n t e r a c t i o n , f a s t e r r u n t i m e f o r p a r t i t i o n i n g a l g o r i t h m s , a n d f a s t e r e s t i m a t i o n s , b u t
f e w e r p o s s i b l e p a r t i t i o n s .
S e c o n d , w e m u s t s e l e c t t h e d e s i g n m e t r i c s t h a t w i l l b e u s e d t o d e n e a g o o d p a r t i t i o n . C o m m o n
m e t r i c s i n c l u d e m o n e t a r y c o s t , p e r f o r m a n c e , c o m m u n i c a t i o n r a t e s , p o w e r c o n s u m p t i o n , s i l i c o n a r e a ,
p a c k a g e s i z e , t e s t a b i l i t y , r e l i a b i l i t y , p r o g r a m s i z e , d a t a s i z e , a n d m e m o r y s i z e .
T h i r d , w e m u s t s e l e c t a m o d e l w i t h w h i c h w e w i l l e s t i m a t e m e t r i c v a l u e s . E s t i m a t i o n i s n e c e s s a r y
b e c a u s e w e c a n ' t s p a r e t h e h o u r s o r d a y s n e c e s s a r y t o b u i l d a d e s i g n f o r e a c h p o s s i b l e p a r t i t i o n ,
e s p e c i a l l y i f w e w i s h t o e x a m i n e h u n d r e d s o r t h o u s a n d s o f p o s s i b i l i t i e s .
F o u r t h , w e n e e d t o c o m b i n e m u l t i p l e e s t i m a t e d m e t r i c v a l u e s i n t o a s i n g l e c o s t v a l u e t h a t d e n e s a
p a r t i t i o n ' s \ g o o d n e s s " , b y u s i n g a n o b j e c t i v e f u n c t i o n . B e c a u s e t h o s e m e t r i c v a l u e s o f t e n c o m p e t e
w i t h o n e a n o t h e r ( i . e . , w h e n o n e v a l u e i n c r e a s e s , a n o t h e r v a l u e d e c r e a s e s ) , w e u s u a l l y n e e d t o w e i g h
e a c h v a l u e i n t h e o b j e c t i v e f u n c t i o n b y i t s r e l a t i v e i m p o r t a n c e t o t h e o v e r a l l d e s i g n . A n o b j e c t i v e
f u n c t i o n t h u s g i v e s u s a w a y t o c o m p a r e t w o p a r t i t i o n s , a n d t o s e l e c t o n e t h a t s a t i s e s c o n s t r a i n t s .
F i f t h , w e n e e d p a r t i t i o n i n g a l g o r i t h m s t o e c i e n t l y e x p l o r e a s u b s e t o f t h e h u g e n u m b e r o f
p o s s i b l e p a r t i t i o n s . C o m m o n l y u s e d c l a s s e s o f a l g o r i t h m s i n c l u d e c l u s t e r i n g a l g o r i t h m s 3 0 ] , i t e r a t i v e -
i m p r o v e m e n t a l g o r i t h m s 3 1 , 3 2 ] , g e n e t i c a l g o r i t h m s 3 3 ] , a n d c u s t o m a l g o r i t h m s 2 6 , 3 4 ] . S o m e a l g o -
r i t h m s a r e f a s t , s u c h a s c l u s t e r i n g , w h i l e o t h e r a l g o r i t h m s a r e s l o w e r b u t o f t e n n d b e t t e r s o l u t i o n s ,
l i k e g e n e t i c a l g o r i t h m s .
A v a r i e t y o f t e c h n i q u e s h a v e e v o l v e d t o a s s i s t t h e d e s i g n e r p e r f o r m f u n c t i o n a l p a r t i t i o n i n g . W e
c a n f o r m t h r e e c a t e g o r i e s o f t e c h n i q u e s : h a r d w a r e p a r t i t i o n i n g , h a r d w a r e / s o f t w a r e p a r t i t i o n i n g ,
a n d i n t e r a c t i v e p a r t i t i o n i n g e n v i r o n m e n t s . T h e h a r d w a r e p a r t i t i o n i n g t e c h n i q u e s a i m t o p a r t i t i o n
f u n c t i o n a l i t y a m o n g h a r d w a r e m o d u l e s , s u c h a s a m o n g A S I C s o r a m o n g b l o c k s o n a n A S I C . M o s t
s u c h t e c h n i q u e s p a r t i t i o n a t t h e g r a n u l a r i t y o f a r i t h m e t i c o p e r a t i o n s , d i e r i n g i n t h e p a r t i t i o n i n g
a l g o r i t h m s e m p l o y e d . C l u s t e r i n g a l g o r i t h m s a r e u s e d i n 3 5 , 3 6 ] , i n t e g e r - l i n e a r p r o g r a m m i n g i n
3 7 , 3 8 ] , m a n u a l p a r t i t i o n i n g i n 3 9 ] , a n d i t e r a t i v e - i m p r o v e m e n t a l g o r i t h m s i n 4 0 ] . O t h e r t e c h n i q u e s
f o r h a r d w a r e p a r t i t i o n i n g o p e r a t e a t a h i g h e r - l e v e l o f g r a n u l a r i t y , s u c h a s i n 4 1 ] , w h e r e p r o c e s s e s a n d
s u b r o u t i n e s a r e p a r t i t i o n e d a m o n g A S I C s u s i n g c l u s t e r i n g a n d i t e r a t i v e - i m p r o v e m e n t a l g o r i t h m s .
H a r d w a r e / s o f t w a r e p a r t i t i o n i n g t e c h n i q u e s f o r m t h e s e c o n d f u n c t i o n a l p a r t i t i o n i n g c a t e g o r y .
T h e s e t e c h n i q u e s f o c u s o n p a r t i t i o n i n g f u n c t i o n a l i t y a m o n g a h a r d w a r e / s o f t w a r e a r c h i t e c t u r e . I n 2 9 ]
a n d 4 2 ] , o v e r v i e w s o f t h e h a r d w a r e / s o f t w a r e p a r t i t i o n i n g p r o b l e m a r e p r o v i d e d , i n c l u d i n g d i s c u s s i o n
o n t h e i s s u e s o f g r a n u l a r i t y a n d e s t i m a t i o n . T h e t e c h n i q u e i n 4 3 ] p a r t i t i o n s a t t h e s t a t e m e n t - l e v e l
1 0
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
15/29
o f g r a n u l a r i t y u s i n g c l u s t e r i n g a l g o r i t h m s , w h i l e t h e a p p r o a c h e s i n 2 6 ] , 2 7 ] , a n d 3 4 ] p a r t i t i o n a t
t h e s t a t e m e n t , s t a t e m e n t s e q u e n c e , a n d s u b r o u t i n e l e v e l s , r e s p e c t i v e l y , u s i n g i t e r a t i v e i m p r o v e m e n t
a l g o r i t h m s .
I n t h e t h i r d c a t e g o r y a r e g e n e r a l e n v i r o n m e n t s t h a t s u p p o r t i n t e r a c t i v e o r a u t o m a t e d p a r t i t i o n i n g
o f a l l t h r e e t y p e s o f s p e c i c a t i o n o b j e c t s ( v a r i a b l e s , b e h a v i o r s , a n d c h a n n e l s ) a m o n g a v a r i e t y o f
s y s t e m s c o m p o n e n t s ( s u c h a s p r o c e s s o r s , A S I C s , m e m o r i e s , a n d b u s e s ) . A n e x a m p l e o f s u c h a n
e n v i r o n m e n t i s f o u n d i n 9 ] . S u c h a n e n v i r o n m e n t c a n b e u s e d f o r h a r d w a r e p a r t i t i o n i n g a s w e l l a s
f o r h a r d w a r e / s o f t w a r e p a r t i t i o n i n g .
F i g u r e 6 s h o w s a n e x a m p l e p a r t i t i o n o f t h e m a i n f u n c t i o n a l o b j e c t s f r o m F i g u r e 4 ( b ) a m o n g t h e
g i v e n s y s t e m c o m p o n e n t a l l o c a t i o n . S i n c e a u d i o m u s t b e s t o r e d a n d g e n e r a t e d a t v e r y h i g h s p e e d s ,
t h e f u n c t i o n s r e s p o n s i b l e f o r s u c h s t o r i n g a n d g e n e r a t i o n a r e t o b e i m p l e m e n t e d w i t h a n A S I C .
S i n c e a u d i o a n d v i d e o c a n b e g e n e r a t e d s i m u l t a n e o u s l y , t h e a u d i o a n d v i d e o d a t a a r e t o b e s t o r e d
i n s e p a r a t e m e m o r i e s , t h u s p r e v e n t i n g c o n t e n t i o n f o r a c c e s s t o a s i n g l e m e m o r y . T h e r e m a i n i n g
f u n c t i o n s a r e t o b e i m p l e m e n t e d o n t h e p r o c e s s o r , s i n c e t h e y d o n ' t r e q u i r e t h e s p e e d o e r e d b y a n
A S I C a n d h e n c e c a n b e i m p l e m e n t e d m o r e c h e a p l y o n t h e p r o c e s s o r .
3 . 3 T r a n s f o r m a t i o n
U p t o t h i s p o i n t , w e h a v e a s s u m e d t h a t t h e s p e c i c a t i o n c o n s i s t e d o f f u n c t i o n s t h a t c o u l d b e i m p l e -
m e n t e d o n e - t o - o n e o n s y s t e m c o m p o n e n t s . H o w e v e r , t h o s e f u n c t i o n s a r e d e r i v e d f r o m a s p e c i c a t i o n
i n t e n d e d f o r r e a d a b i l i t y , s o i m p l e m e n t i n g t h e m d i r e c t l y m a y n o t l e a d t o t h e b e s t d e s i g n . F o r e x -
a m p l e , w e m a y h a v e i n t r o d u c e d a p r o c e d u r e i n t h e s p e c i c a t i o n f o r r e a d a b i l i t y , b u t i m p l e m e n t i n g
a d i s t i n c t h a r d w a r e m o d u l e t o i m p l e m e n t t h a t p r o c e d u r e m a y p r o d u c e a p e r f o r m a n c e b o t t l e n e c k .
I n s t e a d , w e m a y p r e f e r t o i n l i n e t h a t p r o c e d u r e s o t h a t e a c h c a l l e r i m p l e m e n t s t h e f u n c t i o n a l i t y o f
t h a t p r o c e d u r e i n t e r n a l l y , r e s u l t i n g i n b e t t e r p e r f o r m a n c e . A s a n o t h e r e x a m p l e , w e m a y c r e a t e a
s p e c i c a t i o n c o n s i s t i n g o f t w o c o n c u r r e n t p r o c e s s e s , b u t i m p l e m e n t i n g a s e p a r a t e c o n t r o l l e r f o r e a c h
p r o c e s s m i g h t b e t o o c o s t l y . I n s t e a d , w e m a y p r e f e r t o m e r g e t h o s e t w o p r o c e s s e s i n t o o n e p r o c e s s ,
s o t h a t t h e y w i l l e x e c u t e s e r i a l l y i n a s i n g l e c o n t r o l l e r .
I n l i n i n g p r o c e d u r e s a n d m e r g i n g p r o c e s s e s a r e c o m m o n e x a m p l e s o f s p e c i c a t i o n t r a n s f o r m a t i o n s .
A t r a n s f o r m a t i o n r e o r g a n i z e s t h e s p e c i c a t i o n , t h u s c h a n g i n g t h e o r g a n i z a t i o n o f a n y s u b s e q u e n t
i m p l e m e n t a t i o n . O t h e r t r a n s f o r m a t i o n s i n c l u d e a t t e n i n g h i e r a r c h y , s p l i t t i n g p r o c e s s e s , g r o u p i n g
s t a t e m e n t s i n t o p r o c e d u r e s , a n d m e r g i n g v a r i a b l e s i n t o a r r a y s .
S o m e a p p r o a c h e s h a v e e v o l v e d t o h e l p a u t o m a t e t r a n s f o r m a t i o n s . I n 4 4 ] , s e v e r a l t r a n s f o r m a t i o n s
a r e p r o p o s e d , i n c l u d i n g p r o c e d u r e i n l i n i n g a n d p r o c e s s s p l i t t i n g , t o a l l o w a d e s i g n e r t o t r a d e - o a r e a
a n d p e r f o r m a n c e . I n 4 5 ] , a t r a n s f o r m a t i o n t e c h n i q u e i s d e s c r i b e d f o r m e r g i n g t w o p r o c e s s e s i n t o o n e .
T h e t e c h n i q u e p r o v i d e s f o r a n e - g r a i n e d s c h e d u l i n g o f o p e r a t i o n s f r o m t h e t w o p r o c e s s e s , m e a n i n g
t h a t g o o d p e r f o r m a n c e c a n b e a c h i e v e d , w h i l e r e d u c i n g h a r d w a r e s i z e f r o m t w o c o n t r o l l e r s d o w n t o
o n e c o n t r o l l e r . A v a r i e t y o f o p t i m i z i n g t r a n s f o r m a t i o n s w i t h o r i g i n s i n s o f t w a r e c o m p i l a t i o n a r e a l s o
a p p l i e d t o t h e i n t e r n a l r e p r e s e n t a t i o n o f b e h a v i o r i n m a n y d e s i g n t o o l s 4 6 , 4 7 ] .
1 1
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
16/29
3 . 4 E s t i m a t i o n
W e w o u l d l i k e t o e v a l u a t e m e t r i c v a l u e s , s u c h a s p e r f o r m a n c e a n d a r e a , f o r a l a r g e n u m b e r o f s y s t e m -
l e v e l d e s i g n s , i n o r d e r t o n d a d e s i g n t h a t b e s t s a t i s e s c o n s t r a i n t s . W e c a n d e r i v e t h o s e m e t r i c
v a l u e s f r o m t h e s y s t e m ' s i m p l e m e n t a t i o n , b u t t h a t r e q u i r e s f a r t o o m u c h t i m e i f w e w i s h t o e x a m i n e
m o r e t h a n a f e w d e s i g n s . I n s t e a d , w e c a n e s t i m a t e m e t r i c v a l u e s , b y c r e a t i n g a r o u g h ( a n d t h u s
q u i c k ) h a r d w a r e a n d s o f t w a r e i m p l e m e n t a t i o n f o r e a c h s y s t e m c o m p o n e n t .
A c c u r a c y a n d s p e e d a r e c o m p e t i n g f a c t o r s i n t h e d e v e l o p m e n t o f a n e s t i m a t o r . A c c u r a c y c o m e s
f r o m c r e a t i n g a m o r e c o m p l e t e i m p l e m e n t a t i o n , w h i l e s p e e d c o m e s f r o m c r e a t i n g a l e s s - d e t a i l e d
i m p l e m e n t a t i o n . F o r e x a m p l e , w e c o u l d r a p i d l y e s t i m a t e h a r d w a r e s i z e b y a l l o c a t i n g a n d t h e n
c o u n t i n g f u n c t i o n a l u n i t s , a n d t h e n u s i n g q u i c k s t a t i s t i c a l e s t i m a t e s f o r t h e n u m b e r o f r e g i s t e r s ,
m u l t i p l e x o r s , a n d c o n t r o l l e r g a t e s . C l e a r l y , t h e t i m e s a v e d o v e r g e n e r a t i n g a c o m p l e t e i m p l e m e n t a t i o n
i s a t t h e e x p e n s e o f l e s s a c c u r a c y . I n g e n e r a l , o n l y r o u g h e s t i m a t e s a r e n e e d e d d u r i n g s y s t e m d e s i g n .
F o r e x a m p l e , i f w e w i s h t o s e e i f a s e t o f f u n c t i o n s c a n b e i m p l e m e n t e d u s i n g a g a t e a r r a y w i t h 1 0 0 0 0 0
g a t e s , w e o n l y n e e d t o g e t a n i d e a o f w h e t h e r t h e f u n c t i o n s r e q u i r e m u c h m o r e o r m u c h l e s s t h a n
1 0 0 0 0 0 g a t e s .
W e d e s c r i b e m e t h o d s f o r e s t i m a t i n g t h e c o m m o n m e t r i c s o f h a r d w a r e s i z e , s o f t w a r e s i z e , a n d
p e r f o r m a n c e . A s w e w i l l s e e , s o f t w a r e / h a r d w a r e s i z e a n d p e r f o r m a n c e e s t i m a t i o n t e c h n i q u e s a r e n o t
c o m p l e t e l y a c c u r a t e b e c a u s e t h e m a p p i n g o f a b e h a v i o r a l d e s c r i p t i o n i n t o h a r d w a r e o r s o f t w a r e i s n o t
s t r a i g h t f o r w a r d ( o n e - t o - o n e ) . T h e c o m p l e x i t y i s i n t r o d u c e d b y o p t i m i z a t i o n o n d i e r e n t a b s t r a c t i o n
l e v e l s . S i n c e a l g o r i t h m s u s e d i n o p t i m i z i n g c o m p i l e r s a r e n o t k n o w n d u r i n g e s t i m a t i o n , i t i s d i c u l t
t o p r e d i c t c o d e r e d u c t i o n o r p e r f o r m a n c e e n h a n c e m e n t d u e t o t h e o p t i m i z a t i o n . A l s o , i t i s d i c u l t t o
p r e d i c t p e r f o r m a n c e d u e t o a r c h i t e c t u r a l f e a t u r e s s u c h a s c a c h i n g , p i p e l i n i n g , a n d m u l t i p l e i n s t r u c t i o n
i s s u e , s i n c e e s t i m a t o r s d o n o t c o m p u t e d y n a m i c s o f t h e c o d e a n d d a t a . S i m i l a r l y , i n h a r d w a r e i t i s
d i c u l t t o p r e d i c t p e r f o r m a n c e a n d s i z e d u e t o l o g i c o p t i m i z a t i o n o f c o n t r o l , l i b r a r y m a p p i n g i n
d a t a p a t h s , s t a t e m i n i m i z a t i o n , e t c .
T h e h a r d w a r e s i z e o f a g i v e n s e t o f f u n c t i o n s c a n b e e s t i m a t e d b y r o u g h l y s y n t h e s i z i n g a c o n t r o l l e r
a n d d a t a p a t h t o i m p l e m e n t t h o s e f u n c t i o n s , b y a p p l y i n g a l g o r i t h m s f o r s c h e d u l i n g o p e r a t i o n s i n t o
c o n t r o l s t e p s , a l l o c a t i n g f u n c t i o n a l , s t o r a g e , a n d i n t e r c o n n e c t u n i t s , a n d b i n d i n g d a t a v a l u e s a n d
o p e r a t i o n s t o u n i t s . I n o t h e r w o r d s , w e n e e d t o d e t e r m i n e t h e n u m b e r a n d t y p e o f r e g i s t e r - t r a n s f e r
o b j e c t s r e q u i r e d , i n c l u d i n g : r e g i s t e r s , r e g i s t e r l e s , f u n c t i o n a l u n i t s , m u l t i p l e x o r s , b u s e s , w i r e s , s t a t e
r e g i s t e r s a n d c o n t r o l l o g i c . U n f o r t u n a t e l y , t h e a l g o r i t h m s f o r d e t e r m i n i n g t h e n u m b e r a n d t y p e
o f o b j e c t s r e q u i r e d a r e c o m p u t a t i o n a l l y e x p e n s i v e , s o e s t i m a t o r s u s u a l l y o n l y g e n e r a t e a s u b s e t o f
o b j e c t s . O n c e t h e r e q u i r e d o b j e c t s h a v e b e e n d e t e r m i n e d , w e c a n e s t i m a t e s i z e f o r a v a r i e t y o f
t e c h n o l o g i e s . F o r a n F P G A i m p l e m e n t a t i o n , w e w o u l d e s t i m a t e t h e t o t a l n u m b e r o f c o m b i n a t i o n -
l o g i c b l o c k s ( C L B ) b y s u m m i n g C L B s u s e d f o r e a c h o b j e c t . F o r a g a t e a r r a y , w e w o u l d s u m t h e
e q u i v a l e n t g a t e s n e e d e d f o r e a c h o b j e c t . F o r a c u s t o m i m p l e m e n t a t i o n , w e w o u l d s u m t h e t r a n s i s t o r s
f o r e a c h o b j e c t , o r w e w o u l d c o m p u t e t h e b o u n d i n g b o x a r e a a f t e r p e r f o r m i n g o b j e c t p l a c e m e n t a n d
r o u t i n g .
T h e s o f t w a r e s i z e o f a g i v e n s e t o f f u n c t i o n s m a y b e e s t i m a t e d b y c o m p i l i n g t h e f u n c t i o n s i n t o t h e
i n s t r u c t i o n s e t o f a g i v e n p r o c e s s o r . I f s u c h c o m p i l e r s a r e u n a v a i l a b l e , t h e n w e c o u l d a l t e r n a t i v e l y
c o m p i l e i n t o a g e n e r i c i n s t r u c t i o n s e t . I f w e p r e v i o u s l y t a b u l a t e t h e n u m b e r o f t h e g i v e n p r o c e s s o r ' s
i n s t r u c t i o n s n e e d e d t o i m p l e m e n t e a c h g e n e r i c i n s t r u c t i o n , t h e n w e c o u l d e s t i m a t e s o f t w a r e s i z e b y
s u m m i n g t a b u l a t e d n u m b e r s f o r a l l g e n e r i c i n s t r u c t i o n s i n t h e c o m p i l e d g e n e r i c c o d e .
1 2
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
17/29
T h e r e a r e g e n e r a l l y t w o t y p e s o f p e r f o r m a n c e m e t r i c s t h a t w e a r e i n t e r e s t e d i n e s t i m a t i n g :
e x e c u t i o n - t i m e o f a f u n c t i o n , a n d c o m m u n i c a t i o n b i t r a t e s o f a b u s . F o r e a c h t y p e , w e m a y b e
i n t e r e s t e d i n m i n i m u m , m a x i m u m , o r a v e r a g e v a l u e s . S u c h p e r f o r m a n c e m e t r i c s c a n b e e s t i m a t e d
a t v a r i o u s l e v e l s o f a c c u r a c y . F o r c o a r s e b u t q u i c k e s t i m a t e s w e c a n u s e q u e u e i n g m o d e l s . I n t h i s
a p p r o a c h , w e ( m a n u a l l y ) a s s o c i a t e s t a t i s t i c a l n u m b e r s r e l a t i n g t o t h e e x e c u t i o n t i m e a n d c o m m u n i c a -
t i o n f r e q u e n c i e s o f e a c h f u n c t i o n o n a g i v e n s y s t e m c o m p o n e n t t y p e , a n d t h e n w e u s e q u e u i n g m o d e l s
t o d e t e r m i n e s t a t i s t i c a l e x e c u t i o n - t i m e s a n d c o m m u n i c a t i o n r a t e s f o r t h e o v e r a l l s y s t e m 1 6 , 4 8 ] .
F o r s o m e w h a t m o r e a c c u r a t e p e r f o r m a n c e e s t i m a t e s , w e c a n u s e p r o g r a m - l e v e l m o d e l s . I n t h i s
c a s e , d e t e r m i n i n g m i n i m u m a n d m a x i m u m p e r f o r m a n c e r e q u i r e s a n a l y s i s o f t h e p o s s i b l e p a t h s
t h r o u g h e a c h f u n c t i o n i n t h e s p e c i c a t i o n , w h i c h i s h a r d f o r a l l b u t v e r y s i m p l e f u n c t i o n s . D e -
t e r m i n i n g a v e r a g e p e r f o r m a n c e r e q u i r e s d y n a m i c p r o l i n g , i n w h i c h w e s i m u l a t e t h e s p e c i c a t i o n
w i t h t y p i c a l i n p u t s t i m u l i a n d d e t e r m i n e t h e b r a n c h p r o b a b i l i t i e s . O n c e w e h a v e d e t e r m i n e d t h e
p o s s i b l e p a t h s o r t h e b r a n c h p r o b a b i l i t i e s , w e m u s t d e t e r m i n e t h e p e r f o r m a n c e f o r t h e g i v e n s e t o f
s y s t e m c o m p o n e n t s . F o r f u n c t i o n s a s s i g n e d t o h a r d w a r e c o m p o n e n t s , e s t i m a t i n g p e r f o r m a n c e r e -
q u i r e s t h a t w e m a p t h e f u n c t i o n s t o R T - l e v e l u n i t s , a n d t h e n d e t e r m i n e t h e m i n i m u m / m a x i m u m o r
a v e r a g e f r e q u e n c y o f e x e c u t i o n o f e a c h c o n t r o l s t e p f r o m t h e p a t h s o r b r a n c h p r o b a b i l i t i e s , r e s p e c -
t i v e l y . T h e n , t h e e x p e c t e d n u m b e r o f c o n t r o l s t e p s t i m e s t h e c l o c k c y c l e p r o d u c e s t h e e x e c u t i o n t i m e ,
a n d t h e f r e q u e n c y o f e a c h c o n t r o l s t e p i n f o r m s u s o f t h e c o m m u n i c a t i o n r a t e s . O n t h e o t h e r h a n d ,
f o r f u n c t i o n s a s s i g n e d t o s o f t w a r e c o m p o n e n t s , e s t i m a t i n g p e r f o r m a n c e r e q u i r e s t h a t w e c o m p i l e t h e
f u n c t i o n s i n t o t h e i n s t r u c t i o n s e t o f t h e g i v e n p r o c e s s o r , a n d t h e n d e t e r m i n e t h e m i n i m u m / m a x i m u m
o r a v e r a g e f r e q u e n c y o f e x e c u t i o n o f e a c h i n s t r u c t i o n . T h e n , t h e e x p e c t e d n u m b e r o f e x e c u t i o n s o f
e a c h i n s t r u c t i o n t i m e s t h e e x e c u t i o n t i m e o f e a c h i n s t r u c t i o n p r o d u c e s t h e t o t a l e x e c u t i o n t i m e , a n d
t h e f r e q u e n c y o f c o m m u n i c a t i o n i n s t r u c t i o n s i n f o r m s u s o f t h e c o m m u n i c a t i o n r a t e s . N o t e t h a t , a s
w a s t h e c a s e d u r i n g s o f t w a r e s i z e e s t i m a t i o n d e s c r i b e d a b o v e , w e c a n a g a i n u s e g e n e r i c i n s t r u c t i o n s
a n d t a b u l a t i o n t o e s t i m a t e s o f t w a r e p e r f o r m a n c e w h e n a c o m p i l e r f o r a g i v e n p r o c e s s o r i s u n a v a i l a b l e .
S o f t w a r e p e r f o r m a n c e e s t i m a t i o n f o r s o m e p r o c e s s o r s r e q u i r e s e v e n m o r e e o r t t o a c c o u n t f o r
p i p e l i n i n g , c a c h i n g a n d i n t e r r u p t s . F o r a p i p e l i n e , t h e r a t e o f e x e c u t i o n d e p e n d s h e a v i l y o n t h e
w a y t h a t i n s t r u c t i o n s a r e p a i r e d . W e m i g h t t h e r e f o r e s e e k a d d i t i o n a l i n f o r m a t i o n o n t h e e x e c u t i o n
t i m e o f e a c h i n s t r u c t i o n b a s e d o n w h a t s t a t e m e n t f o l l o w s o r p r e c e e d s i t , i n o r d e r t o o b t a i n m o r e
a c c u r a t e e s t i m a t e s . F o r c a c h i n g , e a c h m e m o r y a c c e s s m a y t a k e a d i e r e n t a m o u n t o f t i m e d e p e n d i n g
o n w h e t h e r o r n o t t h e d a t a b e i n g a c c e s s e d i s f o u n d i n t h e c a c h e . W e m i g h t u s e s t a t i s t i c a l h i t / m i s s
r a t i o s t o d e t e r m i n e a v e r a g e a c c e s s t i m e , o r w e c a n a s s u m e f o r w o r s t - c a s e e s t i m a t e s t h a t t h e d a t a i s
n e v e r i n t h e c a c h e , o r w e c a n a n a l y z e t h e d a t a - r e p l a c e m e n t p o l i c y i n u s e t o p o s s i b l y d e t e r m i n e i f t h e
d a t a w i l l b e i n t h e c a c h e . F o r i n t e r r u p t s , a c c u r a c y m i g h t b e i m p r o v e d i f w e s o m e h o w d e t e r m i n e t h e
f r e q u e n c y o f i n t e r r u p t s a n d t h e t i m e t o s e r v i c e e a c h .
F i n a l l y , s o f t w a r e p e r f o r m a n c e e s t i m a t i o n m a y i n c l u d e t h e c a s e w h e n t h e r e a r e m u l t i p l e c o n c u r r e n t
t a s k s a s s i g n e d t o a s i n g l e p r o c e s s o r . I n t h i s c a s e , w e n e e d t o t a k e i n t o a c c o u n t t h e f a c t t h a t e a c h
t a s k w i l l o n l y b e a b l e t o e x e c u t e o n t h e p r o c e s s o r f o r p a r t i c u l a r i n t e r v a l s o f t i m e .
A v a r i e t y o f e s t i m a t i o n t o o l s a n d t e c h n i q u e s h a v e b e e n s u g g e s t e d . F o r h a r d w a r e e s t i m a t i o n ,
s e v e r a l t e c h n i q u e s e s t i m a t e t h e s i z e a n d p e r f o r m a n c e o f a g r o u p o f a r i t h m e t i c o p e r a t i o n s . I n 4 0 ] ,
t h e e s t i m a t e s a r e o b t a i n e d b y s u m m i n g p r e v i o u s l y - a s s i g n e d w e i g h t s a s s o c i a t e d w i t h e a c h o p e r a t i o n .
I n 3 5 ] a n d 3 6 ] , t h e e s t i m a t e s a r e o b t a i n e d b y r o u g h l y s y n t h e s i z i n g h a r d w a r e t o i m p l e m e n t t h e
o p e r a t i o n s . I n 3 9 ] , m u l t i p l e g r o u p s o f o p e r a t i o n s a r e c o n s i d e r e d ; r s t , a s e t o f p o s s i b l e r o u g h
1 3
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
18/29
i m p l e m e n t a t i o n s a r e d e t e r m i n e d f o r e a c h g r o u p , a n d t h e n a g l o b a l a n a l y s i s p i c k s o n e i m p l e m e n t a t i o n
f o r e a c h g r o u p s u c h t h a t g l o b a l c o n s t r a i n t s o n s i z e a n d p e r f o r m a n c e f o r a l l t h e g r o u p s a r e s a t i s e d .
O t h e r h a r d w a r e e s t i m a t i o n t e c h n i q u e s e s t i m a t e f o r a g r o u p o f c o a r s e - g r a i n e d f u n c t i o n s , r a t h e r t h a n
a r i t h m e t i c o p e r a t i o n s . I n 9 ] , e s t i m a t e s a r e o b t a i n e d b y r o u g h l y s y n t h e s i z i n g h a r d w a r e f o r e a c h g r o u p
o f f u n c t i o n s , a n d a s p e c i a l d a t a s t r u c t u r e i s u s e d t h a t p e r m i t s r a p i d , i n c r e m e n t a l m o d i c a t i o n o f t h e
h a r d w a r e a s f u n c t i o n s a r e m o v e d b e t w e e n g r o u p s .
F o r s o f t w a r e p e r f o r m a n c e e s t i m a t i o n , t e c h n i q u e s i n 4 9 ] a n d 5 0 ] u s e d y n a m i c p r o l i n g t o e s t i -
m a t e e x e c u t i o n t i m e d u r i n g h a r d w a r e / s o f t w a r e p a r t i t i o n i n g . T e c h n i q u e s i n 5 1 ] a n d 5 2 ] p e r f o r m
p a t h a n a l y s i s t o d e t e r m i n e m i n i m u m o r m a x i m u m e x e c u t i o n t i m e s , t h e l a t t e r w i t h t h e h e l p o f u s e r
a n n o t a t i o n s . I n 5 3 ] , m e t h o d s a r e d e s c r i b e d f o r r e a s o n i n g a b o u t p r o g r a m e x e c u t i o n t i m e . A s u m m a r y
o f s o f t w a r e p e r f o r m a n c e e s t i m a t i o n t e c h n i q u e s c a n b e f o u n d i n 5 4 ] .
F i g u r e 7 i l l u s t r a t e s e s t i m a t e d v a l u e s f o r s e v e r a l d e s i g n m e t r i c s f o r t h e I T V P s y s t e m - l e v e l d e s i g n
o f F i g u r e 6 ( b ) . T h e d e s i g n e r ( o r a u t o m a t e d a l g o r i t h m s ) c a n u s e t h i s i n f o r m a t i o n t o d e c i d e h o w t o
i m p r o v e t h e d e s i g n . F o r e x a m p l e , n o t i n g t h a t t h e p r o g r a m - m e m o r y s i z e f o r t h e p r o c e s s o r i s c u r r e n t l y
v i o l a t e d a n d t h a t t h e r e a r e 2 0 0 0 g a t e s a v a i l a b l e o n t h e A S I C , t h e d e s i g n e r m a y t r y m o v i n g a f u n c t i o n
f r o m t h e p r o c e s s o r t o t h e A S I C .
Metric Estimate Constraint
Size(ASIC1)
Size(Processor)
8000 gates
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
19/29
4 . 1 M e m o r i e s
D u r i n g t h e e x p l o r a t i o n s t a g e o f s y s t e m d e s i g n , w e m a y h a v e g r o u p e d v a r i a b l e s f o r s t o r a g e i n a
p a r t i c u l a r m e m o r y . T h e s e v a r i a b l e s a r e n o l o n g e r d i r e c t l y a c c e s s i b l e b y e a c h p r o c e s s . I n s t e a d , w e
m u s t c r e a t e a m e m o r y d e s c r i p t i o n , m o v e t h e v a r i a b l e d e c l a r a t i o n s t o t h a t m e m o r y d e s c r i p t i o n , a n d
t h e n i n s e r t t h e m e m o r y a c c e s s p r o t o c o l i n t o e v e r y p a r t o f t h e s y s t e m d e s c r i p t i o n t h a t a c c e s s e s a
v a r i a b l e i n t h e m e m o r y . O t h e r d e t a i l s , s u c h a s s p e c i c m e m o r y a d d r e s s e s f o r e a c h v a r i a b l e , m a y a l s o
b e a d d e d t o t h e n e w l y c r e a t e d m e m o r y d e s c r i p t i o n .
4 . 2 I n t e r f a c i n g
P a r t i t i o n i n g f u n c t i o n s a m o n g s y s t e m c o m p o n e n t s u s u a l l y i n t r o d u c e s t h e n e e d t o c o m m u n i c a t e d a t a
b e t w e e n c o m p o n e n t s . F o r e x a m p l e , a s p e c i c a t i o n m a y i n c l u d e a f u n c t i o n t h a t r e a d s a v a r i a b l e . I f
t h e f u n c t i o n a n d t h e v a r i a b l e a r e a s s i g n e d t o d i e r e n t c o m p o n e n t s , t h e n t h e v a r i a b l e ' s v a l u e w i l l n e e d
t o b e t r a n s f e r r e d o v e r a b u s . T h e a d d i t i o n o f s u c h s p e c i c a t i o n d e t a i l s t h a t d e s c r i b e c o m m u n i c a t i o n
b e t w e e n c o m p o n e n t s i s c a l l e d i n t e r f a c i n g . T h e r e a r e s e v e r a l p r o b l e m s t h a t m u s t b e s o l v e d w h e n
i n t e r f a c i n g , i n c l u d i n g b u s - s i z e g e n e r a t i o n , p r o t o c o l g e n e r a t i o n , a n d p r o t o c o l m a t c h i n g .
B u s - s i z e g e n e r a t i o n d e t e r m i n e s t h e w i d t h o f t h e b u s t h a t w i l l i m p l e m e n t a g r o u p o f c o m m u n i c a t i o n
c h a n n e l s , g i v e n a s e t o f b i t r a t e a n d b u s w i d t h c o n s t r a i n t s . A l t h o u g h w e a s s i g n e d a w i d t h t o e a c h
b u s d u r i n g t h e a l l o c a t i o n s t e p o f s y s t e m d e s i g n , d u r i n g t h i s r e n e m e n t s t e p w e c a n o p t i m i z e t h e b u s
w i d t h t o u s e a s f e w w i r e s a s p o s s i b l e w h i l e s t i l l s a t i s f y i n g p e r f o r m a n c e c o n s t r a i n t s . A p p r o a c h e s t o
b u s g e n e r a t i o n a r e d e s c r i b e d i n 5 5 , 5 6 ] .
P r o t o c o l g e n e r a t i o n d e t e r m i n e s t h e e x a c t m e c h a n i s m f o r t r a n s f e r r i n g d a t a o v e r a b u s o f a x e d
w i d t h . W e m u s t d e t e r m i n e t h e t y p e o f c o n t r o l t o b e u s e d , s u c h a s a f u l l h a n d s h a k e , a h a l f h a n d -
s h a k e , o r a x e d - t i m e a c c e s s . W e m u s t a l s o d e t e r m i n e h o w t o d i s t i n g u i s h d a t a d e s t i n e d f o r d i e r e n t
l o c a t i o n s , p e r h a p s b y s e n d i n g a n a d d r e s s o v e r t h e d a t a l i n e s r s t , o r b y a d d i n g a d d i t i o n a l a d d r e s s
w i r e s . F i n a l l y , w e m u s t d e t e r m i n e h o w t o d e c o m p o s e t h e d a t a f o r s e r i a l t r a n s m i s s i o n , i n c a s e t h e
b u s w i d t h i s n a r r o w e r t h a n t h e n u m b e r o f b i t s o f t h e d a t a t h a t w e w i s h t o t r a n s f e r .
P r o t o c o l m a t c h i n g e n a b l e s c o m m u n i c a t i o n b e t w e e n c o m p o n e n t s i n w h i c h o n e c o m p o n e n t u s e s
a x e d p r o t o c o l . S u c h a c a s e a r i s e s w h e n w e i m p l e m e n t c e r t a i n f u n c t i o n s i n s o f t w a r e r u n n i n g o n
a n o - t h e - s h e l f p r o c e s s o r . I f t h e o t h e r c o m p o n e n t i s a n A S I C , t h e n t h a t A S I C m u s t i m p l e m e n t a
p r o t o c o l t h a t i s t h e c o m p l e m e n t o f t h e x e d p r o t o c o l . I f t h e o t h e r c o m p o n e n t a l s o u s e s a x e d b u t
d i e r e n t p r o t o c o l , t h e n w e n e e d t o i n s e r t h a r d w a r e b e t w e e n t h e t w o c o m p o n e n t s t h a t c a n r e c e i v e
a n d s e n d d a t a w i t h e a c h p r o t o c o l ( s u c h h a r d w a r e i s c a l l e d a t r a n s d u c e r ) .
T h e r e a r e s e v e r a l t e c h n i q u e s d e v e l o p e d t h a t a d d r e s s t h e p r o b l e m s o f i n t e r f a c i n g . I n 5 7 , 5 8 ] ,
t e c h n i q u e s f o r s p e c i f y i n g p r o t o c o l s a r e d e s c r i b e d t h a t e x t e n d t r a d i t i o n a l t i m i n g d i a g r a m s . I n 5 9 , 6 0 ] ,
t e c h n i q u e s a r e d e s c r i b e d f o r c r e a t i n g t r a n s d u c e r s . I n 6 1 , 6 2 ] , a n a p p r o a c h i s i n t r o d u c e d i n w h i c h t h e
d e t a i l e d I / O s t r u c t u r e a n d p r o t o c o l s o f l i b r a r y m o d u l e s a r e h i d d e n f r o m a d e s i g n e r , w h o c a n s i m p l y
i n t e r c o n n e c t t h o s e m o d u l e s u s i n g h i g h - l e v e l p r i m i t i v e s . I n t e r f a c e c o n t r o l l e r s a r e t h e n s y n t h e s i z e d
a u t o m a t i c a l l y t o p e r m i t c o m m u n i c a t i o n b e t w e e n m o d u l e s .
1 5
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
20/29
4 . 3 A r b i t r a t i o n
W h e n c o n c u r r e n t l y - e x e c u t i n g p r o c e s s e s a c c e s s t h e s a m e r e s o u r c e , s u c h a s a b u s o r a m e m o r y , w e
n e e d t o e n s u r e t h a t o n l y o n e p r o c e s s a c c e s s e s t h a t r e s o u r c e a t a g i v e n t i m e . A r b i t r a t i o n r e s o l v e s
s i m u l t a n e o u s a c c e s s r e q u e s t s b y g r a n t i n g p e r m i s s i o n t o o n l y o n e p r o c e s s a t a t i m e . D u r i n g r e n e m e n t ,
w e m u s t i n s e r t n e w a r b i t e r p r o c e s s e s i n t o t h e s p e c i c a t i o n w h e r e n e e d e d . T h e r e a r e t w o t y p e s o f
s c h e m e s f o r d e t e r m i n i n g p r i o r i t y d u r i n g a r b i t r a t i o n . A x e d - p r i o r i t y s c h e m e a s s i g n s a p r i o r i t y t o
e a c h p r o c e s s s t a t i c a l l y ; t h e p r o c e s s ' s p r i o r i t y n e v e r c h a n g e s . A d y n a m i c - p r i o r i t y s c h e m e d e t e r m i n e s
t h e p r i o r i t y o f a p r o c e s s a t r u n - t i m e , b a s e d o n t h e p a t t e r n o f a c c e s s e s o f t h e p r o c e s s e s . A r o u n d - r o b i n
d y n a m i c - p r i o r i t y s c h e m e a s s i g n s t h e l o w e s t p r i o r i t y t o t h e p r o c e s s t h a t w a s m o s t r e c e n t l y g r a n t e d
a c c e s s . A r s t - c o m e - r s t - s e r v e d d y n a m i c - p r i o r i t y s c h e m e g r a n t s a c c e s s t o p r o c e s s e s i n t h e o r d e r
t h a t t h e y r e q u e s t e d a c c e s s . F i x e d - p r i o r i t y s c h e m e s h a v e s i m p l e i m p l e m e n t a t i o n s , b u t m a y l e a v e a
l o w - p r i o r i t y p r o c e s s w a i t i n g f o r v e r y l o n g p e r i o d s o f t i m e , e v e n f o r e v e r i f h i g h e r - p r i o r i t y p r o c e s s e s
c o n t i n u o u s l y r e q u e s t a c c e s s . D y n a m i c - p r i o r i t y s c h e m e s h a v e m o r e c o m p l e x i m p l e m e n t a t i o n s , b u t
e n s u r e f a i r a c c e s s f o r a l l p r o c e s s e s .
4 . 4 G e n e r a t i o n
A f t e r i n t r o d u c i n g t h e a b o v e r e n e m e n t d e t a i l s , w e n e e d t o r e n e t h e f u n c t i o n a l s p e c i c a t i o n i n t o a
s y s t e m - l e v e l d e s c r i p t i o n . I n d o i n g s o , w e m u s t e n s u r e t h a t t h e n e w d e s c r i p t i o n i s r e a d a b l e , m o d i a b l e ,
a n d m o d u l a r i z e d , a n d t h a t d i e r e n t d e s i g n e r s c a n i m p l e m e n t d i e r e n t p a r t s . W e m u s t a l s o e n s u r e
t h a t t h e d e s c r i p t i o n i s s u i t a b l e f o r f u r t h e r p r o c e s s i n g b y s y n t h e s i s o r c o m p i l a t i o n t o o l s . F i n a l l y , w e
m u s t e n s u r e t h a t t h e d e s c r i p t i o n i s s i m u l a t a b l e , s o t h a t w e c a n c o n t i n u e t o v e r i f y s y s t e m f u n c t i o n a l i t y .
F o r e x a m p l e , F i g u r e 8 s h o w s a S p e c C h a r t s s y s t e m - l e v e l d e s c r i p t i o n f o r t h e I T V P , r e e c t i n g t h e
a l l o c a t i o n a n d p a r t i t i o n o f F i g u r e 6 . N o t e t h a t w e n o w i n c l u d e t h e m e m o r y , A S I C , a n d p r o c e s s o r
c o m p o n e n t s , a s w e l l a s d e c l a r a t i o n s o f b u s e s a n d c o n t r o l s i g n a l s a m o n g t h o s e c o m p o n e n t s . W e
a l s o d e s c r i b e t h e f u n c t i o n a l i t y t o b e i m p l e m e n t e d o n e a c h c o m p o n e n t . F o r e x a m p l e , A S I C 1 i s t o
i m p l e m e n t t h e S t o r e A u d i o a n d G e n e r a t e A u d i o f u n c t i o n s . N o t e t h a t t h e G e n e r a t e A u d i o f u n c t i o n h a s
b e e n m o d i e d : t h e r e a d o f a u d i o 1 h a s b e e n r e p l a c e d b y a p r o c e d u r e c a l l t h a t e x e c u t e s a p r o t o c o l
( R e a d M e m o r y 1 t h a t r e a d s a u d i o 1 f r o m M e m o r y 1 o v e r b u s 1 )
A l g o r i t h m s f o r g e n e r a t i n g a s y s t e m - l e v e l d e s c r i p t i o n a f t e r p a r t i t i o n i n g a r e f o u n d i n 3 ] .
1 6
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
21/29
entity ItvE is port (audio_in : in integer;audio_out : out integer.... ); end;
architecture ItvA of ItvE is begin
behavior Itv typeconcurrent subbehaviors is
signal bus1 : bustype;signal bus1req, bus1ack : bit;signal bus2 : bustype;
beginMemory1 : ;Memory2 : ;ASIC1 : ;Processor : ;
behavior Memory1 type code is
signal audio1 : audiomemtype;begin
-- code to control access toaudio1 over bus1
....behavior ASIC1
type concurrent subbehaviors isbegin
StoreAudio : ;GenerateAudio : ;
behavior GenerateAudiotype code is begin
wait until gen_audio;for i in 1 to num_audio loop
a := ReadMemory1(bus1)audio_out
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
22/29
5 S o f t w a r e s y n t h e s i s
A s y s t e m - l e v e l d e s c r i p t i o n u s u a l l y p o s s e s s e s c o m p l e x f e a t u r e s n o t f o u n d i n t r a d i t i o n a l p r o g r a m m i n g
l a n g u a g e s , s u c h a s t h e C l a n g u a g e . A t y p i c a l c o m p i l e r c a n n o t u s u a l l y c o m p i l e t h e s e f e a t u r e s . S o f t w a r e
s y n t h e s i s i s t h e t a s k o f c o n v e r t i n g a c o m p l e x d e s c r i p t i o n i n t o a t r a d i t i o n a l s o f t w a r e p r o g r a m t h a t
c a n b e c o m p i l e d b y t r a d i t i o n a l c o m p i l e r s .
O n e s u c h c o m p l e x f e a t u r e o f s y s t e m - l e v e l d e s c r i p t i o n s i s t h e d e n i t i o n o f c o n c u r r e n t t a s k s . I f
t w o c o n c u r r e n t t a s k s a r e m a p p e d t o a s i n g l e p r o c e s s o r , t h e n t h e t a s k s m u s t b e s c h e d u l e d t o e x e c u t e
s e q u e n t i a l l y 6 3 , 6 4 ] . I n s u c h s c h e d u l i n g , i t i s i m p o r t a n t t o e n s u r e t h a t e v e r y t a s k h a s a c h a n c e t o
e x e c u t e , o r i n o t h e r w o r d s , t h a t n o t a s k i s \ s t a r v e d . " A n o t h e r i s s u e i s m i n i m i z i n g t h e a m o u n t o f
\ b u s y - w a i t i n g " : t h e t i m e t h e p r o c e s s o r s p e n d s w a i t i n g f o r s o m e e x t e r n a l e v e n t . A t h i r d i s s u e i s
e n s u r i n g t h a t t i m i n g c o n s t r a i n t s f o r e a c h t a s k a r e s a t i s e d . F o r e x a m p l e , d a t a m a y b e a r r i v i n g a t
a s p e c i c r a t e a n d m u s t b e c a p t u r e d a n d p r o c e s s e d b y a g i v e n t a s k , o r a t a s k m a y h a v e t o o u t p u t
d a t a a t a c e r t a i n r a t e t o e n s u r e s a t i s f a c t o r y s y s t e m p e r f o r m a n c e . S u c h t a s k s m u s t b e g u a r a n t e e d a
m i n i m a l r a t e o f e x e c u t i o n . S e v e r a l t e c h n i q u e s e x i s t f o r p e r f o r m i n g s u c h s c h e d u l i n g 5 4 , 2 6 , 6 5 , 6 4 ] .
O n e u s e s a g l o b a l t a s k s c h e d u l e r , w h i c h a c t i v a t e s e a c h t a s k ( o r p o r t i o n t h e r e o f ) b y c a l l i n g e a c h a s a
s u b r o u t i n e . T h i s t e c h n i q u e m a y r e q u i r e o v e r h e a d t o m a i n t a i n t h e s t a t e o f e a c h t a s k a s i t s w i t c h e s
f r o m o n e t o t h e o t h e r . A n o t h e r t e c h n i q u e r e d u c e s t h i s o v e r h e a d b y m a i n t a i n i n g d a t a l o c a l l y w i t h i n
e a c h t a s k , a n d m o d i f y i n g e a c h t a s k t o r e l i n q u i s h c o n t r o l o f t h e p r o c e s s o r w h e n e v e r i t m u s t w a i t f o r a n
e v e n t o r a n i n t e r r u p t o c c u r s . C h o o s i n g a t e c h n i q u e u s u a l l y i n v o l v e s a t r a d e o b e t w e e n p e r f o r m a n c e
a n d p r o g r a m s i z e .
6 H a r d w a r e s y n t h e s i s
A f t e r g e n e r a t i n g a r e n e d s y s t e m - l e v e l d e s c r i p t i o n , w e n e e d t o c r e a t e h a r d w a r e f o r t h e p a r t s o f t h e
d e s c r i p t i o n t h a t a r e t o b e i m p l e m e n t e d o n c u s t o m c o m p o n e n t s , s u c h a s o n A S I C ' s o r F P G A ' s . S u c h
h a r d w a r e s y n t h e s i s i n c o r p o r a t e s h i g h - l e v e l s y n t h e s i s , F S M s y n t h e s i s , l o g i c s y n t h e s i s a n d t e c h n o l o g y
m a p p i n g . H i g h - l e v e l s y n t h e s i s t r a n s f o r m s a s y s t e m c o m p o n e n t ' s f u n c t i o n a l d e s c r i p t i o n i n t o a s t r u c -
t u r e o f r e g i s t e r - t r a n s f e r c o m p o n e n t s s u c h a s r e g i s t e r s , m u l t i p l e x o r s , a n d A L U ' s . S u c h a s t r u c t u r e
u s u a l l y c o n s i s t s o f t w o p a r t s : a c o n t r o l l e r i m p l e m e n t i n g a n i t e - s t a t e m a c h i n e , a n d a d a t a p a t h e x e -
c u t i n g a r i t h m e t i c o p e r a t i o n s . W e r e f e r t o s u c h a s t r u c t u r e a s a n i t e - s t a t e m a c h i n e w i t h d a t a p a t h ,
o r F S M D 1 , 6 6 ] . T h e c o n t r o l l e r c o n t r o l s r e g i s t e r t r a n s f e r s i n t h e d a t a p a t h a n d g e n e r a t e s s i g n a l s f o r
c o m m u n i c a t i o n w i t h t h e e x t e r n a l w o r l d .
T h e r e a r e s e v e r a l i n t e r d e p e n d e n t t a s k s t h a t m a k e u p h i g h - l e v e l s y n t h e s i s . T h e i n p u t e x e c u t a b l e
s p e c i c a t i o n i s r s t c o m p i l e d i n t o a n i n t e r n a l r e p r e s e n t a t i o n , s u c h a s o n e d e s c r i b e d i n 1 4 , 6 7 , 6 8 , 6 9 ] .
T h e i n t e r n a l r e p r e s e n t a t i o n e x p o s e s c o n t r o l a n d d a t a d e p e n d e n c i e s b e t w e e n a r i t h m e t i c o p e r a t i o n s ,
s u c h a s b e t w e e n a d d i t i o n s a n d c o m p a r i s o n s . A l l o c a t i o n s e l e c t s , f r o m a r e g i s t e r - t r a n s f e r c o m p o n e n t
d a t a b a s e , t h e s t o r a g e , f u n c t i o n a n d b u s u n i t s t o b e u s e d i n t h e d e s i g n . S c h e d u l i n g m a p s o p e r a t i o n s
t o c o n t r o l s t e p s , e a c h o f w h i c h u s u a l l y r e p r e s e n t s o n e c l o c k p e r i o d o r c l o c k p h a s e . S c h e d u l i n g i s
n e c e s s a r y s i n c e a l l o p e r a t i o n s u s u a l l y c a n n o t b e e x e c u t e d a t o n c e d u e t o d a t a d e p e n d e n c i e s o r d u e t o
a l i m i t e d n u m b e r o f u n i t s c a p a b l e o f e x e c u t i n g p a r t i c u l a r o p e r a t i o n s . B i n d i n g m a p s s c a l a r a n d a r r a y
v a r i a b l e s t o r e g i s t e r s a n d m e m o r i e s , o p e r a t i o n s t o f u n c t i o n u n i t s , a n d t r a n s f e r s t o b u s e s . A v a r i e t y
o f a l g o r i t h m s , t o o l s a n d e n v i r o n m e n t s f o r h i g h - l e v e l s y n t h e s i s a r e d e s c r i b e d i n 1 , 7 0 , 7 1 ] .
1 8
-
8/6/2019 Specification and Design of Embedded Software and Hardware Systems
23/29
F S M a n d l o g i c s y n t h e s i s t r a n s f o r m s a n i t e - s t a t e m a c h i n e ( F S M ) t o a h a r d w a r e s t r u c t u r e c o n -
s i s t i n g o f a s t a t e - r e g i s t e r , a n d o f a c o m b i n a t i o n a l c i r c u i t , w h i c h g e n e r a t e s t h e n e x t s t a t e a s w e l l a s
t h e c o n t r o l l e r ' s o u t p u t s . T h e t a s k s i n v o l v e d i n c r e a t i n g s u c h a s t r u c t u r e i n c l u d e s t a t e m i n i m i z a t i o n ,
s t a t e e n c o d i n g , l o g i c m i n i m i z a t i o n a n d t e c h n o l o g y m a p p i n g . S t a t e m i n i m i z a t i o n r e d u c e s t h e n u m b e r
o f s t a t e s i n a n F S M b y r e p l a c i n g e q u i v a l e n t s t a t e s w i t h a s i n g l e s t a t e . T w o s t a t e s a r e e q u i v a l e n t i f
t h e s e q u e n c e o f o u t p u t s f o r a n y s e q u e n c e o f i n p u t s d o e s n o t d e p e n d o n w h i c h o f t h e t w o s t a t e s w e
s t a r t i n . S t a t e m i n i m i z a t i o n i s i m p o r t a n t s i n c e t h e n u m b e r o f s t a t e s d e t e r m i n e s t h e s i z e o f t h e s t a t e
r e g i s t e r a n d c o n t r o l l o g i c . S t a t e e n c o d i n g a s s i g n s b i n a r y c o d e s t o s y m b o l i c s t a t e s . T h e g o a l i s t o
o b t a i n a b i n a r y c o d e t h a t m i n i m i z e s t h e c o n t r o l l e r ' s c o m b i n a t i o n a l l o g i c . L o g i c m i n i m i z a t i o n i s u s e d
a f t e r e n c o d i n g t o r e d u c e t h e s i z e o r d e l a y o f t h e c o m b i n a t i o n a l l o g i c . T e c h n o l o g y m a p p i n g t r a n s f o r m s
a t e c h n o l o g y - i n d e p e n d e n t l o g i c n e t w o r k p r o d u c e d b y t h e l o g i c m i n i m i z e r i n t o a n e t l i s t o f s t a n d a r d
g a t e s f r o m a p a r