cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
srv
Visitor
Visitor
14,919 Views
Registered: ‎10-18-2011

Saving the contents of BRAM to a file

I am using Xilinx ISE 10.1 synthesizer. 

 

-I am able to initialize my BRAM with a .coe file and access it. Also I can update it with new .mem file using data2mem tool and update my bit file. Here I have configured it as ROM.

-My problem is, I don't know how to store the BRAM contents to a file. I am using Single port block memory from the core generator. I am configuring it as RAM. I want to write data to it and access it later.

-I didn't find any relevant post stating this. May be its only me who didnt find a way to save the contents to a file.

For example, in Altera in-system memory content editor, there is an option to export the data to a file. Is there any such way in Xilinx or some way to do it with data2mem tool.

-I can send the memory content to PC using serial port but that's not my concern right now. I am really looking for some way to store the content to a file (probably a .mem file) and use it in MATLAB.

So, please can anyone explain it to me or point a document or some link.

I have studied the relevant documentation but it didn't strike my mind.

Any kind of suggestion would be highly appreciated. Also, tell me if I am thinking in a wrong way.

0 Kudos
Reply
7 Replies
srv
Visitor
Visitor
14,907 Views
Registered: ‎10-18-2011

please help me out.....I feel exhausted in searching...
0 Kudos
Reply
viviany
Xilinx Employee
Xilinx Employee
14,900 Views
Registered: ‎05-14-2008

This is not the right place to ask this question. I'll move your message to "System Logic" board. Hope you'll get the answer there.

 

Thanks.

Vivian

-------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 Kudos
Reply
rcingham
Teacher
Teacher
14,866 Views
Registered: ‎09-09-2010

"I don't know how to store the BRAM contents to a file."

At which point in the design/test process are you trying to do this? While you are running the design in hardware?

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Reply
srv
Visitor
Visitor
14,865 Views
Registered: ‎10-18-2011

Thank you for the reply....

 

-I am synthesizing my code on fpga boards equipped  with Virtex II FPGAs, bg575 package.

 

-I am storing the input data for my filter chain on BRAM. I tested it with few data and it worked and I can also update it.

 

-I wish to write my output data again to the same BRAM or a different one. At this point, I didnt find explicity the way to store the data written to the BRAM to a file (and i suppose it should be .mem file)

 

- I have seen in the data2mem documentation that I can produce a .mem file as output by giving the .elf file and .bmm file as input. But I dont see any .elf file generated because I am only using the .bit file to program the FPGA. I suppose that .elf file is produced when we are using some processor core and writing some firmware to activate it.

 

-I have seen the following lines in the data2mem documentation and I didnot fully understand it

 

An OUTPUT keyword can be used for outputting memory device MEM files. This takes the
form of:
top/ram_cntlr/ram0 [7:0] OUTPUT = ram0.mem;

 

- Is this going to help me write the BRAM contents to mem file.?

 

- I am attaching the example .bmm file, here I can understand that the placement locations are given but I didnt understand the way, the output keyword is used and the how this is going to give me the mem file as output.

example_bmm_file.bmp
0 Kudos
Reply
srv
Visitor
Visitor
14,834 Views
Registered: ‎10-18-2011

will some one point out if i am trying to do it in the right way....please......
Tags (1)
0 Kudos
Reply
rcingham
Teacher
Teacher
14,794 Views
Registered: ‎09-09-2010

I am still struggling to understand your use case. When you say "I am storing the input data for my filter chain on BRAM. I tested it with few data and it worked and I can also update it", is that 'live' data input via your board into the FPGA on the board?



------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Reply
srv
Visitor
Visitor
14,785 Views
Registered: ‎10-18-2011

Its not live data but I am initializing the BRAM with my data

I am using the data in my design by instatiating the memory in my code.

Now my interest is to write the output to BRAM

I am trying for some way to get the contents of this BRAM to my pc not by serial interface but possibly through jtag interface

0 Kudos
Reply