UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

Similar documents
Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 6: Quartus II Tutorial and Practice. Name: Date:

Quick Tutorial for Quartus II & ModelSim Altera

FPGA Introductory Tutorial: Part 1

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

QuartusII.doc 25/02/2005 Page 1

Tutorial for Altera DE1 and Quartus II

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

University of Florida EEL 3701 Dr. Eric M. Schwartz Madison Emas, TA Department of Electrical & Computer Engineering Revision 1 5-Jun-17

SCHEMATIC DESIGN IN QUARTUS

Tutorial on Quartus II Introduction Using Schematic Designs

Tutorial on Quartus II Introduction Using Verilog Code

Altera Quartus II Tutorial ECE 552

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

NIOS CPU Based Embedded Computer System on Programmable Chip

UNIVERSITI MALAYSIA PERLIS

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London.

Lab 6: Integrated the Decoder with Muti-bit Counter and Programming a FPGA

Xilinx Schematic Entry Tutorial

COSC 3215 Embedded Systems Laboratory

ECE 3610 Microprocessing Systems Lab #1 Verilog Design of the TOC Using Quartus II

Quartus II Introduction Using Verilog Design

EE261 Computer Project 1: Using Mentor Graphics for Digital Simulation

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA

QUARTUS II Altera Corporation

Quartus II Introduction Using Schematic Design

CET4805 Component and Subsystem Design II. EXPERIMENT # 5: Adders. Name: Date:

ENSC 350 ModelSim Altera Tutorial

Laboratory 4 Design a Muti-bit Counter and Programming a FPGA

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Chapter 2 Getting Hands on Altera Quartus II Software

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Engineering 303 Digital Logic Design Spring 2017

eproduct Designer A Simple Design and Simulation Tutorial

Laboratory 4 Design a Muti-bit Counter

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

EE 231 Fall EE 231 Lab 2

TUTORIAL #2 HIERARCHICAL DESIGNS AND TEST FIXTURES

SOPC LAB1. I. Introduction. II. Lab contents. 4-bit count up counter. Advanced VLSI Due Wednesday, 01/08/2003

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

Xilinx Tutorial Basic Walk-through

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

Xilinx ChipScope ICON/VIO/ILA Tutorial

Start Active-HDL. Create a new workspace TUTORIAL #1 CREATING AND SIMULATING SIMPLE SCHEMATICS

Verilog Design Entry, Synthesis, and Behavioral Simulation

Using ModelSim to Simulate Logic Circuits for Altera FPGA Devices

Step 1: Downloading the source files

Quartus II Introduction Using Verilog Designs. 1 Introduction. For Quartus II 12.0

PRELAB! Read the entire lab, and complete the prelab questions (Q1- Q3) on the answer sheet before coming to the laboratory.

NOTE: This tutorial contains many large illustrations. Page breaks have been added to keep images on the same page as the step that they represent.

Introduction to Computer Engineering (E114)

FACULTY OF ENGINEERING MULTIMEDIA UNIVERSITY LAB SHEET DIGITAL INTEGRATED CIRCUIT

Using Synplify Pro, ISE and ModelSim

LAB 2: INTRODUCTION TO LOGIC GATE AND ITS BEHAVIOUR

CSE P567 - Winter 2010 Lab 1 Introduction to FGPA CAD Tools

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 10: Implementing Binary Adders. Name: Date:

Quartus II Version 14.0 Tutorial Created September 10, 2014; Last Updated January 9, 2017

EXPERIMENT 1. INTRODUCTION TO ALTERA

DKAN0011A Setting Up a Nios II System with SDRAM on the DE2

Xilinx ISE/WebPack: Introduction to Schematic Capture and Simulation

Introduction to Simulation of VHDL Designs Using ModelSim Graphical Waveform Editor. 1 Introduction. For Quartus Prime 16.1

Programmable Logic Design I

How to Get Started. Figure 3

1 Introduction 2. 2 Background 3. 3 Getting Started 4. 4 Starting a New Project 6. 5 Design Entry Using VHDL Code 13

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

CET4805 Component and Subsystem Design II. EXPERIMENT # 2: VHDL(VHSIC Hardware Descriptive Language) Name: Date:

