- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a project for which I would like to generate multiple versions of the same design differing *only* in the firmware loaded into SRAM. I obviously don't want to have to do a full recompile for each version, but it seems oddly difficult to make it happen.
quartus_cpf appears to have a command that does exactly what I'm looking for:
quartus_cpf --help=update_emb
Option: --update_emb
To update embedded memory block data in a SOF, specify the
Memory Initialization File (.mif) with the data for the
embedded memory block and its Address Mapping Information File (.amif),
along with the original SRAM Object File (.sof) file name and the
desired updated .sof file name.
quartus_cpf --update_emb <input_mif_file> <input_amif_file> <input_sof_file> <output_sof_file>
However, I have not been able to find any documentation at all about how to generate said .amif file, which I am guessing contains the metadata for quartus_cpf to know which bits correspond to the contents of the memory in question.
The section option, which seems far more tedious, is to create a new temporary revision of the project using quartus_cdb create_revision -based_on -copy_results and then --update_mif, but for the flow to work in any kind of sensible way, it has to be able to use a different .mif file (dynamically swapping out the .mif file in the filesystem would be a nightmare to get right in all cases), but the pathname to the .mif file is embedded in the database; so it would have to be changed/overridden without triggering a recompile. I thought manipulating parameters in quartus_cdb might be able to do it, but no matter what I have tried I have not been able to find any parameters whatsoever using get_all_parameters, get_parameters, etc; and so I have still no idea what I would even need to modify, how to do it, and whether or not it would avoid the recompile.
Many thanks for any hints.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There have been some suggestions on the net to generate the RAM blocks in HDL and then replace the .mif files directly in the database directory. This, presumably, would work, although is perhaps more than a bit cantankerous?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, may i know which device you are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using a Cyclone IV E.
I ended up handling this for now at least by making a hard-link copy (cp -al) of the database, .qsf and .qpf files into another directory, and putting the replacement .mif files in the corresponding relative path location inside that other directory. After that, quartus_cdb --update_mif does what one would like.
It is very clumsy but it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
allright got it. Let me get back to you on the AMIF file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, it seems like this .amif file is not available for public. You cant use the update_emb option.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page