Configuration Memory Verify and Readback - 2021.2 English

Vivado Design Suite User Guide: Programming and Debugging

Document ID
Release Date
2021.2 English

You can convert a bitstream file (.bit) to an .mcs or .bin file and then program it into a configuration memory device, such as serial/SPI or parallel/BPI flash, via the write_cfgmem command. See the Vivado Design Suite Tcl Command Reference Guide (UG835) for details.

Verify the configuration memory device through the Vivado Design Suite Hardware Manager as shown in the following figure.

Figure 1. Configuration Memory Verification

You can also verify the configuration memory device by setting the appropriate HW_CFGMEM properties and calling program_hw_cfgmem as shown in the following code:

set_property PROGRAM.ADDRESS_RANGE {use_file} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.FILES [list "H:/projects/k7_led/k7_led_325t_afx_x16_33v.mcs" ] \
[ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0]]
set_property PROGRAM.BPI_RS_PINS {none} [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} [ get_property \
PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.BLANK_CHECK 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.ERASE 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.CFG_PROGRAM 0 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
set_property PROGRAM.VERIFY 1 [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]
if {![string equal [get_property PROGRAM.HW_CFGMEM_TYPE [lindex [get_hw_devices] 0]] [get_property MEM_TYPE
[get_property CFGMEM_PART [get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]]]] } \
{ create_hw_bitstream -hw_device [lindex [get_hw_devices] 0] [get_property PROGRAM.HW_CFGMEM_BITFILE \
[ lindex [get_hw_devices] 0]]; program_hw_devices [lindex [get_hw_devices] 0]; };
program_hw_cfgmem -hw_cfgmem [get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0 ]]

The contents of the configuration memory can be readback through the Vivado Design Suite Tcl Console using the following command sequence:

readback_hw_cfgmem -file test.bin -hw_cfgmem \ 
   [get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices] 0]] 
Note: Perform configuration memory readback operations through the Tcl Console only.

For more information on these features, see the UltraScale Architecture Configuration User Guide (UG570) or the 7 Series FPGAs Configuration User Guide (UG470).