Creating a Project for a Target Platform

In the SDSoC IDE, click on File > New > Xilinx SDx Project to create a new project and open up the New Project wizard. After entering the project name, the first step is to select a platform target for development from the Choose Hardware Platform window. The platform includes a base hardware system, software runtime (including operating system), boot loaders, and root file system. For an SDSoC environment project, the platform must be one of the hardware platforms from the Zynq-7000 or Zynq UltraScale+ families.

Note: The hardware platform is fixed and the command line options are automatically inserted into every makefile. To retarget a project to a new platform, you must create a new project with the new platform and copy the source files from your current project into the new project.

In addition to the available base platforms, you can manage other aspects of the hardware target from this window:

  • Add Custom Platform: This allows you to add your own platform to the list of available platforms. Simply navigate to the top-level directory of the custom platform, select it and press OK to add the new platform. The custom platform is immediately available for selection from the list of available platforms. You can find sample platforms in the <sds_root>/samples/platforms directory.
  • Manage Repositories: This allows you to both add or remove standard and custom platforms. If a custom platform is added, the path to the new platform is automatically added to the repositories. Removing any platform from the list of repositories removes the platform from the Choose Hardware Platform selection.
  • Add Devices/Platforms: This allows you to manage which Xilinx devices (FPGAs) and platforms are installed. If a device or platform is not selected for inclusion during the installation process, the device will not be available for selection and any platform that uses the device will not be available for selection.
The menu option Xilinx > Add Custom Platform can be used at any time to directly add custom platforms and manage the repositories.
Note: OpenCL is support is only provided for the target platforms ZCU102_ES1_OCL and ZCU102_ES2_OCL. The clCreateBuffer flag option CL_MEM_USE_HOST_PTR is not supported. OpenCL is only supported in the Linux environment.

In the Choose Software Platform and Target CPU window, select a System Configuration which defines the software environment that runs on the hardware platform, including the CPU and operating system (OS). For OpenCL support, the System Configuration must be set to A53 OpenCL Linux: the Runtime selection will automatically update to OpenCL. C/C++ is supported for all platforms.

Next, in the Templates window, select Empty Application to create a blank project into which you can add files or select from one of the available templates. Finally, review the application description to determine if it is a good starting point for your project, and click Finish to open the project.

In addition to the SDSoC IDE, a command line interface is provided.

  • For C based projects this is invoked using sdscc command.
  • For C++ projects this is invoked using the sds++ command.
  • The command line executables are located in <sdx_root>/bin.

If you are using the command line interface and writing makefiles outside of the SDSoC IDE, you must include the platform using the -sds-pf command line option on every call to sdscc. You can also specify the software platform, which includes the operating system that runs on the target CPU, using the -sds-sys-config <system_configuration> command line option.

sdscc -sds-pf <platform path name>
Here, the platform is either a file path or a named platform within the <sdsoc_root>/platforms directory. To view the available base platforms from the command line, run the following command.
sdscc -sds-pf-list

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 sdscc system compiler.

The hardware/software interface is defined implicitly in your application source code once you have selected a platform and a set of functions in the program to be implemented in hardware. The sdscc/sds++ system compilers analyze the program data flow involving hardware functions, schedule each such function call, and generate a hardware accelerator and data motion network realizing the hardware functions in programmable logic. They do so not by implementing each function call on the stack through the standard ARM application binary interface, but instead by redefining hardware function calls as calls to function stubs having the same interface as the original hardware function. These stubs are implemented with low-level function calls to a send/receive middleware layer that efficiently transfers data between the platform memory and CPU and hardware accelerators, interfacing as needed to underlying kernel drivers.

The send/receive calls are implemented in hardware with data mover IP cores based on program properties like memory allocation of array arguments, payload size, the corresponding hardware interface for a function argument, as well as function properties such as memory access patterns and latency of the hardware function.