cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
756 Views
Registered: ‎10-03-2018

Checksum Mismatch with bin file and mcs

Jump to solution

Hiiiii......

    I am doing the configuration flash loading for ultrasclae FPGA KU115,I am facing  the Checksum mismatch problem as follows

1) Whenever Loading the binfile via configuartion flash interface and try to Read the Checksum via VIVADO Tool, Cant able to get the Same Checksum.

2) The loaded .bin file data has been readback from FPGA one by one, and the loaded file and readback file are compared and found that both are Same.

3) PROM File Checkusm and readback Checsum are Same. but not Matched with CRC32 Checksum of .bin file loaded.

 

Give your comments to solve this...

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
669 Views
Registered: ‎06-05-2013

I am not sure where you are reading the checksum in Vivado. May be I haven't tried that option. Below is something I just verified.

Generated the .prm with Checksum. 


write_cfgmem -format mcs -size 32 -interface SPIx4 -loadbit {up 0x00000000 "C:/Golden.bit" } -checksum -force -file "/test.mcs"


Command: write_cfgmem -format mcs -size 32 -interface SPIx4 -loadbit {up 0x00000000 "C:/Golden.bit" } -checksum -force -file test.mcs


Creating config memory files...
Creating bitstream load up from address 0x00000000
Loading bitfile C:/Golden.bit
Writing file test.mcs
Writing log file test.prm
===================================
Configuration Memory information
===================================
File Format MCS
Interface SPIX4
Size 32M
Start Address 0x00000000
End Address 0x01FFFFFF
Checksum 0xDD907A76
Fill Value 0xFF

Addr1 Addr2 Date File(s) Checksum


0x00000000 0x0021C543 Apr 24 13:46:30 2015 C:/Golden.bit 0x0133F932


