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

Similar documents
Lab 1: Introduction to Xilinx ISE Tutorial

VHDL Test Bench Tutorial

Quartus II Introduction for VHDL Users

Lab 1: Full Adder 0.0

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

Using Xilinx ISE for VHDL Based Design

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

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

An Example VHDL Application for the TM-4

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

Quartus II Introduction Using VHDL Design

Chapter 7 Memory and Programmable Logic

Digital Systems Design. VGA Video Display Generation

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus II 12.0

ModelSim-Altera Software Simulation User Guide

Lesson 1 - Creating a Project

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

Lab 2 - CMPS 1043, Computer Science I Introduction to File Input/Output (I/O) Projects and Solutions (C++)

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

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

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

Digital Design with VHDL

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

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

User Manual Software for DSL Digital Speed Switch

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

Colorfly Tablet Upgrade Guide

Creating the program. TIA Portal. SIMATIC Creating the program. Loading the block library. Deleting program block Main [OB1] Copying program blocks

VHDL GUIDELINES FOR SYNTHESIS

Design of Remote Laboratory dedicated to E2LP board for e-learning courses.

PCB Project (*.PrjPcb)

Getting Started Using Mentor Graphic s ModelSim

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

Designing VM2 Application Boards

Lattice Diamond User Guide

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

12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr

RGK60 RGK50 RGAM10 RGAM20 RGAM4 Generator set control units

Hardware Implementation of the Stone Metamorphic Cipher

Modeling Latches and Flip-flops

Multiplexers Two Types + Verilog

Lab 3: Introduction to Data Acquisition Cards

Work with Arduino Hardware

Practice Fusion API Client Installation Guide for Windows

DeviceNet Motor Control

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;

Digital Design and Synthesis INTRODUCTION

IGSS. Interactive Graphical SCADA System. Quick Start Guide

Contents. Welcome to the Priority Zoom System Version 17 for Windows. This document contains instructions for installing the system.

TNM Programmer User Manual. For Windows 7 / Vista / XP. TNM Electronics Ltd.

GAL-ASM-Starterkit. taskit GmbH Seelenbinderstr Berlin (Germany) Telefon +49(0)30 / Fax +49(0)30 /

Windows Server 2003 Logon Scripts Paul Flynn

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

VHDL programmering H2

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

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

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

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

Freescale Semiconductor, I

USB Flash Memory TransMemory-EX II TM

Two's Complement Adder/Subtractor Lab L03

Optional Lab: Data Backup and Recovery in Windows 7

EMP-20 Device Programmer

Software Version 10.0d Mentor Graphics Corporation All rights reserved.

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

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

ivms-4200 Client Software Quick Start Guide V1.02

Setting Up Database Security with Access 97

In-System Programmability

An Introduction to MPLAB Integrated Development Environment

2. Scope of the DE0 Board and Supporting Material

Creating Cost Recovery Layouts

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

S7 for Windows S7-300/400

DocumentsCorePack for MS CRM 2011 Implementation Guide

How to use the VMware Workstation / Player to create an ISaGRAF (Ver. 3.55) development environment?

Lab - Data Backup and Recovery in Windows 7

LatticeXP2 Configuration Encryption and Security Usage Guide

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

Digital Circuit Design Using Xilinx ISE Tools

VGA video signal generation

AW-HE60 Firmware Upgrade Procedure

State Machines in VHDL

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

The 104 Duke_ACC Machine

Microsoft Access Database

CNC Transfer. Operating Manual

Finite State Machine Design and VHDL Coding Techniques

IT Quick Reference Guides Using Windows 7

Printed Circuit Board Design with HDL Designer

Configuring the WT-4 for ftp (Ad-hoc Mode)

Tutorial: Configuring GOOSE in MiCOM S1 Studio 1. Requirements

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

SQL Server 2005: Report Builder

E-Map Application CHAPTER. The E-Map Editor

Quick Start Guide for High Voltage Solar Inverter DC-AC Board EVM. Version 1.3

