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.
#pragma SDS partition(ID)
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 partitionID
.
- In the absence of a
partition
pragma, a hardware function is implemented in partition 0. ID
must be a positive integer. PartitionID 0
is reserved.
Example 1
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 tobar
is implemented in partition 1, and the secondbar
is implemented in partition 2.
A complete example showing the usage of this pragma can be found in