Forum Discussion

johnt2's avatar
johnt2
Icon for New Contributor rankNew Contributor
1 year ago

New tcl error when accessing onchip memory.

I am trying to use the console (tcl shell)(Quartus Prime Pro 22.2) to run a tcl script that writes a memory location and then save the results. This had been working but with my latest load this problem popped up.

Here is the original working script (scratch.tcl):

Note: this script runs without any errors, but it is not actually writing or fetching from the memories any longer. I next started going line by line, see results below

# from command line type: quartus_stp -t scratch.tcl
begin_memory_edit -hardware_name "USB-Blaster \[USB-0\]" -device_name "@1: 10AS066H((0x02E050DD)"
for {set i 1} {$i < 65} {incr i} {
set filename "data$i.hex"
puts $filename
write_content_to_memory -instance_index 3 -start_address 30 -word_count 1 -content "0000000A" -content_in_hex
after 1000
save_content_from_memory_to_file -instance_index 1 -mem_file_path "$filename" -mem_file_type hex
after 1000
}
end_memory_edit

This command works:

tcl> quartus_stp --tcl_eval get_hardware_names
{USB-Blaster [USB-0]}

This command fails

tcl> quartus_stp --tcl_eval begin_memory_edit -hardware_name "USB-Blaster \[USB-0\]" -device_name "@1: 10AS066H((0x02E050DD)"
------------------------------------------------
invalid command name "USB-0"
while executing
"unknown_original USB-0"
("eval" body line 1)
invoked from within
"eval unknown_original $cmd $args"
(procedure "::unknown" line 7)
invoked from within
"USB-0"
invoked from within
"begin_memory_edit -hardware_name "USB-Blaster [USB-0]" -device_name "@1: 10AS066H((0x02E050DD)""
------------------------------------------------
child process exited abnormally
tcl>

I am not sure what changed and why this behavior has started. I did install some of the HPS

tools which May be linked to the issue.

Thanks,

John

8 Replies

  • johnt2's avatar
    johnt2
    Icon for New Contributor rankNew Contributor

    Some additional:

    I tried a cut and paste from the Quartus Prime message panel. This command is executed when you open memory content editor.

    result below when I try to run the same command from the TCL consle.

    quartus_stp --tcl_eval get_editable_mem_instances -hardware_name "USB-Blaster \[USB-0\]" -device_name "@1: 10AS066H(1|2|3|3E2|4|4E2)/.. (0x02E050DD)"
    ------------------------------------------------
    invalid command name "USB-0"
    while executing
    "unknown_original USB-0"
    ("eval" body line 1)
    invoked from within
    "eval unknown_original $cmd $args"
    (procedure "::unknown" line 7)
    invoked from within
    "USB-0"
    invoked from within
    "get_editable_mem_instances -hardware_name "USB-Blaster [USB-0]" -device_name "@1: 10AS066H(1|2|3|3E2|4|4E2)/.. (0x02E050DD)""
    ------------------------------------------------
    child process exited abnormally
    tcl>

  • ShengN_altera's avatar
    ShengN_altera
    Icon for Super Contributor rankSuper Contributor

    Hi,


    Possible to provide the sample design for testing?


    Thanks,

    Regards,

    Sheng


  • ShengN_altera's avatar
    ShengN_altera
    Icon for Super Contributor rankSuper Contributor

    Hi John,


    Any update on the sample design for testing?


    Thanks,

    Regards,

    Sheng


  • johnt2's avatar
    johnt2
    Icon for New Contributor rankNew Contributor

    Hi Sheng,

    Sorry for not closing this post. I discovered that the memory index was changed with the addition of a new diagnostic memory. This caused the previous tcl script to not run properly.

    Thanks,

    john

  • ShengN_altera's avatar
    ShengN_altera
    Icon for Super Contributor rankSuper Contributor

    Hi John,


    May I confirm that your problem being resolved from your side already?


    Thanks,

    Regards,

    Sheng