An option in the CIPS customization GUI allows you to pick that option that suits your needs. In the CPM options, a Tandem Configuration selection is enabled when a PCIe Endpoint is selected for PCIe Controller 0 or Controller 1. The three available options are:
- Tandem PROM
- Tandem PCIe
- None
Tandem PROM is the simpler mode for Tandem Configuration, where both stages reside in a single programming image. If 120 ms enumeration is required the selection of this option essentially comes for free, as there is no overhead in the design complexity or requirement for programmable logic to build. The programming ordering simply starts with the CPM and other necessary elements before moving on to the rest of the device.
Because Tandem PCIe uses the PCIe link to program the stage 2 portion of the design, the design must include connectivity from the enable CPM master(s) to the PMC slave. This should be accomplished through the block design connectivity. The Tandem PCIe option is not selectable until the CPM to NoC 0 interface is enabled as highlighted in red in the figure above.
The specific aperture within the PMC slave that must be accessible from
the host is the slave boot interface (SBI) that is available at Versal device address 0x102100000
.
To deliver stage 2 images using MCAP VSEC, this advanced feature must be enabled during the IP customization. Within the Configuration options for the Controller instance to be used:
- Under the Basic tab, set the PCIe[0/1] Basic/Advanced mode selection option to Advanced.
- Under the Advanced Options tab, confirm that the check box for MCAP Capability is checked.Important: The MCAP VSEC can only natively address the lower 4 GB of the address map, as it can only issue 32-bit address transactions. To reach the SBI buffer address, the NoC NMU address remapping capability must be employed, see the following recommended command.
set_property CONFIG.REMAPS {M00_AXI {{0xF122_0000 0x1_0122_0000 64K} {0xF210_0000 0x1_0210_0000 64K}}} [get_bd_intf_pins /axi_noc_0/S00_AXI]
To deliver stage 2 images using PCIe DMA, the DMA BAR must be set to BAR0. The driver probes BAR0 to find the DMA BAR. If this access does not terminate internally in the CPM hard block and instead goes to the PL, the transaction can not be completed, because the PL is not yet configured. For more information on Tandem PCIe using QDMA or XDMA, see Versal Adaptive SoC CPM DMA and Bridge Mode for PCI Express Product Guide (PG347).
Confirmation that the Vivado parameters and
Tandem Configuration in general are applied can be seen in the log when write_device_image
is run. Following is a snippet of the
log for a Tandem PROM run during the write_device_image
step:
INFO: [Designutils 12-2358] Enabled Tandem boot bitstream.
Creating bitmap...
INFO: [Bitstream 40-812] Reading NPI Startup sequence definitions
INFO: [Bitstream 40-811] Reading NPI Shutdown sequence definitions
INFO: [Bitstream 40-810] Reading NPI Preconfig sequence definitions
Creating bitstream...
Tandem stage1 bitstream contains 1243712 bits.
Writing NPI partition ./Versal_CPM_Tandem_tandem1.rnpi...
Creating bitstream...
Tandem stage2 bitstream contains 15633728 bits.
Writing CDO partition ./Versal_CPM_Tandem_tandem2.rcdo...
Writing NPI partition ./Versal_CPM_Tandem_tandem2.rnpi...
Generating bif file Versal_CPM_Tandem_tandemPROM.bif for Tandem PROM.
The resulting run creates (in addition to the files mentioned above) a single .pdi image for this design called Versal_CPM_Tandem.pdi.
- <design>_tandem1.pdi
- This file should be added to the device configuration flash.
- <design>_tandem2.pdi
- This file should be programmed into the device through the PCIe link once it becomes active.
write_device_image
log looks nearly identical, but the file name for the .bif is slightly different:INFO: [Designutils 12-2358] Enabled Tandem boot bitstream.
Creating bitmap...
INFO: [Bitstream 40-812] Reading NPI Startup sequence definitions
INFO: [Bitstream 40-811] Reading NPI Shutdown sequence definitions
INFO: [Bitstream 40-810] Reading NPI Preconfig sequence definitions
Creating bitstream...
Tandem stage1 bitstream contains 1243712 bits.
Writing NPI partition ./Versal_CPM_Tandem_tandem1.rnpi...
Creating bitstream...
Tandem stage2 bitstream contains 15633728 bits.
Writing CDO partition ./Versal_CPM_Tandem_tandem2.rcdo...
Writing NPI partition ./Versal_CPM_Tandem_tandem2.rnpi...
Generating bif file Versal_CPM_Tandem_tandem1.bif for Tandem stage-1.
In addition to the files mentioned above, the resulting run creates two .pdi images for this design called design_1_wrapper_tandem1.pdi and design_1_wrapper_tandem2.pdi. The _tandem1 and _tandem2 suffixes are automatically added to differentiate the stages.
ERROR: [Vivado 12-4165] Tandem Configuration bitstream generation is not supported for part <device>.
In UltraScale+, the Field Updates solution enables you to build Reconfigurable Stage Twos where one could not only pick a stage 2 image from a list of compatible images, but then also reconfigure that stage 2 area with another stage 2 image to provide dynamic field updates. In a Versal device, the solution is similar but not exactly the same. The first part (for the initial boot of a device) can be supported in the future to allow you to lock a stage 1 image in a small local boot flash; the second part (dynamic reconfiguration) requires a Tandem + DFX-based approach to allow for dynamic reconfiguration of a subsection of the PL.
For test and debug purposes the HD.TANDEM_BITSTREAMS
property can be set on the implemented design before
.pdi file generation to separate a single
Tandem PROM .pdi file into separate tandem1.pdi and tandem2.pdi files.
set_property HD.TANDEM_BITSTREAMS Separate [current_design]
Similarly, the behavior of Tandem PROM or Tandem PCIe file
generation can be disabled entirely by using the HD.TANDEM_BITSTREAMS
property on the implemented design before .pdi file generation. The following command can be used
to do this.
set_property HD.TANDEM_BITSTREAMS NONE [current_design]