Transcription:

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER OBJECTIVES 1. Learn the basic elements of VHDL that are implemented in Warp. 2. Build a simple application using VHDL and its simulation. 3. Being able to programming the GAL IC using All-11 Universal Programmer. 4. Being able to create other applications using IC GAL22V10D. INTRODUCTION Introducing VHDL The following will explain the basic elements of VHDL which include: identifier, data objects, data types, entity, architecture and package. 1. Identifier Identifier in VHDL consists of one or more characters which form the character of letters, digits or underscore with the following rules: The characters that are allowed are uppercase (A Z), lowercase (a z), letters (0...9) and underscore (_). The first character must be a letter. The last character may not be an underscore (_), use two underscore character ( ) are also not allowed. The use of uppercase and lowercase letters are considered equal (not case sensitive). Comments in VHDL start with a --. 2. Data Objects In the third known VHDL data objects are: Constant, Variable and Signal Constant Constant object can store a value which is defined as a constant declaration. Predefined value cannot be changed during the design process.. Declaration: constant identifier[,identifier..]:type[:value]; Example: constant bus_width: integer := 8; Variable Object variable can store a given value at design time, and that value can be changed at any time of the design. Declaration: variable identifier[,identifier..]:type[:value]; Example: variable ctrl_bits: std_logic; Signal Signal can be equated with the object variable, the difference is that the signal can store or release the logic value, while variables cannot, therefore, the signal can be realized in the memory element. Declaration: signal identifier[,identifier..]:type[:value]; Example: signal con: std_logic;

3. Data Types In the Warp, has defined several types of data that is often used, namely: integer, boolean, bit, character, string, bit_vector, std_logic and std_logic_vector. 4. Entity VHDL is composed by the couple of entity and its architecture, defines the design entity I/O or interface, while the architecture stated content or conduct of the design. Entity and architecture pair may be used as a complete design or can be used also as a component. Declaration of the entity program code is: ENTITY entity-name IS PORT [signal][sig-name,..]:[direction] type; [;signal[sig-name,..]:[direction] type].. ); END entity-name; Name of the entity that is created will be used as a reference for its architecture. Entity declare the port, the port is an object of class signal is defined in the entity. Each port has a port name, mode and type. Type used on the port is in (default), out, in-out, and buffer. 5. Architecture Architecture to describe the behavior of a design/process and the structure of the entity. Program code of the architecture declaration is: ARCHITECTURE architecture-name OF entity-name IS [type-declarations] [signal-declarations] [constant-declarations] BEGIN [architecture definition] END architecture-name; 6. Package A package can declare a partner entity and component architecture, types, constants or functions that these items can be used in other designs. Package often written before the entity and architecture. In order for a design can use a package that has been made, then the design should call the package that will be used by using the USE clause. 7. Generic Array Logic (GAL) GAL is an IC-type most widely used PLD, GAL produced by many IC vendors (eg, Cypress, Lattice and Texas Instruments). All digital expressions can be represented using the sum of product (SOP), therefore, using an array of AND/OR can be programmed, will be obtained much

desired digital circuit applications. GAL contains an array of AND / OR (Fig. Fig. III-1), the AND array, all the input and its complement is connected to the AND gate, the output of the AND array (product) is connected to the OR gate (sum). Fig. III-1. GAL/PAL s Structure At GAL, AND array input can be disconnected or reconnected to the programmed path. For example, if the desired logic equations the relationship array input AND the GAL can be demonstrated as shown Fig. III-2. Fig. III-2. Programming Input of AND Gate IC PLD on earlier, the relationship input AND array is made of fuse that will break if the drain voltage is high. With this fuse, then the AND array input cannot be reprogrammed. IC PLD generation now use EEPROM, so that the AND array input can be reprogrammed. To program an IC PLD, can be done by writing programs using the VHDL compilation and enter the results into the IC using a Programmer. One of the commonly used IC-Programmer is All-11 Universal Programmer who has the ability to program the PLD IC, MCU, EPROM, EEPROM, etc. REQUIREMENT 1. Full pack of HBE-LogicCircuit-Digital

