Read_content_from_memory, Usage, Options – Altera Quartus II Scripting User Manual

Page 258: Description, Example, Read_content_from_memory –128

Advertising
background image

3–128

Chapter 3: Tcl Packages & Commands

insystem_memory_edit

Quartus II Scripting Reference Manual

© July 2013

Altera Corporation

read_content_from_memory

Usage

read_content_from_memory [-content_in_hex] -instance_index <instance index>
-start_address <starting address> -word_count <word count>

Options

-content_in_hex: The memory content string is represented in hexadecimal format

-instance_index <instance index>: Index of the editable memory instance to read

-start_address <starting address>: The lowest memory address to be read

-word_count <word count>: The number of contiguous memory words to be read

Description

Retrieves the memory content represented in the bit stream from the specified editable memory instance
starting from the specified address.

The memory content string is in the same format as the input content string in the TCL command
write_content_to_memory.

Example

# Instance 0 is configured as {0 1024 8 RW ROM/RAM mem0}

# Initiate a editing sequence
begin_memory_edit -hardware_name "USB-Blaster \[USB-0\]" -device_name \
"@1: EP1S25/_HARDCOPY_FPGA_PROTOTYPE (0x020030DD)"

# Write memory content using binary string
write_content_to_memory -instance_index 0 -start_address 575 -word_count \
2 -content "0000001011011100"

# Read back memory content in binary string written
puts \
[read_content_from_memory -instance_index 0 -start_address 575 \
-word_count 2 ]

# Write memory content using hexadecimal string
write_content_to_memory -instance_index 0 -start_address 575 -word_count \
2 -content "E2F1" -content_in_hex

# Read back memory content in hexadecimal string written
puts \
[read_content_from_memory -instance_index 0 -start_address 575 \
-word_count 2 -content_in_hex]

# End the editing sequence
end_memory_edit

Advertising