8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 1/6
A c t i v e - H
D L I n t e r f a c e s
S i m u l i n k ®
I n t e r f a c e
C o u r s e
1 3
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
O v e r v i e w
O v e r v i e w
O v e r v i e w
T h e M a t h W o r
k s ' M A T L A B ® / S i m u l i n k ®
s i m u l a t i o n
e n v i r o n m e n t p r o v i d e s a
p o w e r f u l
h i g h l e v e l m a t h e m a t i c a l m o d e l i n g e n v i r o n m e n t
f o r D S P s y s t e m s
t h a t c a n
b e w
i d e l y u s e d
f o r a l g o r i t h m
d e v e l o p m e n t a n d v e r i f i c a t
i o n .
A c t i v e - H
D L p r o v i d e s a n
i n t e r f a c e
t o
M A T L A B
a n d
S i m u l i n k s i m u l a t i o n
e n v i r o n m e n t , w
h i c h a l l o w s c o - s i m u l a t i o n o f
f u n c t i o n a l b l o c k s d e s c r i b e d b y u s i n g
m a t h e m a t i c a l
f o r m u l a s a n d
b e h a v i o r a l m o d e l s
d e s c r i b e d
b y u s i n g
h a r d w a r e
d e s c r i p t i o n l a n g u a g e s .
T h e S i m u l i n k I n
t e r f a c e p r o v i d e s u s e r s w
i t h t h e f o l l o w i n g
b e n e f i t s :
– I n t u i t i v e i n t e r f a c e t h a t f i l l s t h e g a p
b e t w e e n
H D L s i m u l a t i o n a n
d h i g h l e v e l m a t h e m a t i c a l m o d e l i n g
e n v i r o n m e n t f o r
D S P s y s t e m s
– D i s p l a y i n g s i m u l a t i o n r e s u l t s
i n b o t h t h e S i m u l i n k e n v i r o n m e n t a n d
t h e A c t i v e - H D L w a v e f o r m w
i n d o w
– A u t o m a t i c v a l u e c o n v e r s i o n
b e t w e e n A c t i v e - H
D L a n d S i m u l i n k
d a t a t y p e s , i n c l u d i n g S i m u l i n k
f i x e d -
p o i n t t y p e s .
– A d v a n c e d t e s t b e n c h e s e m p l o y i n g c o m p l e x m a t h e m a t i c a l f o r m u l a s u s e d
t o s t i m u l a t e u n i t u n d e r
t e s t
– I n t e g r a t i o n w i
t h X i l i n x S y s t e m G e n e r a t o r ™
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 I n t e r f a c e S e t u p
1 3 . 1 I n t e r f a c e S e t u p
T h e i n t e r f a c e d e l i v e r e d w
i t h t h e A c t i v e -
H D L i n s t a l l a t i o n p r o g r a m a l l o w s
y o u t o
s e l e c t a
V e r i l o g m o d u l e ,
E D I F c e l l o r
V H D L e n t i t y / a r c h i t e c t u r e p a i r
t h a t w i l l b e u s e d a s a
b l a c k - b o x d u r i n g t h e v e r i f i c a t i o n p r o c e s s p e r f o r m e d
w i t h i n
S i m u l i n k .
B e f o r e
t h e f i r s t u s e o f
t h e S i m u l i n k
I n t e r f a c e , y o u n e e d
t o i n s t a l l t h e
A c t i v e - H
D L B l o c k s e t d e l i v e r e d w
i t h t h e A c t i v e - H D L i n s t a l l a t i o n .
P r o v i d e d
s e t u p
s c r i p t a u t o m a t e s
t h e
i n s t a l l a t i o n p r o c e s s .
I t c a n
b e s e l e c t e d
t o
r u n
a u t o m a t i c a l l y
d u r i n g
A c t i v e - H D L
i n s t a l l a t i o n p r o c e s s
b y c h e c k i n g
t h e R u n
S i m u l i n k I n t e r f a c e S e t u p c h e c k b o x
i n
t h e S e t u p T y p e d i a l o g b o x o f
t h e A c t i v e -
H D L S e t u p P r o g r a m
. I t c a n a l s o b e
e x e c u t e d a f t e r
A c t i v e - H
D L i s i n s t a l l e d .
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6 1
3 . 1 a I n s t a l l i n g A c t i v e - H
D L B l o c k s e t
1 3 . 1 a I n s t a l l i n g A c t i v e - H
D L B l o c k s e t
I n o r d e r
t o i n s t a l l
S i m u l i n k
I n t e r f a c e a f t e r
A c t i v e - H
D L i s i n s t a l l e d , f o l l o w
s t e p s b e l o w
:
1 . S t a r t M A T L A B
.
2 . B r o w s e
t o t h e
$ A L D E C / S i m u l i n k s u b f o l d e r .
3 . T y p e s e t u p c o m m a n d
i n t h e C o m m a n d
W i n d o w
.
A f t e r t h e s e t u p
h a s
f i n i s h e d s u c c e s s f u l l y , M A T L A B i s c l o s e d a u t o m a t i c a l l y a s
i t n e e d s
t o b e
r e s t a r t e d t o i n c o r p o r a t e c h a n g e s
i n e n v i r o n m e n t .
Y o u c a n e x a m
i n e t h e i n s t a l l . l o g f i l e l o c a t e d i n t h e $ A L D E C / S i m u l i n k s u b f o l d e r .
8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 2/6
8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 3/6
8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 4/6
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 0 C o - S i m u l a t i o n
- S i m u l i n k s i m u l a t i o n
M o d e l
1 3 . 1 0 C o - S i m u l a t i o n
- S i m u l i n k s i m u l a t i o n
M o d e l
S i m u l i n k M o
d e
l w i t h H D L B l a c k - B o x r e a
d y
f o r c o - s i m u
l a t i o n
i s p r e s e n
t e d b e
l o w .
A c t i v e - H
D L c o - s i m u l a t i o n
b l o c k H D L B l a c k - B o x s i m u l a t e d
i n A c t i v e - H
D L
S i m u l i n k
b l o c k s
T h e s t e p
b y s
t e p e x a m p
l e o
f c o - s
i m u
l a t i o n w
i l l b e s
h o w n
l a t e r
i n t h e p r e s e n
t a t i o n .
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 1 C o - S i m u l a t i o n
- c o n n e c t i o n
t o A c t i v e - H
D L
1 3 . 1 1 C o - S i m u l a t i o n
- c o n n e c t i o n
t o A c t i v e - H
D L
1 . A l l H D L B l a c k - B o x e s
f r o m t h e A c t i v e - H D L B l o c k s e t a r e s i m u l a t e d
w i t h A c t i v e - H
D L s i m u l a t o r .
2 . R u n n i n g s i m
u l a t i o n f r o m t h e S i m u l i n k
d i a g r a m
o p e n s c o n n e c t i o n
t o
t h e A c t i v e - H
D L s i m u l a t i o n s e r v e r a n d c o n f i g u r e s
i t t o r u n c o - s i m u l a t i o n
o f c o d e a s s o c i a t e d w
i t h a l l i n s t a n t i a t e d
b l a c k - b o x e s .
3 . A n e w o r e x
i s t i n g i n s t a n c e c a n
b e c o n f i g u r e d a s
s i m u l a t i o n s e r v e r a n d
i s
r e u s e d f o r a l l c o - s i m u l a t i o n s e s s i o n s .
4 . U s e r c a n r e v i e w r e s u l t s
i n b o t h S i m u l i n k a n d A c t i v e - H
D L w a v e f o r m .
N O T E :
W a v e f o r m
i s c r e a t e d
i n a n a u t o m a t e d w a y w
h e n s i g n a l s a r e a d d e d
t o l i s t i n t h e
“ W a v e f o r m
” t a b .
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 2 C o - S i m u l a t i o n
- s i m u l a t i o n s t a r t
1 3 . 1 2 C o - S i m u l a t i o n
- s i m u l a t i o n s t a r t
O n c e
S t a r t S i m u l a t i o n
b u t t o n i s p r e s s e d o n
t h e S i m u l i n k
t o o l b a r ,
t h e c o - s i m u l a t i o n p r o c e s s w
i l l b e s t a r t e d .
H D L B l a c k - B o x s i m u l a t e d w
i t h
A c t i v e - H
D L s i m u l a t o r
i n s i d e o f
t h e n e w ,
a u t o m a t i c a l l y c r e a t e d
d e s i g n .
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 3 S i m u l a t i o n w
i t h S i m u l i n k
- v i e w s i m u l a t i o n r e s u l t s
1 3 . 1 3 S i m u l a t i o n w
i t h S i m u l i n k
- v i e w s i m u l a t i o n r e s u l t s
U s e r c a n r e v i e w
t h e s i m u l a t i o n r e s u l t s w
i t h i n S i m u l i n k a n d
i n t h e
A c t i v e - H
D L W a v e f o r m w
i n d o w
8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 5/6
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 4
E x a m p l e o f u s e –
A c t i v e - H
D L d e s i g n
1 3 . 1 4
E x a m p l e o f u s e –
A c t i v e - H
D L d e s i g n
O p e n s i m u l i n k_ e x a m p l e w o r k s p a c e .
T h i s
w o r k s p a c e c o n t a i n s
M o d u l a t o r d e s i g n .
T h e d e s i g n c o n t a i n s
t h e f o l l o w i n g r e s o u r c e
f i l e s :
1 . a
b s . v h d
V H D L e q u i v a l e n t m o d e l o f
t h e S i m u l i n k
A b s b l o c k .
2 . m u l t . v h d , m u l t 1 . v h d
V H D L e q u i v a l e n t m o d e l o f
t h e S i m u l i n k
P r o d u c t b l o c k .
3 . s
i g n . v h d
V H D L e q u i v a l e n t m o d e l o f
t h e S i m u l i n k
S i g n b l o c k .
4 . M o d u l a t i o n . m
d l
S i m u l i n k m o d e l s
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 5 D e s i g n
E x a m p l e
– g e n e r a t i n g b
l o c k d e s c r i p t i o n f i l e s
1 3 . 1 5 D e s i g n
E x a m p l e
– g e n e r a t i n g b
l o c k d e s c r i p t i o n f i l e s
1 . C o m p i l e a
l l f i l e s w
i t h i n d e s i g n .
2 . U s e G e n e r a t e
B l o c k D e s c r i p t i o n
f o r S i m u l i n k …
f o r e a c h
e n t i t y i n t h e l i b r a r y a n d a s s i g n c r e a t e d
f i l e s
t o H D L B l a c k - B o x
s y m b o l s o n
t h e S i m u l i n k
d i a g r a m .
A l t e r n a t i v e l y
y o u c a n u s e c o m p i l e .
d o m a c r o a t t a c h e d
t o d e s i g n .
I t c o m p i l e s a l l f i l e s a n d u s e s
“ s i m u l i n k g e n m o d ” c o m m a n d s
t o
p r e p a r e b l o c k d e s c r i p t i o n f i l e s f o r S i m u l i n
k
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 6
D e s i g n
E x a m p l e
- S i m u l i n k s i m u l a t i o n m o d e l
1 3 . 1 6
D e s i g n
E x a m p l e
- S i m u l i n k s i m u l a t i o n m o d e l
1 . S t a r t M A T L A B .
2 . S t a r t S i m u l i n k
f r o m t h e M A T L A B t o o l b a r .
3 . S e t
t h e w o r k i n g
f o l d e r t o t h e S i m u l i n k s u b
f o l d e r o f
t h e s i m u l i n k_ e x a m p l e
w o r
k s p a c e a n d o p e n
M o d u l a t i o n . m
d l m o d e l .
T h e
S i m u l i n k s i m u l a t i o n m o d e l s h o u l d
l o o k l i k e p i c t u r e d o n
t h i s s l i d e .
A l l m a t e r i a l s u p d a t e d o n :
N o v e m
b e r 2 0 , 2 0 0 6
1 3 . 1 7 D e s i g n
E x a m p l e
- r e p l a c i n g
b l o c k s w
i t h H D L B l a c k - B o x e s
1 3 . 1 7 D e s i g n
E x a m p l e
- r e p l a c i n g
b l o c k s w i t h H D L B l a c k - B o x e s
I n s i d e M o d u l a
t i o n . m
d l p l e a s e r e p l a c e
t h e S i m u l i n k
b l o c k s w i
t h t h e c o r r e s p o n d i n g
b l a c k - b o x e s c o m
i n g f r o m t h e A L D E C b l o c k s e t .
F o l l o w t h e s t e p s
d e c r i b e d i n t h e n e x t s l i d e .
A c t i v e - H
D L C o - S i m b l o c k .
H D L B l a c k - B o x c o r r e s p o n d i n g
t o
m_ a b s
e n t i t y .
8/13/2019 C13_Simulink_interface4
http://slidepdf.com/reader/full/c13simulinkinterface4 6/6