SPI Flash Programming and Hardware Interfacing Using ispvm System



Similar documents
ISP Engineering Kit Model 300

LatticeECP2/M S-Series Configuration Encryption Usage Guide

LatticeXP2 Configuration Encryption and Security Usage Guide

In-System Programming Design TM. Guidelines for ispjtag Devices. Introduction. Device-specific Connections. isplsi 1000EA Family.

Pre-tested System-on-Chip Design. Accelerates PLD Development

Arbitration and Switching Between Bus Masters

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

Post-Configuration Access to SPI Flash Memory with Virtex-5 FPGAs Author: Daniel Cherry

MAX II ISP Update with I/O Control & Register Data Retention

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

Using the Agilent 3070 Tester for In-System Programming in Altera CPLDs

USB-Blaster Download Cable User Guide

Using Altera MAX Series as Microcontroller I/O Expanders

Reading User Data from Configuration PROMs

ISP Daisy Chain Download User Manual

Using the Altera Serial Flash Loader Megafunction with the Quartus II Software

Figure 1. 8-Bit USB Debug Adapter

LMS is a simple but powerful algorithm and can be implemented to take advantage of the Lattice FPGA architecture.

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

The Advanced JTAG Bridge. Nathan Yawn 05/12/09

Lab 1: Introduction to Xilinx ISE Tutorial

MasterBlaster Serial/USB Communications Cable User Guide

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

Altera Error Message Register Unloader IP Core User Guide

Quartus II Introduction Using VHDL Design

ATF1500AS Device Family. Application Note. In-System Programming of Atmel ATF1500AS Devices on the HP3070. Introduction.

LatticeECP3 High-Speed I/O Interface

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

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

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

9. Configuration, Design Security, and Remote System Upgrades in the Cyclone III Device Family

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

M CORE 14-PIN ENHANCED BACKGROUND DEBUG INTERFACE (14EBDI) USER S MANUAL

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

Hardware User Guide 2.1i

In-System Programmability

Programming the On-Chip Flash on a phycore-xc161 phycore-xc167

RCC2 Test Proceedures

JTAG Applications. Product Life-Cycle Support. Software Debug. Integration & Test. Figure 1. Product Life Cycle Support

BitBlaster Serial Download Cable

USB - FPGA MODULE (PRELIMINARY)

National CR16C Family On-Chip Emulation. Contents. Technical Notes V

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

Qualcomm IR-I 2 C Bridge Demo

Lattice Diamond User Guide

ice40 Oscillator Usage Guide

Spartan-3 Generation Configuration User Guide

Introducing AVR Dragon

TAP CONNECT JTAG CABLE

Advanced Security Encryption Key Programming Guide for ECP5, LatticeECP3, and LatticeECP2/MS Devices

SPI Configuration and Flash Programming in UltraScale FPGAs

Transmission of High-Speed Serial Signals Over Common Cable Media

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

Vicon Flash Upgrade Software

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

LatticeECP3 HDMI/DVI Loopback Demo User s Guide

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

BP-2600 Concurrent Programming System

Creating a Webserver on the Nios development kit Stratix Edition board Enoch Hwang

USER GUIDE Programming Adapter Cable for Fujitsu Flash Microcontroller- F²MC-16LX/FR Family Fujitsu Microelectronics America, Inc.

Intel RAID Controller Troubleshooting Guide

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

Application/Connection Examples

ModelSim-Altera Software Simulation User Guide

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

ISE In-Depth Tutorial 10.1

_ v1.0. EVB-56x Evaluation & Development Kit for Motorola PowerPC MPC56x Microcontrollers USERS MANUAL. isystem, February /8.

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

MX PIC24F Educational Module User Manual

The Programming Interface

How To Add A Usb Secondary Ipo Bootloader To An Lpc23Xx Flash Device To A Flash Device

Trace Port Analysis for ARM7-ETM and ARM9-ETM Microprocessors

MAX 10 FPGA Configuration User Guide

MARTECH SPI Tools. MARTECH SPI Tools User Manual v1.0. User Manual

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

MN3310 Evaluation Kit v1 User Guide

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

JTAG-HS2 Programming Cable for Xilinx FPGAs. Overview. Revised January 22, 2015 This manual applies to the HTAG-HS2 rev. A

RETRIEVING DATA FROM THE DDC112

Qsys System Design Tutorial

The following is a summary of the key features of the ARM Injector:

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

AN2146 APPLICATION NOTE

USB-Blaster II Download Cable User Guide

8 by 8 dot matrix LED displays with Cascadable Serial driver B32CDM8 B48CDM8 B64CDM8 General Description

Keep it Simple Timing

ChipScope Pro Tutorial

LatticeSC/Marvell Serial-GMII (SGMII) Physical Layer Interoperability

