Step 6: Querying the DFX Controller in the FPGA - 2020.2 English

Vivado Design Suite Tutorial: Dynamic Function eXchange

Document ID
Release Date
2020.2 English

In this step, you interact with the core via JTAG from the Hardware Manager to understand the status of the core and issue software triggers.

In the Vivado Hardware Manager, you might need to select Refresh Device to establish the link to the device over the JTAG connection. Notice the XADC as well as 6 ILA cores and the hw_axi link shown under the device in the Hardware view.

  1. In the Tcl Console, cd into the DFX Controller tutorial directory then source the AXI4-Lite command Tcl script.
    source ./Sources/scripts/axi_lite_procs_us.tcl

    This enables a set of procedures that make the subsequent interaction with the DFX Controller easier. Examine this file to see how these procedures are defined. Note that these are written explicitly (hard-coded) for this design, the references to Virtual Sockets in any other design will need to be modified. For more information on this topic, consult the Dynamic Function eXchange (DFX) Controller Product Guide (PG374).

  2. Source the procedure to establish communication with the DFX Controller.
  3. Check the state of each Virtual Socket to see if they are in Shutdown or not.
    is_vsm_in_shutdown vs_shift
    is_vsm_in_shutdown vs_count

    You should see that the Shift Virtual Socket is in Active mode (value = 0), and the Count Virtual Socket is in Shutdown mode (value = 1).

  4. Examine the status of each Virtual Socket.
    dfxc_decode_status vs_shift
    dfxc_decode_status vs_count

    Before examining the data returned, reference Table 2-4 in this link of the Dynamic Function eXchange Controller Product Guide (PG374). The table in that section defines the values in the STATUS register. While this is a 32-bit register, you only need to pay attention to the lowest 24 bits, as the upper 8 bits are used for Virtual Socket Managers (VSM) in UltraScale devices.

    The status of vs_shift is 263, which is 0000_0000_0000_0001_0000_0111 in binary. The status for vs_shift may also be 7, where the only difference is that RM_ID is now 0.

    • RM_ID (bits 23:8) = 1. This means RM 1 is loaded (rm_shift_right). It may also appear as RM_ID (bits 24:8) = 0. This means RM 0 is loaded (rm_shift_left).
    • SHUTDOWN (bit 7) = 0. This VSM is not in the shutdown state.
    • ERROR (bits 6:3) = 0000. There are no errors.
    • STATE (bits 2:0) = 111. The Virtual Socket is full.

    The status of vs_count is 129, which is 0000_0000_0000_0000_1000_0001 in binary.

    • RM_ID (bits 23:8) = 0. This means RM 0 is loaded (rm_count_up).
    • SHUTDOWN (bit 7) = 1. This VSM is in the shutdown state.
    • ERROR (bits 6:3) = 0000. There are no errors.
    • STATE (bits 2:0) = 001. RM_SHUTDOWN_ACK is 1, as this VSM is executing the hardware shutdown step.

    These explicit details are reported in the breakdown of the status register in the return value from this Tcl proc.

  5. Send a software trigger to the Shift Virtual Socket.
    dfxc_send_sw_trigger vs_shift 0
    dfxc_send_sw_trigger vs_shift 1

    Remember that values of 0 and 2 correspond to shift left, and values of 1 and 3 correspond to shift right, as defined during DFX Controller customization.

  6. Check the configurations of the RMs for the Count Virtual Socket.
    dfxc_show_rm_configuration vs_count 0
    dfxc_show_rm_configuration vs_count 1

    The values for the bitstream sizes and address for both clearing and partial bitstreams are reported here. These values could then be modified to account for necessary adjustments to the size or location of the bitstream. Different indices can be added to insert new RMs. Note that this query cannot be done for vs_shift, as the vs_shift VSM is not in the shutdown state.

  7. Move the Count Virtual Socket Manager into active mode.
    dfxc_restart_vsm_no_status vs_count

    The Count Up and Count Down pushbuttons can now be used to load these partial bitstreams using the DFX Controller.