Configuring SRAM FPGAs Using Actel Fusion

Similar documents
Developing Embedded Applications with ARM Cortex TM -M1 Processors in Actel IGLOO and Fusion FPGAs. White Paper

SmartDesign MSS. How to Create a MSS and Fabric AMBA AHBLite/APB3 Design (MSS Master Mode)

SmartDesign MSS. Clock Configuration

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

SPI Flash Programming and Hardware Interfacing Using ispvm System

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

DS1621 Digital Thermometer and Thermostat

Serial port interface for microcontroller embedded into integrated power meter

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

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

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

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

LatticeECP2/M S-Series Configuration Encryption Usage Guide

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

RAM & ROM Based Digital Design. ECE 152A Winter 2012

DS1621 Digital Thermometer and Thermostat

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

W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI

2.0 Command and Data Handling Subsystem

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

Microtronics technologies Mobile:

Fusion Embedded Development Kit. Webserver Demo User s Guide

Chapter 13. PIC Family Microcontroller

SPI Configuration and Flash Programming in UltraScale FPGAs

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

Reading User Data from Configuration PROMs

USER GUIDE EDBG. Description

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

DS18B20 Programmable Resolution 1-Wire Digital Thermometer

DS Wire Digital Thermometer and Thermostat

ice40 Programming and Configuration

8051 MICROCONTROLLER COURSE

FPGA INTEGRATION MANUAL SATURN-SIL 2 MODULES. Dictionary Code. Edition 01. Revision 00. Number of pages 18

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

USB - FPGA MODULE (PRELIMINARY)

Memory Basics. SRAM/DRAM Basics

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Embedded Systems Design Course Applying the mbed microcontroller

Fondamenti su strumenti di sviluppo per microcontrollori PIC

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Atmel Norway XMEGA Introduction

MicroMag3 3-Axis Magnetic Sensor Module

Am186ER/Am188ER AMD Continues 16-bit Innovation

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

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

Lab Experiment 1: The LPC 2148 Education Board

DS1821 Programmable Digital Thermostat and Thermometer

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

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

ADS9850 Signal Generator Module

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Using a Microprocessor to Configure Xilinx FPGAs via Slave Serial or SelectMAP Mode Author: Mike Peattie

Using Altera MAX Series as Microcontroller I/O Expanders

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

The Programming Interface

Lecture N -1- PHYS Microcontrollers

Memory. The memory types currently in common usage are:

Flexible Active Shutter Control Interface using the MC1323x

Spartan-3 Generation Configuration User Guide

Chapter 11. Using MAX II User Flash Memory for Data Storage in Manufacturing Flow

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

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

ET-BASE AVR ATmega64/128

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

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

STK User Guide

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

CAN bus board. EB018

Dolphin In-Circuit programming Updating Firmware in the field

Serial Communications

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

DS1307ZN. 64 x 8 Serial Real-Time Clock

DECT Module UM-9802 Datasheet

SmartFusion csoc: Basic Bootloader and Field Upgrade envm Through IAP Interface

VDIP1. Vinculum VNC1L Module. Datasheet

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

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

Open Flow Controller and Switch Datasheet

FLYPORT Wi-Fi G

Chapter 7 Memory and Programmable Logic

Internal Oscillator. I 2 C Interface. SPI Interface. Controller. Internal Registers Port Controller. Eight I/O Pins. Figure 1.

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

Software based Finite State Machine (FSM) with general purpose processors

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Web Site: Forums: forums.parallax.com Sales: Technical:

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

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

TERMINAL Debug Console Instrument

Transcription:

