Sie sind auf Seite 1von 10

SHORT TUTORIAL ON ALTERA Quartus II

Background: The UP2 Education Board is a stand-alone experiment board based on a FLEX 10K device and includes a MAX 7000 device. When used with the Quartus II software, the board provides a superior platform for learning digital logic design using industrystandard development tools and PLDs. This board is designed specifically to meet the needs of instructors and students in a laboratory environment. The UP2 Education Board supports both look-up table (LUT) -based and product term-based architectures. This device can be configured in-system with the ByteBlaster II download cable.

Tutorial In this tutorial, we will implement a simple circuit as shown below with AND, NAND and NOR functions to provide an introduction to the Altera Quartus II software.

Figure 1 - A simple circuit with AND, NAND and NOR gates

Part 1 - Design Entry Using schematic Capture


Step 1

A. Design Using the Graphic Editor 1. Start Quartus II software. Choose File New Project Wizard. In the new window select Next, then in the next window set your desired working directory (always create a new directory for a new circuit, call it iti_tutorial) then choose iti_tutorial for your file name and top-level design entity. Press Next. 2. We have no existing files, so in the new window click Next. 3. In the next window choose MAX7000S as target device family and in the list of available devices choose EPM7128SLC84-7 and press Finish.

B. Creating the Schematic 1. Select File New. A window appears that allows you to choose the type of file that should be created. Choose Block Diagram/Schematic File and click OK. An empty Block Editor window will appear. 2. Double click on the blank space inside the Block Editor display to open the directory labelled Libraries which lists several available libraries including Primitives library. Expand the directories to find a list of the Logic gates available in the Primitive library. 3. Scroll down in the Symbol Files box and double click on nor2. The symbol should appear in the center of the Graphic Editor. 4. Repeat these steps for nand2 and and2 gates.

C. Assigning Output and Input pin 1. Open the Primitives Library again. 2. Scroll down past the gates until you reach pins. 3. Double click on Output. The symbol should appear on the Graphic Editor. 4. Repeat these steps and select an Input symbol.

5. With the right mouse button copy and paste three more Input symbol.

D. Connecting the Symbol 1. Go to the end of a symbol with the mouse and when the cross-symbol cursor appears drag the wire to the point to connect to, see diagram below for the connection. 2. Repeat the previous step for all connections. 3. If a wire is not properly run, just select it (wire turns red) and hit delete to remove it. 4. If you have problem running the wire from one point completely to another, try running half way from both devices. Also you can zoom in and out at any time. 5. The mouse can also be used to move a wire to the desired position. 6. Now, your diagram should look like the one below.

Figure 2 - Schematic with input and output wired E. Editing Pin Names 1. Double click on the pin_name1 on your first input symbol to select it. 2. Rename the pin as shown below. 3. Repeat for all input and output pins. 4. Compile your circuit by going to Processing menu and clicking on Start Compilation. 5. If asked save the file as iti_tutorial.bdf in the same name folder. This is your top level entity. 6. The project should compile with 0 errors. If any errors appear verify if you

have performed the entire steps correctly.

Figure 3 - Schematic Ports Name

F. Assign PIN Numbers 1. From Quartus II main menu choose Assignments Assign Pins. 2. Double click on row 1 column To and choose pin name A, and under locarion choose PIN_34. 3. Repeat these steps for pin numbers 33, 36, and 44 for pin names B, C, and D. See table below for all the necessary information. 4. Repeat the same steps for pin number 45 and output pin Y. 5. Save your work. 6. Close all the windows except your top level entity.

Pin Name

Device (external connection) A 34 SW1-1 B 33 SW1-2 C 36 SW1-3 D 44 SW1-4 Y 45 LED1 Table 1 Device Pin connections and name

Pin Number

G. Compiling your Project 1. Select Processing Start Compilation. 2. After complication you should revive Full complication was successful message.

3. The project should compile with 0 errors. If any errors appear verify if you have performed the entire steps correctly. 4. Close all the windows except your top level entity.

Step 2 A. Simulating your project 1. Select File New Other Files Vector Waveform File and click OK. 2. From the main menu, select EditInsert Node or Bus. 3. Click on Node Finder. 4. Choose Pins: all for your filter then click Start. 5. Select (highlight) A, B, C, D and Y from Nodes Found. 6. Click on > button to have all A, B, C, D, and Y in the Selected Nodes. 7. Click OK and OK. 8. You can drag and drop the Node to have an appropriate order.

Figure 6 - Waveform Editor Window 9. Set the simulation to run from 0.0ns and 160.0ns by selecting EditEnd

Time and entering 160.0 ns. 10. Select ViewFit in Window to display entire simulation range. 11. Click and highlight A and from the side bar mane press Overwrite clock button and type 20.0 ns for its period.

12. Do the same for B: 40.0 ns, C: 80.0 ns, and D: 160.0 ns. (Figure 7) 13. Select Assignments Settings to open the settings window. Under Simulations Settings choose Mode and change the simulation mode to Timing. Press ok. 14. Go to File Save. 15. Save option would automatically select filename to be the same as the project name, click OK.

Figure 7 - Waveform Editor Window with Inputs 16. Go to main menu and select Processing Start Simulation. 17. Once simulation is done, the finish dialog box would appear. Click OK.

18. Select View Fit in Window to display entire simulation range. 19. Simulate different scenarios and explain the simulation result. Compare this

result with the truth table of the circuit.

Step 3 A. Connecting wires to the UP1/2 board 1. Connect the output of the circuit to the LED. Locate hole number 45 output around MAX chip and connect it physically with an electrical wire to the onboard LED labelled D1. 2. Connect the inputs of the circuit to four DIP switch. Locate the corresponding inputs holes around MAX chip and connect them with four wires to four DIP switches (on MAX_SW1).

B. Downloading your Project to the UP2 board 1. Make sure the Byteblaster cable is attached to the board and to the parallel port on the PC. 2. Verify that the board is properly powered using a 9V DC transformer and is attached to the DC_IN located on the corner on the UP2 board. 3. Select Tools Programmer. 4. Click on Hardware Setup button, and then click on Currently Selected Hardware button to select ByteblasterMV. Press Close. 5. Select JTAG mode. 6. Add iti_tutorial.pof using Add File button select it again if it is already selected). 7. Click and check on Program/configure square in front of iti_tutorial.pof. Small check mark should appear in that square now. 8. Click on Start Programming button programming the board. on the side menu bar to start to the list of files (Do not

Figure 8 - Programming Window 9. If successful, verify your circuit according to the simulation using four DIP switches as input and the LED as output. Remember that the LED illuminate when the input is 0 and stays OFF when the input is 1. (you can change that by inverting for out put using an inverter not gate)

Logic Value 0 1

LED Illumination ON OFF

DIP Switches Position Down Up

Find the combination of DIP switches that turn the decimal point LED segment OFF. Compare this to your simulation result and expected truth table.

Das könnte Ihnen auch gefallen