CHAPTER 1 INTRODUCTION... 1 CHAPTER 2 ASSIGN THE DEVICE... 7 CHAPTER 3 DESIGN ENTRY CHAPTER 4 COMPILE AND VERIFY YOUR DESIGN...

Terasic DE0 Field Programmable Gate Array (FPGA) Development Board

Boise State University Digital Systems Laboratory

Tutorial 2 Implementing Circuits in Altera Devices

Experiment VERI: FPGA Design with Verilog (Part 2) (webpage: /)

CSEE W4840 Embedded System Design Lab 1

ISE Simulator (ISim) In-Depth Tutorial. UG682 (v 13.1) March 1, 2011

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

ENGR 5865 DIGITAL SYSTEMS

Complete Tutorial (Includes Schematic & Layout)

Design Flow Tutorial

Tutorial for Verilog Synthesis Lab (Part 2)

Physics 536 Spring Illustrating the FPGA design process using Quartus II design software and the Cyclone II FPGA Starter Board.

University Program 3 Kit

EE 330 Laboratory Experiment Number 11

The development board used in this class is ALTERA s DE The board provides the following hardware:

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim

Lab 2 EECE473 Computer Organization & Architecture University of Maine

ENGN 1630: CPLD Simulation Fall ENGN 1630 Fall Simulating XC9572XLs on the ENGN1630 CPLD-II Board Using Xilinx ISim

NIOS CPU Based Embedded Computer System on Programmable Chip

Tutorial: Working with the Xilinx tools 14.4

Simulating a Design Circuit Using Qsim

Lab 2: Introduction to Verilog HDL and Quartus

CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND:

Programmable Logic Design Techniques I

Revision Notes: July2004 Generate tutorial for single transistor analysis. Based on existing schematic entry tutorial developed for ECE410

Vivado Tutorial. Introduction. Objectives. Procedure. Lab Workbook. Vivado Tutorial

Altera Technical Training Quartus II Software Design

Transcription:

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180A DIGITAL SYSTEMS I Winter 2015 LAB 1: Introduction to Quartus II Schematic Capture and ModelSim Simulation This lab provides an introduction to a few of the tools you can use in EEC180A including the Quartus II design software, and the ModelSim simulation software. In this lab, you will use the Quartus II schematic capture tool for design entry and ModelSim to simulate your design. This lab will be done as a self-paced tutorial. I. SCHEMATIC CAPTURE USING QUARTUS II The ECE Department has Altera s Quartus II 13.0SP1 installed on the Windows workstations in 2110. To use one of these PCs, you should log in and create a directory for your projects. For example, you can create a folder eec180a in your My Documents folder. Then add a folder lab1 under eec180a for this lab. 1. Start Quartus II. NOTE: If you get the message: "License file is not specified" then do the following: a) Select the option that reads "If you have a valid license file, specify the location of your license file" and click OK. b) In the "License File" setup type the following: 1800@samba2.ece.ucdavis.edu and click OK 2. Click on File > New Project Wizard to start the project wizard. - Click Next once you have read the Introduction page. - On page 1, browse to your working directory such as C:/Users/name/Documents/eec180a/lab1 - Give the project and the top-level design entity the same name, such as lab1. - Click Next to move to page 2 - In this lab, you don t need to Add Files, so click Next to move to page 3. - Under the Device family section, select Cyclone II as the Family. - Under the Target device section, select Specific device selected in Available devices list and choose the device EP2C35F672C6. - Click Next to move to page 4. 1

