Altera RAM Initializer User Manual

RAM Initializer (ALTMEM_INIT)
Megafunction User Guide
101 Innovation Drive San Jose, CA 95134 www.altera.com
Software Version: 8.0 Document Version: 1.0 Document Date: May 2008
UG-01034-1.0
ii Confidential—Internal Use Only Altera Corporation RAM Initializer (ALTMEM_INIT) Megafunction User Guide May 2008

Contents

About this User Guide ............................................................................. v
Revision History ........................................................................................................................................ v
Referenced Documents ............................................................................................................................. v
How to Contact Altera .............................................................................................................................. v
Typographic Conventions ...................................................................................................................... vi
Chapter 1. About this Megafunction
Device Family Support ......................................................................................................................... 1–1
Introduction ............................................................................................................................................ 1–1
Features ................................................................................................................................................... 1–2
General Description ............................................................................................................................... 1–3
Chapter 2. Getting Started
Software and System Requirements ................................................................................................... 2–1
MegaWizard Plug-In Manager Customization ................................................................................. 2–1
MegaWizard Plug-In Manager Page Descriptions ........................................................................... 2–2
Instantiating Megafunctions in HDL Code or Schematic Designs ................................................. 2–8
Generating a Netlist for EDA Tool Use ......................................................................................... 2–8
Using the Port and Parameter Definitions .................................................................................... 2–9
Identifying a Megafunction after Compilation ................................................................................. 2–9
Simulation ............................................................................................................................................... 2–9
Quartus II Software Simulator ....................................................................................................... 2–9
EDA Simulator ................................................................................................................................ 2–10
Design Example 1: RAM Initialization with Initialization Data File ........................................... 2–10
Design Files ..................................................................................................................................... 2–10
Configuration Settings ................................................................................................................... 2–11
Functional Simulation in the ModelSim-Altera Simulator ...................................................... 2–11
Understanding the Simulation Results ....................................................................................... 2–12
Design Example 2: Memory Initialization with External ROM .................................................... 2–15
Design Files ..................................................................................................................................... 2–15
Configuration Settings ................................................................................................................... 2–16
Functional Simulation in the ModelSim-Altera Simulator ...................................................... 2–16
Understanding the Simulation Results ....................................................................................... 2–17
Conclusion ............................................................................................................................................ 2–19
Chapter 3. Specifications
Ports and Parameters ............................................................................................................................ 3–1
Altera Corporation iii
RAM Initializer (ALTMEM_INIT) Megafunction User Guide
Contents
iv Confidential—Internal Use Only Altera Corporation RAM Initializer (ALTMEM_INIT) Megafunction User Guide

About this User Guide

Revision History

Date and Document
Version
May 2008 v1.0

Referenced Documents

How to Contact Altera

The following table shows the revision history for this user guide.
Changes Made Summary of Changes
Initial release.
This user guide references the following documents:
Quartus II Integrated Synthesis chapter in volume 1 of the Quartus II
Handbook
Recommended HDL Coding Styles chapter in volume 1 of the Quartus II
Handbook
Simulation section in volume 3 of the Quartus II Handbook
Synthesis section in volume 1 of the Quartus II Handbook
For the most up-to-date information about Altera® products, refer to the following table.
Contact (1)
Technical support Website www.altera.com/support
Technical training Website www.altera.com/training
Product literature Website www.altera.com/literature
Non-technical support (General)
(Software Licensing)
Note to table:
(1) You can also contact your local Altera sales office or sales representative.
Contact Method
Email custrain@altera.com
Email nacomp@altera.com
Email authorization@altera.com
Address
Altera Corporation Confidential—Internal Use Only v May 2008 RAM Initializer (ALTMEM_INIT) Megafunction User Guide

Typographic Conventions

