Ug Civgx Fpga Dev Kit
Ug Civgx Fpga Dev Kit
UG-01094-1.1
Subscribe
Copyright © 2014 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized Altera logo, and specific device designations
are trademarks and/or service marks of Altera Corporation in the U.S. and other countries. All other words and logos identified as trademarks and/or service marks
are the property of Altera Corporation or their respective owners. Altera products are protected under numerous U.S. and foreign patents and pending applications,
maskwork rights, and copyrights. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard
warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of
the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to
obtain the latest version of device specifications before relying on any published information and before placing orders for products or services.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Contents
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
iv Contents
Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
Flash Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
The SSRAM Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10
Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10
Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11
Random Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11
Incrementing Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11
The DDR2 Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11
Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Performance Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Error Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Number of Addresses to Write and Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Read and Write Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–13
The HSMC Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–13
Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
PMA Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Data Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Error Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15
Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15
The Power Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15
General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–16
Power Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Power Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Graph Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Calculating Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
The Clock Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–18
Serial Port Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–18
fXTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
Target Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
Reset Si570 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
Set New Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
Configuring the FPGA Using the Quartus II Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
Additional Information
Document Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info–1
How to Contact Altera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info–1
Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info–1
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
1. About This Kit
Kit Features
This section briefly describes the Cyclone IV GX FPGA Development Kit contents.
Hardware
The Cyclone IV GX FPGA Development Kit includes the following hardware:
■ Cyclone IV GX FPGA development board—A development platform that allows
you to develop and prototype hardware designs running on the Cyclone IV GX
EP4CGX150DF31 FPGA.
f For detailed information about the board components and interfaces, refer
to the Cyclone IV GX FPGA Development Board Reference Manual.
■ HSMC loopback board—A daughtercard that allows for loopback testing all
signals on the HSMC interface using the Board Test System.
■ HSMC debug breakout board—A daughtercard that routes 40 CMOS signals to a
0.1" header and adds 20 LEDs to the remaining 40 CMOS signals.
■ Power supply and cables—The kit includes the following items:
■ Power supply and AC adapters for North America/Japan, Europe, and the
United Kingdom
■ USB cable
■ Ethernet cable
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
1–2 Chapter 1: About This Kit
Kit Features
Software
The software for this kit, described in the following sections, is available on the Altera
website for immediate downloading. You can also request to have Altera mail the
software to you on DVDs.
f Download the Quartus II Web Edition Software from the Quartus II Web Edition
Software page of the Altera website. Alternatively, you can request a DVD from the
Altera IP and Software DVD Request Form page of the Altera website.
f For more information about OpenCore Plus, refer to AN 320: OpenCore Plus
Evaluation of Megafunctions.
■ Nios® II Embedded Design Suite (EDS)—A full-featured set of tools that allow you
to develop embedded software for the Nios II processor which you can include in
your Altera FPGA designs.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 1: About This Kit 1–3
Kit Features
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
1–4 Chapter 1: About This Kit
Kit Features
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
2. Getting Started
The remaining chapters in this user guide lead you through the following
Cyclone IV GX FPGA development board with the HSMC daughtercard setup steps:
■ Inspecting the contents of the kit
■ Installing the design and kit software
■ Setting up, powering up, and verifying correct operation of the FPGA
development board
■ Configuring the Cyclone IV GX FPGA
■ Running the Board Test System designs
f For complete information about the FPGA development board, refer to the
Cyclone IV GX FPGA Development Board Reference Manual.
2. Verify that all components are on the board and appear intact.
f For more information about power consumption and thermal modeling, refer to
AN 358: Thermal Management for FPGAs.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
2–2 Chapter 2: Getting Started
References
References
Use the following links to check the Altera website for other related information:
■ For the latest board design files and reference designs, refer to the Cyclone IV GX
FPGA Development Kit page.
■ For additional daughter cards available for purchase, refer to the Development
Board Daughtercards page.
■ For the Cyclone IV GX device documentation, refer to the Literature: Cyclone IV
Devices page.
■ To purchase devices from the eStore, refer to the Devices page.
■ For Cyclone IV GX OrCAD symbols, refer to the Capture CIS Symbols page.
■ For Nios II 32-bit embedded processor solutions, refer to the Embedded
Processing page.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
3. Software Installation
f If you have difficulty installing the Quartus II software, refer to Altera Software
Installation and Licensing.
Licensing Considerations
The Quartus II Web Edition Software is license-free and supports Cyclone IV GX
devices without any additional licensing requirement. This kit also works in
conjunction with the Quartus II Subscription Edition Software, once you obtain the
proper license file. To purchase a subscription, contact your Altera sales
representative.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
3–2 Chapter 3: Software Installation
Installing the USB-Blaster Driver
The installation program creates the Cyclone IV GX FPGA Development Kit directory
structure shown in Figure 3–1.
<install dir>
The default Windows installation directory is C:\altera\<version>\.
kits
cycloneIVGX_4cgx150_fpga
board_design_files
demos
documents
examples
factory_recovery
Table 3–1 lists the file directory names and a description of their contents.
f Installation instructions for the USB-Blaster driver for your operating system are
available on the Altera website. On the Altera Programming Cable Driver Information
page of the Altera website, locate the table entry for your configuration and click the
link to access the instructions.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
4. Development Board Setup
The instructions in this chapter explain how to set up the Cyclone IV GX FPGA
development board.
c Use only the supplied power supply. Power regulation circuitry on the
board can be damaged by power supplies with greater voltage.
4. Set the POWER switch (SW3) to the on position. When power is supplied to the
board, a blue LED (D11) illuminates indicating that the board has power.
The MAX II device on the board contains (among other things) a parallel flash loader
(PFL) megafunction. When the board powers up, the PFL reads a design from flash
memory and configures the FPGA. The USER_FACTORY switch (SW1.1) controls
which design to load. When the switch is in the off position, the PFL loads the design
from the factory portion of flash memory. When the switch is in the on position, the
PFL loads the design from the user hardware portion of flash memory.
1 The kit includes a MAX II design which contains the MAX II PFL megafunction. The
design resides in the
<install dir>\kits\cycloneIVGX_4cgx150_fpga\examples\max2 directory.
When configuration is complete, the CONF DN LED illuminates, signaling that the
Cyclone IV GX device configured successfully.
f For more information about the PFL megafunction, refer to AN 386: Using the Parallel
Flash Loader with the Quartus II Software.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
4–2 Chapter 4: Development Board Setup
Factory Default Switch Settings
SW2 SW1
8 7 6 5 4 3 2 1 OFF = 1 4 3 2 1
User DIP Clock Enable
Switch DIP Switch
ON ON = 0 ON
CLK_SEL
CLK_EN
CLK125_EN
FACTORY
SW4 SW5
ON ON
Link Width JTAG Chain
DIP Switch Control DIP
1 2 3 4 1 2 3 4 Switch
HSMB
x1
x4
n/a
USBn
MAX2
HSMA
PCIe
To restore the switches to their factory default settings, perform these steps:
1. Set DIP switch bank (SW1) to match Table 4–1 and Figure 4–1.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 4: Development Board Setup 4–3
Factory Default Switch Settings
2. Set DIP switch bank (SW4) to match Table 4–2 and Figure 4–1.
3. Set DIP switch bank (SW5) to match Table 4–3 and Figure 4–1.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
4–4 Chapter 4: Development Board Setup
Factory Default Switch Settings
f For more information about the FPGA board settings, refer to the Cyclone IV GX FPGA
Development Board Reference Manual.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
5. Board Update Portal
The Cyclone IV GX FPGA Development Kit ships with the Board Update Portal
design example stored in the factory portion of the flash memory on the board. The
design consists of a Nios II embedded processor, an Ethernet MAC, and an HTML
web server.
When you power up the board with the USER_FACTORY switch (SW1.1) in the off
position, the Cyclone IV GX FPGA configures with the Board Update Portal design
example. The design can obtain an IP address from any DHCP server and serve a web
page from the flash on your board to any host computer on the same network. The
web page allows you to upload new FPGA designs to the user hardware portion of
flash memory, and provides links to useful information on the Altera website,
including kit-specific links and design resources.
1 After successfully updating the user hardware flash memory, you can load the user
design from flash memory into the FPGA. To do so, set the USER_FACTORY switch
(SW1.1) to the on position and power cycle the board.
The source code for the Board Update Portal design resides in the
<install dir>\kits\cycloneIVGX_4cgx150_fpga\examples directory. If the Board
Update Portal is corrupted or deleted from the flash memory, refer to “Restoring the
Flash Device to the Factory Settings” on page A–4 to restore the board with its original
factory contents.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
5–2 Chapter 5: Board Update Portal
Using the Board Update Portal to Update User Designs
5. Click Cyclone IV GX FPGA Development Kit on the Board Update Portal web
page to access the kit’s home page. Visit this page occasionally for documentation
updates and additional new designs.
f You can also navigate directly to the Cyclone IV GX FPGA Development Kit page of
the Altera website to determine if you have the latest kit software.
1 Design files available from the Cyclone IV GX FPGA Development Kit page of the
Altera website include .flash files. You can also create .flash files from your own
custom design. Refer to “Preparing Design Files for Flash Programming” on page A–2
for information about preparing your own design for upload.
To upload a design over the network into the user portion of flash memory on your
board, perform the following steps:
1. Perform the steps in “Connecting to the Board Update Portal Web Page” to access
the Board Update Portal web page.
2. In the Hardware File Name field, specify the .flash file that you either
downloaded from the Altera website or created on your own. If there is a software
component to the design, specify it in the same manner using the Software File
Name field, otherwise leave the Software File Name field blank.
3. Click Upload. The progress bar indicates the percent complete.
4. To configure the FPGA with the new design after the flash memory upload process
is complete, set the USER_FACTORY switch (SW1.1) to the on position and power
cycle the board, or press the PGM_SEL button (S2) until the user LED is on, and
then press the PGM_LOAD button.
5. As long as you don’t overwrite the factory image in the flash memory device, you
can continue to use the Board Update Portal to write new designs to the user
hardware portion of flash memory. If you do overwrite the factory image, you can
restore it by following the instructions in “Restoring the Flash Device to the
Factory Settings” on page A–4.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
6. Board Test System
The kit includes a design example and application called the Board Test System to test
the functionality of the Cyclone IV GX FPGA development board. The application
provides an easy-to-use interface to alter functional settings and observe the results.
You can use the application to test board components, modify functional parameters,
observe performance, and measure power usage. The application is also useful as a
reference for designing systems. To install the application, follow the steps in
“Installing the Cyclone IV GX FPGA Development Kit” on page 3–1.
The application provides access to the following Cyclone IV GX FPGA development
board features:
■ General purpose I/O (GPIO)
■ SRAM
■ Flash memory
■ DDR2
■ Two HSMC connectors
■ Character LCD
■ Ethernet
■ Programmable oscillator
■ Transceivers
■ PCIe
The application allows you to exercise most of the board components. While using the
application, you reconfigure the FPGA several times with test designs specific to the
functionality you are testing.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–2 Chapter 6: Board Test System
A GUI runs on the PC that communicates over the JTAG bus to a test design running
in the Cyclone IV GX device. Figure 6–1 shows the initial GUI for a board that is in the
factory configuration.
Several designs are provided to test the major board features. Each design provides
data for one or more tabs in the application. The Configure menu identifies the
appropriate design to download to the FPGA for each tab.
After successful FPGA configuration, the appropriate tab appears that allows you to
exercise the related board features. Highlights appear in the board picture around the
corresponding components.
The Power Monitor button starts the Power Monitor application that measures and
reports current power information for the board. Because the application
communicates over the JTAG bus to the MAX II device, you can measure the power of
any design in the FPGA, including your own designs.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–3
Preparing the Board
1 The Board Test System and Power Monitor share the JTAG bus with other
applications like the Nios II debugger and the SignalTap® II Embedded Logic
Analyzer. Because the Quartus II programmer uses most of the bandwidth of the
JTAG bus, other applications using the JTAG bus might time out. Be sure to close the
other applications before attempting to reconfigure the FPGA using the Quartus II
Programmer.
c To ensure operating stability, keep the USB cable connected and the board
powered on when running the demonstration application. The application
cannot run correctly unless the USB cable is attached and the board is on.
1 On Windows, click Start > All Programs > Altera > Cyclone IV GX FPGA
Development Kit <version> > Board Test System to run the application.
A GUI appears, displaying the application tab that corresponds to the design running
in the FPGA. The Cyclone IV GX FPGA development board’s flash memory ships
preconfigured with the design that corresponds to the appropriate tabs.
1 If you power up your board with the USER_FACTORY switch (SW1.1) in the off
position, or if you load your own design into the FPGA with the Quartus II
Programmer, you receive a message prompting you to configure your board with a
valid Board Test System design. Refer to “The Configure Menu” for information about
configuring your board.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–4 Chapter 6: Board Test System
Using the Board Test System
To configure the FPGA with a test system design, perform the following steps:
1. On the Configure menu, click the configure command that corresponds to the
functionality you wish to test.
2. When configuration finishes, the design begins running in the FPGA. The
corresponding GUI application tabs that interface with the design enable.
Board Information
The Board information controls display static information about your board.
■ Name—Indicates the official name of the board, given by the Board Test System.
■ Part number—Indicates the part number of the board.
■ Serial number—Indicates the serial number of the board.
■ Factory test version—Indicates the version of the Board Test System used to test
this board originally.
■ Factory test date—Indicates the date this board was test originally.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–5
Using the Board Test System
■ MAX II ver—Indicates the version of MAX II code currently running on the board.
The MAX II code resides in the
<install dir>\kits\cycloneIVGX_4cgx150_fpga\examples\max2 directory. Newer
revisions of this code might be available on the Cyclone IV GX FPGA
Development Kit page of the Altera website.
■ MAC—Indicates the MAC address of the board’s Ethernet port.
MAX II Registers
This control allows you to view and change the current MAX II register values as
described in Table 6–1. Changes to the register values with the GUI take effect
immediately. For example, writing a 0 to SRST resets the board.
■ PSO—Sets the MAX II PSO register. The following options are available:
■ Use PSR—Allows the PSR to determine the page of flash memory to use for
FPGA reconfiguration.
■ Use PSS—Allows the PSS to determine the page of flash memory to use for
FPGA reconfiguration.
■ PSR—Sets the MAX II PSR register. The numerical values in the list corresponds to
the page of flash memory to load during FPGA reconfiguration. Refer to Table 6–1
for more information.
■ PSS—Displays the MAX II PSS register value. Refer to Table 6–1 for the list of
available options.
■ SRST—Resets the system and reloads the FPGA with a design from flash memory
based on the other MAX II register values. Refer to Table 6–1 for more information.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–6 Chapter 6: Board Test System
Using the Board Test System
1 Because the Config tab requires that a specific design is running in the FPGA, writing
a 0 to SRST or changing the PSO value can cause the Board Test System to stop
running.
JTAG Chain
The JTAG chain control shows all the devices currently in the JTAG chain. The
Cyclone IV GX device is always the first device in the chain.
1 Setting DIP switch SW5.1 to the on position includes the MAX II device in the JTAG
chain.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–7
Using the Board Test System
Character LCD
Allows you to display text strings on the character LCD on your board. Type text in
the text boxes and then click Display.
1 If you exceed the 16 character display limit on either line, a warning message appears.
User LEDs
The User LEDs control displays the current state of the user LEDs. Click the LED
buttons to turn the board LEDs on and off.
Ethernet
Click Start Simple Socket Server to run the simple_socket_server.elf program that
was downloaded into FPGA during configuration.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–8 Chapter 6: Board Test System
Using the Board Test System
Read
The Read control reads the flash memory on your board. To see the flash memory
contents, type a starting address in the text box and click Read. Values starting at the
specified address appear in the table. The flash memory addresses display in the
format the Nios II processor within the FPGA uses, that is, each flash memory address
is offset by 0x08000000. Thus, the first location in flash memory appears as 0x08000000
in the GUI.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–9
Using the Board Test System
Write
The Write control writes the flash memory on your board. To update the flash
memory contents, change values in the table and click Write. The application writes
the new values to flash memory and then reads the values back to guarantee that the
graphical display accurately reflects the memory contents.
1 To prevent overwriting the dedicated portions of flash memory, the application limits
the writable flash memory address range to 0x08FE0000 to 0x08FFFFFF (which
corresponds to address range 0x00FE0000 - 0x00FFFFFF in the uppermost portion of
the user software memory block, as shown in Figure 6–1 on page 6–2 and Table A–1
on page A–1).
Random Test
Starts a random data pattern test to flash memory. Limited to scratch page in the
upper 128K block.
CFI Query
The CFI Query control updates the memory table, displaying the CFI ROM table
contents from the flash device.
Increment Test
Starts an incrementing data pattern test to flash memory. Limited to scratch page in
the upper 128K block.
Reset
The Reset control executes the flash device’s reset command and updates the memory
table displayed on the Flash tab.
Erase
Erases flash memory. Limited to scratch page upper 128K blocks.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–10 Chapter 6: Board Test System
Using the Board Test System
Read
The Read control reads the SSRAM on your board. To see the SSRAM contents, type a
starting address in the text box and click Read. Values starting at the specified address
appear in the table. The SSRAM addresses display in the format the Nios II processor
within the FPGA uses, that is, each SSRAM address is offset by 0x00200000. Thus, the
first location in SSRAM appears as 0x00200000 in the GUI.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–11
Using the Board Test System
Write
The Write control writes the SSRAM on your board. To update the SSRAM contents,
change values in the table and click Write. The application writes the new values to
SSRAM and then reads the values back to guarantee that the graphical display
accurately reflects the memory contents.
Random Test
Starts an random data pattern test to flash memory.
Incrementing Test
Starts an incrementing data pattern test to flash memory.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–12 Chapter 6: Board Test System
Using the Board Test System
Port
The Port control directs communication to one of two DDR2 memory ports on your
board. Each interface is 32 bits wide. Since there are two DDR2 ports on the
Cyclone IV GX FPGA development board, the DDR2 tab has 2 radio buttons to
monitor each DDR2 interface.
Start
The Start control initiates DDR2 memory transaction performance analysis.
Stop
The Stop control terminates transaction performance analysis.
Performance Indicators
These controls display current transaction performance analysis information collected
since you last clicked Start:
■ Write, Read, and Total performance bars—Show the percentage of maximum
theoretical data rate that the requested transactions are able to achieve.
■ Write (MBps), Read (MBps), and Total (MBps)—Show the number of bytes of
data analyzed per second. Each data bus is 32 bits wide and the frequency is
167 MHz double data rate (333 Mbps per pin), equating to a theoretical maximum
bandwidth of 1332 MBps.
Error Control
The Error control controls display data errors detected during analysis and allow you
to insert errors:
■ Detected errors—Displays the number of data errors detected in the hardware.
■ Inserted errors—Displays the number of errors inserted into the transaction
stream.
■ Insert Error—Inserts a one-word error into the transaction stream each time you
click the button. Insert Error is only enabled during transaction performance
analysis.
■ Clear—Resets the Detected errors and Inserted errors counters to zeros.
Data Type
The Data type control specifies the type of data contained in the transactions. The
following data types are available for analysis:
■ PRBS—Selects pseudo-random bit sequences.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–13
Using the Board Test System
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–14 Chapter 6: Board Test System
Using the Board Test System
1 You must have the loopback HSMC installed on the HSMC connector that you are
testing for this test to work correctly.
Channel
■ HSMA x4 XCVR—Selects the transceiver signals on HSMC Port A for test status
reporting
■ HSMA x41 single-ended—Selects the single-ended CMOS signals on HSMC Port
A for test status reporting
■ HSMB x4 XCVR—Selects the transceiver signals on HSMC Port B for test status
reporting
■ HSMB x41 single-ended—Selects the single-ended CMOS signals on HSMC Port
B for test status reporting
Start
The Start control initiates HSMC transaction performance analysis.
Stop
The Stop control terminates transaction performance analysis.
PMA Setting
The PMA Setting button allows you to make changes to the PMA parameters that
affect the active transceiver interface. The following settings are available for analysis:
■ Serial Loopback—Routes signals from the receiver to the transmitter.
■ VOD—Specifies the voltage output differential of the transmitter buffer.
■ Pre-emphasis tap
■ Pre—Specifies the amount of pre-emphasis on the pre-tap of the transmitter
buffer.
■ First post—Specifies the amount of pre-emphasis on the first post tap of the
transmitter buffer.
■ Second post—Specifies the amount of pre-emphasis on the second post tap of
the transmitter buffer.
■ Equalizer—Specifies the setting for the receiver equalizer.
■ DC gain—Specifies the DC portion of the receiver equalizer.
Data Pattern
The Data pattern control specifies the type of data contained in the transactions. The
following data types are available for analysis:
■ PRBS 7—Selects pseudo-random 7-bit sequences.
■ PRBS 15—Selects pseudo-random 15-bit sequences.
■ PRBS 23—Selects pseudo-random 23-bit sequences.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–15
The Power Monitor
Error Control
The Error control controls display data errors detected during analysis and allow you
to insert errors:
■ Detected errors—Displays the number of data errors detected in the hardware.
■ Inserted errors—Displays the number of errors inserted into the transmit data
stream.
■ Insert Error—Inserts a one-word error into the transmit data stream each time you
click the button. Insert Error is only enabled during transaction performance
analysis.
■ Clear—Resets the Detected errors and Inserted errors counters to zeros.
Status
These controls display current transaction performance analysis information collected
since you last clicked Start:
■ TX and RX performance bars—Show the percentage of maximum theoretical data
rate that the requested transactions are able to achieve. The maximum is 3.125
Gbps per transmitter x 4 transmitters = 12.5 Gbps = 1562.5 MBps, which requires a
reference clock of approximately 100.8 MHz; the board powers up with a 100.0
MHz clock with a typical maximum performance of approximately 1550 MBps.
■ PLL lock—Shows the PLL locked or unlocked state.
■ Pattern sync—Shows the pattern synced or not synced state. The pattern is
considered synced when the start of the data sequence is detected.
■ Channel lock—Shows the channel locked or unlocked state. When locked, all
lanes are word aligned and channel bonded.
■ MBps—Shows the number of megabytes of data analyzed per second for transmit
and receive.
1 You can also run the Power Monitor as a stand-alone application. PowerMonitor.exe
resides in the
<install dir>\kits\cycloneIVGX_4cgx150_fpga\examples\board_test_system
directory.
On Windows, click Start > All Programs > Altera > Cyclone IV GX FPGA
Development Kit <version> > Power Monitor to start the application.
The Power Monitor communicates with the MAX II device on the board through the
JTAG bus. A power monitor circuit attached to the MAX II device allows you to
measure the power that the Cyclone IV GX FPGA device is consuming regardless of
the design currently running. Figure 6–8 shows the Power Monitor.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–16 Chapter 6: Board Test System
The Power Monitor
c If the VCC rail consumes more than 3.25 A, Altera recommends that the fan be
installed.
General Information
The General information controls display the following information about the
MAX II device:
■ MAX II version—Indicates the version of MAX II code currently running on the
board. The MAX II code resides in the <install
dir>\kits\cycloneIVGX_4cgx150_fpga\factory_recovery and <install
dir>\kits\cycloneIVGX_4cgx150_fpga\examples\max2 directories. Newer
revisions of this code might be available on the Cyclone IV GX FPGA
Development Kit page of the Altera website.
■ Power rail—Selects the power rail to measure. After selecting the desired rail, click
Reset to refresh the screen with new board readings.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–17
The Power Monitor
Power Information
The Power information control displays current, maximum, and minimum power
readings for the following units:
■ mVolt
■ mAmp
■ mWatt
Power Graph
The power graph displays the mWatt power consumption of your board over time.
The green line indicates the current value. The red line indicates the maximum value
read since the last reset. The yellow line indicates the minimum value read since the
last reset.
Graph Settings
The following Graph settings controls allow you to define the look and feel of the
power graph:
■ Scale select—Specifies the amount to scale the power graph. Select a smaller
number to zoom in to see finer detail. Select a larger number to zoom out to see the
entire range of recorded values.
■ Update speed—Specifies how often to refresh the graph.
Reset
This Reset control clears the graph, resets the minimum and maximum values, and
restarts the Power Monitor.
Calculating Power
The Power Monitor calculates power by measuring two different voltages with the
LT2418 A/D and applying the equation P = V × I to determine the power
consumption. The LT2418 measures the voltage after the appropriate sense resistor
(Vsense) and the voltage drop across that sense resistor (Vdif). The current (I) is
calculated by dividing the measured voltage drop across the resistor by the value of
the sense resistor (I = Vdif/R). Through substitution, the equation for calculating
power becomes P = V × I = Vsense × (Vdif/R) = (Vsense) × (Vdif) × (1/.003).
You can verify the power numbers shown in the Power Monitor with a digital
multimeter that is capable of measuring microvolts to ensure you have enough
significant digits for an accurate calculation. Measure the voltage on one side of the
resistor (the side opposite the power source) and then measure the voltage on the
other side. The first measurement is Vsense and the difference between the two
measurements is Vdif. Plug the values into the equation to determine the power
consumption.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–18 Chapter 6: Board Test System
The Clock Control
f For more information about the Si570 and the Cyclone IV GX FPGA development
board’s clocking circuitry and clock input pins, refer to the Cyclone IV GX FPGA
Development Board Reference Manual.
The Clock Control communicates with the MAX II device on the board through the
JTAG bus. The Si570 programmable oscillator is connected to the MAX II device
through a 2-wire serial bus. Figure 6–9 shows the Clock Control.
The following sections describe the Clock Control application’s control and status
information.
f For more information about the Si570 registers, refer to the Si570/Si571 datasheet
available on the Silicon Labs website (www.silabs.com).
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter 6: Board Test System 6–19
Configuring the FPGA Using the Quartus II Programmer
fXTAL
The fXTAL control shows the calculated internal fixed-frequency crystal, based on the
serial port register values.
f For more information about the fXTAL value and how it is calculated, refer to the
Si570/Si571 datasheet available on the Silicon Labs website (www.silabs.com).
Target Frequency
The Target frequency control allows you to specify the frequency of the clock. Legal
values are between 10 and 810 MHz with eight digits of precision to the right of the
decimal point. For example, 421.31259873 is possible within 100 parts per million
(ppm). The Target frequency control works in conjunction with the Set New
Frequency control.
Reset Si570
The Reset Si570 control sets the Si570 programmable oscillator to the default
frequency of 100 MHz.
1 Using the Quartus II programmer to configure a device on the board causes other
JTAG-based applications such as the Board Test System and the Power Monitor to lose
their connection to the board. Restart those applications after configuration is
complete.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
6–20 Chapter 6: Board Test System
Configuring the FPGA Using the Quartus II Programmer
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
A. Programming the Flash Memory
Device
As you develop your own project using the Altera tools, you can program the flash
memory device so that your own design loads from flash memory into the FPGA on
power up. This appendix describes the preprogrammed contents of the common flash
interface (CFI) flash memory device on the Cyclone IV GX FPGA development board
and the Nios II EDS tools involved with reprogramming the user portions of the flash
memory device.
The Cyclone IV GX FPGA development board ships with the CFI flash device
preprogrammed with a default factory FPGA configuration for running the Board
Update Portal design example and a default user configuration for running the Board
Test System demonstration. There are several other factory software files written to
the CFI flash device to support the Board Update Portal. These software files were
created using the Nios II EDS, just as the hardware design was created using the
Quartus II software.
f For more information about Altera development tools, refer to the Design Software
page of the Altera website.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
A–2 Chapter :
Preparing Design Files for Flash Programming
c Altera recommends that you do not overwrite the factory hardware and factory
software images unless you are an expert with the Altera tools. If you unintentionally
overwrite the factory hardware or factory software image, refer to “Restoring the
Flash Device to the Factory Settings” on page A–4.
f For more information about Nios II EDS software tools and practices, refer to the
Embedded Software Development page of the Altera website.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter : A–3
Programming Flash Memory Using the Board Update Portal
The resulting .flash files are ready for flash device programming. If your design uses
additional files such as image data or files used by the runtime program, you must
first convert the files to .flash format and concatenate them into one .flash file before
using the Board Update Portal to upload them.
1 The Board Update Portal standard .flash format conventionally uses either
<filename>_hw.flash for hardware design files or <filename>_sw.flash for software
design files.
1 If you have generated a .sof that operates without a software design file, you can still
use the Board Update Portal to upload your design. In this case, leave the Software
File Name field blank.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
A–4 Chapter :
Restoring the Flash Device to the Factory Settings
f For more information about the nios2-flash-programmer utility, refer to the Nios II
Flash Programmer User Guide.
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Chapter : A–5
Restoring the MAX II CPLD to the Factory Settings
f To ensure that you have the most up-to-date factory restore files and information
about this product, refer to the Cyclone IV GX FPGA Development Kit page of the
Altera website.
1 Setting DIP switch SW5.1 to the on position includes the MAX II device in
the JTAG chain.
f To ensure that you have the most up-to-date factory restore files and information
about this product, refer to the Cyclone IV GX FPGA Development Kit page of the
Altera website.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
A–6 Chapter :
Restoring the MAX II CPLD to the Factory Settings
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation
Additional Information
This chapter provides additional information about the document and Altera.
Typographic Conventions
The following table shows the typographic conventions this document uses.
November 2014 Altera Corporation Cyclone IV GX FPGA Development Kit User Guide
Info–2 Additional Information
Typographic Conventions
Cyclone IV GX FPGA Development Kit User Guide November 2014 Altera Corporation