Home

EET 1131 Lab #4 Introduction to Quartus II Software

image

Contents

1. How long the simulation should run This is called the end time In our case we have four input variables and we want to simulate all possible combinations of these four inputs That s a total of 16 possible combinations Therefore since we re allowing 1 ps for each input combination our end time will be 16 ps 3 Select Edit gt Grid Size from the menus In the resulting dialog box set Period to and set the unit to us Then press OK EET 1131 Lab 4 Page 7 Revised 12 29 2014 4 Select Edit gt Set End Time from the menus In the resulting dialog box set End Time to 16 and set the unit to us Then press OK Your window should now look like this Fle Eat Vew Smuain Heb 9 a aon EIEN XEN BE NS HE 12 Yd as gt ms BK Moter Tmo bori ops a _ pote os Ieeerva 0p Sat ef 7 Mow eow sow igw gut mgu 160uwil time vana EE i a Go i f Next you need to add the input and output variables that you want to simulate 5 Near the left edge of the window double click in the blank area under the word Name The following dialog box should open Vabe ype Seve Node Ende ge sn SCY i stati PT I Display gray code count as binary count 6 Type a in the Name box and press OK 7 Repeat the previous two steps several times to add b d and x in the Name column underneath a Next how do you tell Quartus II to step through all of th
2. Add Hardware sea oat UO Remove Hardwire Press the Close button Back in the main dialog box verify that the words USB Blaster USB 0 now appear to the right of the Hardware Setup button as shown below File Edt vew Processing Tool Widow Heb Y m Hardware Setup Us8 Blaster US8 0 Mode Tac TT Enable ratio ISP tallow background programming for MAX 11 and MAX V dose y Progress Make sure there s a check in the checkbox under the words Program Configure next to your output file s name Then press the Start button You should see a progress bar telling you the status of the download The download should complete with no error messages EET 1131 Lab 4 Page 13 Revised 12 29 2014 Part 7 Testing the Programmed FPGA The first page of this lab shows the truth table for the expression that you ve just burned onto the chip Now let s verify that the chip behaves as expected Procedure 1 Examine the slide switches on the DE2 115 Each one produces a LOW or 0 when it s slid toward you and a HIGH or 1 when it s slid away from you 2 DO NOT use a pencil to move the slide switches since graphite from the pencil can foul the switch contacts and cause the switch to fail Use your fingertip or a small screwdriver instead 3 Use the slide switches to run through all possible combinations of the input variables Using a straight edge record your results in a truth t
3. After you ve entered the five pins numbers close the Pin Planner window Then select File gt Save Project from Quartus II s menus Your bdf file which should still be open now displays the pin numbers that you ve assigned to the inputs and outputs as shown below pe 1 all Paps Compile your design again by selecting Processing gt Start Compilation from the menus After a delay you should get a message telling you that compilation was successful with some warnings Press the OK button EET 1131 Lab 4 Page 11 Revised 12 29 2014 Part 6 Downloading Your Design to the FPGA Now you re ready to program the chip Procedure 1 Plug one end of a USB cable into your computer s USB port and the other end into the leftmost USB port on the top edge of the DE2 115 board 2 Make sure that the power cord is plugged into a wall socket and the other end is plugged into the DE2 115 board Press the DE2 115 s red ON OFF switch The DE2 115 s LEDs should light up 3 In Quartus II select Tools gt Programmer from the menus The dialog box shown below will open Hee Stn aoe T Enable real time ISP to allow background programming For MAX TI and MAX Y devices Fie Deve chechan Uereods programy vey Contig pester RE r output flesh abttogesa EPACELISZS 00S62ABO 00562480 kd hd 5p In the picture above notice the words No Hard
4. that we can see with our eyes To do this we ll use a circuit called a frequency divider As its name suggests if we give it an input signal of a certain frequency it will produce an output signal with a lower frequency If the input frequency is 50 MHz and the frequency divider divides the frequency by 16 what will the output frequency be Now if we divide that frequency by 16 again what will the frequency be Now if we divide that frequency by 16 four more times what will the frequency be 1 Create a New Project Following the steps that you performed above in Part 1 of this lab create a new project called Lab4BlinkingLED in a new folder named Lab4BlinkingLED 2 Create the Block Diagram Schematic File Following the steps that you performed above in Part 2 create a new bdf file In your bdf file build the schematic shown below Two new symbols that you ll need for your design are the ones named freqdiv and VCC Name your input pin elkin and name your output pin elkout Save this file under the name Lab4BlinkingLED bdf ES ae 3 Compile the Project Compile your design as you did above in Part 3 You should get some warnings but no errors 4 Assign Input and Output Pin Numbers Referring to the DE2 115 s User Manual find out which pin number is connected to a 50 MHz clock signal Hint Do a search for the name CLOCK _50 Following the steps that you performed above in
5. NTITY Lab4VHDL IS PORT a b c d IN BIT OUT BIT END Lab4VHDL ARCHITECTURE arc OF Lab4VHDL IS BEGIN x lt a AND b OR NOT c AND d END arc c To save your file select File gt Save from the menus and fill in the dialog box as shown below i Give this file a name of Lab4VHDL Make sure that Save as type is set to VHDL File vhd vhdl Make sure there s a checkmark in the Add file to current project box iv Press the Save button EET 1131 Lab 4 Page 18 Revised 12 29 2014 3 Compile Following the steps that you performed in Part 3 above compile your design You may get some warnings but you shouldn t get any errors 4 Simulate Following the steps that you performed in Part 4 above create a vwf file Set up your vwf file to step the input variables through all of their possible combinations as you did earlier Then run the simulation and make sure that your output variable x has the right value for each input combination Show me your simulation results 5 Assign Pin Numbers Using the DE2 115 User Manual fill in the last column of the table below in which I have selected certain switches and LEDs for your circuit s input and outputs Variable Switch or LED Pin number a sw3 b sw2 c sw1 d swo x LEDR 0 Following the steps that you performed in Part 5 above assign these pin numbers and then recompile your design 6 Download Following the step
6. Name EET 1131 Lab 4 Introduction to Quartus II Software Introduction In the steps below you ll use Altera s Quartus II software to program a simple Boolean expression into a programmable logic device This exercise will illustrate the steps of entering a design simulating it and burning it onto a programmable chip The expression that we ll use is X AB CD Here is the truth table for this expression You ll need this later in the lab to verify that your chip is working correctly In another week or so you ll know how to create this truth table yourself from scratch D Hee eee HH CCC COC COf gt Re ee coco REL OoScScOly 0o0 00 00 Cola He eH CoH co oH COSHH 0x Hor cH oP oH oH oH SOHO Part 0 Starting Quartus IT The first time you start Quartus II you ll a couple of dialog boxes that will never appear again after this first start up Follow the steps below to get Quartus IT up and running Procedure 1 From your computer s Start menu go into the Altera folder and start the program named Quartus II 13 0 sp1 EET 1131 Lab 4 Page 1 Revised 12 29 2014 2 You should soon see the dialog box shown below Select Run the Quartus IT software and press OK a a eem E bup bu arta tpt ene B anme garne nane Eo Cee You should soon see the Getting Started screen shown below I find this screen annoying and not very useful so I recommend checking the box in the lower left corner tha
7. Part 5 assign this pin number to your circuit s input pin Also assign a pin number connected to any LED to your circuit s output pin Then recompile your design EET 1131 Lab 4 Page 17 Revised 12 29 2014 5 Download Your Design to the FPGA Following the steps that you performed above in Part 6 burn your design onto the Cyclone chip 6 Test the Programmed FPGA You should find that the LED blinks on and off a few times each second Show me your working circuit 7 Close this project by selecting File gt Close Project from the menus For future use copy the Lab4BlinkingLED folder from your computer to your flash drive Part 10 A Brief Introduction to VHDL Up to now you ve been using the schematic entry method to enter your designs For complex designs the text entry method can be more efficient When using this method you type a description of your design using a hardware description language One popular tion language is VHDL Let s use VHDL to implement the same ion that you implemented above using the schematic entry method X AB CD Procedure 1 Create a New Project Following the steps that you performed in Part 1 above create a new project called Lab4VHDL in a new folder called Lab4 VHDL P Create a VHDL File a Inthe Quartus II menus select File gt New b In the resulting dialog box select VHDL File and press OK A text editor window will open Type the following VHDL program in this window E
8. able below EET 1131 Lab 4 Page 14 Revised 12 29 2014 4 After you ve verified that your truth table matches the one on this lab s first page show me your working circuit 5 Close this project by selecting File gt Close Project from the menus For future use copy the Lab4LogicGates folder from your computer to your flash drive Part 8 Programming a Counter Circuit You ve learned how to use Quartus IT to program the Cyclone FPGA chip to implement a simple circuit containing a few gates You can also design more complicated circuits that contain many 74XX chips and then burn your entire design onto a single Cyclone chip Let s keep things simple for now by just programming the Cyclone chip to behave like the 7490 counter circuit that you built in Lab 1 which is shown below 7890 To Pulse Swatch socket A fj 1 ro ers soera Fa ro evs socket gt To BCD1 s socket 5 at TO BCD1 s socket C This will require you to run through most of the steps that you performed above with the changes noted below Procedure 1 Create a New Project Following the steps that you performed above in Part 1 of this lab create a new project called Lab4Counter in a new folder named Lab4Counter Page in the New Project Wizard should look like this 2 ject Directory Name Top Level Entity page 1 of 5 What isthe poring drectory for this project What is t
9. at we ve done the work of setting up the combinations of input variables to be simulated it s time to tell Quartus II to perform the simulation 14 Select Simulation gt Run Functional Simulation from the menus A new Simulation Flow window will open and quickly display some messages that you don t need to worry about After a few seconds another new window will open with the results of your simulation It should look like this ESLER ee Peer Ar P es Se SEIE Wa ho A ZEB ES eS ae fal mete ter Io mmea mei or amf en Vane Po e Ashe amu spa Aju Tah sia Mpa Re po He Haw Obs lod i gt 00 ENER R SESS H is so J l J Je v J l i l J L J Fe w Frail gg SH pga EEN pgg HAA iy Soa o m Sit m f 15 Using the truth table from the beginning of this lab verify that the output waveform is correct for x ab d Then show me your simulation results EET 1131 Lab 4 Page 9 Revised 12 29 2014 Part 5 Assigning Input and Output Pin Numbers So far you ve simulated your design and you ve also in Part 1 told Quartus IT that you plan to download this design onto an Altera Cyclone IV EP4CE115F29C7 chip Before you actually download the design to the chip you must tell Quartus IT which pins on the chip to use for your circuit s four inputs a b c d and your circuit s one output x The Altera DE2 115 board contains many switches and LEDs Locate the bank of slide switches along
10. df will open Save this new file as part of your project by selecting File gt Save As from the menus and filling in the dialog box as follows e Give this file a name of Lab4LogicGates Thi same as your project s name Make sure that Save as type is set to Block bdf Make sure there s a checkmark in the Add file to current project box Then press the Save button name must be the gram Schematic File You ve now got an empty workspace in which you ll draw your schematic diagram This is very much like drawing a schematic diagram in Multisim although there are differences that you ll get used to as you practice 4 Si 6 Right click your mouse anywhere in the empty workspace In the shortcut menu that appears select Insert gt Symbol In the Name box type and2 This is the name for a two input AND gate Then press the OK button Move your mouse to wherever you d like to place the AND gate and press your left mouse button Repeat the steps above to place another two input AND gate a two input OR gate which is called or2 and an inverter which is called not EET 1131 Lab 4 Page 5 Revised 12 29 2014 9 Next follow these steps to place four input pins and one output pin Right click in the empty workspace e Select Insert gt Symbol Inthe Name box type input Then press OK Place the input pin to the left of the gates Repeat for three more input pins and
11. e possible input combinations for a b c and d The easiest way is to tell Quartus TI to treat each of these inputs as a clock with each input having a period half as long as the input before it In reality we don t plan to use these four inputs as clock inputs But this is an easy way to get Quartus II to step through all possible input combinations 8 Highlight the variable name a in the Name column by clicking it 9 Select Edit gt Value gt Overwrite Clock from the menus In the resulting dialog box set Period to 16 and set the unit to us Then press OK EET 1131 Lab 4 Page 8 Revised 12 29 2014 10 Similarly select b and make it a clock with a period of 8 us 11 Then select c and make it a clock with a period of 4 ps 12 Finally select d and make it a clock with a period of 2 us At this point your timing diagram should look as shown below Notice that a b c and d step through all possible combinations Since we haven t run the simulation yet the value of output variable x is unknown as indicated by the crossed diagonal lines Pe tit Vow wo oy kakertaan YE He WR Ta Moter Tma tes ops gt porter ors iterat 0p sat oe tnd ors r ce fee tae tg gue ae mpa peg Co ee ee Toe v J 1 J io so i a E a ee Z Eue m i mp SE og E pap S p py GE ag AA g x ox EA EEEE RENN IR NOH 13 Save your file by selecting File gt Save from the menus Now th
12. ext button Page 3 of the New Project Wizard will appear asking you to specify the chip onto which you will burn your design Fill in this dialog box as follows Inthe Family drop down box select Cyclone IV E Under Available devices select EP4CE115F29C7 which is near the bottom of the list Press the Next button Page 4 of the wizard will appear letting you specify settings for any electronic design automation tools EDA tools that you ll be using in addition to Quartus II Since you won t use any other EDA tools just press the Next button Page 5 of the wizard will appear asking you to confirm everything you ve entered It should look like this EET 1131 Lab 4 Page 4 Revised 12 29 2014 10 Press the Finish button Part 2 Creating a Block Diagram Schematic File There are two main ways to enter a design in Quartus IT The first way which you ll learn now is to draw a schematic diagram much as you would in Multisim When you do this you save the diagram in a file called a block diagram schematic file The other way which you ll learn later is to type a description of your design using a special language called VHDL In this part of the lab you ll use the schematic diagram method to implement the Boolean equation X AB CD Procedure T 2 In the Quartus II menus select File gt Ne In the resulting dialog box select Block Diagram Schematic File and press OK A new window named Block1 b
13. formed above in Part 5 assign this pin number to your circuit s input pin Also refer to the manual to find out which pin numbers are connected to the four rightmost green LEDs Assign these pin numbers to your circuit s output pins with output QA connected to the rightmost LED output QB connected to the next LED and so on Then recompile your design 6 Download Your Design to the FPGA Following the steps that you performed above in Part 6 but this time you should be able to skip the steps to set up the USB Blaster burn your design onto the Cyclone chip 7 Test the Programmed FPGA You should find that the four LEDs count up in binary as you press the pulse switch Show me your working circuit 6 Close this project by selecting File gt Close Project from the menus For future use copy the Lab4Counter folder from your computer to your flash drive Part 9 A Blinking LED As you know from previous labs you can use the red trainer s built in function generator to produce a signal that switches between HIGH and LOW at a frequency of your choice EET 1131 Lab 4 Page 16 Revised 12 29 2014 The DE2 115 doesn t have a function generator with adjustable knobs but it does gives you a way to produce signals that switch between HIGH and LOW Let s see how to do it First let s do some calculations One of the Cyclone s input pins carries a clock signal whose frequency is 50 MHz We ll need to reduce that to a low enough frequency
14. he name of this project c usersinickreederfOocunents LabsCounter Lab acourter Whats the name of the top evel design entity for this project This name is case LabACounter Use Exiting Project Settings 2 Create the Block Diagram Schematic File Following the steps that you performed above in Part 2 create a new bdf file In your bdf file build the schematic shown below Two new symbols that you ll need for your design are the ones named 7490 and GND As shown below name your input pin CLKA EET 1131 Lab 4 Page 15 Revised 12 29 2014 and name your output pins QA QB QC and QD Save this file under the name Lab4Counter bdf 3 Compile the Project Compile your design as you did above in Part 3 You should get some warnings but no errors 4 Simulate Your Design Following the steps that you performed above in Part 4 create a vwf file that displays your circuit s one input and four outputs Set the grid size to 1 us and the end time to 16 us Also configure the CLKA input to behave as an Overwrite Clock with a time period of 1 us When you run the simulation you should find that the four output bits count in binary from 00002 to 10012 and then repeat Show me your simulation results 5 Assign Input and Output Pin Numbers Referring to the DE2 115 s User Manual find out which pin number is connected to the leftmost push button Following the steps that you per
15. oka but if you have any errors then you ve done something wrong above and need to fix it before you proceed 2 Press the OK button Part 4 Simulating Your Design At this point you could download your design onto the chip But first you should simulate it in software to make sure that your design will produce the correct output s In many cases you ll catch mistakes at this point which you can correct before you burn the design onto the chip This will save you time since Quartus II can test your design in the virtual world faster than you can test it in the real world To simulate your design you must first create a vector waveform file VWE Procedure 1 Select File gt New from the menus In the resulting dialog box select University Program VWF and then press OK A new file will open in a new window named Simulation Waveform Editor P Save this new file as part of your project by selecting File gt Save As from the menus and filling in the dialog box as follows e Give this file a name of Lab4LogicGates Make sure that Save as type is set to University Program VWF vwf e Make sure there s a checkmark in the Add file to current project box Then press the Save button Next you must set up the timing for your simulation which involves telling Quartus IT two things How often it should change the input values This is called the grid In the steps below we ll set the grid size to 1 ps
16. one output pin Arrange the symbols so that your workspace looks like this 10 To change the name of an input pin or output pin simply double click its current name Do this now renaming your input pins to a b and d from top to bottom Also rename your output pin to x 11 Now you must wire these gates and pins to each other This is similar to drawing wires in Multisim but it s a little different In Multisim to draw a wire you click and release the mouse button and then move the mouse In Quartus II you must hold the mouse button down as_you move the mouse don t release the mouse button until you ve reached the point that you want the wire to go to Do this now wiring your symbols together so that your drawing looks like thi 12 Save your file by selecting File gt Save from the menus Part 3 Compiling the Project Next you ll compile your design In this step Quartus TI does a number of things It checks your design for errors It also generates the code needed to program your design into the specific chip that you selected earlier EET 1131 Lab 4 Page 6 Revised 12 29 2014 Procedure 1 Select Processing gt Start Compilation from the menus Compilation will take a minute or so during which you should see a spinning clock circle in the screen s lower right corner Eventually you should see a message telling you that full compilation was successful with some number of warnings Warnings are
17. s that you performed in Part 6 above download your design to the Cyclone chip 7 Test After testing your circuit s operation show me your working circuit 8 Close this project by selecting File gt Close Project from the menus For future use copy the Lab4VHDL folder from your computer to your flash drive EET 1131 Lab 4 Page 19 Revised 12 29 2014
18. t says Don t show this screen again Then close this screen by clicking the X in its upper right corner 9 Now you re into Quartus II and your screen should look as shown below You might see a small Tips and Tricks window I recommend closing it Maximize the window so that it fills your computer screen EET 1131 Lab 4 Page 2 Revised 12 29 2014 Part 1 Creating a Project Any design task using Quartus II involves a large number of files You create some of these files yourself such as e A block diagram schematic file whose filename ends in bdf e A vector waveform file whose filename ends in vwf In addition to the files that you create Quartus automatically creates many others All of these files are stored as a project inside a single folder on your computer So when you start working on a new design your first step will be to create a new project Procedure 1 Choose File gt New Project Wizard You ll see the Introduction screen shown below Click the Next button xi Introduction The ew Projact Ward heips you create a naw project andi primary project setings cing the folowing Project name ara directory Na of the top oe desi entty Project Fles and ibvaries Tape ganar eee terer ote oe stead ject de setts w the eins command sont mer You can se the various papes of the Settngs dlalog box to add Functionality to the project 2 As shown below you ll see page 1 of the Ne
19. the board s lower edge Notice that these switches are labeled SWO through SW17 You ll use four of these switches to enter the values of your inputs a b c and d Also locate the bank of red LEDs just above the slide switches You ll use one of these LEDs to display your output x AIl of the switches and LEDs are hard wired to certain pins on the Cyclone IV chip The DE2 115 User Manual on the course website tells you which devices are connected to which of the chip s pins Look now the tables on pages 36 37 of the User Manual Note that for example the rightmost switch SW 0 is connected to pin AB28 on the chip Using these tables fill in the last column of the table below in which I have selected certain switches and LEDs for your circuit s input and outputs Variable Switch or LED Pin number a swi7 b SW16 c swis d swi4 x LEDR 17 Procedure 1 In Quartus II select Assignments gt Pin Planner from the menus You ll see the Pin Planner window shown below Notice that near the bottom of this window your input and output names are listed in the Node Name column EET 1131 Lab 4 Page 10 Revised 12 29 2014 Sow Sm ogale SC ee lalla Double click in the Location column of the first row the row whose Node Name is a Then type Y23 and press your keyboard s Enter key Repeat the previous two steps several times entering the pin numbers for your other inputs and outputs
20. w Project Wizard which asks you for three things a working directory a project name and a top level entity name ew Project waard x Directory Name Top Level Entity page 1 of 5 Wae e the wins ety for ts ropet What isthe name of tis poet Ti Wat them of the top inve design ety For hs project Tis namme is case sre and rust exact atch the erty name ite de fie Use Exiting Project Settings 3 For the working directory click the button labeled A dialog box named Select Folder will open Navigate to the My Documents folder and click the Select Folder button You should now see C Users nick reeder Documents but with your name instead of mine in the first box At the end of this type Lab4LogicGates 4 For the name of the project type Lab4LogicGates Notice that as you type this in for the project s name it also appears in the third box which is for the name of the top level design entity You should always use the same name for your working directory your project and your top level design entity So your filled in dialog box will look like this EET 1131 Lab 4 Page 3 Revised 12 29 2014 Press the Next button and you ll see a message asking if you want to create the directory C Users nick reeder Documents Lab4LogicGates Click Yes You ll see page 2 of the New Project Wizard which lets you add files to your project You don t have any files to add so just press the N
21. ware to the right of the Hardware Setup button near the top of the picture The first time you use your computer to program the DE2 115 your screen will probably also say No Hardware and so you must complete the next few steps to configure the hardware connection But when you re working on future projects you should see the words USB Blaster USB 0 instead of No Hardware Then you can skip these next few steps 4 Press the Hardware Setup button The Hardware Setup dialog box shown below will open EET 1131 Lab 4 Page 12 Revised 12 29 2014 Hardware Settings JTAG Settings Select a programming hardware setup to use when programming devices This programming hardware setup applies only to the current programmer window current selected naraware Jno narawara E Available hardware items p e a Press the Add Hardware button An Add Hardware dialog box will open e For Hardware type select USB Blaster For Port select USB 0 e Press OK Back in the Hardware Setup window use the drop down box to select USB Blaster USB 0 instead of No Hardware so that your dialog box looks like this Hardware Setup Taare sate rac Stig xj Select a programming hardware setup to use when programming devices This programming window hardware setup apples ony to the current programmar Currently selected haroa Available hardware rems Hardware server rot

Download Pdf Manuals

image

Related Search

Related Contents

Instructions  Klip Xtreme KFM-330 flat panel wall mount  Yamaha A-S300    Service Manual - Manuales de Service  Surftest SV-600 - RDR Electronics Inc  G-Major Manual  取扱説明書 - Panasonic  DV-696AV-S DV-696AV-K  PRAIRIE RIDGE  

Copyright © All rights reserved.
Failed to retrieve file