Application Note AC307 Configuring SRAM FPGAs Using Actel Fusion Introduction Due to the nature of SRAM technology, SRAM-based FPGAs are volatile and lose their configuration when powered off, so they must be reconfigured at every power-up. Hence, almost every system using SRAMbased FPGAs contains an additional nonvolatile memory, such as flash PROM or EEPROM, to store the configuration data and load it into the SRAM-based FPGA after power-up. In many applications, a complex programmable logic device (CPLD) is used in addition to the external configuration memory to perform the vital functions of the system necessary at power-up. One Actel Fusion device can replace several components: the configuration memory, the power management CPLD, and often the SRAM FPGA itself. Actel Fusion devices are nonvolatile, live at power-up, and contain embedded flash memory blocks, providing a single-chip, low-cost solution for many applications. These features enable the user to integrate both CPLD and configuration memory into the Fusion device if the functionality of the SRAMbased FPGA itself cannot be incorporated in the Fusion device. In addition, Fusion FPGAs offer many other unique features, such as on-chip voltage regulators, analog-to-digital (A/D) converters, and real-time counters, which enable designers to integrate even more functionalities of their system into a single Fusion FPGA. For example, Fusion devices can incorporate and perform the following power management and system supervisory functions: Power-up ramp-rate and sequence control Voltage, current, and temperature monitoring Flagging supervisory system protection based on implemented flags and power-on and brownout detection This document provides an overview of how an Actel Fusion device can be used to configure an SRAMbased FPGA, and includes reference designs. General Implementation Overview The flash memory in Fusion devices can be used to store the configuration bitstream of SRAM-based FPGAs. The size of the available flash memory varies between 2 Mbits and 8 Mbits, depending on the size of the Fusion device (AFS090 and AFS1500 are the smallest and largest members of the Fusion family, respectively). This memory size is sufficient for configuration of a variety of SRAM-based FPGAs (refer to each SRAM-based FPGA datasheet for the size of the memory required to store the configuration bitstream). User logic, implemented in the FPGA fabric of Fusion devices, is needed to interface between the embedded flash memory and the SRAM-based FPGA configuration pins. Depending on the user logic, the SRAM-based FPGA can be configured in various modes, such as SPI, Master parallel, Slave parallel, Master serial, and Slave serial. Figure 1 shows the simplified block diagram of the general implementation of such applications. SRAM-Based FPGA PROG_ B INIT_B D[7:0] CCLK BUSY CS DONE R/W SRAM Configuration Logic Actel Fusion Device Up to 1.5 M Additional System Gates Available for Any User Application Flash Memory Power Management Figure 1 Simplified Block Diagram September 2007 1 2007 Actel Corporation

In Figure 1 on page 1, the SRAM-based FPGA is being configured in parallel mode (Master or Slave, depending on the direction of the configuration clock). The Actel CoreCFI can be used to create a common parallel flash interface to the embedded flash memory blocks within Fusion devices. In this case, the user interface of CoreCFI can be connected to the SRAM-based FPGA configuration pins, similar to any common parallel flash PROM. However, any other user logic can also be used to interface between the embedded flash memory block and the SRAM based FPGA. The contents of the flash memory (the SRAMbased FPGA configuration bitstream) should be in Intel-Hex, Motorola-S, Actel-Hex, or Actel-Binary format. Using SmartGen and Actel Libero Integrated Design Environment (IDE), the configuration bitstream is incorporated into a STAPL file and programmed into the embedded flash memory of Fusion devices. Reference Design Implementation SPI The SPI reference design provided in this application note demonstrates the capability of configuring an SRAM FPGA using an Actel Fusion device via a Serial Peripheral Interface (SPI). Fusion embedded flash memory is used to store the configuration data. The FPGA core tiles are used to emulate a generic SPI flash ROM to program the Xilinx FPGA via the SPI interface. The Actel Fusion Evaluation Kit (Part number: AFS- EVAL-KIT) and Xilinx Spartan -3E Starter Kit (Part Number: HW-SPAR3E-SK-US-G) are used for the hardware testing and implementation of the reference design. The timing diagram in Figure 2 describes the programming sequence of Spartan-3E. PROG_b INIT_b M[2:0] <0:0:1> VS[2:0] <1:0:1> CSO_b CCLK MOSI 8-Bit Read Command 0x03 24-Bit Address 0x0000_0000 DIN Data Bitstream DONE Figure 2 Spartan-3E SPI Configuration Timing Diagram During the device power-up or when PROG_B is pulsed low, the device goes through an initialization stage to clear the internal memory. At this stage, both INIT_B and DONE drive low. When INIT_B drives high again, the M[2:0] and VS[2:0] signals must be ready for the device to recognize the device programming mode and the corresponding SPI flash command. To program the Xilinx part using the SPI interface, M[2:0] is set to "001" on the Spartan-3E Starter Kit (jumper J12). The reference design on the 2

