QUARTUS NOTES by Gregory L. Moss

Similar documents
Lab 1: Full Adder 0.0

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

Physics 226 FPGA Lab #1 SP Wakely. Terasic DE0 Board. Getting Started

The 104 Duke_ACC Machine

Xilinx ISE. <Release Version: 10.1i> Tutorial. Department of Electrical and Computer Engineering State University of New York New Paltz

Quartus II Introduction for VHDL Users

Quartus II Introduction Using VHDL Design

Simulating Power Supply Sequences for Power Manager Devices Using PAC-Designer LogiBuilder

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

QUICK START GUIDE. SG2 Client - Programming Software SG2 Series Programmable Logic Relay

After opening the Programs> Xilinx ISE 8.1i > Project Navigator, you will come to this screen as start-up.

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Two's Complement Adder/Subtractor Lab L03

ASYNCHRONOUS COUNTERS

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.

PCB Project (*.PrjPcb)

What is a Mail Merge?

Embroidery Fonts Plus ( EFP ) Tutorial Guide Version

Creating Basic HTML Forms in Microsoft FrontPage

Using Xilinx ISE for VHDL Based Design

Counters and Decoders

ModelSim-Altera Software Simulation User Guide

Shortcut Keys. Edit document under cursor

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

To change title of module, click on settings

VHDL Test Bench Tutorial

Start Active-HDL by double clicking on the Active-HDL Icon (windows).

PLL frequency synthesizer

Page 1 S5.5 Monitoring Software Manual Rev 1.2 for Software Ver 1.0

3. On the top menu bar, click on File > New > Project as shown in Fig. 2 below: Figure 2 Window for Orcad Capture CIS

Employee Appointment Books. User s Manual

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Merging Labels, Letters, and Envelopes Word 2013

Module 3: Floyd, Digital Fundamental

Meridian 1 Meridian 1 Attendant PC LAN Interface Installation Guide

Lab 3: Introduction to Data Acquisition Cards

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

Lab 1: Introduction to Xilinx ISE Tutorial

Lab 17: Building a 4-Digit 7-Segment LED Decoder

Lecture 8: Synchronous Digital Systems

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Altera Error Message Register Unloader IP Core User Guide

Importing Contacts to Outlook

Introduction to Simulink

CNC Transfer. Operating Manual

Back Propagation Neural Networks User Manual

Installing a Browser Security Certificate for PowerChute Business Edition Agent

Mail Merge: Create Mailing Labels Using Excel Data and Filtering the Contents in the Data

20 Saving Device Data Backup

Module 1: Getting Started With Altium Designer

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Use Find & Replace Commands under Home tab to search and replace data.

Asynchronous counters, except for the first block, work independently from a system clock.

Finite State Machine Design A Vending Machine

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Printer Sharing of the PT-9500pc in a Windows Environment

Introduction to the Quartus II Software. Version 10.0

CHAPTER 3 Boolean Algebra and Digital Logic

Design: a mod-8 Counter

PCB Artist. Library Creation Tutorial

Create Mailing Labels from an Electronic File

Service & Support. How can you establish a connection between an S PLC and SIMATIC NET OPC? S PLC, SIMATIC NET OPC.

KiCad Step by Step Tutorial

Installing LearningBay Enterprise Part 2

Generative Drafting. Page DASSAULT SYSTEMES. IBM Product Lifecycle Management Solutions / Dassault Systemes

A QUICK OVERVIEW OF THE OMNeT++ IDE

OrCAD Capture with PSpice and Allegro DE CIS with AMS Simulator. Describes how to create a PSpice Archive File with Capture

PCB Artist Tutorial:

Data Tool Platform SQL Development Tools

Avery Wizard: Using the wizard with Microsoft Word. This is a simple step-by-step guide showing how to use the Avery wizard in word

2009 Braton Groupe sarl, All rights reserved.

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Sequential Logic Design Principles.Latches and Flip-Flops

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Making Basic Measurements. Publication Number August Training Kit for the Agilent Technologies Series Logic Analysis System

Mentor Graphics Tutorial

Viewing and Troubleshooting Perfmon Logs

Microsoft Access 2010 Part 1: Introduction to Access

PRACTICE CS. Billing WalkThrough. version 2014.x.x

VENDING MACHINE. ECE261 Project Proposal Presentaion. Members: ZHANG,Yulin CHEN, Zhe ZHANG,Yanni ZHANG,Yayuan

Let s put together a Manual Processor

WHAT S NEW IN WORD 2010 & HOW TO CUSTOMIZE IT

2012 Teklynx Newco SAS, All rights reserved.

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Microsoft Access 2010: Basics & Database Fundamentals

Managing Contacts in Outlook

Selecting a Sub-set of Cases in SPSS: The Select Cases Command

DEPLOYING A VISUAL BASIC.NET APPLICATION