MaxQ Development Tools Guide

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

EMBEDDED ACCESS CONTROL Hardware Installation Guide

Transcription:

March 2005 Introduction Technical Note TN1081 SRAM-based FPGA devices are volatile and require reconfiguration after power cycles. This requires external configuration data to be held in a non-volatile device. Although serial boot PROM devices are commonly used for this purpose, they are often found in a proprietary format from one single vendor. This can lead to high cost and problems with availability. Lattice has addressed this significant cost issue with its new FPGA product families. The latest generation of FPGAs from Lattice can be configured directly from low-cost, industry-standard third-party SPI (Serial Peripheral Interface) Flash memory devices. These memory devices are available from many sources, allowing them to remain cost-effective. FPGAs that do not directly support SPI Flash configuration can still benefit from the cost savings of SPI Flash memory with the addition of some simple external logic. This technical note describes how a serial PROM can be emulated using a Lattice PLD and SPI Flash memory device to configure an FPGA in a standard master-serial mode. The accompanying design files can be downloaded from the Lattice web site at www.latticesemi.com. SPI Flash Programming using ispvm System ispvm System software version 15.0 and later provides support for the SPI Flash FPGA Loader. The device selection dialog box contains a device named FPGA Loader, as shown in Figure 1. This device represents the FPGA Loader PLD in a standard JTAG chain, along with the SPI Flash device. The following are required to accommodate SPI programming from ispvm System: 1. The PLD must be the first device in the JTAG chain. 2. There can be only one PLD/SPI pair per JTAG chain. ispvm System Setup The figures in this section describe the ispvm System setup for programming the SPI Flash device. Figure 1. Device Selection Dialog SPI Flash Programming and Hardware Interfacing 2005 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal. All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice. www.latticesemi.com 1 tn1081_01.0

Once the FPGA Loader is selected, the configuration dialog appears, as seen in Figure 2. Figure 2. FPGA Loader Dialog The FPGA Loader dialog is comprised of four pages of options to specify the PLD, configuration data, Flash device and hardware setup. Figure 3. CPLD or FPGA Device Page Device: Select the specific PLD that implements the FPGA Loader functionality. FPGA Loader Application Specific Data File: By default, the.jed file shipped with the ispvm System software will be loaded. Clicking on the Default button will also select the default.jed file. See Table 2 for the pinouts for the default.jed files. Click the Browse button to select the.jed file produced by the isplever design software after fitting the SPI Loader design files. 2

FPGA Loader Application Specific BSDL File: This field should be left blank. Operation: The operation to be performed on the PLD prior to Flash programming. If the PLD is not yet programmed with the SPI Loader pattern, set this to Erase, Program, Verify. The PLD will then be programmed prior to the Flash. If the PLD has already been programmed, choose Bypass. Figure 4. Configuration Data Setup The Configuration Data File contains the data to be programmed into the SPI Flash device. This can be in a generic bitstream (.bit) file, or one of the supported PROM file formats. Figure 5. Specifying the Flash Device Specify the Flash device by clicking the Select button and choosing from the list of supported Flash devices. The device description and device size fields will be filled out automatically when the device is selected. 3

Flash Base Address: The address at which to begin the programming of the Flash. Data File Size: The size of the data file. This field is automatically filled in when a configuration data file is loaded on the previous page. Operation: The desired operation to perform on the Flash. Normally set to Program. Figure 6. Hardware Setup Page For this configuration, the Hardware Setup Page is shown for reference only. No modification is required. FPGA Configuration Configuration can be done at any time on a Lattice FPGA device. The FPGA supports several options for configuration, which can be broken down into two categories: Master and Slave. In Master mode, the FPGA provides a configuration clock (CCLK) and signaling to an external memory to read its contents. In Slave mode, an external device must provide the configuration clock and data to the FPGA. For both Master and Slave modes, the device can be configured to accept parallel or serial data. The Master Serial mode is easily utilized for configuration from most serial data sources, and is the foundation for this application. Master Serial Mode In master serial mode, the FPGA loads its configuration data automatically from an external ROM on power up or after the PROGRAM pin is toggled. The FPGA provides signaling to the serial PROM. The FPGA device generally has five pins associated with configuration: INIT, PRGM, CCLK, DIN/DI and DONE. DOUT is only necessary if there are multiple FPGAs in a daisy chain configuration. In Master Serial Mode, the FPGA drives the INIT pin low during a configuration cycle if there is an error. The DONE pin will drive high on the completion of a successful configuration. Power Up On power up, the FPGA device can be configured automatically. While the power is ramping up to the device, a power-on-reset is triggered, external configuration mode pins are sampled, the DONE and INIT pins are driven low, and the internal RAM cleared. Once the device reaches the proper voltage threshold, the INIT pin is released and must be pulled up externally to allow the start of CCLK. In Master mode, the FPGA remains in the initialization state an additional six internal clock cycles after INIT goes high to ensure that any daisy chained devices have a chance to clear. 4

