beautypg.com

Altera MAX II User Manual

Page 29

background image

Altera Corporation

Development Kit Version 1.1.0

2–21

July 2005

MAX II Development Kit Getting Started User Guide

Getting Started

e.

Read the UFM—The UFM is arranged as 256 locations, each
containing 32 bits of data. Currently residing in the UFM is the
inverse of each address. Set the default encoding to
Hexadecimal and click Read UFM. The data displayed should
be FFFF FFFE FFFD FFFC FFFB and so forth. You can recompile
this design with a different memory initialization file (MIF) to
change the data in the UFM. Note that when you read from the
UFM, a file called UFMDataBack.txt is created in the same
directory where the USB_Utility.exe file resides. This file is
re-created each time you read the UFM. It contains the
addresses and the data read from those addresses.

1

UFMDataBack.txt

must not be open when you read from

the UFM.

f.

Display the board temperature and push button counts—Press the
S2, S3, and S4 buttons on the board. Note that each time a
button is pressed, the corresponding text box on the GUI
increments. Also note that the board temperature is updated
each time a switch is pressed.

1

The SRAM and UFM read/write options only read or write
384 bytes at a time. This data is always written to or read from
the 384 lowest address locations.

Understanding the Functionality of the USB Reference Design

The USB Reference Design has two pieces:

Verilog code written to dictate the functionality of the MAX II device

Visual Basic code to control the PC application

The MAX II design consists entirely of state machines. Each individual
design file contains a state machine to control the reading/writing of each
component. These files contain extensive comments and designers are
encouraged to look through the Verilog code to gain a complete
understanding of how the MAX II design functions. The Director.v code
constantly awaits for one of two things to happen: either a button is
pressed or data arrives from the PC. If a button is pressed, the Director
enables the PassivesInterface.v, which takes over control of the output to
the USB MAC FIFO and writes the values of the Switch Counters and
Temperature blocks. If data is received from the PC, then the Director
passes control to the UFMInterface.v, the SRAMInterface.v, or the
LCDInterface.v

, depending on the value of the data received. Refer to the

Verilog code itself for more details on the operation of this MAX II design.