Step 3: Set the definition of AXI control slave registers, including CTRL and user kernel arguments - 2022.2 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2022-12-01
Version
2022.2 English

Here we use ipx::add_register command to add the registers to inferred s_axi_control interface and use set_property command to set the property of the registers, for example the kernel argument KEY_LEN:

ipx::add_register KEY_LEN   [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
set_property description    {AES key length}    [ipx::get_registers KEY_LEN -of_objects [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]]
set_property address_offset {0x018}             [ipx::get_registers KEY_LEN -of_objects [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]]
set_property size           {32}                [ipx::get_registers KEY_LEN -of_objects [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]]

Here KEY_LEN is the kernel argument name; “AES key length” is the register description; “0x018” is the address offset the the register and “32” is the data width of the register (all scalar kernel arguments should be 32-bit width).

You can see in the provided Tcl script that all the registers defined in the previous table are added and defined accordingly.

Since the krnl_aes kernel doesn’t have AXI master ports, so we don’t need to configure them. The description of setting AXI master can be found in krnl_cbc kernel part next.