- For Simulation, select the tool ModelSim-Altera from the drop-down box and specify the format as Verilog. (Quartus II will generate a Verilog netlist from your schematic, allowing you to easily simulate your design.) Click Next to move to page 5. - Click Finish once you have reviewed the Summary page. 3. Open a New schematic page: - Click File > New and select Block Diagram/Schematic File and click OK. - Click File > Save As and specify a file name such as lab1. Make sure the box Add file to current project is checked and click Save. 4. Start placing components on your blank schematic page: - Double-click on the blank schematic page to bring up the Symbol dialog box. You can browse through the libraries to view the various components available. - Enter 74163 as the Name and click OK. Place the component in the upper middle portion of your schematic. - Place an additional 74163 symbol on your schematic in order to build a simple 8-bit counter. One way to do this is to use the Copy and Paste options from the Edit menu, or the keyboard shortcuts. MAKING CONNECTIONS - There are two methods of drawing a net or bus between two pins. - 1) If "Rubberbanding" is on, moving a device so that one pin touches another pin can make a connection. Once this occurs, the pins are connected and moving the devices apart will show a wire or bus. "Rubberbanding" can be turned on or off using the icons on the left side of the screen. (By placing the cursor over each icon, you can display the function of each icon button at the bottom of the screen.) - 2) If "Rubberbanding" is off, a wire must be drawn between the two pins. This is done by moving the cursor to the end of a pin until it changes from an arrow to a +. Dragging the mouse from one pin to another with the LMB pressed will draw a wire. Wire the two 74163 components into an 8-bit counter circuit as shown in Fig. 1. Get and place a vcc components on your schematic and wire connect it to complete the circuit. Place input and output components on the schematic as shown in Figure 1. A convenient way to place the output pin components is to place one output part on the schematic. Label the output pin name q0 by double-clicking the pin_name and typing q0. Connect this pin to QA as shown in Figure 1. Then select it and use Ctrl-C and 2

Ctrl-V to copy and paste a new output component. This will automatically get the name q1. Next, type Ctrl-V again to get the q2 output pin, etc. MAKING CONNECTIONS BY NAME Although it isn't necessary for this counter circuit, you can also make connections by labeling wires with identical signal names. Wires with the same signal name are considered to be connected by the Altera software if the wires are on the same level of hierarchy. Note that a signal name must be very close to the wire that it is naming, otherwise the Altera software will just interpret it as text rather than a valid net name. Thus, if you move a signal name too far away from its net, it will cease to be a valid net name. You can check if a wire or bus is labeled by clicking on the wire or bus. If the text is highlighted along with the wire or bus, then it is a valid signal name. Label the RCO (Ripple Carry Output) signal which connects to the ENT and ENP (Enable) inputs of the other 74163 component as "rco1" as shown in Figure 1. To label the net, click the wire to select it and just type the name. At this point, your schematic should look like the one shown below in Figure 1. 5. Compile your design by clicking on the Start Compilation icon,, on the menu toolbar. (You can also select Processing > Start Compilation.) 6. Your design should compile without Errors, and a pop-up box should confirm that Full Compilation was successful. You can ignore any warnings. Note: If you get an Error 275062, it means two components have the same instance name. You can right-click one of the components and select Properties and give it a unique instance name. 3

Figure 1. Initial Schematic II. MODELSIM SIMULATION Once your design has been drawn in Altera s Quartus II, it is important to examine and to verify the functionality of the design. For small scale designs, it might be simpler to directly implement the design rather than simulate its functionality. However, in real world designs, logic circuits are often encompass tens of millions of logic gates making the design impossible to cost effectively implement and test. For this section, you will reuse the counter circuit from Part I, Figure 1. You will set up the simulator environment, and with the design schematic you will compile the Altera simulation model libraries, simulate your Quartus II design, and view the input/output waveforms in ModelSim to ensure correct behavior. Note: There are two parts to the simulation environment setup; the ModelSim simulation tool setup and the schematic capture setup. The ModelSim tool setup is only done one time and will remain in effect for all new and old projects. However, the schematic capture setup must be performed for every project. 1. It does not matter whether you have a project open or not. Set up the ModelSim Tool by clicking on Tools > Options 2. Under the General Tab, click on EDA Tool Options. 4

- Find the EDA Tool name, ModelSim-Altera. Enter the path location of the ModelSim-Altera installation of your local machine. For your PC installation following Appendix A below, the path should be: C:\altera\13.0sp1\modelsim_ase\win32aloem - The path to the ModelSim-Altera executable might already be entered from a previous section or by default. Double-check the EDA Tool Options settings as shown in Figure 2, to make sure the path is correct. If the incorrect path is set, an execution error will occur and ModelSim-Altera will not automatically open during project simulation. Figure 2. Tool options setting in Altera Quartus II for Windows OS 3. If the project containing the counter in section I is not open, open it. 4. Click on Assignments > Settings 5. Under the EDA Tool Settings, click Simulation - Make sure that the Tool name is set to ModelSim-Altera. - Under the EDA Netlist Writer Settings, make sure that the Format for output netlist is set to "Verilog HDL". - The output directory where your simulation files are stored will be in a subfolder "simulation/modelsim" - Your settings should look like Figure 3. 5

