cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
181 Views
Registered: ‎08-07-2013

How to caculate the checksum of bin file?

Hi All,

I'm using a low endian spartan7 device without AES support, so I want to program different USER_ACESS value according to corresponding DNA ID, but I don't want to re-compile the project by setting the USR_ACCESS property in contrains file.

I can find the USER_ACCESS value in bit file but can't to modify it simply as there is a checksum value, is there any file to describe how to calculate the bin file checksum, I guess it's CRC-32C algorithm but don't know which bytes in the file are involved in calculating.

0 Kudos
1 Reply
Highlighted
Moderator
Moderator
137 Views
Registered: ‎06-05-2013

Modifying a bit file is not recommended.
You can follow 4 steps to generate the checksum for your updated bin file. This will take very little time. Add these to the script and use them.

1. Open the routed design .dcp file.
2. set_property BITSTREAM.CONFIG.USR_ACCESS NONE|0x<8-digit hex>|TIMESTAMP
[current_design]
3. Write_bitstream -file your_location/design.bit
4. write_cfgmem -format bin -size 128 -interface SPIx4 -loadbit {up 0x00000000 "design.bit" } -checksum -file "test.bin"

At this point, .prm file will have your bin file checksum.

===================================
Configuration Memory information
===================================
File Format MCS
Interface SPIX1
Size 16M
Start Address 0x00000000
End Address 0x00FFFFFF
Checksum 0xF0239965
Fill Value 0xFF
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Tags (1)
0 Kudos