This section contains HLS C/C++ Kernel Examples. The main purpose of C++ kernels is to showcase the benefits and usage of HLS pragmas and optimization directives in Vitis flow.
Examples Table :
Example | Description | Key Concepts/Keywords |
---|---|---|
array_partition | This is a simple example of matrix multiplication (Row x Col) to demonstrate how to achieve better performance by array partitioning, using HLS kernel in Vitis Environment. | Key Concepts Keywords |
bind_op_storage | This is simple example of vector addition to describe how to use BIND OP and STORAGE for better implementation style. | Key Concepts Keywords |
burst_rw | This is simple example of using AXI4-master interface for burst read and write | Key Concepts Keywords |
critical_path | This example shows a normal coding style which could lead to critical path issue and design will give degraded timing. Example also contains better coding style which can improve design timing. | Key Concepts
|
custom_datatype | This is simple example of RGB to HSV conversion to demonstrate Custom DATA Type usages in C Based Kernel. Xilinx HLS Compiler Supports Custom Data Type to use for operation as well as Memory Interface between Kernel and Global Memory. | Key Concepts Keywords |
dataflow_stream | This is simple example of vector addition to demonstrate Dataflow functionality of HLS. HLS Dataflow allows user to schedule multiple task together to achieve higher throughput. | Key Concepts Keywords |
dataflow_stream_array | This is simple example of Multiple Stages Vector Addition to demonstrate Array of Stream usage in HLS C Kernel Code. | Key Concepts
Keywords |
dependence_inter | This Example demonstrates the HLS pragma 'DEPENDENCE'.Using 'DEPENDENCE' pragma, user can provide additional dependency details to the compiler by specifying if the dependency in consecutive loop iterations on buffer is true/false, which allows the compiler to perform unrolling/pipelining to get better performance. | Key Concepts Keywords |
gmem_2banks | This example of 2ddr is to demonstrate how to use multiple ddr and create buffers in each DDR. | Key Concepts Keywords |
kernel_chain | This is a kernel containing the cascaded Matrix Multiplication using dataflow. ap_ctrl_chain is enabled for this kernel to showcase how multiple enqueue of Kernel calls can be overlapped to give higher performance. ap_ctrl_chain allow kernel to start processing of next kernel operation before completing the current kernel operation. | Key Concepts
|
lmem_2rw | This is simple example of vector addition to demonstrate how to utilize both ports of Local Memory. | Key Concepts
Keywords |
loop_pipeline | This example demonstrates how loop pipelining can be used to improve the performance of a kernel. | Key Concepts Keywords |
loop_reorder | This is a simple example of matrix multiplication (Row x Col) to demonstrate how to achieve better pipeline II factor by loop reordering. | Key Concepts
Keywords |
partition_cyclicblock | This example shows how to use array block and cyclic partitioning to improve performance of a kernel | Key Concepts
Keywords |
plram_access | This example shows the usage of PLRAM and how to use it with simple matrix multiplication (Row x Col). | Key Concepts
Keywords |
port_width_widening | This example shows how HLS introduces the capability of resizing the port width of the kernel interface ports for better resource utilization maintaining the performance. | Key Concepts Keywords
|
shift_register | This example demonstrates how to shift values in registers in each clock cycle | Key Concepts Keywords |
simple_vadd | This is a simple example of vector addition.The purpose of this code is to introduce the user to application development in the Vitis tools. | |
systolic_array | This is a simple example of matrix multiplication (Row x Col) to help developers learn systolic array based algorithm design. Note : Systolic array based algorithm design is well suited for FPGA. | |
wide_mem_rw | This is simple example of vector addition to demonstrate Wide Memory Access using ap_uint<512> data type. Based on input argument type, V++ compiler will figure our the memory datawidth between Global Memory and Kernel. For this example, ap_uint<512> datatype is used, so Memory datawidth will be 16 x (integer bit size) = 16 x 32 = 512 bit. | Key Concepts Keywords |