2. Cooper Cable 3. IC GAL22V10D 4. IC Programmer ALL-11 5. PC with WARPR 6.3 Galaxy and Active-HDL Simulator PRE-LAB WORK TASK 1. Read the Lab Work s Technical Guide first! 2. Learn the Data Sheet of each ICs of Logic Gates used in this lab work! 3. What is VHDL? What is/are the difference(s) with Verilog? 4. What is the difference(s) of data types of std_logic and std_logic_vector? Explain! 5. Write the program code in VHDL to create a simple application of 3- inputs OR gate, complete with library, entity and its architecture! 6. Explain the working principle of PAL/GAL! Search the datasheet of IC GAL22V10D! 7. Describe and explain the function of the pins of the IC GAL22V10D! EXPERIMENT 1 : VHDL [Trial 1] Making 2-Input AND Gate Using VHDL [Preparation] I/O Device - Module - Others PC with WARPR 6.3 Galaxy [Procedure] 1. Open Galaxy Software 2. Create a new project via File menu New, then select Project [Target - Device] and click Ok 3. Select the Project Type VHDL. 4. Enter the name of the project "and3in" 5. Enter Project Path to the directory: "C:\Rangkaian Logika\VHDL\ and3in" 6. Click Next to get to the Add Files Wizard. Add Files Wizard is used to add the VHDL file into the Project. Just ignore the dialog and click Next to go to Target Device Wizard. 7. Choose the device by selecting the SPLD (Small PLDs) c22v10, on select Package PALC22V10D-25PC (Fig. Fig. III-3) 8. Click Finish to create the project 9. Click Yes to save the project 10. Create a new file via the File -> New 11. Select Text File, then click Ok, then you will see a text editor as shown in Fig. III-3

Fig. III-3. Device Option Fig. III-4. Blank Editor 12. Save the empty file via the File -> Save, put in a directory with the project file "and3in.pfg" and name the file "and2in.vhd 13. Next is to write entity, we will create an entity to an AND gate with 2 inputs, declared entity name, direction and data type of each port to be used. Type the following entity: entity and2in is port( input: in std_logic_vector(1 downto 0); output: out std_logic); end and2in; 14. The next step is to write AND 2 Architecture of the input that we make. Architecture defines the behavior of the components are made, and it's always been after the entity, type the following 2 input AND architecture:

architecture archand2in of and2in is begin and2in: process (input) begin if (input = "00") then output <= '0'; elsif (input = "01") then output <= '0'; elsif (input = "10") then output <= '0'; elsif (input = "11") then output <= '1'; end if; end process; end archand2in; 15. The next step is to write Package of 2 input AND gate before, write the name and2in_pkg Package with program code below! Put before the entity! package and2in_pkg is component and2in port(input: in std_logic_vector(1 downto 0); output: out std_logic); end component; end and2in_pkg; 16. The next step is to write Library, type library in accordance with the code below! Put one before Package and one before the Entity! library ieee; use ieee.std_logic_1164.all; [Trial 2] Making 3-Input AND Gate Using VHDL [Preparation] I/O Device - Module - Others PC with WARPR 6.3 Galaxy [Procedure] Fig. III-5. 3-Input AND Gate Using 2-Input AND Gate

