UWEC CS 278 - Quartus II Tutorial - Lab Session 1

Unformatted text preview:

Digital System Design (CS 278) Lab Session #1: Quartus II Tutorial Objective The object of this first lab in digital design is to help you gain familiarity with the Quartus II computer aided design (CAD) software. This lab will introduce you to the basic features of the Quartus II software, including how to design, compile, simulate, and implement your digital logic designs. You will learn how to use the Block Diagram Tool for schematic capture, the Text Editor Tool for Verilog programming, the Waveform Editor Tool for simulation, the Assignment Tool for setting pin assignments, and the Programmer Tool for downloading your design to the UP2 development board. Quartus II is a professional CAD tool. As such it has many features that we will never use. This can make learning to use the tool more complicated since many features don’t apply to our situation, or aren’t needed for our work. On the other hand, using a professional tool makes the educational experience highly practical, and is excellent preparation for anyone wishing to pursue CAD work in the future. Write-up At the end of this lab, you will be asked to turn in the files for your completed designs, along with answers to the questions at the end of the lab. You should place all of your Quartus project folders within one folder, zip it up (right click -> send to -> compressed file), name it “<myname>-<partnername>-Lab1.zip”, and drop it in the CS 278 Dropbox folder under W:\c s\Ernst\cs278. (Failure to follow these guidelines may result in point loss, followed by a merciless mocking from the professor regarding your reading comprehension skills). Lab Procedure Pay close attention to the following steps, and practice using Quartus II as you work through this lab. The design you are going to build is that of a 2x1 Multiplexor (MUX) using the basic logic gates of AND, OR, and NOT. In this implementation, the input S to the MUX selects either A (when S = 0) or B (when S = 1) passes through the MUX as the output. 1) Using the Block Diagram Tool and Creating a Project Every design must be part of a project, since it is the project file that maintains information about the target implementation, compiler settings, simulation settings, etc. My personal preference is to first create the design file (either a schematic, Verilog program, or waveform) and then to save that file into a project while creating the project at the same time. Here's how to do that: From the toolbar, select the New Block Diagram / Schematic File Tool. See the diagram below. This will open a drawing canvas in which you can build a schematic diagram. This schematic is also called a block diagram in Quartus II. So, a Block Diagram File (extension BDF) is just another name for a schematic capture design file. The default name for this Block Design File is Block1.bdf. You will change this name shortly, when you save the file and create the associated project.To enter basic gates into the design, you can select the Symbol Tool from the left side of the drawing canvas, or you can simply double click anywhere on the drawing canvas. The image below shows the location of the Symbol Tool. Open the libraries hierarchy until you get to the primitives/logic subgroup. You will notice that there are other subgroups to choose from as well. You’ll need the Primitives/Pin subgroup later. For now, you need two AND gates, one OR gate, and a NOT gate. Start with the AND gate (select it from the list and press OK, or just double click on it).Notice that you can insert more than one copy of a symbol by just clicking on the canvas where you want to place it. To quit inserting copies, just press escape. If you already have a symbol on the drawing canvas and you want another copy of it at a later time, hold down the control key and drag the symbol across the canvas. This creates a second copy of it at the point where you release the mouse. You will need two AND gates, an OR gate, and a NOT gate. Place them onto the canvas as I show below. You'll need to rotate the NOT gate (right click on the NOT gate to see how). You need three input pins and one output pin. Use the Symbol Tool again to insert those onto the canvas. They are in the primitives/pin subgroup of the Symbol Tools library hierarchy.Here is how things should look at this point: This is a good time to stop and save the file, and create the project at the same time. You are not done yet with the schematic capture phase, but it's always good to save your work early and often. Save the file by selecting File -> Save As. You will get a Save As dialog box as a result. It is very important to save the Block Diagram File into the correct location. I strongly urge you to create a new folder called quartus designs (the actual name you choose is not very important here) someplace on a network accessible drive (your H drive or workspace on W) and then create another folder inside that one for this particular project. You will want your Quartus designs to be kept together in some reasonable structure (inside quartus designs), but you'll also want each separate project to be in its own directory. Here is how I recommend that you set this up. Create a folder called quartus designs that is network accessible to you from anywhere you might work. Inside that folder, create a new folder called 2x1mux for this project. I recommend that you do this by selecting the Create New Folder icon from the Save As dialog. Here is the sequence: 1. Name the new folder 2x1mux, but don't save anything yet!! 2. Go into that folder and save the BDF with the name 2x1mux.bdf. Also make sure that the Create new project based on this file checkbox is selected.After you click on Open, you will get the following dialog because we are creating the project at the same time: These are good defaults. We usually want the project name to match the top-level design name, and it's also good policy (but certainly not a requirement) to have the project folder name match those as well. So just click on Finish for now. This creates a number of files in the 2x1mux folder. The one labeled 2x1mux.qpf is the actual project file. The one labeled 2x1mux.bdf is the schematic capture file you just saved.2) Working with the Block Diagram Tool You now need to connect the basic gates and pins, and then name the I/O pins. To connect the gates, just position the mouse at the end of any pin stub on a gate (or I/O pin) until the cursor changes shape to


View Full Document

UWEC CS 278 - Quartus II Tutorial - Lab Session 1

Download Quartus II Tutorial - Lab Session 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Quartus II Tutorial - Lab Session 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Quartus II Tutorial - Lab Session 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?