Creating a Project for a Target Platform
In the SDSoC IDE, click onNew Projectwizard. After entering the project name, the first step is to select a platform target for development from theChoose Hardware Platformwindow. 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.
to create a new project and open up theIn 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 pressOKto 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
/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 theChoose Hardware Platformselection.
- 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.
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, selectEmpty Applicationto 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 clickFinishto 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
/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 tosdscc
. You can also specify the software platform, which includes the operating system that runs on the target CPU, using the-sds-sys-config
command line option.
sdscc -sds-pf
Here, the platform is either a file path or a named platform within the
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 thesdscc
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. Thesdscc/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 asend/receive
middleware layer that efficiently transfers data between the platform memory and CPU and hardware accelerators, interfacing as needed to underlying kernel drivers.
Thesend/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.