Forum Discussion

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

On-Chip Memory in Qsys/Quartus

I have a design based on an Arria II GX part in which Qsys is utilized to generate a system made up of many different interfaces, other components and IP in the design. This system implements a PCIe bus that interacts with an off chip processor. This interface operates well and to the extent necessary thus far. I need to implement ROM with 12 bytes of information in the FPGA that is memory mapped and accessible through the PCIe bus. I have used Qsys to implement and instantiate the On-Chip memory and configured it as a ROM component with a 32 bit data width and 16 bytes of total memory. This made both Qsys and Quartus happy as it was indicated that there is a minimum amount of memory in this configuration and that the 4 bytes would have been padded, anyway. The memory block type in Qsys was identified as 'Auto'. The memory is connected to the PCIe via the Avalon interconnect in the Qsys tool along with the appropriate clock and reset signals. The address is specified in the location the off chip processor is expecting.

Once the Qsys 'system' is generated, I edit the .hex file indicated in the Qsys component, enter my data in a 32 bit format, and save the file. No additional comments, warnings or errors are generated regarding this component during compile, synthesis and routing. The programming file is generated/converted and the part programmed.

The external processor is then programmed to read the addresses for the information contained. The data that is read back by the processor is limited to the contents of bytes 8 - 11 only. I have attempted to read further addresses in the range and do not receive any of the other data that I entered in the hex file.

I have inspected the .hex file for the contents and the format for verification that it is correct. Apart from manually calculating the CRC in the Intel hex file, the contents are accurate.

Testing:

In many circumstances and in many forums, there are recommendations to delete the db and incremental_db folders and recompile. I have performed this action without resolution. I have changed the format of the memory w.r.t width and depth to construct the same number of bits/bytes.

What might be going on here? I believe I have ruled out endian-ness issues in dealing with the format of the data, but I don't believe that all of the data is in fact being loaded into the .sof or .pof files correctly. Is there any way to inspect these files for appropriate data? Is there something going on with the synthesis of the memory type or the information contained? Is there a known bug in using the on chip memory as ROM in Arria II devices?

Thanks in advance to any who can offer assistance.

Steve

11 Replies