UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer ahmadian
Observer
11,294 Views
Registered: ‎05-03-2015

Initializing BRAM by external file

Hello, 

 

I've instantiated several "BRAM_SDP_MACRO" in my code to store the needed parameters and data to be read by some componenets. (I can't use the native block memory generator, as the BRAM is used within an independent IP). 

As the same entity is instantiated several times, I'd like to use external .mem files (or similar files) to initialize the BRAMs. I've also imported .mif files in the "Design sources" but I don't know how to use them. 

I used the INIT_FILE, which is in the generics of this primitive, but it works only in the simulation and not in the real FPGA. 

 

I think that I can use the configuration memory for this purpose and I've tried to find a tutorial or document for that, but I couldn't find any. 

 

Can somebody help me and let me know the steps briefly?

 

I use Vivado 15.2, VHDL and Zynq-7000

 

Thanks in advance,

Hamid

0 Kudos
6 Replies
Scholar drjohnsmith
Scholar
11,251 Views
Registered: ‎07-09-2009

Re: Initializing BRAM by external file

0 Kudos
Observer ahmadian
Observer
11,250 Views
Registered: ‎05-03-2015

Re: Initializing BRAM by external file

Dear @drjohnsmith,

 

Thanks for the remark. 

In fact, as I've used the primitives of Vivado, the introduced function is already used within the code. The problem is that this function (to my knowledge) works only for the simulation and it does not initialize the block ram. 

 

Best regards, 

Hamid

0 Kudos
Scholar drjohnsmith
Scholar
11,217 Views
Registered: ‎07-09-2009

Re: Initializing BRAM by external file

should work for synthesis as well as simulation,

 

its used by things such as the microblaze and picoblaze to load the new programs into the design at synthesis time.

 

0 Kudos
Visitor itaowazard
Visitor
68 Views
Registered: ‎11-12-2017

Re: Initializing BRAM by external file

Same situation for me,
Behaviour, Post Synthesis, Post Implementation simulation works fine (memory initialized) but bitstream leaves whose memory registers empty (default zero's)

Can someone provide example or etc ? If it's possible at all

Tnx

0 Kudos
Scholar drjohnsmith
Scholar
52 Views
Registered: ‎07-09-2009

Re: Initializing BRAM by external file

@itaowazard 

 

you might want to start a new thread as this one is very very old,

 

0 Kudos
Visitor itaowazard
Visitor
45 Views
Registered: ‎11-12-2017

Re: Initializing BRAM by external file

tnx for advice
0 Kudos