EE-313 – Digital Logic and Microprocessors Quartus II 12.0sp1 Familiarization Guide Quartus II Environment • The next few slides will highlight important the location of important parts of the Quartus II design environment. • Specifically, the following items will be highlighted. – – – – – Dropdown menus Shortcut toolbars Status bar Dockable Utility Windows Editor Space Shortcut Toolbars Drop Down Menus Status Bar These operate like most other Windows programs. Project Navigator Window Task Window Message Window These are the three most commonly used Utility Windows. If they are ever accidently closed, they can be restored by going to the View-> Utility Window dropdown menu. • Project Navigator Window - Allows the user to see all the components of the project and how they relate. • Task Window – Shows the progress of various tasks such as compiling and provides links to their settings and reports. • Messages Window – Provides important compiler messages such as warnings and errors that can be used in debugging. When a design file is opened for editing or a report is opened for reading, this is where it’s corresponding window is placed. Multiple files may be opened at the same time and are selectable using the tab at the top of the region. The name of the file will be shown on the selection tab. Editor/Report Space Common Dropdown Functions • There are some common operations/tools contained in the drop down menus you will need to perform while using Quartus II. • They include – File and Project Creating, Saving and Closing – Pin Assigning – Compiling – Schematic Viewing (RTL Viewer) – Programming As with most Windows programs, the File drop down menu is where you create, save, open and close things. For Quartus II, these things are projects, design files, symbol files and various other files related to a project. Design files are the meat of a project and symbol files schematic symbols representing the contents of a particular design. **** I M P O R T A N T **** You should always open or create a Project before creating a new design file! This is where you create or update symbols for your designs. (More on that later.) This is where you specify the FPGA type. This is where you can change your pin assignments. This is where you import previously defined pin assignments. Part of the design process is determining what pins will be used for the various inputs and outputs of your project. That is where the Assignment Editor And Device menu options come into play. **** I M P O R T A N T **** Always save and recompile your project after making a change to the assignments. The status of your compiling will be indicated here. Warnings and Errors will show up here. After the design is complete, it must be compiled into a form that can be used to program your FPGA or simulated. This process is started by selecting Processing>Start Compilation, pressing Control-L, or clicking the purple arrow on the shortcut toolbar. **** I M P O R T A N T **** Make sure you save any changes before compiling your project. Note that it is possible to simulate the performance results of a design. After the design is compiled, it is frequently desirable to see a schematic of the final result. This can be done using the RTL Viewer. The last step before testing is programming the FPGA. Programming sends the compiled design to the FPGA thus implementing the design. The data is passed via the USB Blaster Port. Creating a Project • A new project is created by starting the New Project Wizard. This is done by either – Selecting File->New Project Wizard from the dropdown menus – Clicking the Create A New Project button on the Quartus II opening Splash screen. • The following slides will discuss the process for creating a new project. The first step of creating a new project is selecting the working directory for the project. This is the location where all of the project’s files should be kept. It is important that you choose a unique meaningful location for all projects. After the directory is selected enter the project name and the name of your top-level design entity. The top-level design entity encompasses all lesser entities. If you were designing a house, it would be the house. Other smaller entities that make up the house might include a bedroom, bathroom, kitchen, etc. **** I M P O R T A N T **** Ensure that the project working directory name is unique. Ensure that the project working directory is contained in your own folder NOT c:\altera\anything... Ensure you remember the location and name of your project. Ensure none of the names contain spaces as this may cause issues later Click the Next > button when ready to continue. The next step is to add any pre-existing files to your project. This is how one would add and reuse components designed in a separate project. It prevents having to reinvent the wheel. If there are no existing files one can simply proceed to the next dialog box. Click the Next > button when ready to continue. The third step in the New Project Wizard is selecting the FPGA device that the project should be compiled for. Find the name of the FPGA on your Altera board to determine the correct FPGA and then select it in the list of Available devices. **** I M P O R T A N T **** Selecting the wrong device or no device will result in your project compiling but not working. Click the Next > button when ready to continue. The fourth step is to select any EDA tools that might be used in addition to Quartus II. If there are none, leave the entries as None and continue. Click the Next > button when ready to continue. Verify these make sense and follow the guidelines. Verify these match your Altera board. The last step of the New Project Wizard is to verify your entries. If there are any mistakes, click the <Back button until you reach the appropriate menu and make any necessary corrections. When all corrections are complete, click the Finish button and your new project will be created. Adding a Design File to a Project • While there are many types of design files available, only two will be discussed here. They are Schematic Block Diagram files (.bdf) and VHDL (.vhd) files. • They are added to the project by selecting File->New… from the dropdown menus. • Files that are part of a project will be listed in the Files tab of the Project Navigator. Input Pins This screenshot shows that the project contains two files. One is a VHDL file called ee313and.vhd and the other is a Schematic file called misslelaunchtoplevelentity.bdf. The Schematic file is opened in the editor where you can see three input pins, three output pins and a symbol for the VHDL file ee313and.vhd. There is another output pin that can not be seen without using the horizontal slide bar. ee313and entity symbol Output Pins Adding Components to a Schematic Components can be added to a schematic from other project entities or built in library entities. Common library entities include the primitive input/output pins and standard logic functions. Input Pin Primitive A Project Specific Entity LIBRARY Section 3 inputs and 1 output. ENTITY Section ARCHITECTURE Section While drawing a circuit using a schematic is one method of inputting your design, a second is writing a VHDL file that describes either the structure, dataflow, or behavior of the design. Note that there are three sections to a VHDL file. How the inputs and outputs are connected. Compiling a Project • Before a project can be sent to the FPGA, it must be compiled. • Start compiling by either – selecting Processing->Start Compilation – pressing Control-L – clicking the purple arrow on the shortcut toolbar. Compile Design Progress Once compiling has started, the progress bar in the Task Utility window will start to increase from 0-100%. Be patient for large designs. Errors and Warnings will show up in the Messages Utility window. Once compiling has completed, a dialog box will pop up stating it was successful and how many warnings were received or that it failed. Warnings and errors will be listed in the Messages Utility window. Learning how to sort through these warnings and errors will speed debugging and come with time and practice. Programming the Altera Board • The last step before testing is programming the FPGA. Programming sends the compiled design to the FPGA thus implementing the design. • Start the programmer by either – selecting Tools->Programmer – clicking the button the shortcut toolbar. These indicate the software is ready to program. Before programming, you must make sure the Altera board is connected to the computer via the USB-Blaster cable and that Quartus II is set up to program via the USB-Blaster. If the software is not ready to program, click the Hardware Setup button. After clicking the Hardware Setup button, select USB-Blaster. If USB-Blaster is not available, verify your cable is connect to the correct ports and then click the Add Hardware button. Select the appropriate hardware and then click the Close button. Start button after being clicked. Programming Progress Once you have verified your Hardware Setup, you can click the Start button. It will start to program the Altera board. If it fails verify your device type is correct and your RUN/PROG switch is in the RUN position. Once your programming progress is 100% you may now test your design. Thorough testing is a critical part of any design process. Have a plan for test and follow it meticulously. Document all results and steps taken to obtain said results. The End