D
D
i
i
g
g
i
i
l
l
e
e
n
n
t
t
M
M
e
e
m
m
U
U
t
t
i
i
l
l
U
U
s
s
e
e
r
r
M
M
a
a
n
n
u
u
a
a
l
l
TM
www.digilentinc.com
Revision: 05/ 31/ 05 215 E Main Suite D| Pullman, WA 99163
(509) 334 6306 Voice and Fax
Copyright Digilent, Inc. Page 1 of 3
Doc: 506-003
Introduction
The Digilent MemUtil application is used to
read data and write data to and from the
Digilent Mem1 module.
MemUtil allows for:
writing data to Flash from files
reading data from Flash to file
erasing data from the Flash
writing data to RAM from file
reading data from RAM to file.
Definitions
MEM1 C0 128Kb SRAM, 512Kb Flash
MEM1 C1 512Kb SRAM, 512Kb Flash
MEM1 C2 1Mb SRAM, no Flash
MEM1 C3 1Mb Flash, no SRAM
D2SB XC2S200E system board
D2FT 300 XC2S300E system board
D2FT 400 XC2S400E system board
Pegasus1 XC2S50 system board
Pegasus2 XC2S200 system board
S3 200 XC3S200 system board
S3 400 XCS3400 system board
Net1 Ethernet Communications Mod
USB2 USB Communications Mod
SIO2 Serial Communications Mod
Setup
Installing Adept Suite
The Digilent Adept Suite must be installed
before MemUtil can be used. The Adept Suite
is available on Digilent’s website,
www.digilentinc.com
.
Board Setup
The placement of the communication module
and Mem1 module(s) depends on the logic
loaded into the FPGA. Configuration files (.bit)
to control the reading and writing of memory in
the FPGA are provided. The Communications
module (for example the USB2 module) is
always placed on the A1 expansion connector
on the system board.
All memory modules are
connected to the A2 expansion connector on
the system board. If two MEM1 C1 modules
are used simultaneously, then the placement
of the second Mem1 C1 module varies
depending on the device. For more information
see the following table, that illustrates where
the memory modules are placed based on the
logic loaded into the FPGA.
D2FT D2SB Peg S3
Mem1 C1
A2 A2 A2 A2
Mem1 C1X2
A2, B1 A2, C1 A2, B1 A2, B1
Mem1 C2
A2 A2 A2 A2
Mem1 C3
A2 A2 A2 A2
Configure FPGA
Before MemUtil can be used, logic to control
memory, reading and writing must be loaded
into the gate array on the system board.
After connecting the modules to the proper
expansion ports, power up the module and
configure the FPGA with the .bit file
corresponding to the module in use. To locate
the .bit file, first open the directory for the
specific memory module, then within that
directory there are specific directories for each
Digilent board. Select the directory that
corresponds to the board being used.
Using MemUtil
Once the system board FPGA has been
configured with the proper .bit file, MemUtil can
be used.
User Interface
All numeric values can be entered into MemUtil
as binary, decimal, or hexadecimal. For
example, a decimal byte is written as 170, a
hexadecimal byte as 0xaa, and a binary byte is
written as 10101010.
Digilent, Inc
TM
MemUtil User Manual
www.digilentinc.com
Copyright Digilent, Inc. Page 2 of 3
Doc: 506-003
Selecting a Connection
Click the “Properties” tab in MemUtil. In this
tab, a communications module can be selected
from the device table. By clicking the
“Configure” button, the Communication
Modules dialog box will appear and the device
table can be manipulated. For more
information about the device table, see the
Digilent Adept Users Manual.
Selecting the Mem1 Configuration
The Mem1 configuration must be selected in
MemUtil before performing any read/write
operations. This setting is under the
“Properties” tab in the “Memory Configuration”
box.
Setting a Starting Register Address
Different reference designs may need starting
register address to be changed from the
default address of 0. This setting can be
altered under the “Properties” tab in the
“Starting Register Address” box. The address
must be within the range of 0 and 255 and
must be a multiple of 8.
Loading Data to RAM From File
Click the “Load RAM” tab. Enter the path and
name of the file to load into RAM in the “File
Name” text box. The path and file name can
be retrieved using a windows dialog box by
clicking the “Browse” button. Enter the offset
from the beginning of the file (in bytes) in the
“File Start Location” text box. Data will begin
to be loaded into RAM from this offset location
in the file. In the “Start Address” text box,
enter the starting address in RAM to which the
data is to be written. The first address in the
RAM is 0x00. In the “Length” text box, enter
the number of bytes to be loaded into RAM. A
file can be completely loaded or partially
loaded into RAM. To verify that the data has
been loaded properly, check the “Verify after
load” box. Finally, to load the RAM, click the
“Load” button.
If MemUtil tries to write to an address higher
than the maximum address in the RAM, the
logic in the gate array will load the rest of the
data from the beginning address in the RAM.
Store Data from RAM to File
Click the “Store RAM” tab. Enter the path and
name of the file to store data from RAM in the
“File Name” text box. The path and file name
can be retrieved using a windows dialog box
by clicking the “Browse” button.
Choose a method of writing the data to the file.
If the file exists, it can be appended, replaced
completely, or overwritten from a specified
location. In the “Start Address” text box, enter
the starting address in the RAM from which
data is to be read. In the “Length” text box,
enter the number of bytes to store from the
RAM. Finally, to store the RAM, click the
“Load” button.
Loading Data to Flash From File
Click the “Load Flash” tab. Enter the path and
name of the file to load into Flash in the “File
Name” text box. The path and file name can
be retrieved using a windows dialog box by
clicking the “Browse” button.
Enter the offset from the beginning of the file
(in bytes) in the “File Start Location” text box.
Data will begin to be loaded into Flash from
this offset location in the file.
In the “Start Address” text box, enter the
starting address in Flash to which the data is to
be written. The first address in the Flash is
0x00.
In the “Length” text box, enter the number of
bytes to be loaded into Flash. A file can be
completely loaded or partially loaded into
Flash. To verify that the data has been loaded
properly, check the “Verify after load” box.
Finally, to load the Flash, click the “Load”
button.
It is very important that the Flash be erased
before it is programmed. To avoid damage to
the Mem1, it is advised that the “Auto erase
before programming” box remain checked.
If an address higher than the maximum
address in the Flash is to be loaded, MemUtil
will post an error, and not load any data.