Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

System Console: Avalon MM command "master_write_from_file"

Hi!

I am using System Console to connect to a QSYS/JTAG to Avalon Master controller to read/write CIII Starter Kit DDR memory (running a .tcl that makes a dashboard GUI).

This works well when using master_write_32/master_read_32 commands.

Next step was to use master_write_from_file and master_read_to_file commands to allow - simply said - file download from System Console GUI to DDR (and back).

Unfortunately, these files are required to be in binary format, which makes it hard to generate them or read them back.

Documentation in QII53028-12.1.0 (Analyzing and Debugging Designs with the System Console) is not very detailed on this "binary" format itself.

I was able to send files (memory content was changing when executed) and read back memory content to a file on the host.

Is there any simple tool/process embedded in Quartus II I am missing or do I have to manually to the job to convert my data back&forth from/into binary format that System Console wants to see?

:confused: how should a file look like that avalon mm command "master_write_from_file" can process it well?

I was planning to have a .mif or .hex file or something similar as source for System Console download.

Currently I am not able to convert received file in way to make it readable.

There is an API for MATLAB (from Altera) that offers similar MasterRead/MasterRead commands, allowing easier data processing from host into DDR RAM.

But I want to avoid bringing MATLAB into the game since this TCL script should simply run on different machines that have Quartus II available only.

Any comments or ideas are appreciated!

Thanks in advance.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As a workaround MATLAB can be used to do the conversion job from integer to binary format to prepare files for System Console. I did a check and this works well in both directions, but I am still wondering if there is a way to use Quartus II for that task, like in the same way one can generate .mif Files. Any proposals? Thanks!