Partition Specification

The SDSoC system compilerssdscc/sds++can automatically generate multiple bitstreams for a single application that is loaded dynamically at run-time. Each bitstream has a corresponding partition identifier. A platform might not support bitstream reloading, for example, due to platform peripherals that cannot be shut down and then brought back up after reloading.

The syntax of this pragma is:
#pragma SDS partition(ID)

Thepartitionpragma is specified immediately preceding a call to a hardware function, directing the compiler to assign the implementation of the hardware function to the partitionID.

  • In the absence of apartitionpragma, a hardware function is implemented in partition 0.
  • IDmust be a positive integer. PartitionID 0is reserved.

Example 1

The following example shows an example of using this pragma:
foo(a, b, c); #pragma SDS partition (1) bar(c, d); #pragma SDS partition (2) bar(d, e);

In this example, hardware functionfoohas no partition pragma, so it is implemented in partition 0. The first call tobaris implemented in partition 1, and the secondbaris implemented in partition 2.

A complete example showing the usage of this pragma can be found in/samples/file_io_manr_sobel_partitions.