pragma SDS resource

Description

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

Theresourcepragma 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 generate a hardware accelerator and data motion network realizing the hardware functions in programmable logic.

Syntax

The syntax of the pragma is:
#pragma SDS resource()
Where:
  • : 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 functionmmultwill be bound to an accelerator with an ID of 1, and the second call tommultwill be bound to another accelerator with an ID of 2.

See Also