File Checksum Total 0x0133F932
0 Infos, 0 Warnings, 0 Critical Warnings and 0 Errors encountered.
write_cfgmem completed successfully
write_cfgmem: Time (s): cpu = 00:00:09 ; elapsed = 00:00:13 . Memory (MB): peak = 1778.648 ; gain = 0.000
set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.FILES [list "test.mcs" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ERASE 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CFG_PROGRAM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CHECKSUM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.PRM_FILES [list "test.prm" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.FILES [list "test.mcs" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.PRM_FILE {test.prm} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ERASE 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CFG_PROGRAM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CHECKSUM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
startgroup
create_hw_bitstream -hw_device [lindex [get_hw_devices xcku040_0] 0] [get_property PROGRAM.HW_CFGMEM_BITFILE [ lindex [get_hw_devices xcku040_0] 0]]; program_hw_devices [lindex [get_hw_devices xcku040_0] 0]; refresh_hw_device [lindex [get_hw_devices xcku040_0] 0];
INFO: [Labtools 27-2302] Device xcku040 (JTAG device index = 0) is programmed with a design that has 1 SPI core(s).
program_hw_cfgmem -hw_cfgmem [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
Mfg ID : 20 Memory Type : bb Memory Capacity : 19 Device ID 1 : 0 Device ID 2 : 0
Performing Erase Operation...
Erase Operation successful.
Performing Program and Verify Operations...
Program/Verify Operation successful.
Performing Checksum Operation...
Addr1 Addr2 Checksum
00000000 0021C543 0133F932
Device Checksum Total 0133F932
Checksum Operation successful.
INFO: [Labtoolstcl 44-377] Flash programming completed successfully

 

So device checksum and file checksum should be same . Here checksum value is 0133F932. 

Hope it helps. 

-harshit

 
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

6 Replies
Highlighted
729 Views
Registered: ‎01-22-2015

murali@1996 

As you have noted, comparing the loaded .bin file to the readback .bin file is a complete check that the configuration flash has been programmed properly.

Computing your own checksum for the loaded and readback .bin files and comparing these checksums is an additional but unnecessary check if you have already compared the .bin files directly.

I suggest that you not use the Vivado computed checksums for configuration files - because we are unsure how they are calculated and over what part of the configuration file they apply.

From prior experience, information like this (checksums) about the bitstream seems to fall under Xilinx proprietary information.  So, I don’t think you’ll get much information from Xilinx about Vivado-computed checksums.

Mark

 

0 Kudos
Highlighted
Contributor
Contributor
715 Views
Registered: ‎10-03-2018

As I have observed that,

1) the read checksum in vivado tool, when the bin file loaded via spi flash interface

2)the read checksum in vivado tool, when .mcs file loaded also via vivdo tool.

both not giving same checksum, but all the functionalities are working properly....

can u have any idea Why the cheksum is not matching in this case...???

0 Kudos
Highlighted
Moderator
Moderator
702 Views
Registered: ‎06-05-2013
Does it fail when you perform verify step during the flash programming? That's where it verify the checksum from .prm file.

What if you use bin file and get the md5sum.
Linux command: tail -c <bytes> <filename.bin> | md5sum

Mcs file has header in it and it has data like tool version, date & time etc. So it might not match with the bin file checksum. So mcs file generated at different time or date or version.

What if you compare the checksum after generating the bin file from the same bit file?

Thanks
Harshit
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
684 Views
Registered: ‎10-03-2018

@hj markg@prosensing.com 

Thanks for your valuable comments,

I have loaded a bin file to flash, and checksum read via vivado tool.

Is the readback checksum and prm checksum will be same...???

0 Kudos
Highlighted
Moderator
Moderator
670 Views
Registered: ‎06-05-2013

I am not sure where you are reading the checksum in Vivado. May be I haven't tried that option. Below is something I just verified.

Generated the .prm with Checksum. 


write_cfgmem -format mcs -size 32 -interface SPIx4 -loadbit {up 0x00000000 "C:/Golden.bit" } -checksum -force -file "/test.mcs"


Command: write_cfgmem -format mcs -size 32 -interface SPIx4 -loadbit {up 0x00000000 "C:/Golden.bit" } -checksum -force -file test.mcs


Creating config memory files...
Creating bitstream load up from address 0x00000000
Loading bitfile C:/Golden.bit
Writing file test.mcs
Writing log file test.prm
===================================
Configuration Memory information
===================================
File Format MCS
Interface SPIX4
Size 32M
Start Address 0x00000000
End Address 0x01FFFFFF
Checksum 0xDD907A76
Fill Value 0xFF

Addr1 Addr2 Date File(s) Checksum


0x00000000 0x0021C543 Apr 24 13:46:30 2015 C:/Golden.bit 0x0133F932


File Checksum Total 0x0133F932
0 Infos, 0 Warnings, 0 Critical Warnings and 0 Errors encountered.
write_cfgmem completed successfully
write_cfgmem: Time (s): cpu = 00:00:09 ; elapsed = 00:00:13 . Memory (MB): peak = 1778.648 ; gain = 0.000
set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.FILES [list "test.mcs" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ERASE 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CFG_PROGRAM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CHECKSUM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.PRM_FILES [list "test.prm" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.FILES [list "test.mcs" ] [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.PRM_FILE {test.prm} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.ERASE 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CFG_PROGRAM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
set_property PROGRAM.CHECKSUM 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
startgroup
create_hw_bitstream -hw_device [lindex [get_hw_devices xcku040_0] 0] [get_property PROGRAM.HW_CFGMEM_BITFILE [ lindex [get_hw_devices xcku040_0] 0]]; program_hw_devices [lindex [get_hw_devices xcku040_0] 0]; refresh_hw_device [lindex [get_hw_devices xcku040_0] 0];
INFO: [Labtools 27-2302] Device xcku040 (JTAG device index = 0) is programmed with a design that has 1 SPI core(s).
program_hw_cfgmem -hw_cfgmem [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcku040_0] 0]]
Mfg ID : 20 Memory Type : bb Memory Capacity : 19 Device ID 1 : 0 Device ID 2 : 0
Performing Erase Operation...
Erase Operation successful.
Performing Program and Verify Operations...
Program/Verify Operation successful.
Performing Checksum Operation...
Addr1 Addr2 Checksum
00000000 0021C543 0133F932
Device Checksum Total 0133F932
Checksum Operation successful.
INFO: [Labtoolstcl 44-377] Flash programming completed successfully

 

So device checksum and file checksum should be same . Here checksum value is 0133F932. 

Hope it helps. 

-harshit

 
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

Highlighted
Contributor
Contributor
639 Views
Registered: ‎10-03-2018

@hj 

Thank  you so much for your effort...!!!

0 Kudos