Data2Mem with CRC for Virtex FPGAs

I have configured an XCV1000 as a data and instruction cache. It is connected to a external hard core. I would like to be able to update the contents of the caches without recompiling the file. I have been using Data2mem, but it appears that the CRC bits for the bitstream are not recalculated. They are always set to: 0xDEFC

When data2mem modifies a bit file, it apparently turns off CRC checking by replacing the calculated CRC value with a constant 0xDEFC (which apparently spells DEFault Crc value). 0xDEFC is apparently supposed to tell the FPGA not to bother doing a CRC check on load because we were apparently TOO LAZY to calculate a correct value to check against.

I found one (non-xilinx) web site that indicated that Virtex-II etc. will work just fine without a valid CRC value, but not so for Virtex.

ngdbuild, or one of those tools near it, explicitly states that "-g CRC:DISABLE" is a valid command line option for Virtex-II but not Virtex, and indeed project navigator complains when I attempt "-g CRC:DISABLE" for our part.

It seems clear at the moment that data2mem is not calculating CRC values but is calculating a bypass value instead; and it's less clear, but all signs seem to indicate, that that would work for Virtex-II and later parts but won't work for Virtex.

I think there must be a way to get the CRC in the bitfile, hopefully using data2mem, but I haven't found it yet.

Has anyone run into this problem and solved it? Here is a diff of the two bit files.

Diff between working bitfile addr11.bit, generated by bitgen, and nonworking bitfile tmp.bit, generated by data2mem:

6c6 < Command: data2mem -bm tmp.bmm -bt addr11.bit -d
--
Command: data2mem -bm tmp.bmm -bt tmp.bit -d

9c9 < File:               addr11.bit [working] ---

File:            tmp.bit [nonworking]

5480c5480 < Write of CRC (CRC Check) register with
0x0000884F CRC value. < Calculated CRC value =
0x0000DEFC. [???] ---

Write of CRC (CRC Check) register with 0x0000DEFC CRC
value. Calculated CRC value = 0x0000DEFC.

5499c5499 < Write of CRC (CRC Check) register with
0x00004964 CRC value. < Calculated CRC value =
0x0000DEFC. ---

 Write of CRC (CRC Check) register with 0x0000DEFC CRC
 value. Calculated CRC value = 0x0000DEFC.

Thanks,
JOhn
Reply to
John D. Davis
Loading thread data ...

"John D. Davis" schrieb im Newsbeitrag news: snipped-for-privacy@elaine15.Stanford.EDU...

hi John,

we are using internally libraries that read bitstreams and recalculate the CRC, it is currently being used to fix the oscillator optons for Spartan3e, but with no big mods it should be able to process virtex bitstreams as well.

so as one option is to have a simple command line tool that post-process the bitstream and injects the proper CRC.

and you are right DEFC is DEFault Crc that is needed to be written in place of real CRC and also in place of autoCRC, also the CRC bypass bit in COR must be set.

and as noted not all familes support the CRC bypass

Antti

Reply to
Antti Lukats

Is your library for the CRC generation available to others.

JOhn

John D. Davis PhD Candidate Computer Systems Lab Office # 1.650.723.6891 Stanford University Fax # 1.650.725.6949

Reply to
John D. Davis

"John D. Davis" schrieb im Newsbeitrag news: snipped-for-privacy@elaine15.Stanford.EDU...

hi John

I just sent per email to you an updated version (tested with Virtex) of bit2frames application that is based on our bitsream library, if you can verify that the tool works and is able to process and properly calculate the CRC in your bitstreams then well we can give the source out too,

ah one more adivce make sure not to use compression whrn working with data2mem, but I guess you are not using it anyway.

the bit2frames I just sent is also not tested with compressed Virtex bitsreams yet

Antti

Reply to
Antti Lukats

"John D. Davis" schrieb im Newsbeitrag news: snipped-for-privacy@elaine15.Stanford.EDU...

formatting link

the code snippet that does calc the CRC is at the above link, bitpatch utility with the ability to inject fixed CRC is scheduled for release as well

--
Antti Lukats
http://www.xilant.com
Reply to
Antti Lukats

Hi Antti,

The bitpatch.exe worked for the Xilinx XCV1000. It calculated the CRC and replaced the default CRC. I tested it this past weekend by starting with a known good bit file and updating the BRAMs used as cache with 6 different programs. XCV1000 don't support DISABLE_CRC, so the output of data2mem did not program the FPGA. I have a wrapper script/batch file that uses data2mem + .bmm file and does the correct replacment. I then use your bitpatch to replace the default CRC. This saved several hours of recompilation and all resulting downloads to the FPGA worked. Thanks for the help. You have streamed this process and saved several days of me hacking something based on Xilinx specs.

THANKS! John

Reply to
John D. Davis

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.