pragma SDS resource


This pragma can be used at function call sites to manually specify resource binding.

The resource pragma is specified immediately preceding a call to a hardware function, directing the compiler to bind the caller to a specified accelerator instance. The SDSoC™ compiler identifies when multiple resource IDs have been specified for a function, and automatically generates a hardware accelerator and data motion network realizing the hardware functions in programmable logic.


The syntax of the pragma is:
#pragma SDS resource(<ID>)
  • <ID>: Must be a compile time unsigned integer constant. For the same function, each unique ID represents a unique instance of the hardware accelerator.

Example 1

The following code snippet shows an example of using this pragma with a different ID:
    #pragma SDS resource(1)
    mmult(A, B, C);
    #pragma SDS resource(2)
    mmult(D, E, F);

In the above example, the first call to function mmult will be bound to an accelerator with an ID of 1, and the second call to mmult will be bound to another accelerator with an ID of 2.

See Also

  • SDSoC Environment Profiling and Optimization Guide (UG1235)
  • SDSoC Environment User Guide (UG1027)