- Click Apply, and then click OK to exit the from the Settings window. Figure 3. Settings dialog box to set up the simulation environment 6. Make sure all previous ModelSim windows are closed. Multiple ModelSim programs running can cause compiling errors. 7. Compile the entire design, and run the Gate Level Simulation by pressing the icon. A pop-up box will appear asking you to select which Timing model to run. From the drop down menu, select "Fast Model" and press Run. 8. ModelSim will open and your design will be automatically transferred to ModelSim. Verify this by looking at "work" folder in the Library list window. If the Library window is not open, select View > Library to open it. Click on the + to expand the work library. You should see your Lab1 project name, which is a Verilog netlist output file, in the work Library. 9. To simulate your design, select Simulate > Start Simulation from the toolbar menu. Click on the Design tab and select your design file in the work library. In Figure 4, the Verilog netlist file, lab1, has been selected. 6

Figure 4. Selecting your Verilog netlist output file to simulate 10. Next, click the Libraries tab in the same Start Simulation dialog box. Click the Add button to the left of the Search Libraries (-L) pane. A Select Library dialog box will pop up. Select the down arrow and scroll down through the list of libraries. Select cycloneii_ver, as shown in Figure 5. Figure 5. Selecting the cycloneii_ver library 7

11. Click OK to close the dialog box. Your screen will update and show you the "sim- Default", the "Objects", and the "Processes (Active)" window as shown in Figure 6. Figure 6. Simulation windows updated 12. You may or may not have the waveform viewer open. If not, click on View and select Wave. This will display the waveform viewer window. 13. You are now ready to simulate and view the values of the signals in your design. Let's add some signals we want to inspect into the Wave window. With your top-level design file highlighted in the sim-default window, drag and drop the clk, reset, rco, and the q0 to q7 signals from the Objects window into the Wave window. (Another method is to select clk and reset and the other signals in the Objects window, right-click and select Add Wave.) 14. For the simulation to function, you need to set up the input stimulus on the input pins of your design. Right-click on the clk signal, and select Clock... The Define Clock window will pop up and from here we can set parameters of the clock. Set the clock period to 8

100000, where picoseconds are the default time units. Leave the other settings at their default values and select OK to close the Define Clock window. 14. Right-click on the reset signal and select Force... The Force Selected Signal window will pop up. This window is used to force signals in your design to logic 0 or logic 1. Enter the digit 1 (one) in the Value field and select Drive in the Kind field. Press OK to save changes and close the window. 15. You are now finished with setting up the input stimulus. Enter 1000 ns time in the simulation toolbar in order to simulate 10 clock cycles, and click the Run icon,, as shown in Figure 7. You can also type in the command line 'run 1000 ns' (without quotes) and the simulation will run for 1000 ns. Another option is to press the F9 hotkey. Figure 7. Simulate Tool Bar with 1000 ns Simulation Time 15. Select View > Zoom > Zoom Full in order to display the full 10 clock cycles in the Wave window. 16. Reset the counter by forcing reset to zero and Run for 1000ns. Then force reset to 1 (one) to allow the counter to count again. Run in increments of 1000ns to observe the count. 17. Continue to simulate your design and change and set reset to zero to determine whether or not your design functions as expected. You can restart your simulation at any time by selecting Simulate/Restart 18. We could continue the simulation now and view the q0-q7 signal individually. However, since these outputs form an 8-bit counter, it is more convenient to group the signals together and view the count value in hexadecimal form. Highlight q7 to q0 by holding the Shift key down as you select each one; right click and select Combine Signals. The Result name could be something like q7_to_q0, and the radix should be hexadecimal. You can right-click on the q7_to_q0 node and select Top Down or Top up to reverse the order of the bits in the group, if necessary. To change the radix, right click on the q7_to_q0 and select Radix>Hexadecimal. Your combined signals should look similar to those of Figure 8. 19. Run the simulation to observe the combined count signals. Observe at what count the rco pulse occurs.. 9

Figure 8. Simulation Output 20. Demonstrate to your TA that you can simulate the circuit in ModelSim by demonstrating your simulation and have your TA sign your lab verification sheet. 10