13
Tutorial on Simulation using Aldec Active-HDL Ver 2.0 by Shashi Karanam, Kishore Kumar Surapathi

Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

Tutorial on

Simulation

using

Aldec Active-HDL

Ver 2.0

by Shashi Karanam, Kishore Kumar Surapathi

Page 2: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!"#$%&'(#)%"*

*+(#),-./01*)2*3"*)"#-4$3#-&*-",)$%"5-"#*&-2)4"-&*6%$*&-,-7%85-"#*%6*9/01*&-2)4"2:*;<-*(%$-*%6*

#<-* 2=2#-5* )2* 3*9/01* 2)5'73#%$:*+7%"4*>)#<*&-?'44)"4*3"&*&-2)4"*-"#$=* #%%72@* )#*53A-2*'8*3* (%587-#-*2=2#-5* #<3#* 377%>2* =%'* #%* >$)#-@* &-?'4* 3"&* 2)5'73#-* 9/01* (%&-:* B32-&* %"* #<-* (%"(-8#* %6* 3* &-2)4"@*+(#),-./01*377%>2*=%'*#%*%$43")C-*=%'$*9/01*$-2%'$(-2*)"#%*3*(%",-")-"#*3"&*(7-3$*2#$'(#'$-:*************************D#'&-"#2*(3"*'2-*+(#),-./01*#%*8-$6%$5*6%77%>)"4*#32A2E*• &-,-7%85-"#*%6*#<-*9/01*?32-&*&-2)4"2@*• 6'"(#)%"37*2)5'73#)%"*%6*#<-)$*(%&-@*• 6'"(#)%"37*2)5'73#)%"*%6*#<-*2="#<-2)C-&*(%&-@*• #)5)"4*2)5'73#)%"*%6*#<-*<3$&>3$-*)587-5-"#3#)%":**!"#$%&'($)**************************;<)2*#'#%$)37*<-782*=%'*#%*• F$-3#-*3*"->*&-2)4"*%$*3&&*:,<&*6)7-2*#%*=%'$*&-2)4"*• F%58)7-*3"&*&-?'4*=%'$*&-2)4"*• G-$6%$5*2)5'73#)%"***H%#-*E*;<)2*#'#%$)37*&%-2*"%#*-I873)"*#<-*2="#<-2)2*%$*)587-5-"#3#)%"*2#-82:***&+,&-./))

J: D#3$#*KK*91D!*;%%72*KK*+(#),-./01*L:M*

Page 3: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!

!

Page 4: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!"#!$%&%'(!')%"(%!*%+!+,)-./"'%!"*0!'&1'-!234!')%"(%.!*%+!+,)-./"'%!1*!5,6)!01)%'(,)5#!7#!$%&%'(1*8!,/%*!%91.(1*8!+,)-./"'%!81:%.!5,6!(;%!,/(1,*!(,!';,,.%!<),=!5,6)!/)%:1,6.!>,)-./"'%?.#!

!!!"!! @5/%! (;%! *"=%! "*0! .%&%'(! &,'"(1,*! ,<! 5,6)! 0%.1)%0! +,)-./"'%! "*0! '&1'-! #$#! A<! 5,6?)%! 6.1*8!.';,,&?.! &"74! 1(! 1.! )%',==%*0%0! (,!+,)-! 1*! 5,6)! &,'"&?.! 0)1:%! BC! 0)1:%D4! ".! 5,6)! (;6=7! 0)1:%! "*0! 5,6)!*%(+,)-!0)1:%!B3!0)1:%D!")%!.&,+#!E,)!*,+4!6.%!F&"70%=,G!".!5,6)!+,)-./"'%#!!

!!!!!!!!%"! $%&%'(!&'()*(+),+-./*0+1(234,4!"*0!'&1'-!5(6*#!

!

Page 5: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!!"! "#$$%&!'($)*!+,-./-0!)$12,.3/-4,$1!-%!#$%&'()*+#,*(&-.'&.&!-1+!5&2-3(4!657!(-1.3-.&!-%!/+#,8!7&-9&!4#&!:-/.&4!:&)#1$($.;!'(-1*%!-%!1$4!+&2,1&+8!"(,)*!0$1)<!!

Page 6: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!!!!!"! "#$%!&'%!(%)*+,!,-.%!#/0!1-,&!&/!23%-&%!-,(!45*26!#$%&7!8/3!&'*)!&0&/3*-59!0)%!:-,(+-&%;!-)!#/03!(%)*+,!,-.%7!!

Page 7: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!!!"!! "#$%&'!'()#!('*!*#$%&'!*%+#,-.+/!0%11!2#!*%$31(/#*!3+.,##*!45+-6#+!2/!,1%,7%'&!#$%$&'8!!!

Page 8: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

!!!"!! "#!$%&!'&($!)#*+,-./&!.01!0&)!1&,230!.*&!12,-'.4&15!!

!!!#"!! 6#7!/.0!.11!.'*&.14!&82,$203!9:;<!,#7*/&!(2'&,5!"#!/*&.$&!.!0&)!9:;<!,#7*/&!(2'&!7,203!$%&!,#7*/&!/#1&!)2=.*1!$%&'%&(!

&

Page 9: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

6

2. Compiling designs

Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler checks all the syntax and writes all the necessary information in the internal binary format. It should be clearly noted that the compiler’s ability to find errors is limited to syntax errors only. Many other errors and mistakes can be found only when performing thorough simulation. It is also important to understand that the compilation does not produce any synthesized code for implementation purposes. This task is performed in Foundation Series exclusively. 2.1 Compiling selected files

Select the file you want to compile and press button or press F11 on the keyboard. This will start compilation.

Page 10: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

7

If everything went right during the compilation, you should see check mark near your file. You can also expand the branch headed by the library icon to see that all compiled entities and architectures have been added to the project library.

check mark

compiledentities messages

fromcompiler

If the compilation process did not end with success, the compiler will produce meaningful descriptions of errors. All places in your code where errors were found will be highlighted.

errors found inthis entity

architecture hasnot beencompiled to thelibrary

located errors

Page 11: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

8

2.2 Compiling all files

The entire design can be compiled at once by pressing buttons: or . If all the entities in the design are organized in the clear hierarchical structure, the compiler will automatically recognize the top-level entity. However, if distinct hierarchies of entities exist, the compiler will leave the choice of the top-level entity for you.

More than onetop-level entitiesdetected

Page 12: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

9

3. Simulating the design

Simulation can be performed when the entire design has been successfully compiled. It means that the simulation model of all elements has been created. Simulator can be configured to stimulate all inputs to the circuit, however students should learn to write test benches – top-level testers described behaviorally. The task of test bench is to produce all the stimulation to the tested circuit to verify its correctness. Once the test bench is created, performing simulation becomes an easy task.

Simulation is performed in a graphical way – simulator plots waveforms of

all signals being of designer’s interest. To create an empty waveform click on the button . Next add desired signals by clicking on the button .

select desiredsignals

signals can be selectedfrom any level in hierarchy

Page 13: Aldec Active-HDL Simulation rev 2 · 2013. 8. 8. · 6 2. Compiling designs Compilation of the VHDL code is necessary to create simulation model of the described circuit. The compiler

10

When you are done with adding signals, you can attempt to perform simulation. There are three slightly different ways to run it: • by pressing button - the simulation will run until you will stop it by pressing

. • by pressing button - the simulation will run until specified point of time will

be reached. • by pressing button - the simulation will run for specified amount of time. The result of simulation is represented in the form of waveforms.

You can always restart simulation by pressing button .