You are on page 1of 18

Quartus II and DE2 Manual

1) Start the Quartus II software. You should see a display similar to the one in Figure 1.

Fig. 1 2) To start working on a new design we rst ha e to dene a new design pro!e"t. #reate a new pro!e"t as follows$ Sele"t File %&ew 'ro!e"t (i)ard as shown in Figure 2 to rea"h the window in Figure *. You "an skip this window. 'ress &e+t to get the window shown in Figure ,.

Fig 2

Fig. *

Fig. , *) Fill in your working dire"tory name for the pro!e"t. The pro!e"t must ha e a name- whi"h is usually the same as the top.le el design entity that will /e in"luded in the pro!e"t. 0fter this "li"k &e+t to get to the window as shown in Figure 1.

Fig. 1 ,) 0dd all the files that must /e in"luded in your pro!e"t e+"ept for the pa"kages and li/raries. 0fter that "li"k on the 2ser 3i/raries i"on shown on this window. This will get you to Figure 4.

Fig. 4 1) 0dd all the li/raries and pa"kages you ha e used in your pro!e"t here. Qsim5logi" pa"kage has to /e added here. I666 li/raries and pa"kages do not need to /e added. #li"k 7k and upon returning to window in Figure 4 "li"k &e+t to get to the window as shown in Figure 8.

Fig. 8 4) #hoose the 9e i"e Family name as #y"lone II- pin "ount 482- speed grade 4- and pa"kage F:;0and from the list of a aila/le de i"es- "hoose the de i"e "alled 6'2#*1F482#4 whi"h is the F';0 used on 0ltera<s 962 /oard. 'ress &e+t- whi"h opens the window in Figure =.

Fig. = 8) (e "an spe"ify any third.party tools that should /e used for the pro!e"t. For this pro!e"t we need to "hoose the >odelsim?@A93) tool under the 690 Simulation Tool option. 0fter Sele"ting this tool press &e+t.

=) 0 summary of the "hosen settings appears in the s"reen shown in Figure B. 'ress Finish- whi"h returns to the main Quartus II window- /ut with the new pro!e"t spe"ified in the display title /ar.

Fig. B B) The @A93 "ode in the le is pro"essed /y se eral Quartus II tools that analy)e the "ode- synthesi)e the "ir"uit- and generate an implementation of it for the target "hip. These tools are "ontrolled /y the appli"ation program "alled the Compiler. Cun the #ompiler /y sele"ting 'ro"essing %Start #ompilationor /y "li"king on the tool/ar i"on that looks like a purple triangle as shown in Figure 1D. 0s the "ompilation mo es through arious stages- its progress is reported in a window on the left side of the Quartus II display as shown in Figure 11. Su""essful ?or unsu""essful) "ompilation is indi"ated in a pop. up /o+. 0"knowledge it /y "li"king 7E- whi"h leads to the Quartus II display as shown in Figure 12. In the message window- at the /ottom of the gure- arious messages are displayed. In "ase of errors- there will /e appropriate messages gi en. (hen the "ompilation is nished- a "ompilation report is produ"ed. This window "an /e opened at any time either /y sele"ting 'ro"essing %#ompilation Ceport or /y "li"king on the i"on. The report in"ludes a num/er of se"tions listed on the left side of its window.

Fig. 1D

Fig. 11

Fig. 12 1D) Quartus II software displays messages produ"ed during "ompilation in the >essages window. If the @A93 design le is "orre"t- one of the messages will state that the "ompilation was su""essful and that there are no errors. If the #ompiler does not report )ero errors- then in that "ase a message "orresponding to ea"h error found will /e displayed in the >essages window. 9ou/le."li"king on an error message will highlight the offending statement in the @A93 "ode in the Te+t 6ditor window. Similarly- the #ompiler may display some warning messages. Their details "an /e e+plored in the same way as in the "ase of error messages. #orre"t the errors if any and re"ompile the design. 11) 0fter #ompilation is done- Simulation needs to /e done to erify the "orre"tness of the design. To run the simulation go to 0ssignments >enu and "li"k Settings. In the window that pops up- under the Simulator Settings- set the Simulation >ode to Fun"tional as shown in Figure 1*. If you want to use the .do file for your simulations you "an spe"ify the file under the 690 Tool Settings.%Simulation as shown in Figure 1,. 0fter these settings are done go to Tools >enu and run the 690 Simulation Tool .%690 CT3 Simulation- this will pop up the >odelsim window in whi"h the simulation "an /e performed. If you are using .do file to run your simulation you need to spe"ify the working dire"tory where your design is "ompiled as shown in Figure 11.

Fig. 1*

Fig. 1,

