LatticeMico32 Tutorial
84 pages
English

LatticeMico32 Tutorial

-

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
84 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

LatticeMico32 Tutorial
Lattice Semiconductor Corporation
5555 NE Moore Court
Hillsboro, OR 97124
(503) 268-8000
August 2007 Copyright
Copyright © 2007 Lattice Semiconductor Corporation.
This document may not, in whole or part, be copied, photocopied,
reproduced, translated, or reduced to any electronic medium or machine-
readable form without prior written consent from Lattice Semiconductor
Corporation.
Trademarks
Lattice Semiconductor Corporation, L Lattice Semiconductor Corporation
2(logo), L (stylized), L (design), Lattice (design), LSC, E CMOS, Extreme
Performance, FlashBAK, flexiFlash, flexiMAC, flexiPCS, FreedomChip, GAL,
GDX, Generic Array Logic, HDL Explorer, IPexpress, ISP, ispATE, ispClock,
ispDOWNLOAD, ispGAL, ispGDS, ispGDX, ispGDXV, ispGDX2,
ispGENERATOR, ispJTAG, ispLEVER, ispLeverCORE, ispLSI, ispMACH,
ispPAC, ispTRACY, ispTURBO, ispVIRTUAL MACHINE, ispVM, ispXP,
ispXPGA, ispXPLD, LatticeEC, LatticeECP, LatticeECP-DSP, LatticeECP2,
LatticeECP2M, LatticeMico8, LatticeMico32, LatticeSC, LatticeSCM,
LatticeXP, LatticeXP2, MACH, MachXO, MACO, ORCA, PAC, PAC-Designer,
PAL, Performance Analyst, PURESPEED, Reveal, Silicon Forest,
Speedlocked, Speed Locking, SuperBIG, SuperCOOL, SuperFAST,
SuperWIDE, sysCLOCK, sysCONFIG, sysDSP, sysHSI, sysI/O, sysMEM, The
Simple Machine for Complex Design, TransFR, UltraMOS, and specific
product designations are either registered trademarks or trademarks of
Lattice Semiconductor Corporation or its subsidiaries in ...

Sujets

Informations

Publié par
Nombre de lectures 162
Langue English

Extrait