Fusion device is emulating a generic SPI flash ROM supporting the READ (0x03) SPI flash command, so VS[2:0] on the Spartan-3E Starter Kit is set to "101". Once CSO_B starts driving low, Spartan-3E drives 8 bits of the SPI flash command (READ 0x03) and 24 bits of the starting address (default value 0x0000000) of the configuration data on the MOSI pin. When the last address bit is sent on the positive clock edge of CCLK, the Fusion device will start sending the configuration bits on the following falling clock edge of CCLK. When a successful device configuration is completed, INIT_B drives low or becomes the user I/O, and DONE drives high. For detailed information on the programming procedure and timing diagrams for SRAM FPGAs, refer to their corresponding datasheets and application notes. Figure 3 shows the simplified block diagram for this reference design. Implementation and functionality of each of the design blocks in Figure 3 is described in the following sections. Refer to "Appendix A SPI Reference Design" on page 9 for design files and other board-level configuration information. config_top.vhd rc_oscs.vhd Internal 100 MHz RC Oscillator PLL_60_40_10.vhd Clock Conditional Circuitry (PLL) NVM_2_blocks.vhd CSn CLK DI DO sconfig.vhd SPI Interface State Machine Embedded Flash Memory Figure 3 Top -Level Design Block Diagram RC Oscillator The integrated RC oscillator generates a 100 MHz clock, which can be used to provide a known clock source to the internal logic or clock conditional circuitry. In this reference design, the RC oscillator is providing a 100 MHz clock source to the clock conditional circuitry. The VHDL file, rc_oscs.vhd, is created using SmartGen (Figure 4) in the Libero IDE software. Note that the usage of RC oscillator is not mandatory if other clock sources are available in the user s system application. Figure 4 SmartGen RC Oscillator 3

Clock Conditional Circuitry The clock conditional circuitry consists of a phase-locked loop (PLL) which is used to generate different clock frequencies used in the design. Only the 60 MHz clock is used in this design, and it is connected to the embedded flash memory blocks. The 60 MHz fast clock is needed for the flash memory read so the BUSY signal from the flash memory blocks will not interrupt the serial data transmission process. This block, PLL_60_40_10.vhd, is generated using Smartgen in the Libero IDE software (Figure 5). Figure 5 SmartGen Clock Conditional Circuitry Configuration Embedded Flash Memory The embedded flash memory block in Fusion devices provides nonvolatile memory (NVM) to store the SRAM-based FPGA configuration data. Each flash memory block can store 2 Mbits of data. Depending on the size of the Fusion device, it can have up to 4 blocks of 2-Mbit flash memory blocks. In this reference design, the scrolling text demo design configuration data file (s3esk_startup.bit), which is provided with the Xilinx starter kit, is stored in the Fusion flash memory block. The s3esk_startup.bit file is formatted to program the Xilinx PROM. In order to store this configuration data in Fusion embedded flash memory, the configuration data must be formatted appropriately using the impact tool included in the Xilinx ISE software (Figure 6 on page 5). In impact, create a new project and select the configuration data file (s3esk_startup.bit) for the targeted device (xc3s500e). Once this is completed, select the PROM File formatter and configure the files as shown in Figure 6 on page 5. Note that the third-party SPI PROM should be selected; this reference design serially puts out data bytes MSB first while Xilinx PROM puts out data LSB first. 4

Figure 6 impact PROM Formatter As the size of the created SPI_3rd_Party.mcs file (intel-hex file format) is larger than two Mbits, two flash memory blocks are needed to store all the configuration data. A software program is used to split the hex file into two different hex files. Download the software tool from http://www.keil.com/support/docs/963.htm. Step 1: hex2bin test_spi.mcs test_spi.bin (convert hex to bin) Step 2: bin2hex /L262144 /4 test_spi.bin test_one.hex (part1) Step 3: bin2hex /L262144 /4 /I262144 test_spi.bin test_two.hex (part2) 5

Using the SmartGen Flash Memory System Builder (Figure 7 and Figure 8 on page 7), the corresponding hex file can be associated with each block so that the proper files used for simulation are generated. NVM1 (NVM1.vhd) is used to store the first part of the configuration file and NVM2 (NVM2.vhd) is used to store the second part of the configuration file. NVM_2_blocks.vhd is the wrapper for NVM1 and NVM2. Figure 7 SmartGen Core Flash Memory System Builder 6

Figure 8 Configure the Data Storage Client SPI Interface Block The SPI interface component has a simple state machine to interface the embedded flash memory with the Xilinx device via the standard SPI communication protocol. As shown in the timing diagram, Figure 2 on page 2, the state machine captures the first 8 bits for the command and if it matches the read command (0x03), the following 24 bits of the read address is captured one byte at a time in the next 3 states. The state machine then enters the READ state, in which the data configuration bits are loaded from the embedded flash memory into the shift registers and are shifted out MSB first on each subsequent falling edge of the clock. The data configuration bit continues to shift out of the Fusion device until it is completed, which is indicated by CSn = 1, driven by the connected Xilinx device. Figure 9 shows a section of the post-layout simulation of this reference design. Figure 9 Post-Layout Simulation Results 7