Fig. 11 11) 9uring the "ompilation- the Quartus II #ompiler was free to "hoose any pins on the sele"ted F';0 to ser e as inputs and outputs. Aowe er- the 962 /oard has hardwired "onne"tions /etween the F';0 pins and the other "omponents on the /oard. 'in assignments are made /y using the 0ssignment 6ditor. Sele"t 0ssignments %'ins to rea"h the window in Figure 14. 2nder #ategory sele"t 'in to rea"h window in Figure 18. 9ou/le."li"k on the first "ell whi"h is highlighted in /lue in the "olumn la/eled To. The drop.down menu in Figure 1= will appear. #hoose the ports and assign the pin num/ers to them from the 'in 0ssignment >S6+"el Sheet gi en to you. 0fter all the pins are assigned to sa e the assignments made- "hoose File %Sa e as shown in Figure 2D. You "an also simply "lose the 0ssignment 6ditor window- in whi"h "ase a pop.up /o+ will ask if you want to sa e the "hanges to assignmentsF "li"k Yes. Ce"ompile the "ir"uit- so that it will /e "ompiled with the "orre"t pin assignments.

Fig. 14

Fig. 18

Fig. 1=

Fig. 1B

Fig. 2D 12) The F';0 de i"e must /e programmed and "ongured to implement the designed "ir"uit. The reGuired "onguration le is generated /y the Quartus II #ompiler<s 0ssem/ler module. 0ltera<s 962 /oard allows the "onguration to /e done in two different ways- known as HT0; and 0S modes. The "onguration data is transferred from the host "omputer to the /oard /y means of a "a/le that "onne"ts a 2S: port on the host "omputer to the leftmost 2S: "onne"tor on the /oard. In the HT0; mode- the "onguration data is loaded dire"tly into the F';0 de i"e. The a"ronym HT0; stands for Hoint Test 0"tion ;roup. If the F';0 is "ongured in this manner- it will retain its "onguration as long as the power remains turned on. The "onguration information is lost when the power is turned off. The se"ond possi/ility is to use the 0"ti e Serial ?0S) mode. In this "ase- a "onguration de i"e that in"ludes some Iash memory is used to store the "onguration data. Quartus II software pla"es the "onguration data into the "onguration de i"e on the 962 /oard. Then- this data is loaded into the F';0 upon power.up or re"onguration. Thus- the F';0 need not /e "ongured /y the Quartus II software if the power is turned off and on. 1*) (e will /e using 0"ti e Serial mode of "onfiguration. In this "ase- the "onguration data has to /e loaded into the "onguration de i"e on the 962 /oard- whi"h is identied /y the name 6'#S14. To spe"ify the reGuired "onguration de i"e sele"t 0ssignments %9e i"e- whi"h leads to the window in Figure 21. #li"k on the 9e i"e J 'in 7ptions /utton as shown in Fig. 22 to rea"h the window in Figure 2*. &ow- "li"k on the #onguration ta/. In the #onguration de i"e /o+ ?whi"h may /e set to 0uto) "hoose 6'#S14 and "li"k 7E. 2pon returning to the window in Figure 22- "li"k 7E. Ce"ompile the designed "ir"uit.

Fig. 21

Fig. 22

Fig. 2* 1,) #onne"t one end of the 2S: to the "omputer and se"ond to the 2S: :laster port shown in Figure 2,. 0lso "onne"t the 0dapter to the B@ 9# 'ower Supply #onne"tor. Flip the C2&K'C7; swit"h the 'C7; position for "onfiguring it in 0S mode. 'ress the 'ower 7&K7FF swit"h to power up the F';0.

Fig. 2, 11) Sele"t Tools %'rogrammer to rea"h the window in Figure 21. In the >ode /o+ sele"t 0"ti e Serial 'rogramming as shown in Fig. 24. If you are "hanging the mode from the pre iously set HT0; modethe pop.up /o+ will appear- asking if you want to "lear all de i"es. #li"k Yes. >ake sure that the Aardware Setup indi"ates the 2S:.:laster. You "an setup the Aardware as shown in Fig. 28. If the "onguration le is not already listed in the window- press 0dd File. The pop.up /o+ will appear. Sele"t the le .pof of the pro!e"t designed form your working dire"tory and "li"k 7pen. 0s a result- the "onguration le .pof will /e listed in the window. This is a /inary le produ"ed /y the #ompiler<s 0ssem/ler module- whi"h "ontains the data to /e loaded into the 6'#S14 "onguration de i"e. The e+tension .pof stands for 'rogrammer 7/!e"t File. 2pon returning to the 'rogrammer window- "li"k on the 'rogramK#ongure "he"k /o+- as shown. 'ress Start in the window in Figure 2=. 0n 369 on the /oard will light up when the "onguration data has /een downloaded su""essfully. 0lso- the 'rogress /o+ in Figure 2B will indi"ate when the "onguration and programming pro"ess is "omplete.

Fig. 21

Fig. 24

Fig. 28

Fig. 2=

Fig. 2B 14) Aa ing downloaded the "onguration data into the F';0 de i"e- you "an now test the implemented "ir"uit. Flip the C2&K'C7; swit"h to C2& position and 'ower 7ff the :oard on"e and then 'ower up again to test it. If you want to make "hanges in the designed "ir"uit- rst "lose the 'rogrammer window. Then make the desired "hanges in the @A93 design le- "ompile the "ir"uit- and program the /oard as e+plained a/o e.

You might also like