- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I've been trying to write an inferred memory with init file, but i can't manage to cause Quartus to initilize it.
First, I tried to use TEXTIO to configure initial value. I've read that Quartus doesn't support it, so I tried using MIF files as alternative.
I wrote a MIF file and linked it using the RAM_INIT_FILE attribute, but it seems like quartus ignored it.
When I ran PnR I did noticed that quartus mentioned MIF files only when creating ones itself - the new ones were all zeros and these were implemented instead of my MIF files.
I'm aware of the option to generate initilized ram in quartus, but I'm trying to make the inferred memory work with init file - So Im looking for a way to take care of the init file in the VHDL file only, without additional work in quartus.
The code I've wrote is in VHDL 2002 and was tested in quatus 14. (I don't have an example at the moment, but I can add if its required).
I wrote the MIF solution according to the following instructions :
Thank you in advance.
- Tags:
- inferred RAM
- MIF
- Vhdl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm sorry for the late response - I've been busy for the last few days.
I tried to create a simplified example of the problem (as some of you requested) -I re-wrote it based on quartus code templates and the mif file was used correctly.
After further inspection - I've noticed that my TextIO based initialization function, which should have been for simulation purpose only, did reset the memory to zero even when the TextIO part was not working.
I overlooked that part untill now because it was supposed to be for simulation only and I was sure it didn't had any effect.
I think that attribute didn't work because the function already declaired an initial value. (quartus did create a mif file for the zeros the function set to the memory)
After I've changed that part in the function the attribute worked and all was well.
Thank you all for your help and advice.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you try to upgrade the software to the latest version and see if the problem persists? The latest version is v20.1, you may download from Intel FPGA download center https://fpgasoftware.intel.com/20.1/?edition=standard&platform=windows
Thanks
Best regards,
KhaiY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
As of your proposal- I tried to upgrade the Quartus version and see if the problem presists.
I've checked the same code on Quartus 18.1 (Had it pre-installed) and it seemed the same.
Generally - I'm looking for a solution that will be supported on older versions such as 14.1, so I cannot accept a Quartus upgrade as a valid solution - but if checking it on 20.1 might help to analyze the problem I will gladly try it.
Many Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see why you should not be able to do this. I can do it in Verilog using Quartus 11.0sp1 (and later).
In the verilog source file:
reg [0:11] memory [0:MEMSIZE-1] /* synthesis ramstyle = "no_rw_check" */;
initial $readmemb("meminit.txt", memory, 0, MEMSIZE-1);
And in the plain text file meminit.txt just 8192 lines with a 12b binary data on each line:
000000000000
101100000011
101100000011
010110000011
...
000000000000
This initializes the 8192x12 block ram with the supplied data.
I am not familiar enough with VHDL to know the exact syntax to use but I would be very surprised if it is not supported in VHDL as well.
PS:
Well I guess I gave Altera/Intel too much credit for their VHDL support. Per this old post:
VHDL memory init is not easy to do in the generic case. Glad I code only in verilog. Never much saw the point to using VHDL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think VHDL supports something like at - VHDL 93 doesn't even support 2 dimensional arrays with variying lengths to both dimensions!
I might try out verilog as well, Thank you for your response!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you share the design QAR for investigation? To generate the design QAR, click on Project > Archive Project > Archive
Thanks
Best regards,
KhaiY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you share the design file for investigation?
Thanks
Best regards,
KhaiY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We do not receive any response from you to the previous question/reply/answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you
Best regards,
KhaiY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm sorry for the late response - I've been busy for the last few days.
I tried to create a simplified example of the problem (as some of you requested) -I re-wrote it based on quartus code templates and the mif file was used correctly.
After further inspection - I've noticed that my TextIO based initialization function, which should have been for simulation purpose only, did reset the memory to zero even when the TextIO part was not working.
I overlooked that part untill now because it was supposed to be for simulation only and I was sure it didn't had any effect.
I think that attribute didn't work because the function already declaired an initial value. (quartus did create a mif file for the zeros the function set to the memory)
After I've changed that part in the function the attribute worked and all was well.
Thank you all for your help and advice.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page