28 Simply Confirming Onsite

Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced

Excel 2003 A Beginners Guide

Using Mail Merge in Microsoft Word 2003

Transcription:

QUARTUS NOTES by Gregory L. Moss Schematic capture of maxplus2 functions page 2 Drawing signal buses page 3 Sequential circuit simulation page 5 Schematic capture of megafunctions page 6 Simulation of state machines page 12 Measuring time intervals in simulations page 14 Clock frequency divider page 18 Copyright 2010 by Gregory L. Moss 1

Schematic capture of maxplus2 functions Many standard IC chips have been designed that contain common types of logic functions such as decoders, encoders, multiplexers, adders, registers, and counters. These have been used for many years to more easily and quickly design more complex logic systems. Quartus II provides an extensive set of predesigned blocks called Maxplus2 functions that duplicate many of these common logic functions. Maxplus2 functions can be used in design files as easily as gates and flip-flops. Most of these functions are named with the equivalent standard 74-series part number. Functional descriptions and operational information on 74XXX macrofunctions can be obtained from the data sheets for the equivalent standard part devices. Altera has also defined several additional useful functions. The desired function is selected with the Symbol dialog box (click the Symbol Tool button or double-click the left mouse button anywhere in the drawing area). Open the set of folders for libraries, others, and maxplus2 and select the desired function from the list. Click OK. Place and wire all devices in the schematic as you did for gates and flip-flops. Copyright 2010 by Gregory L. Moss 2

Drawing signal buses An individual signal line is called a Node line. Signal lines can be grouped together in buses for convenience. A bus is essentially an array of signal lines that are related to one another. Input signals contained in a bus can be ripped (split) out into individual signal lines, and individual output logic signals can be merged into a bus. A wide solid line indicates a bus in a bdf file. To create a bus, toggle the Orthogonal Bus Tool button on and draw using the cursor. If you start drawing a wiring line from a bus, it will automatically be drawn as a bus (wide line). If instead, you start drawing a wiring line from an individual signal, it will automatically be drawn as an individual signal line (narrow line). A drawn line can be changed from a Node line to a Bus line and vice versa by selecting the line and clicking the right mouse button to open the menu. Choose the desired line type from the menu and the highlighted line width will change appropriately. A bus must be labeled if it is split or merged. A bus does not have to be labeled if there are no individual signals broken out of the bus. A bus label has a group name that consists of the bus identifier followed by the numerical signal range in brackets, such as Q[3..0]. The signal range indicates the labels for the individual signals going into or coming out of the bus. The range of numbers also will indicate the width of the bus (i.e., number of signals contained in the bus). The individual signal lines going into or coming out of a bus must also be identified with the desired individual signal name, such as Q[3] or Q[2], etc. To label buses and signal lines, click the left mouse button while pointing at the line and then type the desired Bus or Node Name. Input and output ports that are connected to a labeled bus should have a PIN_NAME that is the same as the bus label. Buses and Nodes may be labeled with names that are different than the pinstub labels inside the symbols they are connected to. Connections between signals in a bus and a group pinstub are made in the order specified by the range order inside the respective brackets. Buses can also be merged into (or split from) larger buses. Symbols for logic blocks that are defined with group inputs or group outputs will be drawn with ports represented as buses. Be very careful in labeling buses or signal lines. Any Node or Bus with the same name will be connected (shorted) together. Copyright 2010 by Gregory L. Moss 3

Copyright 2010 by Gregory L. Moss 4

Sequential circuit simulation Sequential circuit simulation is performed the same way as it is for combinational circuits. The Overwrite Clock waveform button can be used to automatically create the pattern for a clock input. Select (highlight) the desired waveform (clock) and click the Overwrite Clock button. The Clock dialog box will automatically choose a clock period equal to the specified Grid Size for the Vector Waveform File. Click OK. You can specify the frequency for a clock input by first setting the grid size equal to the period for the desired clock signal or you can specify the clock period in the Clock dialog. Overwrite Clock button Copyright 2010 by Gregory L. Moss 5

Schematic capture of megafunctions Useful Megafunctions for Beginners Arithmetic Gates Storage LPM_ADD_SUB LPM_AND, LPM_INV, LPM_OR, LPM_XOR LPM_FF LPM_COMPARE LPM_CONSTANT LPM_LATCH LPM_COUNTER LPM_DECODE LPM_SHIFTREG LPM_MUX To enter a megafunction module into a BDF file, double-click the MegaWizard Plug-In Manager in the Tasks Pane. Select Create a new custom megafunctions variation and click Next. Copyright 2010 by Gregory L. Moss 6

