Configuration and Boot Memory Verify and Readback for FPGAs or MPSoCs - 2024.1 English

Vivado Design Suite User Guide: Programming and Debugging (UG908)

Document ID
UG908
Release Date
2024-05-30
Version
2024.1 English

You can convert a bitstream file (.bit) to an .mcs or .bin file and 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 AMD 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 ]]
startgroup
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 ]]
endgroup

On FPGA devices, the contents of the configuration memory can be readback through the Vivado Design Suite Tcl Console using the following command sequence (not supported on MPSoC):

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).