Add Control Registers and Address Offsets - 2023.2 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2023-11-13
Version
2023.2 English

To fix the error in the Ports and Interfaces window, you must add at least one register to the s_axilite interface. This can be done through the Addressing and Memory section of the Package IP window. The user-managed kernel requires a number of registers to be added with the following attributes.

Name Description Offset Size (bits)
USER_CTRL Control Signals 0x010 32
scalar00 Scalar values 0x014 32
A Pointer argument 0x01c 64
B Pointer argument 0x028 64
  1. Under Packaging Steps, select Addressing and Memory. This displays the Addressing and Memory window.

  2. Under Address Blocks, right-click reg0 and select Add Reg.

  3. Enter the name of the register in the Add Register dialog box, and click OK. Notice that the error on the Ports and Interfaces section goes away as you define the registers for the RTL kernel.

    TIP: You will need to add the registers listed in the table above. You can also use the following Tcl commands in the Vivado Tcl Console to add the needed registers:

    ipx::add_register CTRL [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
    ipx::add_register scalar00 [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
    ipx::add_register A [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
    ipx::add_register B [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
    

    After adding the registers to the Addressing and Memory window (as shown in the following figure), you will need to add the descriptions, offset, and size to the registers.

    missing image

  4. For each register, click in the Description field of the register, and enter the description from the table above.

  5. Click in the Address Offset field and enter the offset.

  6. Click in the Size field, and enter the field.

    IMPORTANT: Description is optional, but Offset and Size are required.

    After completing the addition of the various registers and their attributes in accordance with the table above, you must also associate an M_AXI interface with each of the pointer arguments.

  7. Select register A in the Registers table, and right-click and select Add Register Parameter.

    1. In the Add Register Parameter dialog box, add the ASSOCIATED_BUSIF parameter, and click OK.
      This parameter associates the bus interface with the register.

    2. Repeat the prior two steps for register B.

    3. In the Value field for ASSOCIATED_BUSIF enter m00_axi for register A, and m01_axi for register B.

      Your finished results should appear similar to the following image:

      Results