RAM-Type Interface for Embedded User Flash Memory

Similar documents
Local Memory Bus (LMB) V10 (v1.00a)

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

Design Specification. DDR2 UDIMM Enhanced Performance Profiles

or, with the time and date option enabled using the CommFlags command:

Programmable Comparator Options for the isppac-powr1220at8

IS42S32200C1. 512K Bits x 32 Bits x 4 Banks (64-MBIT) SYNCHRONOUS DYNAMIC RAM

MPC8260 UPM Timing Diagram

AN RPM to TACH Counts Conversion. 1 Preface. 2 Audience. 3 Overview. 4 References

SDRAM AS4SD8M Mb: 8 Meg x 16 SDRAM Synchronous DRAM Memory. PIN ASSIGNMENT (Top View)

SYNCHRONOUS DRAM. 128Mb: x32 SDRAM. MT48LC4M32B2-1 Meg x 32 x 4 banks

IS42S32200L IS45S32200L

128Mb Synchronous DRAM. Features High Performance: Description. REV 1.0 May, 2001 NT5SV32M4CT NT5SV16M8CT NT5SV8M16CT

A48P4616B. 16M X 16 Bit DDR DRAM. Document Title 16M X 16 Bit DDR DRAM. Revision History. AMIC Technology, Corp. Rev. No. History Issue Date Remark

1. Historical background of I2C I2C from a hardware perspective Bus Architecture The Basic I2C Protocol...

HYB25D256400/800AT 256-MBit Double Data Rata SDRAM

Technical Information

- - DQ0 NC DQ1 DQ0 DQ2 - NC DQ1 DQ3 NC - NC

6.823 Computer System Architecture Prerequisite Self-Assessment Test Assigned Feb. 6, 2019 Due Feb 11, 2019

Advantage Memory Corporation reserves the right to change products and specifications without notice

EE 330 Integrated Circuit. Sequential Airbag Controller

2004, 2008 Autosoft, Inc. All rights reserved.

CMPEN 411 VLSI Digital Circuits Spring Lecture 22: Memery, ROM

1. INTRODUCTION AND SYSTEM DESCRIPTION BLOCK DIAGRAM GENERAL INFORMATION GLOSSARY... 7

Advantage Memory Corporation reserves the right to change products and specifications without notice

Issue 2.0 December EPAS Midi User Manual EPAS35

Digital Hand Controller. Manual

128Mb DDR SDRAM. Features. Description. REV 1.1 Oct, 2006

- - DQ0 NC DQ1 DQ0 DQ2 - NC DQ1 DQ3 NC - NC

- DQ0 - NC DQ1 - NC - NC DQ0 - NC DQ2 DQ1 DQ CONFIGURATION. None SPEED GRADE

TIMER INTERFACE USER MANUAL

Instruction Manual. SmarTire Dealer Programming Tool. PN: Revision Copyright 2006 SmarTire Systems Inc.

- DQ0 - NC DQ1 - NC - NC DQ0 - NC DQ2 DQ1 DQ

HYB25D256[400/800/160]B[T/C](L) 256-Mbit Double Data Rate SDRAM, Die Rev. B Data Sheet Jan. 2003, V1.1. Features. Description

PMD709408C/PMD709416C. Document Title. Revision History. 512Mb (64M x 8 / 32M x 16) DDR SDRAM C die Datasheet

DOUBLE DATA RATE (DDR) SDRAM

Abrites Diagnostics for Peugeot/ Citroën User Manual abrites.com

Huf Group. Your Preferred Partner for Tire Pressure Monitoring Systems. IntelliSens App

ZT-USB Series User Manual

INSTRUCTIONS FOR TRI-METRIC BATTERY MONITOR May 8, 1996

ZC706 MIG Design Creation November 2014

ABRITES CHRYSLER DODGE JEEP COMMANDER ABRITES. Commander for CHRYSLER DODGE JEEP. User Manual. Version: 2.0. issued by: Abritus 72 Ltd.

CAN-Translator. User s guide

