ModelSim SE Tutorial
176 Pages
English

ModelSim SE Tutorial

-

Downloading requires you to have access to the YouScribe library
Learn all about the services we offer

Description

Model
Sim
®
Advanced V
e
ri
ficat
ion
and Debu
ggin
g
SE
Tu
t
o
r
i
a
l
V
e
rsi
o
n 6.0e
Publ
i
s
h
e
d
:

June 15
, 2005 T-
2

C
o
p
y
r
i
gh

M
e
n
t
or
G
r
ap
hi
cs
Co
rp
ora
t
io
n
200
5
Al
l r
i
gh
ts
res
erv
ed
.
Th
is
doc
um
en
t c
ont
ain
s
i
n
fo
rm
ati
on
tha
t
i
s
p
r
op
rie
t
ary
to
M
e
n
t
or
Gr
ap
hic
s
C
o
r
por
ati
on.
Th
e o
r
ig
in
al r
eci
pie
n
t
of
thi
s

do
cum
e
n
t
m
a
y
d
upl
ica
t
e
this
d
o
cu
me
nt
in
wh
ole
or
in
pa
rt f
o
r
int
e
rn
al
bus
ine
s
s
pu
rpo
s
es
on
ly
, p
r
ov
ide
d
t
h
at
th
is e
n
t
i
re
no
tice
a
p
p
ear
s i
n

all
co
pi
es.
In
d
u
p
lica
tin
g
an
y p
a
r
t
o
f

this
d
o
c
u
m
e
n
t
,
the
re
cip
i
en
t
agr
ees
t
o
m
a
ke
ev
ery
r
eas
ona
bl
e e
ffo
rt
to
pre
v
e
n
t t
h
e
un
aut
h
o
r
ize
d
u
s
e
an
d d
i
st
rib
u
ti
on
of
the
pr
opr
iet
a
ry
in
for
m
a
tio
n.
Th
is
doc
um
en
t is
fo
r i
n
fo
rm
ati
on
and
in
str
u
ct
ion
p
u
rp
ose
s
.
Me
nto
r
G
r
a
p
h
i
cs
res
e
rv
es
the
ri
ght
to
m
a
ke
ch
an
ges
in

sp
ecif
i
ca
tio
ns

a
nd o
t
he
r inf
o
rm
a
tion
con
t
a
i
ne
d in th
is

p
u
b
lica
tio
n w
ith
out

p
r
io
r no
tic
e, an
d th
e rea
d
e
r
sho
u
l
d, in

a
ll ca
ses
,

co
nsu
lt Me
nto
r

G
r
a
phi
cs to det
e
rm
in
e
w
h
e
t
he
r
a
ny cha
n
g
e
s hav
e

b
e
e
n

m
a
d
e
.
T
h
e
t
e
rm
s
an
d
co
n
d
i
t
i
o
n
s
g
o
v
e
r
n
i
ng
t
h
e
sa
l
e

an
d
li
c
e
n
s
in
g
of
M
e
n
t
or
G
r
a
p
hi
c
s

pr
od
uc
t
s
ar
e
...

Subjects

Informations

