tricking bitgen into creating rom-like behavior

Aug 27, 2007 4 Replies

Is there a way I can read in a text / ascii /binary file AFTER P&R is done to mimic a ROM ?



I could use block-RAM instead of ROM to read in this file.



The normal way to do this is would be to read in the ROM image using core-generator and create a ROM. Then P&R it.



I am trying to be clever -- I want to read in a configuration file after P&R is done.



Thanks,



Kaushik



I think you can find out where the bits are in the download file and replace them with the desired bits.

-- glen

Xilinx has a tool for loading roms or rams with hex-file data via the bit file. It merges your original bit file with one or more hex files, according to some memory description. Sorry, I can't recall the name of the utility, but it was developed for use with SW development with embedded CPU(s) in the FPGA, such that you could change the SW code without changing the hardware.

andy

It's called "data2mem".

cu, Sean

My email address is only valid until the end of the month. Try figuring out what the address is going to be after that...

Yeah, there is no ROM in your FPGA, so the tools will synthetize it using either BRAM or LUTs depending on how many bytes you want. You can also instantiate a BRAM directly. In XPS, when you use BRAMs connected to LMB or OPB bus, the xilinx tools are able to write data to the BRAM in the bitstream (ELF executables for instance). In this case an address map is generated which tells the data2mem tool which physical BRAM corresponds to which address. I do not know how it would work for a direct BRAM instantiation, but you can probably use the same tools (platgen / data2mem) to get what you want with a bit of hacking.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required