pragma SDS partition
Description
The SDSoC environment can automatically generate multiple bitstreams for a single application that are loaded dynamically at run-time. Each bitstream has a corresponding partition identifier.
ThePARTITION
pragma is specified immediately preceding a call to a hardware function, directing the compiler to assign the implementation of the hardware function to the specified partitionID
. When the SDSoC compiler sees the pragma, it automatically creates the bitstream for the partition, and inserts a call to load the bitstream when it is needed.
Syntax
#pragma SDS partition( )
: Specified as a positive integer. Important:Partition ID 0 is reserved.
Example 1
PARTITION
pragma:
foo(a, b, c); #pragma SDS partition (1) bar(c, d); #pragma SDS partition (2) bar(d, e);
In this example, hardware functionfoo
has no partition pragma, so it is implemented in partition 0. The first call to functionbar
is implemented in partition 1, which has a separate bitstream that is loaded prior to running the function. The second call tobar
is implemented in partition 2.
Example 2
#pragma SDS partition (1) sobel_filter(yc_out_tmp, out_frames[frame]);
In this example, thesobel_filter
function is implemented in partition 1, with a unique bitstream that is duynamically loaded when the partition is encountered during execution. After the partition 1 completes, partition 0 resumes operation.
The complete example of the sobel_filter can be found in
See Also
- SDSoC Environment Optimization Guide(UG1235)
- The SDSoC Environment