1. Create a new text file and name it "and3in.vhd", put in the same folder with the file Project "and3in.pfg"! 2. Write the library, entity and its architecture with the following program code: library ieee; use ieee.std_logic_1164.all; use work.and2in_pkg.all; entity and3in is port ( a,b,c: in std_logic; y: out std_logic); attribute pin_numbers of and3in:entity is " a:1 b:3 c:5 y:15 "; end and3in; architecture archand3in of and3in is signal con : std_logic; begin and_1: and2in port map ( input(0) => a, input(1) => b, output => con ); and_2: and2in port map ( input(0) => con, ); end archand3in; input(1) => c, output => y 3. The next step is adding a VHDL file "and2in.vhd" and "and3in.vhd" into the project. Add the file through Project -> Add Files..., when they are finished, click Ok 4. The next step is to make the file "and3in.vhd" as the Top Level. Create a file "and3in" as the top level via the right click and choose Set Top 5. In order for the compilation process goes as expected, needs to be done in the compiler settings, click Project -> Compiler Options..., in I / O, Unused Outputs: select "0", and in Simulation, Timing Model, select "Active-HDLSIM/Active - VHDL " 6. Then compile the project by Compile -> Project. It will produce a new file with the name "and3in.jed" (this file will be used to download the programs to IC). [Trial 3] Simulating Active-HDL Sim [Preparation] I/O Device - Module -

Others PC with WARPR 6.3 Galaxy and Active-HDL Simulator [Procedure] 1. Open the Active-HDL Sim application from Tools Active-HDL Sim 2. Open the and3in.vhd file at the address "C:\Rangkaian Logika\VHDL \ and3in\vhd" through the menu File -> Open VHDL 3. Then a window will appear as shown below: Fig. III-6. Active-HDL Sim 4. Add the signal to be simulated by selecting Waveform -> Add Signals..., add the signals a, b, c and y into the simulation by double-clicking Fig. III-7. Signal Option 5. When finished click Add 6. At a signal, set stimulator by Right-click select stimulators..., the stimulator type: select Clock, 2000ns Rate this wavelength, and then click Apply, once completed, click Close

Fig. III-8. Stimulators 7. In the same way, set b stimulators for the type of clock signals with a wavelength of 1000ns 8. In the same way, set c stimulators for the type of clock signals with a wavelength of 500ns 9. On the toolbar entry 100ns, enter a new value of 4000ns 10. On the toolbar, click Run Until 11. By adjusting the image through the Zoom in and Zoom out, then you will get the following image simulation: Fig. III-9. Simulation Result Table III-1. Result Table of 3-Input AND Gate Using Active-HDL Sim Input Output a b c y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 EXPERIMENT 2 : IC GAL PROGRAMMING [Trial 4] IC GAL Programming Using Universal Programmer [Preparation] I/O Device Slide Switch (SW1, SW2, SW3), LED (D1)

Module - Others PC with IC Programmer ALL-11, Cable (to connect I/O device with IC), Breadboard (to implant the IC) [Procedure] 1. Turn off the All-11 Universal Programmer 2. Place the IC GAL on the All-11 Universal Programmer 3. Turn on the All-11 Universal Programmer 4. Open the file "access.exe"! 5. On the Device menu, choose a product developed by Lattice, and select GAL22V10 (no UES) Fig. III-10. Device Menu 6. After that will appear the window below: Fig. III-11. Download Window

7. Delete the contents of IC GAL through the Erase menu! 8. Select File, then select Load JEDEC file, locate the address of where you save the file "and3in.jed"! 9. Do programming by selecting menu Program 10. Turn off the All-11 Universal Programmer 11. Take the IC GAL from the All-11 Universal Programmer 12. Place the IC GAL is already programmed on the breadboard, rangkaikan correctly, point output (15 feet) to an anode of the LED on the feet! 13. Complete the following table, compared with the simulation results in table: Table III-2. Result Table of 3-Input AND Gate Using IC GAL Input Output a b c y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ASSIGNMENT 1. Make applications of 5-input OR gate! 2. Consider the following code: entity and2in is port( input: in std_logic_vector(1 downto 0); output: out std_logic); end and2in; 3. Explain the purpose of the code: "input: in std_logic_vector (1 down to 0)"! 4. Explain the difference with the code: "output: out std_logic"! 5. Explain the difference in the working principle of the PAL /GAL compared to the FPGA! 6. Make the application program code Demultiplexer 2 to 4 using VHDL, making them into a package! 7. Make an application program Demultiplexer 4 to 16 by utilizing the package at number 4! Simulate it! Include a print-out simulation results into a report!