Emulating a Serial PROM with a PLD and SPI Flash Figure 7 shows a connection diagram for the PLD-to-SPI Flash interface. The INIT pin from the FPGA holds the PLD in a reset state until it is ready to be configured. When the FPGA releases the INIT pin, the clock CCLK will start shortly thereafter. Internally, the PLD generates the read command for the SPI Flash and specifies a starting address of zero. Figure 7. Connection Diagram FPGA 1K PLD SPI Flash DIN DONE INIT DONE INIT /W /HOLD CCLK CCLK SPI_S /S TRST PGM_EN C_IN SPI_D SPI_C D C TCK TCK TMS TMS ispen S_IN TDO TDI TDI D_OUT D_IN SPI_Q Q TDO ispdownload Cable Notes: 1. The PLD connected to the SPI Flash device must be the first device in the JTAG chain (PLD TDI connected to the ispdownload cable). 2. If additional JTAG devices are downstream from the PLD, D_OUT must be directly connected to the TDO of the ispdownload cable and the TDO of the last device in the JTAG chain. 3. There can be only one PLD/SPI in the JTAG chain. 4. All resistor values are 5K-10K ohms, unless shown otherwise. 5. TRSTn from the ispdownload Cable must not drive TRSTn inputs to devices in the JTAG chain. The SPI Flash pins are listed in Table 1. Table 1. SPI Flash Signal Listing Signal /S C D Q Description Chip Select Enables and disables device operation. When disabled, the device is at standby power levels. When enabled, the device powers up and instructions can be written to and data read from the device. Serial Clock Provides timing for serial input and output operations. Serial Data In When the device is enabled, allows instructions, addresses and data to be serially written to the device. Data is latched on the rising edge of the Serial Clock. Serial Data Out When the device is enabled, allows data and status to be serially read from the device. Data is shifted out on the falling edge of the Serial Clock. /HOLD Allows the device to be paused while it is actively selected. This function is useful when multiple devices are sharing the same SPI signals. /W Write Protection Used to prevent inadvertent writing to the Status Register Block Protect bits. 5

Figure 8. Standard Pinout for 8-pin SPI Flash Memories S Q W V SS V CC HOLD C D The default.jed file shipped with the ispvm System software targets the ispgal 22V10AV device and uses the pin connection listed in Table 2. The SPI Flash Loader design files are available on the Lattice web site if a different pin connection or target device is required. Table 2. Default ispgal22v10av Pin Connections Signal Implementation in a Lattice PLD The SPI Flash Loader design is implemented using Lattice s isplever design software. The design is distributed in netlist format and can be instantiated in VHDL or Verilog to target the desired PLD with custom pin locations. The design requires fewer than ten macrocells. Design Fit Process Using isplever Requirements isplever v.4.1 or greater with a valid license Procedure Note: This procedure assumes familiarity with the Lattice design software. For more information on using isplever, please see the tutorials included within the help system. 1. Extract the netlist and appropriate instantiation template file from the within the distribution.zip file. spi_loader.bl1 SPI Loader design in netlist format spi_loader_top.vhd VHDL instantiation template spi_loader_top.v Verilog instantiation template ispgal22v10av 32 QFN 28 PLCC D_IN 3 7 C_IN 14 16 S_IN 15 17 PGM_EN 9 12 D_OUT 22 23 DONE 26 27 INIT 32 4 CCLK 30 2 SPI_D 18 20 SPI_C 17 19 SPI_S 23 24 SPI_Q 1 5 Note: When targeting an ispgal22v10 device, support is limited to VHDL for this design. 6

2. Set the file attribute for the spi_loader.bl1 file for read-only access. This will prevent the removal of this file during the clean-up of intermediate files. 3. Launch the isplever design tool and create a new project in the location of the SPI Loader files extracted in step 1. Select the project type according to the desired use of VHDL or Verilog. 4. Select an appropriate PLD device to target. 5. Import the top-level file according to HDL preference. Once imported, the design hierarchy will show the spi_loader module represented as a red question mark as shown in Figure 9. Figure 9. SPI Loader Design Hierarchy in isplever Note: The spi_loader module is displayed in the design hierarchy as an unknown entity. Provided that the spi_loader.bl1 file exists in the project directory, the fit process will properly link the logic. 6. Execute the Fit Design process to run the design flow. Technical Support Assistance Hotline: e-mail: 1-800-LATTICE (North America) +1-408-826-6002 (Outside North America) techsupport@latticesemi.com Internet: www.latticesemi.com 7