Altera Quartus II Scripting Uživatelský manuál Strana 261

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 634
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 260
Chapter 3: Tcl Packages & Commands 3–131
insystem_memory_edit
© July 2013 Altera Corporation Quartus II Scripting Reference Manual
write_content_to_memory
Usage
write_content_to_memory -content <content string> [-content_in_hex] -instance_index
<instance index> -start_address <starting address> -word_count <word count>
Options
-content <content string>: A string that represents all word values concatenated
together in order in either binary or hexadecimal format
-content_in_hex: The memory content string is represented in hexadecimal format
-instance_index <instance index>: Index of the editable memory instance to modify
-start_address <starting address>: The lowest memory address to be modified
-word_count <word count>: The number of contiguous memory words to be modified
Description
Writes the data represented in the bit stream into the specified editable memory instance starting from the
specified address.
The bit stream should be ordered by word from high address to low address, contiguously without gaps or
delimiters. If the starting address is ADDR, and word count is N, the order is <word @ ADDR + N - 1> ...
<word @ ADDR + 1><word @ ADDR> In each word, the MSB is on the left, LSB is on the right. The bit
stream can be in either binary or hexadecimal. For example, if the word width is 8, and two words, 1 and
128, are written to address 0 and 1 respectively, the bitstream should be "1000000000000001" in binary or
"8001" in hexadecimal. The TCL command is write_content_to_memory -instance_index 0 -start_address 0
-word_count 2 -content "1000000000000001" or write_content_to_memory -instance_index 0 -start_address
0 -word_count 2 -content "8001" -content_in_hex
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
Zobrazit stránku 260
1 2 ... 256 257 258 259 260 261 262 263 264 265 266 ... 633 634

Komentáře k této Příručce

Žádné komentáře