Published by
Reads 139
Language English
Document size 2 MB
Model Sim ® Advanced V e ri ficat ion and Debu ggin g SE Tu t o r i a l V e rsi o n 6.0e Publ i s h e d : June 15 , 2005 T- 2 C o p y r i gh t© M e n t or G r ap hi cs Co rp ora t io n 200 5 Al l r i gh ts res erv ed . Th is doc um en t c ont ain s i n fo rm ati on tha t i s p r op rie t ary to M e n t or Gr ap hic s C o r por ati on. Th e o r ig in al r eci pie n t of thi s do cum e n t m a y d upl ica t e this d o cu me nt in wh ole or in pa rt f o r int e rn al bus ine s s pu rpo s es on ly , p r ov ide d t h at th is e n t i re no tice a p p ear s i n all co pi es. In d u p lica tin g an y p a r t o f this d o c u m e n t , the re cip i en t agr ees t o m a ke ev ery r eas ona bl e e ffo rt to pre v e n t t h e un aut h o r ize d u s e an d d i st rib u ti on of the pr opr iet a ry in for m a tio n. Th is doc um en t is fo r i n fo rm ati on and in str u ct ion p u rp ose s . Me nto r G r a p h i cs res e rv es the ri ght to m a ke ch an ges in sp ecif i ca tio ns a nd o t he r inf o rm a tion con t a i ne d in th is p u b lica tio n w ith out p r io r no tic e, an d th e rea d e r sho u l d, in a ll ca ses , co nsu lt Me nto r G r a phi cs to det e rm in e w h e t he r a ny cha n g e s hav e b e e n m a d e . T h e t e rm s an d co n d i t i o n s g o v e r n i ng t h e sa l e an d li c e n s in g of M e n t or G r a p hi c s pr od uc t s ar e s e t fo r t h i n wr i t t e n ag r e e m e n t s be twe e n M e nt or Gra p h i cs an d i t s c u s t om er s. N o rep r es en tati on or oth e r aff i rm at ion of fac t c o n t ain e d in th is p u b lic atio n sh all be dee m ed to b e a w a rr ant y o r g i ve ris e t o a n y lia bil ity of M e nt or Gra p h i cs w h at soe v e r . ME NT OR G R AP HI CS MAK E S N O WA RRA NT Y OF A NY K I N D WI TH R E G A RD TO T H I S MA TE RI AL I N C L U D I NG, BU T NO T L I MI T E D T O , TH E I M PL IE D WA RRA NT IE S OR MER C HA NT ABI L IT Y AN D FI T N ES S FO R A PA RT IC UL AR P U R P OS E. ME NT OR G R AP HI CS SH ALL NOT BE L I ABL E FO R AN Y I N CI D E NT AL , I N D I R E C T , SP EC IA L, OR C ONS EQ UE NTI A L DAMA G E S WHA T S O EV ER ( I N CL UD IN G BUT N O T L I MI T E D TO L O S T PR OFI T S) A R I S I N G O U T OF OR RE LA TE D TO T H I S PU BLI C ATI O N OR TH E I N FO RMA T I O N C ONT AI NE D I N IT , E V E N I F M E NT OR G R AP HI CS COR P O R AT I ON H A S B EEN ADV I S ED OF T H E P O S S I B I L I T Y OF S U C H DA MAG E S . RE ST RI CT E D RI G H T S L E G E ND 0 3 /9 7 U . S . G o v e rn me nt Re st r i ct e d Ri g h t s . T h e S O F T WA RE a n d do c u m e n t a t i o n h a ve be en de ve l o p e d en t i r e l y at pr i v at e e x p e ns e an d a r e c o m m e rc ial co mp ute r s o ft wa re p r o v id ed wi th r e st ric t ed rig h t s . U s e , d upl ica tio n o r d i sc los u re by th e U . S . Go ve rnm e n t o r a U. S. Go ver n m e n t s ubc on tra c to r is su bje c t to the res t ri ctio ns se t fo rth in th e l i cen se ag ree m e n t pro v i d ed wi th the so ftw a re pu rsu a n t to D F A R S 2 2 7 .72 02 -3( a ) o r a s s e t f o rt h i n s u b p ar agr a ph (c )(1 ) a nd (2) of th e C o m m e rc ial Co mp ut er S o f t w a re - R e s t ric t ed R i gh ts cla u se at FA R 52 .22 7- 19, as ap pli cab le. C o ntra cto r / m a n u f a c t u rer is : M e nt or G r a p hi c s Co r p or a t i o n 800 5 S . W. Bo e c k m a n R o a d , Wi l s o nvi l l e , O r e g on 9707 0-777 7. Th is is an unp ub lis hed w o rk o f M e n t or Gr ap hic s C o rp or ati on. Co n t a c t i n g M o delS im Su pp o r t Te l e phon e : 503 .68 5 .0 820 T o l l -F re e Te l e ph one : 8 77-74 4-66 99 W e b s ite: www .m o d e l.co m S upp ort : w w w . m ode l . c o m/ sup port Co nt a c t t e c h ni c a l w r i t e r : w w w . me n t o r .c om/ s uppo rt ne t / d o c u me nt a t i o n/ re pl y_for m.c f m T R ADE M A R K S: The t r a d e m a r k s , l ogos a nd s e rvi c e m a r ks ("Ma rks " ) us e d he re i n a r e t h e p r ope rt y o f Me n t o r G r a phi c s C o rpo r a t i o n or o t h e r third parties . N o on e is permitte d to us e thes e Marks without t h e pr i o r writte n co n s ent of M e n t o r Graph i cs o r the res p ect iv e th ir d - p a r t y ow ne r. The use h e re i n of a t h i r d- pa rt y Ma rk i s n o t a n a t t e mp t t o i n di c a t e Me nt or G r a phi c s a s a s ourc e of a prod uc t , bu t i s i n t e nde d t o i ndi c a t e a produ c t fro m, or a s s o c i a t e d w i t h , a pa r t i c ul a r t h i r d pa rt y. A c u r r e n t l i s t of Me n t or G r a p hi c s t r a d e m a r ks ma y be v ie w e d a t : www . m en to r. co m/te r m s _ co n d iti o n s /trad emark s . c f m . M o d e l S im S E Tu to ria l T- 3 Table of Contents In tro d u ct io n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T -5 Le sson 1 - Mo del Sim concep tua l overvi ew . . . . . . . . . . . . . . . . . . . . . . T -1 1 Le sson 2 - Ba sic simul a t i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T -1 9 Le sson 3 - Mo del Sim proje c ts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T -3 1 Le sson 4 - Wo r k in g w i t h m u lt ip l e li b r a r i e s . . . . . . . . . . . . . . . . . . . . . . . T -4 1 Le sson 5 - Si mula ti ng desi gns wit h Syst emC . . . . . . . . . . . . . . . . . . . . T -5 1 Le sson 6 - Vi ewi ng simul a t i on s i n t h e W a ve wi ndo w . . . . . . . . . . . . . . . T -6 5 Le sson 7 - C r eat in g st imu l us wi th W a vef o rm Edit or . . . . . . . . . . . . . . . T -7 5 Le sson 8 - D ebu ggin g wit h th e Dat a f l ow w i nd ow . . . . . . . . . . . . . . . . . . T -8 9 Le sson 9 - Vi ewi ng and i n it ia lizi ng memori es . . . . . . . . . . . . . . . . . . . . T -9 9 Le sson 10 - Anal yzing pe rfor mance wi th t he Prof il er . . . . . . . . . . . . . . T -1 1 3 Le sson 11 - Simul a t i ng wi th C ode Co verage . . . . . . . . . . . . . . . . . . . . T -1 2 3 Le sson 12 - Deb uggi ng wi th PSL assert io ns . . . . . . . . . . . . . . . . . . . . T -1 3 5 Le sson 13 - W a veform C o mpa r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T -1 4 5 M o d e lS im S E Tu to ria l T- 4 L e sson 14 - Aut o mat i ng Mo del S i m . . . . . . . . . . . . . . . . . . . . . . . . . . . T-1 5 7 I nde x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T-1 7 3 M o d e lS im S E Tu tor i al T- 5 Introduction To pi cs T h e fo llo win g top i cs ar e co ve red in th is c h a p te r: As su mp ti o n s . . . . . . . . . . . . . . . . . . . . . . . . . T - 6 Whe r e t o f i nd ou r d o c u me nt at i o n . . . . . . . . . . . . . . . . . . . T - 7 T e c hni cal su pp ort an d u p d a te s . . . . . . . . . . . . . . . . . . . . T - 8 B e f o re yo u b e g i n . . . . . . . . . . . . . . . . . . . . . . . . T - 9 Ex am ple de sig n s . . . . . . . . . . . . . . . . . . . . . . . T - 9 M o de lSi m SE T u to ria l T- 6 In tro d u c t i on Ass u mp t i ons We as sum e tha t y o u are fa mi liar w ith the us e o f y o u r o p er ati ng sys t em . Yo u s h o u ld be fa mi liar w ith the w i nd ow m a n a ge me nt fun c ti ons o f yo ur gr aph i c in ter f ac e: ei the r Op enW i n d o w s , OS F/ Mo tif , C D E, K D E , GN O M E , or M i cr oso f t W i n dow s 9 8 /M e/ NT / 200 0/ XP . W e a l s o a s s u me t h at yo u ha v e a w o r k i n g k n o w l e d g e of VH DL, Ve r i l o g, an d/ o r Sy s t e m C . A l t h ou gh M o d e l S im i s a n e x c e l l e nt to o l to u s e wh ile le arn i ng H D L co nc ept s a n d pra c ti ces , th is do cum e n t i s n o t wr itte n t o s upp or t th at go al. M o d e lS im S E Tu tor i al Wh er e to fin d o u r do cu m e n t at ion T- 7 Wh ere to f i nd our do c u mentatio n Mod e lS i m do cu me nt a t io n i s a v ai l a b l e f r o m o u r we bs i t e a t w w w . m o d e l.c o m / s upp or t o r in th e fo llo w i ng fo rm ats an d lo ca tio ns: D o c u m e nt Fo rm at Ho w to g e t it M o d e lS im In sta lla tio n & pap e r s h i pp ed wi th Mo de l Si m L i ce nsi n g Gu id e PD F s e l ec t He l p > D o c u m e n t a t io n ; al so ava ila ble fr om th e S u p por t pa ge of our w e b site : w w w .m o d el .co m M o d e lS im Qu ic k G u id e pap e r s h i pp ed wi th Mo de l Si m (c om m a nd an d f eat ure PD F se lec t H e lp > Do cu me nt ati o n , al so ava ila ble fr om th e S u p por t q u ic k-r e fe ren ce) pa ge of our w e b site : w w w .m o d el .co m M o d e lS im Tu to ria l PD F, HT M L se lec t H e lp > Do cu me nt ati o n ; al so ava ila ble fr om th e S u p por t pa ge of our w e b site : w w w .m o d el .co m M o d e lS im Us er ’s M a nua l PD F, HT M L se lec t He l p > D o c u m e n t a t io n M o d e lS im Co m m a nd PD F, HT M L se lec t He l p > D o c u m e n t a t io n Re f e r e nc e M o d e lS im GU I Ref e re nc e PD F, HT M L se lec t He l p > D o c u m e n t a t io n F o re ign L a n gua ge PD F, HT M L se lec t H e lp > D o cu m e n t at ion In ter f ac e R e f e re nce S t d_ De ve lop e rs Ki t U s er ’s PD F ww w . m ode l.c o m / su pp ort / do cu me nta tio n/B O OK /s dk_ um .p df Ma nu a l Th e S t a nda rd De vel o p e r’ s K it i s f o r u s e wi th Me nt or G r a p h i cs Qu ick H DL . Co mma n d He l p A S C I I t yp e hel p [command name] at th e p r om pt in th e T r an sc r i pt pa ne E rro r m e s s ag e h e lp AS CI I t y p e ver ror a t th e T r an sc r i pt or sh e l l pr o m pt T c l M a n P a g e s (Tc l HT M L se lec t H e lp > Tc l M a n P a g e s , o r f i nd co nt e n t s .h t m in ma nu a l ) \m od elte ch \do c s\ tcl _ h e lp _ht ml T ech no tes H T M L s e l ec t T ech no tes dro p d o w n on ww w. mo de l.co m / su pp ort M o de lSi m SE T u to ria l T- 8 In tro d u c t i on Tec h nical suppo rt and up dat e s Su pp or t M ode l T ech no log y o n li ne and em a il t ech nic a l sup p o r t o p t i on s, ma int e na nc e re ne wal, and li nk s to in ter n at ion a l sup p o r t co nta c ts : ww w . m ode l.c o m / su pp ort / de fau lt. asp M e nt or Gra p h i cs su pp ort : ww w . m e nt or. c om /s up por tne t Up da te s Ac ces s t o t h e mo st cur r en t v e rs ion of M o d e lS im : ww w . m ode l.c o m / d o w n lo ad s/d e fa ult . asp L a t e st ve rs io n e m ai l Pl ace yo ur nam e on ou r l i st for em ail no tif ica tio n o f n e w s a nd up dat e s: ww w . m ode l.c o m / p r od uct s /i nfo r m a n t .as p M o d e lS im S E Tu tor i al B e fo re yo u be gin T- 9 B e for e you begi n P r ep ar atio n for so m e o f t h e les s o n s lea v es c e rta i n de tai l s up to yo u. Yo u wi ll d e c i de th e b e s t w a y to cr eat e d i re cto r ie s, co py fil e s, a n d e x ec ute p r o g ra ms w ith in y our o p e r ati n g s y st em . ( W hen y o u a r e op era tin g th e s i m u la to r w i t h in M o del S im ’s G U I , the i n te rfa ce i s c ons ist e nt fo r al l p l at for m s . ) E x a m p l es sh ow W i n dow s pat h s e p a ra tor s - use se par a to rs app r o p ri ate for yo ur op era tin g s y st em w h en tr yin g t h e exa m ple s . Ex amp l e de si gn s M o del S im c o m e s wi th Ve rilo g a n d V H D L ver s io ns of the de sig n s us ed in the s e less on s. Thi s a llo ws yo u t o d o t h e tut o ri al r e ga rdl e ss of w h ic h l i ce nse ty pe yo u h a ve . T h o u g h w e h a v e tr ied to m i ni mi ze the di ffer e nc es be twe e n th e V e ri log an d V H D L v e rs ion s , w e co uld n o t d o so i n all c a se s. In c a se s wh er e the d e s i gn s dif f er ( e .g ., lin e nu mb ers o r sy nta x ), y o u w ill f i nd l a n g ua ge - s p ec ifi c in st ruc tio ns. Fo llo w the in stru ct ion s th at are ap pro p r i at e fo r t h e lan g u a ge th at y o u ar e u s in g. M o de lSi m SE T u to ria l T- 10 In tro d u c t i on M o d e lS im S E Tu tor i al