Open the appropriate megafunction category folder from the list on the left & select the desired megafunction. The example below is an adder/subtractor megafunction from the Arithmetic folder. The correct device family should be identified. Choose an output file type (any HDL can be used). Type a unique filename for this output file. Click Next to continue with the setup for this megafunction. The details will depend on the function type. Copyright 2010 by Gregory L. Moss 7

The final MegaWizard dialog page is the Summary. Make sure the Quartus II symbol file is checked. Click Finish. Copyright 2010 by Gregory L. Moss 8

When finished defining the megafunction, double-click in the Block Editor drawing window to open the Symbol dialog. Open the Project folder and select the file for this megafunction. Click OK & place symbol in the drawing. Copyright 2010 by Gregory L. Moss 9

You must let Quartus know that this megafunction design file should be included in the current project. Double-click the Add/Remove Files in Project task in the Task Pane. Copyright 2010 by Gregory L. Moss 10

Click the Add All button to add megafunction design files that are located in the current project folder. or Click the Browse button to locate the megafunction design file from other project folders. Select the desired megafunction design file and click the Open button to return with the File name to the Settings dialog. Click the Add button. Click OK when all other design files have been added to the project. Browse Add All Copyright 2010 by Gregory L. Moss 11

Simulation of state machines The operation of a buried state machine can be included in the simulation of a logic circuit. The states for a state machine may be specified by name only. To insert the state machine in the vwf, select the Design Entry (all names) Filter option in the Node Finder and click list. A state machine name will be identified by a handle labeled s. Select the machine s name and click OK. In the Insert Node or Bus dialog box, the Name for the selected state machine should be listed. The Type should be MACHINE, the Value should be Enum (abbreviation for enumerated, which means specified by name only), and Binary for Radix. Click OK. The state machine will be added to the waveform vector file. Copyright 2010 by Gregory L. Moss 12

Vector Waveform File for State Machine Design Simulation Report for State Machine Simulation Copyright 2010 by Gregory L. Moss 13

Measuring time intervals in simulations It is very easy to measure time intervals in Quartus simulation. Grab the handle at the top of the Master Time Bar and position it accurately at the beginning of the time period to be measured. You will need to zoom in a few times to align it accurately. Then zoom back out again, click the right mouse button to open the menu, select Time Bar, and choose Insert Time Bar. Enter a Time value that is close to the end of your desired time interval in the Insert Time Bar dialog box and click OK. Again using the handle for the new time bar, align the cursor at the end of the time period to be measured. Zoom in several times to accurately position the second time bar. The time difference between the two cursors will be given above the second time bar s handle. An accurate measurement is dependent upon accurate placement of the two time bars. Copyright 2010 by Gregory L. Moss 14

Turn off snap to grid for Time Bar positioning Copyright 2010 by Gregory L. Moss 15

Copyright 2010 by Gregory L. Moss 16

Copyright 2010 by Gregory L. Moss 17

Clock frequency divider Many CPLD/FPGA development boards have clock signal generator circuits built on the board for your convenience. The clock output frequencies, however, might be higher than desired to clock another design being tested. Check the manual for your CPLD/FPGA development board to determine what clocking frequencies might be produced on-board. This procedure illustrates how to create a simple clock frequency divider using a Quartus lpm_counter megafunction. It is important to note that we can only use this technique to divide a given clock signal by integer values. We cannot produce just any clock frequency out, but we might be able to create a signal frequency that is close enough to a desired frequency. Be sure to check the design specifications! For this example, we will assume that our FPGA development board has a 50 MHz clock signal available. This will be the clock input signal to the lpm_counter. Next calculate the necessary divide-by factor to obtain the desired clocking frequency that will be used to drive another logic circuit. The divide-by factor will be the required modulus for the lpm_counter. Let s say that our specification called for a 10 khz clocking frequency. The calculation is: modulus = freq clock_in freq clock_out = 50MHz 10kHz = 5000 Thus, we will need a mod-5000 counter to obtain the desired output frequency. Next determine the number of counter bits necessary to create a mod-5000 counter. The simplest count sequence for the mod-5000 would be 0 to 4999 so the largest binary number is 1001110000111 (or 1387 16 ). This indicates that we will need a 13-bit counter for our frequency divider. The most significant counter bit q[12] will produce one waveform cycle for every 5000 input clock cycles. The frequency of q[12] will be 1/5000 of the frequency of the input clock signal. Use the Quartus MegaWizard to create the desired counter. Choose lpm_counter from the arithmetic library folder. The output file type does not matter for this application so we will arbitrarily use AHDL. Continue through the wizard parameter settings dialogs until you reach Finish & generate the Block Symbol File (bsf). Place the lpm_counter symbol and complete the wiring as shown below. Add the lpm_counter design file to the current project ( Add/Remove Files in Project task). If we connect the 50 MHz signal to clock, then clkout should be 10 khz. If we create a symbol for this block, we can add this design file to other projects. Copyright 2010 by Gregory L. Moss 18