128Mb Synchronous DRAM Specification

PMD706416A. Document Title. 64Mb (4M x 16) DDR SDRAM (A die) Datasheet

128Mb Synchronous DRAM Specification

Pipelining A B C D. Readings: Example: Doing the laundry. Ann, Brian, Cathy, & Dave. each have one load of clothes to wash, dry, and fold

Ramp Profile Hardware Implementation. User Guide

Series 905-IV16(E) CAN/CANopen Input Modules Installation and Operating Manual

AVS64( )L

Advantage Memory Corporation reserves the right to change products and specifications without notice

Field Programmable Gate Arrays a Case Study

XC95288 In-System Programmable CPLD

MetaXpress PowerCore System Installation and User Guide

X11CA-IM MASTER MODULE

Shrink-TSOP. M464S3323CN0 SDRAM SODIMM 32Mx64 SDRAM SODIMM based on stsop2 16Mx8, 4Banks, 4K Refresh, 3.3V SDRAMs with SPD. Pin. Front. Pin.

APPLICATION NOTE Application Note for Torque Down Capper Application

ZC706 MIG Design Creation November 2015

8Mbit to 256MBit HyperMemory SRAM and FIFO. Configurations. Features. Introduction. Applications

JUMO DSM software. PC software for management, configuration, and maintenance of digital sensors. Operating Manual T90Z001K000

Instruction of connection and programming of the VECTOR controller

CPW Current Programmed Winder for the 890. Application Handbook. Copyright 2005 by Parker SSD Drives, Inc.

DQ0 NC DQ1 DQ0 DQ2 DQ3 DQ Speed Grade

IS42S Meg Bits x 16 Bits x 4 Banks (64-MBIT) SYNCHRONOUS DYNAMIC RAM FEATURES OVERVIEW. PIN CONFIGURATIONS 54-Pin TSOP (Type II)

NexSysLink. Operation Manual. NMEA 2000 SAE J1939 Indmar Engines. CAN Instruments Product Family

Revision History Revision 1.0 (August, 2003) - First release. Revision 1.1 (February, 2004) -Corrected typo.

HYB25D256400B[T/C](L) HYB25D256800B[T/C](L) HYB25D256160B[T/C](L)

Gillig EFAN Diagnostic Software User Guide & Troubleshooting Guide 8A Rev H Last Revised: 3/23/2017

Huf Group. Your Preferred Partner for Tire Pressure Monitoring Systems

SDRAM DEVICE OPERATION

Automotive Application ET01 Software Revision A 12/06

" MANUALLY OVERRIDING YOUR SYSTEM

Technical Bulletin AA 304. Central Locking System. m.y. 97

GE Programmable Control Products. PACSystems* RX3i Rackless Energy Pack IC695ACC403 Quick Start Guide. GFK-3000 December 2016

Controller over electromechanical fuel dispensers for petrol stations

AssayMAP 96AM Wash Station. Maintenance Guide

Exercise 7. Thyristor Three-Phase Rectifier/Inverter EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION. Thyristor three-phase rectifier/inverter

EPAS Desktop Pro Software User Manual

Feature. 512Mb DDR SDRAM. REV 1.1 Jul CAS Latency Frequency NT5DS64M8DS NT5DS32M16DS CONSUMER DRAM. 2KB page size for all configurations.

Notes: Clock Frequency (MHz) Target t RCD- t RP-CL t RCD (ns) t RP (ns) CL (ns) A

Quick Reference: Immobilizer III Service Procedures

Registers Shift Registers Accumulators Register Files Register Transfer Language. Chapter 8 Registers. SKEE2263 Digital Systems

参考資料 PRELIMINARY DATA SHEET. 128M bits SDRAM. EDS1216AGTA (8M words 16 bits) DQ7 VDD LDQM /WE /CAS /RAS /CS BA0 BA1 A10 A0 A1 A2 A3 VDD

VHDL (and verilog) allow complex hardware to be described in either single-segment style to two-segment style

