Design Version Compatibility Checks - 2024.1 English

Vivado Design Suite User Guide: Dynamic Function eXchange (UG909)

Document ID
UG909
Release Date
2024-06-12
Version
2024.1 English

A critical detail of Dynamic Function eXchange is ensuring that incoming partial images are compatible with the currently operating static design. Although pr_verify validates compatibility between a pair of routed design checkpoints, after the programming images are generated, it is the designer’s responsibility to keep them in sync. Versal devices have safeguards in place to help with this effort.

In UltraScale+ and older devices, no compatibility checks are available as a dedicated silicon programming feature. Device IDs embedded in bitstreams ensure the correct target device is selected, but there is no equivalent Design ID to check compatibility of a partial bitstream to the currently loaded full design. If a partial bitstream is programmed over the incorrect static design, failures can occur. These failures can range from simple issues, such as the new Reconfigurable Module not operating (because it does not connect to the static domain) or disruption of the static logic itself (due to static elements or routes not being maintained), to more critical issues, such as contention if static and dynamic resource usage overlaps. The latter is much less likely, but it highlights the need for designers to build solutions to ensure that incompatible images are never mixed.

Versal devices have safeguards in the form of Unique Identifiers (UID) that are checked by the PLM when partial programming images are delivered. Four 32-bit fields are embedded in the PDI as shown in the following table.

Table 1. UIDs Checked by PLM
UID Name Description Defined by PDI Mapping
Node ID Defines the configuration node in the PL or AI Engine Vivado tools id (0x18)
Unique ID A unique hash value to identify the module Vivado tools unique_id (0x24)
Parent ID A reference to the Unique ID of the module above the target module Vivado tools parent_unique_id (0x28)
Function ID Identification of the function residing in the target module User function_id (0x2c)

Three of the four IDs are automatically generated by the Vivado tools, and you define the fourth ID known as the Function ID,. Following are details on each ID:

Node ID
Fixed value that is incremented for each partition in the design. The static image represents the initial configuration of the device and is given an ID of 0x18700000 for the PL and 0x18800000 for the AI Engine. Each node (RM) included in the design has an incremented value starting with 0x18700002, as shown in the example below. A value of 0x18700001 is reserved for Tandem Configuration, representing the stage 2 design. This value is useful in differentiating the partitions in the design.
Unique ID
Hash value automatically generated by the Vivado tools. The value is deterministic, calculated by a number of factors within the design, so any change to a module’s results (for example, code change, new synthesis or implementation options, design constraints, etc.) produces a new Unique ID. If the static design is recompiled such that prior versions of reconfigurable module partial bitstreams do not align, a new Unique ID is issued.
Parent ID
Reference to the Unique ID of the module above the current one. The Parent ID of the static design is always zero (0x00000000), because it is the top level of any DFX design. The Parent ID of a reconfigurable module is the Unique ID of the static design it was compiled with. If Tandem PCIe is enabled, the Parent ID of each RM will be a UID of the stage 2 PDI, because this is the programming image that must be loaded before partial images can be used. This is the comparison done in PLM to ensure compatibility between images.
Function ID
User space to embed any custom unique identifier that can be parsed in the PDI header. You can apply a 32-bit value by setting a property on the reconfigurable module instance. This enables you to quickly differentiate functions contained in the programming image
Note: The Function ID feature is not currently supported and remains at the default 0x00000000.

These unique identifiers are automatically stored in the full and partial PDI files generated by write_device_image. You can read these values using various methods, but the easiest method is to parse them using Bootgen. Call Bootgen with the -read option to see the details of the PDI contents. Find the four UID fields in the pl_cfi portion of the output.

bootgen -arch versal -read <pdi file>

Information seen in the full design PDI that contains the static partition:

... 

-------------------------------------------------------------------------------- 

   IMAGE HEADER (pl_cfi)  

-------------------------------------------------------------------------------- 

          pht_offset (0x00) : 0x000160c0       section_count (0x04) : 0x00000002 

      mHdr_revoke_id (0x08) : 0x00000000          attributes (0x0c) : 0x00001800 

                name (0x10) : pl_cfi 

                  id (0x18) : 0x18700000           unique_id (0x24) : 0x589cd7dd 

    parent_unique_id (0x28) : 0x00000000         function_id (0x2c) : 0x00000000 

   memcpy_address_lo (0x30) : 0x00000000   memcpy_address_hi (0x34) : 0x00000000 

            checksum (0x3c) : 0x2b91d98a 

 attribute list - 

                   owner [plm]               memcpy [no]            

                    load [now]              handoff [now]           

   dependentPowerDomains [spd][pld]

Information seen in a partial PDI that represents a dynamic partition:

... 

-------------------------------------------------------------------------------- 

   IMAGE HEADER (pl_cfi)  

-------------------------------------------------------------------------------- 

          pht_offset (0x00) : 0x00000034       section_count (0x04) : 0x00000008 

      mHdr_revoke_id (0x08) : 0x00000000          attributes (0x0c) : 0x00001800 

                name (0x10) : pl_cfi 

                  id (0x18) : 0x18700002           unique_id (0x24) : 0xb61496d2 

    parent_unique_id (0x28) : 0x589cd7dd         function_id (0x2c) : 0x00000000 

   memcpy_address_lo (0x30) : 0x00000000   memcpy_address_hi (0x34) : 0x00000000 

            checksum (0x3c) : 0x757ea33c 

 attribute list - 

                   owner [plm]               memcpy [no]            

                    load [now]              handoff [now]           

   dependentPowerDomains [spd][pld]      

The Unique ID of the first output matches the Parent Unique ID of the second output. These PDI are from the same configuration and are therefore compatible.

This data can also be found via cdoutil by grepping for the string ldr_set_image_info in a full or partial PDI image. The four UID fields are always listed in order: Node ID, Unique ID, Parent Unique ID, Function ID. Full design PDI have the UID information for the static domain, which is clearly identified by the Parent ID (the third field set to 0), followed by all partials. Whereas partial PDI only shows UID information for that partial image.

> cdoutil design_1_wrapper.pdi | grep ldr_set_image_info 

ldr_set_image_info 0x18700000 0x589cd7dd 0 0 

ldr_set_image_info 0x18700002 0x86a292a3 0x589cd7dd 0 

> cdoutil design_1_i_rp1_rp1rm2_inst_0_partial.pdi | grep ldr_set_image_info 

ldr_set_image_info 0x18700002 0xb61496d2 0x589cd7dd 0 

During the load of a partial programming image, PLM examines these contents and confirms these identifiers match. If they do not, a failure is reported and the partial PDI is rejected before it is programmed, allowing you to take corrective action. Following is an example of the PLM log for a failing condition.

[4232.091]***********Boot PDI Load: Done*********** 

[4236.635]4200.941 ms: ROM Time 

[4239.471]Total PLM Boot Time  

[24261.805]SBI PDI Load: Started 

[24261.894]Loading PDI from SBI 

[24264.739]Monolithic/Master Device 

[24267.946]6.046 ms: PDI initialization time 

[24271.897]Image is not compatible with Parent Image 

[24276.556]Error loading PL data:  

CFU_ISR: 0x00000000, CFU_STATUS: 0x00002A8C  

PMC ERR1: 0x00000000, PMC ERR2: 0x00000000 

[24287.449]PLM Error Status: 0x03530000