Specify init file to inferred BRAM
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.
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.