e-ask electronic Access Security Keyless-entry

Locomotive Driver Desk. Manual

IS42S Meg x MBIT SYNCHRONOUS DRAM SEPTEMBER 2009

TABLE OF CONTENTS 1. GENERAL DESCRIPTION FEATURES PIN DESCRIPTION Signal Descriptions BLOCK DIAGRAM...

ABS motorcycle braking chip

Arduino-based OBD-II Interface and Data Logger. CS 497 Independent Study Ryan Miller Advisor: Prof. Douglas Comer April 26, 2011

ABS motorcycle braking chip

PRODUCT PORTFOLIO. Electric Vehicle Infrastructure ABB Ability Connected Services

DS1643/DS1643P Nonvolatile Timekeeping RAM

PC-I 04/104. Passive PC/CAN Interface HARDWARE MANUAL ENGLISH

Model PRO 9233N OWNER S MANUAL

Generator Sets Controller 210. Operation Manual. Ver1.0

INSTALLATION USER MANUAL

- DQ0 - NC DQ1 - NC - NC DQ0 - NC DQ2 DQ1 DQ

ELECTRONIC TRACTION CONTROL USER MANUAL

Acu-Trac Ultrasonic Fuel Level Transmitters

M464S1724CT1 SDRAM SODIMM 16Mx64 SDRAM SODIMM based on 8Mx16,4Banks,4K Refresh,3.3V Synchronous DRAMs with SPD. Pin. Pin. Back. Front DQ53 DQ54 DQ55

Transcription:

June 2012 Introduction Reference Design RD1126 MachXO2-640/U and higher density devices provide a User Flash Memory (UFM) block, which can be used for a variety of applications including PROM data storage, or general purpose non-volatile Flash memory. In some design contexts, the UFM may be used concurrently to store EFB initialization data, or in rare situations configuration data overflow, as specified by user settings. The UFM is page addressable. Each page has 128 bits (16 bytes). The UFM block connects to the device core through the Embedded Function Block (EFB) WISHBONE interface. If desired, users can also access the UFM block independently through the hardened JTAG, I 2 C and SPI interfaces of the device. This reference design is intended to provide a familiar and intuitive extension to the MachXO2 Embedded Functional Block User Flash Memory (EFB UFM). This design facilitates users to access the MachXO2 EFB UFM module without the knowledge of WISHBONE protocol. Architecture Figure 1. MachXO2 UFM Simplified RAM-Type Interface Block Diagram MachXO2 RD1126 UFM WISHBONE Interface MEM_CLK SM_CLK MEM_WE SM_WE MEM_CE SM_CE MEM_ Rd_DATA [7:0] MEM_Wr_DATA [7:0] Port B DPRAM Port A SM_Rd_DATA [7:0] SM_Wr_DATA [7:0] Internal State Machine MEM_ADDR [3:0] SM_ADDR [4:0] ~SM_ADDR [4] Instruction Decoder ERR BUSY CMD[2:0] UFM_PAGE[10:0] GO RST_N CLK 2012 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 rd1126_01.1