Reference Design Implementation Master Serial While SPI is a popular serial interface, not all SRAM-based FPGAs support this interface. Instead, other serial or parallel interfaces are supported. In this section, another reference design is provided to program the SRAM-based FPGA in Master serial mode. In Master serial mode, the SRAM-based FPGA is providing the clock signal while the Fusion FPGA is acting as a Slave device. Figure 10 shows the simplified block diagram of this reference design. For detailed information regarding the Master serial configuration mode supported by the SRAM-based FPGA, refer to the corresponding datasheets and application notes. MasterSerial.v RC_Oscillator.v PLL_100_40.v NVM1.v and NVM2.v Internal 100 MHz RC Oscillator Clock Conditional Circuitry (PLL) Embedded Flash Memory SCK INIT SDO DONE Counter.v Counter ShiftReg.v Shift Register Figure 10 Master Serial Top-Level Design Block Diagram Similar to the SPI reference design, the Master serial design uses a 100 MHz RC oscillator as the clock source and the PLL is used to generate a fast clock for reading the embedded flash memory. Counter.v generates the read address for the embedded flash memory and the load signal for the shift register. The load signal from the counter is generated every 8 bits to load 1 byte of data from the flash memory. The shift register simply shifts the captured data out on SDO port. Figure 11 shows the post-layout simulation of this reference design. Refer to "Appendix B Master Serial Reference Design" on page 10 for design file information. Figure 11 Master Serial Reference Design Post-Layout Simulation Conclusion Actel Fusion FPGAs contain an embedded flash memory block, which can be used to store the configuration bitstream of an SRAM-based FPGA. Additionally, the power and clock management of the system can also be integrated into Fusion devices, providing a cost-effective solution that incorporates configuration, power management, clock management, and many other applications into a single chip. 8

Appendix A SPI Reference Design Design Files Summary The full design can be downloaded at http://www.actel.com/documents/fusion_masterserial_df.zip. Table 1 gives descriptions of key design source files. Table 1 Design Files Description Files Functionality config_top.vhd NVM_2_blocks.vhd NVM1.vhd NVM2.vhd rc_osc.vhd PLL_60_40_10.vhd sconfig.vhd Top-level wrapper Wrapper for the two flash memory blocks SmartGen Flash Memory data storage client SmartGen Flash Memory data storage client SmartGen 100 MHz RC oscillator SmartGen PLL for generating different clock signals State machines for the bit shifting Programming File Table 2 SRAM FPGA Configuration Data Files s3esk_startup.bit test_one.hex test_two.hex Description Xilinx Starter Kit demo design configuration data Configuration data stored on NVM1 Configuration data stored on NVM2 Pin List Table 3 Pin Assignment and Connection Xilinx Board (J12 header) SEL SDI SDO SCK GND GND Fusion Board Csn - K14 DI M5 DO B6 CLK G4 GND G5 GND GND on J13 header Using the SPI header (J12) on the Xilinx Spartan-3E Starter Kit, this reference design on Fusion demonstrates the capability of programming the SRAM FPGA via the SPI interface. Board-Level Configuration for the Xilinx Starter Kit 1. SPI configuration jumper setting: J30, M0 open, M1 closed, M2 closed 2. VS[2:0] = 0x03. Connect IO_L25N/VS1/A18 (V15) to GND. 9

Appendix B Master Serial Reference Design Design Files Summary The full design can be downloaded at http://www.actel.com/documents/spi_sram_config_df.zip. Table 4 gives descriptions of key design source files. Table 4 Design Files Description Files MasterSerial.v counter.v NVM1.vhd NVM2.vhd RC_Oscillator.v PLL_100_60.v ShiftReg.v Top-level wrapper Functionality Counter to generate the read address and load signal for the shift register SmartGen Flash Memory data storage client SmartGen Flash Memory data storage client SmartGen 100 MHz RC oscillator SmartGen PLL for generating different clock signals Shift register loads the data from the flash memory and shifts the data (MSB first) on the output pin, SDO 10

Actel and the Actel logo are registered trademarks of Actel Corporation. All other trademarks are the property of their owners. www.actel.com Actel Corporation 2061 Stierlin Court Mountain View, CA 94043-4655 USA Phone 650.318.4200 Fax 650.318.4600 Actel Europe Ltd. River Court, Meadows Business Park Station Approach, Blackwater Camberley Surrey GU17 9AB United Kingdom Phone +44 (0) 1276 609 300 Fax +44 (0) 1276 607 540 Actel Japan EXOS Ebisu Bldg. 4F 1-24-14 Ebisu Shibuya-ku Tokyo 150 Japan Phone +81.03.3445.7671 Fax +81.03.3445.7668 www.jp.actel.com Actel Hong Kong Suite 2114, Two Pacific Place 88 Queensway, Admiralty Hong Kong Phone +852 2185 6460 Fax +852 2185 6488 www.actel.com.cn 59100168-0/9.07