Creating a Configuration Memory File (for FPGA Devices) - 2024.1 English

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

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

Use the write_cfgmem Tcl command to create the .mcs or .bin programming file. This file is used in programming the configuration memory device.

For example, to generate an .mcs file to configure an FPGA with a single 1 Gbit BPI configuration memory device:

write_cfgmem -format mcs -interface bpix16 -size 128     \
           -loadbit "up 0x0 design.bit"-file design.mcs
Note: The -size argument to write_cfgmem is in megabytes, different from flash device capacity which is based on megabits. Hence, a 1 Gbit sized flash device is provided as 128 megabytes to write_cfgmem in the previous example.
Note: write_cfgmem automatically sizes the configuration memory file to the size of the bitstream.

Vivado IDE supports the ability to chain multiple .bit files together using the write_cfgmem command. To generate an .mcs file for a single 1 Gbit BPI configuration memory device containing multiple bitstreams:

write_cfgmem -format mcs -interface bpix16 -size 128           \
        -loadbit "up 0 design1.bit up 0xFFFFF design2.bit"     \
        -file design1_design2.mcs

For more information on write_cfgmem command refer to the Vivado Design Suite Tcl Command Reference Guide (UG835).

Tip: You can create configuration memory files in Vivado Lab Edition.

You can also create the Configuration Memory file in Vivado IDE. Click on Tools > Generate Memory Configuration File. This brings up the Write Memory Configuration File dialog box as follows:

Figure 1. Write Memory Configuration File

Select the relevant format and options, and click OK to generate the configuration memory file.