Port Descriptions Table 1. Port Descriptions Port Direction Width (Bits) Description CLK Input 1 Clock input 1 RST_N Input 1 Active low reset signal Command Interface GO Input 1 High ( 1 ) starts command process. GO is ignored if BUSY is asserted. CMD Input 3 Command operation UFM_PAGE Input 11 Target UFM Page BUSY Output 1 Status bit. Indicates operation in progress. ERR Output 1 Error bit. The last operation failed. Will be cleared on subsequent GO. Data Interface MEM_CLK Input 1 Clock for the DPRAM module MEM_WE Input 1 Write enable for the DPRAM module MEM_CE Input 1 Clock enable for the DPRAM module MEM_ADDR Input 4 DPRAM address MEM_Wr_DATA Input 8 DPRAM write data MEM_Rd_DATA Output 8 DPRAM read data 1. Modify the design parameter READ_DELAY when CLK > 16.6 MHz. See discussion below. Functional Description This design facilitates user access to the MachXO2 EFB UFM module without the knowledge of WISHBONE protocol. The user has to provide the necessary command sequence with UFM page address. A GO signal will trigger the interface to perform the necessary WISHBONE transactions to read or write the UFM. UFM The User Flash Memory of the MachXO2 device features non-volatile storage in a single sector. Other features include: Non-volatile storage up to 256Kbits 100K write cycles Write access is performed page-wise; each page has 128 bits (16 bytes) Auto-increment addressing Typical of Flash technology, the array must be cleared (erased) before data can be overwritten. The erased state of the UFM bits is 0. The smallest erasable unit is the entire sector. Thus, any data which must be preserved (e.g. Config data overflow, or EBR init data) must be read out and stored in another available memory (e.g. EBR) prior to the Erase command. After the erase is complete, the data is written back to the UFM. The user is responsible for performing the storage operation. This requirement, along with limited erase cycles and long erase/program times, renders the UFM a poor solution for scratch pad RAM (or similar) applications. MachXO2 Embedded Block RAM (EBR) is the recommended on-board memory type for high-churn, volatile data storage. In the design s default configuration, the internal UFM read operation has been optimized for lower CLK rates. For CLK rates exceeding 16.6 MHz, this design must be configured to insert additional Retrieval Delay into the state machine which generates the UFM read command. A parameter, READ_DELAY, is provided for this purpose. The source file UFM_WB_top.v can be modified directly or the parameter passed in the module instantiation. The minimum value for READ_DELAY can be calculated as follows: 2

READ_DELAY(min) = 240/PERIOD - 4 where PERIOD = CLK period in ns Example, for CLK = 47MHz, PERIOD = 21.28ns thus READ_DELAY >= 8 (7.28 rounded up) Refer to the Reading Flash Pages section of TN1204, MachXO2 Programming and Configuration Usage Guide for more information on the Read UFM command structure and timing requirements. DPRAM The design incorporates a 32-byte (2 UFM page), byte addressable True Dual port RAM. The internal state machine accesses one port of the DPRAM. During the UFM write operation the state machine reads data from the DPRAM and writes it to the UFM. During UFM read operations the data read from the UFM is stored in the DPRAM. The second DPRAM port is accessed by the user to exchange data to or from the UFM. The DPRAM memory is divided into two pages of 16 bytes data each. The Most Significant Bit (MSB) of the DPRAM addresses are controlled by the internal state machine for page swapping. Thus, only one page (16 bytes) of the DPRAM is available through the user port at any given time. The available page is synchronized by the reference design and optimized for maximum throughput. During a UFM write operation, the DPRAM page swap happens once a GO is recognized. For higher throughput in back-to-back writes, this allows the user to immediately start loading the next page to be transferred to the UFM. During a read operation, the DPRAM page swap happens at the end of a read UFM operation and the user can start reading the DPRAM data once BUSY signal is low. In the case of back-to-back Read operations, the data remains available in the DPRAM until the subsequent Read is complete, allowing for higher throughput operation. Commands Table 2. List of Commands Command Operation BUSY Signal Page Swap 000 Read 1 page Clear when finished End of transaction 001 Read next page Clear when finished End of transaction 010 Write 1 page Clear upon UFM busy clear. Beginning of transaction 011 Write next page Clear upon UFM busy clear Beginning of transaction 100 Enable UFM access Clear upon UFM busy clear. N/A 101 Disable UFM access Clear when finished N/A 110 (undefined) 111 Erase UFM Clear upon UFM busy clear N/A Command Descriptions Enable UFM access (100) Required to enable UFM read/write access. Exercising this command will temporarily disable certain features of the device, notably GSR, User SPI port and Power Controller. These features are restored when UFM access is disabled using Disable UFM access command (101). See TN1246, MachXO2 EFB User s Guide, for more information on this behavior. BUSY is asserted until the devices internal Flash pumps are fully charged. Write 1 page (010) The 16 bytes of data from DPRAM is written into the UFM page specified by UFM_PAGE. The internal UFM page pointer is auto incremented at the completion of the command. Make sure that 16 bytes of data that has to be written to the UFM is loaded to the DPRAM prior to issuing a GO. BUSY will be asserted as soon as a GO is recognized and will be de-asserted when programming is complete. Write next page (011) The 16 bytes of data from DPRAM are written into the subsequent UFM page pointed by the internal UFM page pointer. The internal UFM page pointer is auto-incremented at the completion of the 3

