Control Trace Insertion
#pragma SDS monitor trace(var1[:SW|HW][,var2[:SW|HW]])
This pragma must be specified immediately preceding a function declaration, or immediately
preceding another #pragma SDS
bound to the function declaration.
This pragma specifies the trace insertion for the accelerator with different granularity. The
user can set the var
to be the accelerator
function name or individual argument name. The kind of trace can
be either SW
or HW
or both.
HW
trace means the "start" and
"stop" of the corresponding hardware component, such as the
"start" and "stop" of the hardware accelerator, or the "start of
data transfer" and "stop of data transfer" of the argument.
SW
trace means the stub
command
for the accelerator and
arguments.
Example 1
foo
:#pragma SDS monitor trace(foo)
void foo(int a, int b);
In the example shown above, both HW
and
SW
traces are inserted for the
accelerator foo
.
Example 2
#pragma SDS monitor trace(a, b:SW, c:HW)
void foo(int a, int b, int *c);
In the above example, both HW
and
SW
traces are inserted for
argument a
. For argument
b
, only the SW
trace is inserted. For argument c
,
only the HW
trace is inserted.