Typographic
This document uses the typographic conventions shown in the following table.
Conventions
Visual Cue Meaning
Bold Type with Initial Capital Letters
bold type External timing parameters, directory names, project names, disk drive names,
Italic Type with Initial Capital Letters
Italic type Internal timing parameters and variables are shown in italic type.
Initial Capital Letters Keyboard keys and menu names are shown with initial capital letters. Examples:
“Subheading Title” References to sections within a document and titles of on-line help topics are
Courier type Signal and port names are shown in lowercase Courier type. Examples: data1,
1., 2., 3., and a., b., c., etc.
Bullets are used in a list of items when the sequence of the items is not important.
v The checkmark indicates a procedure that consists of one step only. 1 The hand points to information that requires special attention.
c
w
r The angled arrow indicates you should press the Enter key.
f The feet direct you to more information about a particular topic.
Command names, dialog box titles, checkbox options, and dialog box options are shown in bold, initial capital letters. Example: Save As dialog box.
filenames, filename extensions, and software utility names are shown in bold type. Examples: \qdesigns directory, d: drive, chiptrip.gdf file.
Document titles are shown in italic type with initial capital letters. Example: AN 75: High-Speed Board Design.
Examples: t
Variable names are enclosed in angle brackets (< >) and shown in italic type. Example: <file name>, <project name>.pof file.
Delete key, the Options menu.
shown in quotation marks. Example: “Typographic Conventions.”
PIA
, n + 1.
tdi, input. Active-low signals are denoted by suffix n, e.g., resetn.
Anything that must be typed exactly as it appears is shown in Courier type. For example: actual file, such as a Report File, references to parts of files (e.g., the AHDL keyword Courier.
Numbered steps are used in a list of items when the sequence of the items is important, such as the steps listed in a procedure.
A caution calls attention to a condition or possible situation that can damage or destroy the product or the user’s work.
A warning calls attention to a condition or possible situation that can cause injury to the user.
c:\qdesigns\tutorial\chiptrip.gdf. Also, sections of an
SUBDESIGN), as well as logic function names (e.g., TRI) are shown in
vi Confidential—Internal Use Only Altera Corporation RAM Initializer (ALTMEM_INIT) Megafunction User Guide May 2008
Chapter 1. About this
Megafunction

Device Family Support

The RAM Initializer (ALTMEM_INIT) megafunction supports the following target Altera
ACEX
APEX™ II
APEX 20KC
APEX 20KE
Arria™ GX
Cyclone
Cyclone II
Cyclone
FLEX 10K
FLEX
FLEX 10KE
FLEX 6000
HardCopy
HardCopy Stratix
MAX
MAX 3000A
MAX 7000AE
MAX 7000B
MAX 7000S
Stratix IV
Stratix III
Stratix II
Stratix II GX
Stratix
Stratix GX
®
1K
®
®
10KA
®
II
III
®
®
®
device families:
II
®

Introduction

As design complexities increase, the use of vendor-specific intellectual property (IP) blocks has become a common design methodology. Altera provides parameterizable megafunctions that are optimized for Altera device architectures. Using megafunctions instead of coding your own logic saves valuable design time. Additionally, the Altera-provided functions may offer more efficient logic synthesis and device implementation. You can scale the size of the megafunction by setting parameters.
Altera Corporation Confidential—Internal Use Only 1–1 May 2008 RAM Initializer (ALTMEM_INIT) Megafunction User Guide

Features