command. Make sure that 16 bytes of data that has to be written to the UFM is loaded to the DPRAM prior to issuing a GO. BUSY will be asserted as soon as a GO is recognized and will be de-asserted when programming is complete. Read 1 page (000) 16 bytes of data is read back from the UFM page specified by UFM_PAGE and stored in the DPRAM. The internal UFM page pointer is auto-incremented at the completion of the command. Following a Read command, the 16 bytes of UFM data can be read from the DPRAM after BUSY de-asserts. Read next page (011) The subsequent UFM page pointed by the internal UFM page pointer is read and stored into the DPRAM. The internal UFM page pointer is auto-incremented at the completion of the command. Following a Read command, the 16 bytes of UFM data can be read from the DPRAM after BUSY de-asserts. Disable UFM access (101) This command disables UFM interface for change access. Erase UFM (111) This command is issued to completely erase (set to 0 ) the UFM. BUSY is asserted until erasure is complete. Typical Command Sequences Notes: A GO will be ignored when BUSY is asserted. Any UFM read/write or erase command while UFM is disabled will assert the ERR signal. Write to UFM The following sequence explains the necessary commands to be followed for a UFM write operation. The sequence assumes the target UFM row is in the erased state. 1. Enable UFM access (100) Check for BUSY signal to be low and issue enable UFM command on the CMD bus and issue a GO. BUSY signal is asserted once a GO is recognized. 2. Write 1 page (010) Load the DPRAM with one page (16 bytes) of data to be written to the UFM. Check for BUSY signal to be low, issue the Write 1 Page command on the CMD bus, UFM page address on the UFM_PAGE bus and issue a GO. The DPRAM page swap happens once a GO is recognized so that the user can load the next page to be written to the UFM into the DPRAM while the first page is being transferred to the UFM. 3. Write next page (011) Wait for the previous page to be transferred to the UFM successfully and the BUSY signal goes low. Now issue a write next page command and issue GO. The internal UFM page pointer is auto-incremented. 4. Repeat steps 2 and 3 until all desired pages are written. Figure 2 illustrates steps 2 and 3. 5. Disable UFM access (101) Check for BUSY signal to be low and issue disable UFM command on the CMD bus and issue a GO. BUSY signal is asserted once a GO is recognized. 4

Figure 2. Write to UFM Waveform Description Read from UFM The following sequence explains the necessary commands to be followed for a UFM read operation. 1. Enable UFM access (100) Check for the BUSY signal to be low and issue an enable UFM command on the CMD bus and issue a GO. BUSY signal is asserted once a GO is recognized. 2. Read 1 page (000) Check for BUSY signal to be low, issue the Read 1 Page command on the CMD bus, UFM page address on the UFM_PAGE bus and issue a GO. Data read from UFM will be loaded in the DPRAM and user can access the data once BUSY signal goes low. 3. Read next page (011) Check for the BUSY signal to be low, issue the read next page command on the CMD bus and issue a GO. The internal UFM page pointer is auto. Data read from UFM will be loaded in the DPRAM and user can access the data once the BUSY signal goes low. 4. Repeat steps 2 and 3 until all desired pages have been read. Figure 3 illustrates steps 2 and 3. 5. Disable UFM access (101) Check for the BUSY signal to be low and issue a disable UFM command on the CMD bus and issue a GO. The BUSY signal is asserted once a GO is recognized. 5

