Partition Specification

The SDSoC system compilers sdscc/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)

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 partition ID.

  • In the absence of a partition pragma, a hardware function is implemented in partition 0.
  • ID must be a positive integer. Partition ID 0 is 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 function foo has no partition pragma, so it is implemented in partition 0. The first call to bar is implemented in partition 1, and the second bar is implemented in partition 2.

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