LatticeMico32 Tutorial Lattice Semiconductor Corporation 5555 NE Moore Court Hillsboro, OR 97124 (503) 268-8000 August 2007 Copyright Copyright © 2007 Lattice Semiconductor Corporation. This document may not, in whole or part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine- readable form without prior written consent from Lattice Semiconductor Corporation. Trademarks Lattice Semiconductor Corporation, L Lattice Semiconductor Corporation 2(logo), L (stylized), L (design), Lattice (design), LSC, E CMOS, Extreme Performance, FlashBAK, flexiFlash, flexiMAC, flexiPCS, FreedomChip, GAL, GDX, Generic Array Logic, HDL Explorer, IPexpress, ISP, ispATE, ispClock, ispDOWNLOAD, ispGAL, ispGDS, ispGDX, ispGDXV, ispGDX2, ispGENERATOR, ispJTAG, ispLEVER, ispLeverCORE, ispLSI, ispMACH, ispPAC, ispTRACY, ispTURBO, ispVIRTUAL MACHINE, ispVM, ispXP, ispXPGA, ispXPLD, LatticeEC, LatticeECP, LatticeECP-DSP, LatticeECP2, LatticeECP2M, LatticeMico8, LatticeMico32, LatticeSC, LatticeSCM, LatticeXP, LatticeXP2, MACH, MachXO, MACO, ORCA, PAC, PAC-Designer, PAL, Performance Analyst, PURESPEED, Reveal, Silicon Forest, Speedlocked, Speed Locking, SuperBIG, SuperCOOL, SuperFAST, SuperWIDE, sysCLOCK, sysCONFIG, sysDSP, sysHSI, sysI/O, sysMEM, The Simple Machine for Complex Design, TransFR, UltraMOS, and specific product designations are either registered trademarks or trademarks of Lattice Semiconductor Corporation or its subsidiaries in the United States and/or other countries. ISP, Bringing the Best Together, and More of the Best are service marks of Lattice Semiconductor Corporation. HyperTransport is a licensed trademark of the HyperTransport Technology Consortium in the U.S. and other jurisdictions. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. LatticeMico32 Tutorial ii Type Conventions Used in This Document Convention Meaning or Use Bold Items in the user interface that you select or click. Text that you type into the user interface. Variables in commands, code syntax, and path names. Ctrl+L Press the two keys at the same time. Courier Code examples. Messages, reports, and prompts from the software. ... Omitted material in a line of code. . Omitted lines in code and report examples. . . [ ] Optional items in syntax descriptions. In bus specifications, the brackets are required. ( ) Grouped items in syntax descriptions. { } Repeatable items in syntax descriptions. | A choice between items in syntax descriptions. LatticeMico32 Tutorial iii LatticeMico32 Tutorial iv Contents LatticeMico32 Tutorial 1 Introduction 1 Learning Objectives 2 Time to Complete This Tutorial 2 System Requirements 2 Accessing Online Help 3 About the Tutorial Design 3 About the Tutorial Data Flow 3 LatticeMico32/DSP Development Board 6 Task 1: Creating a New ispLEVER Project 7 Task 2: Creating the Microprocessor Platform 9MSB Platform 9 Selecting the Microprocessor Core 14 Adding the Off-Chip Memory 16 Adding the Peripheral Components 18 Specifying the Connections Between Master and Slave Ports 20 Assigning Component Addresses 22 Assigning Interrupt Request Priorities 25 Performing a Design Rule Check 25 Generating the Microprocessor Platform 25 Task 3: Generating the Microprocessor Bitstream 29 Importing the Verilog File 29 Connecting the Microprocessor to the FPGA Pins 30 Performing Functional Simulation 31 Performing Timing Simulation 31 Generating the Bitstream 31 Task 4: Downloading the Hardware Bitstream to the FPGA 32 Task 5: Creating the Software Application Code 35 Creating a New C/C++ SPE Project 37 Selecting Linker Memory Settings 39 Compiling the Project 41 LatticeMico32 Tutorial v Contents Task 6: Debugging and Executing the Software Application Code on the Development Board 45 Software Application Code Execution Flow 45 Debugging the Software Application Code on the Board 47 Inserting Breakpoints 54 Executing the Software Application Code 55 Modifying and Re-Executing the Software Application Code 58 Task 7: Deploying the Software Application Code to the Parallel Flash Memory 59 Parallel Flash Memory Deployment Flow 59 Creating a CFI Flash Programmer Application 62 Preparing LEDTest for Flash Deployment 64 Task 8: Deploying the Microprocessor Bitstream to SPI Flash Memory 71 Summary 73 Glossary 74 Recommended References 77 LatticeMico32 Tutorial vi LatticeMico32 Tutorial Introduction This tutorial steps you through the basic process involved in using the LatticeMico32 System software to implement a soft microprocessor and attached components in a Lattice Semiconductor device for the LatticeMico32/DSP development board. LatticeMico32 System encompasses three tools: the Mico System Builder (MSB), the C/C++ Software Project Environment (C/C++ SPE), and the Debugger. Together, they enable you to build an embedded microprocessor system on a single FPGA device and to write and debug the software that drives it. Such a microprocessor lowers cost by saving board space and increases performance by reducing the number of external wires. The LatticeMico32 System interface is based on the Eclipse environment, which is an open-source development and application framework for building software. Although you can install LatticeMico32 System as a stand-alone tool, this tutorial assumes that you have installed ispLEVER before installing LatticeMico32 System. Once you create a project in ispLEVER, the tutorial shows you how to use MSB to choose a Lattice Semiconductor 32-bit microprocessor, attach components to it, and generate a top-level design, including the microprocessor and the chosen components. Next you will use ispLEVER to synthesize, map, place, and route the design and generate a bitstream for it. You then download this bitstream to the FPGA on the board. The tutorial continues by demonstrating how to use C/C++ SPE to write and compile the software application code that exercises the microprocessor and onents. Finally, you learn how to download and debug the code on the board and deploy it in the parallel flash chips on the LatticeMico32/DSP development board. LatticeMico32 Tutorial 1 LatticeMico32 Tutorial Introduction This tutorial is intended for a new or infrequent user of the LatticeMico32 System software and covers only the basic aspects of it. The tutorial assumes that you have reviewed the LatticeMico32 Development Kit User’s Guide to familiarize yourself with the product and to set up your board correctly. For more detailed information on the LatticeMico32 System software, see the sources listed in “Recommended References” on page 77. Learning Objectives When you have completed this tutorial, you should be able to do the following: Use MSB to configure a Lattice Semiconductor 32-bit microprocessor for your design, select the desired components, and connect the selected components to the microprocessor. Import the Verilog file generated by MSB and an .lpf file containing the pinout. Synthesize, map, place, and route the design. Generate a bitstream of the microprocessor and download it to an FPGA on the board. Use C/C++ SPE to create the software application code that drives the microprocessor and components. Compile, download, and debug the software application code on the LatticeMico32/DSP development board. Program the Common Flash Interface (CFI) parallel flash memory with the software application code. Debug the hardware and software on the board. Time to Complete This Tutorial The time to complete this tutorial is about one hour. System Requirements Your PC system must meet the following minimum system requirements: Pentium II PC running at 400 MHz or faster Microsoft Windows 2000 or Windows XP Professional USB port for use with the LatticeMico32/DSP development board The following software is required to complete the tutorial: ispLEVER software with device support for the device used with your build of the LatticeMico32/DSP development board LatticeMico32 System evaluation tool chain for LatticeMico32, version 1.0 ispVM System software, which is included in the ispLEVER software This tutorial requires the following hardware: A LatticeMico32/DSP development board LatticeMico32 Tutorial 2 LatticeMico32 Tutorial Introduction USB cable AC adapter cord Accessing Online Help You can access the online Help for MSB, C/C++ SPE, the Debugger, or Eclipse Workbench by choosing Help > Help Contents in the LatticeMico32 System graphical user interface. About the Tutorial Design This tutorial uses a LatticeECP device. The tutorial design consists of the LatticeMico32 embedded microprocessor, a memory, a GPIO, a parallel flash memory, and a UART. After you add these components, you will specify the connections between the master and slave ports on these components, as shown in Figure 1. Figure 1: Desired Connections Between Master and Slave Ports SRAM slave device (memory for code and data) GPIO slave device (for controlling LEDs) Instruction portLM32 CPU Parallel flash (master ports) memory (for Data port deploying the application code) UART slave device (for host comunication) The instruction port (I) and the data port (D) of the CPU are the master ports. All other ports are slave ports. The instruction port will access the LatticeMico32 asynchronous SRAM controller and the LatticeMico32 parallel flash memory. The data port will access the LatticeMico32 asynchronous SRAM controller, the LatticeMico32 GPIO, the LatticeMico32 parallel flash memory, and the LatticeMico32 UART. About the Tutorial Data Flow You will perform the following major steps to create an embedded microprocessor system: 1. Create a new project in the ispLEVER Project Navigator. LatticeMico32 Tutorial 3 LatticeMico32 Tutorial Introduction 2. Create a microprocessor platform for the LatticeMico32 microprocessor in
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents