Migration Guide From Vitis/Vivado HLS to SmartHLS¶
Pragmas¶
Vitis/Vivado HLS |
SmartHLS |
---|---|
aggregate, data_pack |
See the Struct Argument Packing and Struct Variable 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. The cyclic, block, factor, and dim options are not yet supported. |
dataflow |
Function Pipelining and Multi-threading can be used to implement a task-level (dataflow) pipeline. |
disaggregate |
See the |
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 |
stream |
Streaming interface is implemented via the hls::FIFO Argument. |
top |
See the Set Custom 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.
.