The HardCopy device family does not support the initialization of a random-access memory (RAM) during power-up. The ALTMEM_INIT megafunction addresses this need by providing memory initialization functions for the HardCopy Stratix and HardCopy II devices. The megafunction also supports Stratix devices that are migratable to HardCopy devices, and in general, other Altera devices that come with RAM.
The ALTMEM_INIT megafunction supports multiple RAMs. You can add logic to the output data port of the megafunction to fan out to more than one RAM. For example, if you want to initialize multiple RAMs to contain all zeros, you can connect the appropriate output ports of the ALTMEM_INIT megafunction to the RAMs that you want to initialize.
1 In this document, HardCopy devices refer to the
HardCopy Stratix and HardCopy II devices; Stratix devices refer to the Stratix IV, Stratix III, Stratix II, and Stratix devices.
The ALTMEM_INIT megafunction initializes the RAM of a HardCopy device with the content of a read-only memory (ROM). The ROM can be located internally within the megafunction, or externally in an on-chip or off-chip ROM. During initialization, the megafunction reads the content of the ROM word-by-word and writes it to the RAM. The RAM can also be initialized without the ROM, but the content can only be set to all zeros.
1 Unless specified otherwise, external ROM refers to both on-chip
and off-chip ROM.
Features
The ALTMEM_INIT megafunction provides the following features to implement memory initialization in HardCopy devices:
Support for RAM initialization using the INIT_FILE parameter
Support for RAM initialization from an external ROM with fixed
latency
Support for RAM initialization from an external ROM with variable
latency
Support for RAM initialization to all zeros
Status signal to indicate RAM initialization status
These features can be configured easily through the RAM Initializer
®
MegaWizard
Plug-In Manager.
f For more information about the INIT_FILE parameter, refer to
Chapter 3, Specifications.
1–2 Confidential—Internal Use Only Altera Corporation RAM Initializer (ALTMEM_INIT) Megafunction User Guide May 2008
About this Megafunction

General Description

The main function of the ALTMEM_INIT megafunction is to copy the content of a ROM into the RAM of a HardCopy device. The RAM can be initialized in two modes—the internal-ROM or external-ROM mode. For both modes, initialization begins when you assert the init signal.
In the internal-ROM mode, the RAM is initialized with the content of the ROM in the ALTMEM_INIT megafunction. This mode uses only the
INIT_FILE parameter and does not require any connection to the datain[] and rom_address[] ports.
In the external-ROM mode, the RAM is initialized from either an on-chip or off-chip ROM. The datain[] and rom_address[] ports of the megafunction must be connected to the external ROM. The initialization process can be automated with a fixed latency by using the ROM_READ_LATENCY parameter, or configured with a variable latency by using the PORT_ROM_DATA_READY parameter and the rom_data_ready control signal.
For the initialization of a RAM from an external ROM with fixed latency, set the ROM_READ_LATENCY parameter to the number of delay cycles incurred after the ALTMEM_INIT megafunction initiates a read from the ROM. For example, if the ROM has both its input and output ports registered, you can set the clock latency to 2 clock cyles. A fixed latency is usually used for an external on-chip ROM where you can identify the number of delay cycles.
For an off-chip ROM, you may not be able to identify the latency, or the latency may vary for different ROMs. In such cases of variable latency, you can use the PORT_ROM_DATA_READY parameter and the rom_data_ready signal to control when to read data into the megafunction.
The ALTMEM_INIT megafunction can also initialize a RAM without a ROM, but the RAM content can only be set to all zeros. For such an initialization, you do not need to use the INIT_FILE parameter or any ROM ports.
The init_busy signal of the ALTMEM_INIT megafunction reflects the initialization status. You can use this signal as an active-low signal to enable the subsequent processes or as an indicator to show that memory initialization is complete.
Altera Corporation Confidential—Internal Use Only 1–3 May 2008 RAM Initializer (ALTMEM_INIT) Megafunction User Guide
General Description
Figure 1–1 shows the block diagram of the input and output ports of the
ALTMEM_INIT megafunction.
Figure 1–1. Input and Output Ports of ALTMEM_INIT Megafunction
Figure 1–2 shows the block connections for the initialization of a
HardCopy device RAM using the INIT_FILE parameter. For this mode, the ROM resides in the ALTMEM_INIT megafunction.
1 The block connections in Figure 1–2 also apply to RAM
initialization without a ROM.
Figure 1–2. Initializing RAM to All Zeros or with INIT_FILE Parameter
1–4 Confidential—Internal Use Only Altera Corporation RAM Initializer (ALTMEM_INIT) Megafunction User Guide May 2008
About this Megafunction
Figure 1–3 shows the block connections for the initialization of a
HardCopy device RAM in the external-ROM mode. This mode uses an external on-chip or off-chip ROM.
Figure 1–3. Initializing RAM with External ROM
Altera Corporation Confidential—Internal Use Only 1–5 May 2008 RAM Initializer (ALTMEM_INIT) Megafunction User Guide
Loading...
+ 25 hidden pages