A Vitis subsystem (VSS) is a platform-independent, reusable design component that you can customize with AI Engine and PL content. You integrate the VSS into a larger system using Vitis tools.
The configuration file specifies which PL kernels and AI Engine graphs to use, and
defines the interface connections between kernels and graphs. The syntax follows the Vitis linker --connectivity directives
for extensible platforms, and also declares kernels, graphs, and other VSS components
added to a VSS component. The following example defines a VSS component.
vss=amd.com:<vss_library_name>:<vss_component_name>:<version_number>:<list_of_instances_of_PL_kernels_or_AI_Engine_graphs>
[connectivity]
nk=producer:2:p0,p1
nk=consumer:2:c0,c1
vss=amd.com:myLib:MyVSSComponent:1.0:p0,p1,c0,c1,ai_engine_0
stream_connect=p0.outs:c0:ins
stream_connect=p1:outs:ai_engine_0.si_0
stream_connect=ai_engine_0.so_0:c1:ins
| Item | Example | Description |
|---|---|---|
vss_library_name
|
my_vss_lib
|
Identifier name that associates the VSS with a library. |
vss_component_name
|
vss_top
|
Used as the VSS archive name and concatenated with instance names to provide a unique name when you integrate the VSS component into an extensible platform. |
version_number
|
1.0
|
Tracks the library or component version. |
list_of_instances
|
counter_0,ai_engine_0
|
Comma-separated list of instance names. The names
must match kernel names declared with nk in the
configuration file.Note: The
ai_engine_0 instance name must match the
default AI Engine IP instance name in the Vivado hardware platform. |
Hierarchical VSS
The Vitis subsystem provides hierarchical constructs for organizing complex designs, which allow multiple VSS components within a single VSS. You can arrange PL kernels within these VSS components. You must create each VSS component independently before adding it to another VSS component.
You can include multiple independently compiled AI Engine graphs, each of which defines a soft partition. A Versal AI Engine design can contain only a single instance of the AI Engine IP.
When you integrate a VSS component into another VSS or platform, the compiler flattens the design and resolves instance names by prepending the corresponding VSS component names based on the hierarchical structure.
The following example shows how VSS and kernel instance names resolve in a hierarchical use case.
The innermost VSS component vss_a
contains an RTL kernel with instance name my_rtl_kernel_0.
The VSS component vss_b
instantiates vss_a and an HLS kernel named
my_hls_kernel_0.
In this example, the AI Engine defines a single graph.
The graph includes one input port named in0
and one output port named out0.
The top-level VSS component vss_top
contains vss_b, my_rtl_kernel_1,
and my_hls_kernel_1.
# Declare VSS component A
vss=amd.com:my_vss_lib:vss_a:1.0:my_rtl_kernel_0
# Declare hierarchical VSS component B
vss=amd.com:my_vss_lib:vss_b:1.0:my_hls_kernel_0,vss_a
# Connect a kernel in vss_a to a kernel in vss_b
sc=vss_a_my_rtl_kernel_0.port_out0:my_hls_kernel_0.port_in0
# Declare hierarchical VSS component top
vss=amd.com:my_vss_lib:vss_top:1.0:ai_engine_0,my_rtl_kernel_1,my_hls_kernel_1,vss_b
# Use flattened names when connecting ports to instances:
# Connections in vss_top
sc=my_rtl_kernel_1.port_out0:ai_engine_0.in0
# Connect from vss_top through vss_b into vss_a to reach the RTL kernel
sc=ai_engine_0.out0:vss_b_vss_a_my_rtl_kernel_0.port_in0
# Connect a kernel in vss_b to a kernel in vss_top
sc=vss_b_my_hls_kernel_0.port_out0:my_hls_kernel_1.port_in0
Inferring a Software-Controllable Subsystem Reset
This feature allows the Vitis linker to infer a hardware-controllable and software-controllable reset network for the VSS.
The following example enables the VSS reset through a configuration file:
[advanced]
param=compiler.enableVssReset=true
The following example enables the VSS reset on the command line:
v++ -l --mode vss --advanced.param compiler.enableVssReset=true
The following figures show the result of enabling the VSS reset on the Versal Vitis Subsystem Flow tutorial.
The example uses two clock domains. Rebuilding with the VSS reset enabled inserts two processor system reset blocks and one AXI4-Lite instance.
Asserting aresetn on the vss_top_rst instance puts the VSS in reset. You can
also control each reset from software by writing gen_reset=1
to assert reset or gen_reset=0 to release reset.
For VSS designs that include AI Engine, the reset procedure requires reloading aie.pdi before you write 0 to the
gen_reset register. Reloading ensures that
all internal states are in a known relationship to the PL after reset.
VSS reset networks are generated only at platform integration time and, consequently, are global to all subcomponents of the VSS.
aresetn
input signal on the reset module.Generating the VSS Component
You generate the VSS archive with the linker using --mode vss. The following example shows the command:
v++ --link --mode vss --save-temps --part <part_name> --config ./src/vss_conn.cfg <list_of_xo> <list_of_libadf_partitions> --out_dir <build_folder>
| Folder | Files | Description |
|---|---|---|
<build_folder>
|
*.log,
*.link_summary
|
Output folder that contains log files and the summary from the v++ linker. |
<build_folder>/<vss_component_name>
|
<vss_component_name>.vss
|
VSS component archive. |
*.a
|
AIE graph
libadf.a files. |
|
*.xo
|
RTL and HLS packaged kernels. | |
<build_folder>/<vss_component_name>/ip_repo/*
|
Folders that contain files associated with the packaged HLS and RTL kernels. | |
<build_folder>/<vss_component_name>/VitisRegion
|
Block design metadata for VitisRegion. | |
<build_folder>/_x
|
Temporary work folder for the v++ linker. |