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.
The PARTITION
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 partition ID
. 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(<ID>)
- <ID>: 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 function foo
has no partition pragma, so it is
implemented in partition 0. The first call to function bar
is implemented
in partition 1, which has a separate bitstream that is loaded prior to running the function.
The second call to bar
is implemented in partition 2.
Example 2
#pragma SDS partition (1)
sobel_filter(yc_out_tmp, out_frames[frame]);
In this example, the sobel_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 <install_path>/samples/file_io_manr_sobel_partitions.