pragma SDS resource
Description
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 generate a hardware accelerator and
data motion network realizing the hardware functions in programmable logic.
Syntax
#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
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.