Here we use the ipx::add_register
command to add the registers to the inferred s_axi_control
interface and use the set_property
command to set the property of the registers. For example, the following shows this process with the kernel argument CBC_MODE
:
ipx::add_register CBC_MODE [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]
set_property description {cbc mode} [ipx::get_registers CBC_MODE -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 {0x050} [ipx::get_registers CBC_MODE -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 CBC_MODE -of_objects [ipx::get_address_blocks reg0 -of_objects [ipx::get_memory_maps s_axi_control -of_objects [ipx::current_core]]]]
The following are included in the above example case:
CBC_MODE
is the kernel argument name“cbc mode” is the register description
“0x050” is the address offset the the register
“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. Two special kernel arguments here are SRC_ADDR
and DEST_ADDR
; these are for AXI master address pointer and are all 64-bit width. We will associate them with the AXI master ports in the next step.