cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
5,479 Views

Initializing bram

In a 256byte bram, how do I initialize the first 128 to different bytes  and the last 128 to 00s?

 

 

0 Kudos
3 Replies
5,472 Views
Registered: ‎07-15-2008

I’ve seen this covered at least three times on the forum, a quick search should answer that one for you. 

 

 

Kind Regards Bobster

 

0 Kudos
Anonymous
Not applicable
5,467 Views

bobster, I did search before posting. can you post the link plz.

XST guide has something similar but not exactly what I want. 

 

The way I am doing is 

 

for a 8byte bram, the first 2 are different values like FF and EE. I want the remaining to be 00h. I can write X"00" 6 times, but probably there is a better way.

 

signal mymem: mem:=(X"FF", X"EE", ......);

0 Kudos
evgenis1
Advisor
Advisor
5,449 Views
Registered: ‎12-03-2007

You can initialize the contents of BRAM using COE (memory coefficient) file. It's described in detail in the datasheet produced by the CoreGen along with other BRAM files (blk_mem_gen_ds512.pdf for Block mem gen v2.8).

 

 

 

 

OutputLogic 

Tags (2)
0 Kudos