Figure 3. Read from UFM Waveform Description Read Modify Write Back to UFM The page read from UFM can be retained in the DPRAM and data modification may be performed directly on the DPRAM, followed by a Write 1 Page operation. The following sequence explains the necessary commands to be followed in order to modify the contents of UFM. Note: The modified data cannot be arbitrary. Only erased bits/bytes (= 0 ) of the UFM can be given new values. This sequence is provided to support applications where small amounts of data, or data unaligned to UFM page boundaries, is accumulated over time (e.g. a data logger application). 1. Enable UFM access (100) Check for BUSY signal to be low and issue an enable UFM command on the CMD bus and issue a GO. BUSY signal is asserted once a GO is recognized. 2. Read 1 page (000) Check for BUSY signal to be low, issue the Read 1 Page command on the CMD bus, UFM page address on the UFM_PAGE bus and issue a GO. Data read from the UFM will be loaded in the DPRAM and is available to read or edit once the BUSY signal goes low. 3. Modify DPRAM data as needed. The DPRAM data is byte addressable. The user may modify the intended byte(s) directly in the DPRAM. Alternatively, the data may be read from, and re-written to, the DPRAM. 4. Write 1 page (010) Once the data in the DPRAM has been modified or re-written, check for the BUSY signal to be low, issue the Write 1 Page command on the CMD bus, set the UFM page address on the UFM_PAGE bus and issue a GO. Note that UFM page address must be specified for both read and write. 5. Repeat steps 2 through 4 until all desired pages have been modified. Figure 4 illustrates steps 2 through 4. 6. Disable UFM access (101) Check for the BUSY signal to be low and issue a disable UFM command on the CMD bus and issue a GO. BUSY signal is asserted once a GO is recognized. 6

Figure 4. Read-Modify and Write Back to UFM Waveform Description HDL Simulation and Verification Enable Command Figure 5. Enable Command HDL Simulation Waveform Write Command Figure 6. Loading of DPRAM HDL Simulation Waveform 7

Figure 7. Write to UFM Command Sequence HDL Simulation Waveform Read Command Figure 8. Read from UFM Command Sequence HDL Simulation Waveform 8

Disable Command Figure 9. Disable Command HDL Simulation Waveform Implementation Table 3. Performance and Resource Utilization Family Language Speed Grade Utilization fmax (MHZ) I/Os Architecture Resources MachXO2 1 Verilog -3 239 LUTs >50 42 1- EFB1- EBR 1. Performance and utilization characteristics are generated using LCMXO2-1200ZE-3TG100C with Lattice Diamond 1.4 design software. Technical Support Assistance Hotline: 1-800-LATTICE (North America) +1-503-268-8001 (Outside North America) e-mail: techsupport@latticesemi.com Internet: www.latticesemi.com Revision History Date Version Change Summary April 2012 01.0 Initial release. June 2012 01.1 Updated design and document to include READ_DELAY parameterization. 9

Appendix A. UFM Command Sequences RAM-Type Interface for The following table explains the different UFM internal command structure involved for the various operations of this reference design. Table 4. MachXO2 Embedded Function Block Commands Operation Command (Hex) Operand (Hex) Write Data Read Data Enable UFM Access (100) Enable UFM 74 08 00 00 Status check F0 00 00 00 1 byte status data Write One Page (010) Set Address B4 00 00 00 40 00 aa aa 1 Write UFM C9 00 00 01 16 bytes data from DPRAM Status check F0 00 00 00 1 byte status data Write Next Page (011) Write UFM C9 00 00 01 16 bytes data from DPRAM Status check F0 00 00 00 1 byte status data Read One Page (000) Set Address B4 00 00 00 40 00 aa aa 1 Read UFM CA 10 00 01 16 bytes data from UFM Read Next Page (011) Read UFM CA 10 00 01 16 bytes data from UFM Disable UFM Access (101) Disable UFM 26 00 00 00 Bypass FF FF FF FF Erase UFM (111) Erase UFM 0E 08 00 00 Status check F0 00 00 00 1 byte status data 1. The aa aa value is copied from the 11-bit UFM_PAGE module input. 10