SmartHLS Migration Guide¶
This section describes how existing Vitis HLS / Vivado HLS designs can be easily migrated to SmartHLS. When migrating an existing C++ design from Vitis HLS / Vivado HLS, the pragmas and libraries used in the source code should be changed to the equivalent ones in SmartHLS.
Pragmas¶
Vitis HLS / Vivado HLS | SmartHLS |
---|---|
aggregate, data_pack | See the Struct Variable/Argument Packing pragmas. |
allocation | A global constraint of operation resources can be set via set_resource_constraint;
constraining the operation resource within a function, a loop or a block of code is not yet available.
Functions that are not inlined (automatically by SmartHLS tool or specified via the Inline Function
pragma) always have a single RTL module instance in hardware, and it is shared by all callers.
Replication of a function instance in hardware can be achieved by the Replicate Function and Inline Function pragmas.
In the case of multi-threading, each thread of a function creates an instance of
the corresponding RTL module.
|
array_partition | See the Partition Top-Level Interface and Partition Memory pragmas. |
dataflow | Data Flow Parallelism and Multi-threading can be used to implement a task-level (dataflow) pipeline. |
disaggregate | See the struct_fields option of the Partition Top-Level Interface pragma. |
expression_balance | See LATENCY_REDUCTION TCL settings to control the expression balance optimization. |
function_instantiate | The equivalent optimization can be achieved with the Inline Function pragma or C++ template functions. |
inline | See the Inline Function pragma. |
interface | See Top-Level RTL Interface for details about supported interfaces and corresponding pragmas. |
pipeline | See Pipeline Function and Pipeline Loop pragmas. |
stable | See the stable option of the Scalar Argument Interface pragma. |
stream | Streaming interface is implemented via the hls::FIFO Argument. |
top | See the Set Top-Level Function pragma. |
unroll | See the Unroll Loop pragma. |
The following Vitis/Vivado HLS pragmas do not have an equivalent support in SmartHLS yet: array_map, array_reshape, bind_op, bind_storage, dependence, disaggregate, latency, loop_flatten, loop_merge, loop_tripcount, occurrence, protocol, reset, shared.
Libraries¶
Arbitrary Precision Data Types¶
Similar to Vitis/Vivado HLS, SmartHLS provides C++ Arbitrary Precision Integer Library and C++ Arbitrary Precision Fixed Point Library.
Streaming Library¶
Similar to the hls::stream
template class in Vitis/Vivado HLS, SmartHLS
provides a hls::FIFO
template class in the Streaming Library.
Math Library¶
SmartHLS supports a subset of functions in the Math Library (math.h), but does not yet have a math function library that is optimized for hardware implementation with customizable arbitrary precisions.
Other Libraries¶
Other libraries such as OpenCV, FFT, FIR, DDS, and SRL libraries are not yet supported by SmartHLS. We are actively developing libraries, such as the computer vision IPs. If you are interested in having support of certain IPs, please email us at SmartHLS@microchip.com. Your feedback is valuable to us and will help to prioritize our production plan.
.