- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a custom SoPC component that instantiates an on-chip memory. I need to use multiple instances of this component in my SoPC system, each with its own memory initialization file. In my custom component (I use VHDL), I have instantiated the memory using the MeagFunction PlugIn Wizard. It allows me to set a memory initialization file, but the file will be the same for all instances. I could modify the MegaFunction wrapper VHDL file to export the init_file parameter as a generic and then export it again from my component so that it becomes a parameter in my SoPC component. Is there a better way? Thanks! NikiLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mega-wizard generated blocks are fairly inflexible for things like that, you're stuck with however you set it up in the wizard.
You can probably do as you describe, but then you wont be able to modify it again in the megawizard and you will have to put your own wrapper around a normal instantiation. Personally, I avoid using the megawizard whenever possible because it just generates a load of files you dont really need and makes it all infexible.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can solve this in the way that you proposed.
An other solution in line with the global design tool flow of Quartus SOPC could be as follows: Each memory module with a different content (different .mif file) can be seen as a different component. So if you generate for every on-chip memory block with specific inital content a new MegaWizard module in SOPC, the whole flow is OK again. (Of course you have a point that it would not be necessary... But then you have to intervene in the design flow, causing trouble in the use of your design afterwards or by other people...)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! Maybe I will just instantiate the RAM in my own wrapper (no MegaWizard), as you suggest.
Regards, Niki- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not a VHDL guru. I use Verilog. But I frequently do what you are trying to do. My method is to override the memory initialization file for each particular instance using the assignment editor.
Here is an example of the resulting assignment in the QSF file:set_parameter -name INIT_FILE trio_boot_loader_epcs.hex -to "trio_sopc:trio_sopc_inst|epcs_controller:the_epcs_controller|altsyncram:the_boot_copier_rom"
So this takes precedence over whatever file is called out in the code itself. The easiest way to do this is to browse through the design hierarchy in the project navigator until you find the RAM module that you want to change the MIF file for, then right click on it and select Locate->In Assignment Editor. Then just make a "Parameter" assignment to it. This is just one method but it works well for me. Jake

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