SDS Pragmas

Optimizations in SDSoC

This section describes pragmas for the SDSoC system compilers,sdsccandsds++, to assist system optimization.

The SDSoC system compilers target a base platform and invoke the Vivado® High-Level Synthesis (HLS) tool to compile synthesizeable C/C++ functions into programmable logic. Using the SDSoC IDE, or sdscc/sds++ command line options, you select functions from your source program to run in hardware, specify accelerator and system clocks, and set properties on data transfers.

In the SDSoC environment, you control the system generation process by structuring hardware functions and calls to hardware functions to balance communication and computation, and by inserting pragmas into your source code to guide the system compiler. The SDSoC compiler automatically chooses the best possible system port to use for any data transfer, but allows you to override this selection by using pragmas. You can also specify pragmas to select different data movers for your hardware function arguments, and use pragmas to control the number of data elements that are transferred to/from the hardware function.

All pragmas specific to the SDSoC environment are prefixed with#pragma SDSand should be inserted into C/C++ source code, either immediately prior to a function declaration or at a function call site for optimization of a specific function call.

#pragma SDS data access_pattern(in_a:SEQENTIAL, out_b:SEQUENTIAL) void f1(int in_a[20], int out_b[20]);
The SDS pragmas include the types specified below:
Table 1.SDS Pragmas by Type
Type Pragmas
Data Access Patterns
Data Transfer Size
Memory Attributes
Data Mover Type
SDSoC Platform Interfaces to External Memory
Hardware Buffer Depth
Asynchronous Function Execution
Specifying Resource Binding
Partition Specification