Forum Discussion
19 Replies
- Altera_Forum
Honored Contributor
Which FPGA are you using?
- Altera_Forum
Honored Contributor
Cyclone EP1C12F324C8
- Altera_Forum
Honored Contributor
I don't know exactly why you want to use "BRAM", maybe you are starting from a Xilinx project and trying to convert it to Altera?
Anyway, I believe that you may instantiate an Altsyncram block and adapt it to your needs. It is a Megafunction available free of charge in Quartus. - Altera_Forum
Honored Contributor
Actually i am implementing a soft-core processor a.k.a zpu microcontroller which i have downloaded from www.opencores.org. What i'm trying to do is implementing simplest version of zpu uses BRAM on Altera Cyclone. If i were successfull then i can see the 'helloworld' on the screen of hyperterminal..The 'helloworld' in the bram is the input of my zpu processor. And how can i use altsyncram??i just found that in megafunction, but i didnt know how to use it cause it has a lot of inputs a and the inputs have strange names, which make complicated for me to use.Do you know where i can get the documentation on it?
- Altera_Forum
Honored Contributor
Yes, it is very simple.
On the Quartus choose Help --> Megafunctions/LPM --> Memory Compiler Megafunctions - Altera_Forum
Honored Contributor
You might be able to modify the HDL to enable synthesis to infer the RAM. See "Inferring Memory Functions from HDL Code" in the Quartus handbook, Volume 1, Section II, Chapter 6, "Recommended HDL Coding Styles". If you want to use features of the RAM block that synthesis does not support for inferred RAM, then you need to instantiate an altsyncram MegaWizard variation as OrchestraDirector suggested.
- Altera_Forum
Honored Contributor
at one stage i need to use the files in the format of .hex or .mif as memory content. But the helloworld data only available in BRAM-file or bin-file in the files i've downloaded.do know how to convert it into .hex or .mif file? Or can you help me to convert the file in the attachment into .hex and .mif file?
- Altera_Forum
Honored Contributor
I would open hello.bram Excel as a text file with the double quotes used as delimiters and the data column formatted as text. It should be easy enough to edit in Excel so that you can save it to a text file in the .mif format. To get an example of the .mif format, create a dummy .mif file in Quartus with 32-bit data.
- Altera_Forum
Honored Contributor
I've just copied all the data from excel and i put them in my new .mif file format.Because i have 3054 data, i formatted the new .mif file with number of words 4096.That means starting from 3054 to 4096 are all 0. Am i correct??
- Altera_Forum
Honored Contributor
Typically the not used bytes are 'FF' in the mif file, but they are dont-care values if you don't read it from the altsyncram block. So also '00' is an acceptable value if not used.