Creating anSDAccelProject

Within theSDx™tool you can create anSDAccel™project using the IDE GUI. The following topic shows you how to set up aSDxworkspace, create anSDAccelproject, and use key features of the IDE.

In addition to theSDxIDE, theSDAccelenvironment provides a command line interface to support a scripted flow, described inBuilding an Application via Command Line. For a full list of commands, see theSDx Command and Utility Reference Guide.

Using an SDx Workspace

  1. Launch theSDxIDE directly from the command line:
    $ sdx
  2. TheSDxIDE opens and prompts you to select a workspace, as shown in the following figure.

    Figure:Specify the SDx Workspace

IMPORTANT:When opening a new shell to enter an SDxcommand, ensure that you first source the settings64and setupscripts to set up the tool environment. See theSDAccel Environment Release Notes, Installation, and Licensing Guide(UG1238)for more information.
IMPORTANT:If you use a single computer to perform both development and deployment, be sure to open separate terminals for running the SDxtools and the xbutilboard installation utility. Running both tools from the same terminal adversely affects the environment variables and causes tool issues.

TheSDxworkspace is the folder that stores your projects, source files, and results while working in the tool. You can define separate workspaces for each project or have workspaces for different types of projects. The following instructions show you how to define a workspace for anSDAccelproject.

  1. Click theBrowsebutton to navigate to, and specify, the workspace, or type the appropriate path in theWorkspacefield.
  2. Select theUse this as the default and do not ask againcheck box to set the specified workspace as your default choice and eliminate this dialog box in subsequent uses ofSDx.
  3. ClickLaunch.
    TIP:You can change the current workspace from within the SDxIDE by selecting File>Switch Workspace.

You have now created anSDxworkspace and can populate the workspace with projects. Platform and application projects are created to describe theSDxtool flow for creating anSDAccelplatform.

Creating an Application Project

TIP:Example designs are provided with the SDAcceltool installation, and also on the Xilinx GitHubrepository. See Getting Started with Examplesfor more information.
  1. After launching theSDxIDE you can create a new Project. SelectFile>New>SDx Application Project, or if this is the first time theSDxIDE has been launched, you can selectCreate Application Projecton the Welcome screen.
  2. The NewSDxProject wizard opens.
  3. In the Create a NewSDxApplication Project page, you can specify the project name as shown. Specify the name of the project in theProject namefield.

    Figure:Create a NewSDxApplication Project

  4. TheUse default locationis selected by default to locate your project in a folder in theSDxworkspace. You can uncheck this check box to specify that the project is created in aLocationof your choice.
  5. If you specify the location, you can useChoose file systemto select thedefaultfile system, JSch, or enable the Eclipse Remote File System Explorer (RSE).
    IMPORTANT:The project location cannot be a parent folder of an SDxworkspace.
  6. ClickNext.

The Platform dialog box, similar to the one shown in the following figure, displays the available installed platforms. For installing additional platforms, see the "Installing Platform-Specific Packages" section inSDAccel Environment Release Notes, Installation, and Licensing Guide(UG1238).

IMPORTANT:Be sure to select the right platform for your project, as subsequent processes are driven by this choice.

Figure:SpecifySDAccelPlatform

A platform is composed of a shell, which describes the base hardware design and the meta-data used in attaching accelerators to declared interfaces.SDAcceloffers platforms for various boards.

You can add custom defined or third-party platforms into a repository. SeeManaging Platforms and Repositoriesfor more information.

  1. To select the target platform for your project, select the desired platform and clickNext.
  2. The System configuration page opens, as shown in the following figure. SelectSystem configurationandRuntimefrom a list of those defined for the selected platform. The System Configuration defines the software environment that runs on the hardware platform. It specifies the operating system and the available runtime settings for the processors in the hardware platform.

    Figure:Specify System Configuration

  3. After selecting theSystem Configurationand clickingNext, the Templates page displays, as shown in the following figure. Specify an application template for your new project. Thesamplesdirectory within theSDxtools installation contains multiple source code example templates.
  4. Initially, the Template dialog box has anEmpty Applicationand aVector Additionapplication. To access additionalSDAccelexamples, click theSDx Examplesbutton.

    Figure:Application Templates

  5. When theSDxExamples dialog box opens, click theDownloadbutton for theSDAccelExamples. Then clickOK. The downloaded examples are now listed in the Templates page.
    Note:The SDxtool might try to download the examples from a GitHub repo depending on your network configuration. Specific proxy settings might be necessary.
  6. You can use the template projects as examples to learn about theSDxtool and acceleration kernels or as a foundation for your new project. Note that you must select a template. You can selectEmpty Applicationto create a blank project into which you can import files and build your project from scratch.
  7. ClickFinishto close the NewSDxProject wizard and open the project.

Understanding the SDx GUI

When you open a project in theSDxIDE, the workspace is arranged in a series of different views and editors, also known as aperspectivein the IDE. The tool opens with theSDx(default) perspective shown in the following figure.

Figure:SDx– Default Perspective

Some key views/editors in the default perspective are:

Project Explorer
Displays a file-oriented tree view of the project folders and their associated source files, plus the build files, and reports generated by the tool.
Assistant
Provides a central location to view/edit settings, build and run your SDAccelapplication, launch profiling and debug sessions, and open reports.
Editor Area
Displays project settings, build configurations, and provides access to many commands for working with the project.
Console Area
Presents multiple views including the command console, design guidance, project properties, logs and terminal views.
Outline
Displays an outline of the current source file opened in the Editor Area.
Target Connections
Provides status for different targets connected to the SDxtool, such as the Vivadohardware server, Target Communication Framework (TCF), and quick emulator (QEMU) networking.

To close a view, click theClosebutton (x) on the tab of the view. To open a view, selectWindow>Show Viewand select a view. You can arrange views to suit your needs by dragging and dropping them into new locations in the IDE.

To save the arrangement of views as a perspective, selectWindow>Perspective>Save Perspective As. This defines different perspectives for initial project editing, report analysis, and debug for example. Any changes made without saving as a perspective are stored with the workspace. To restore the default arrangement of views, selectWindow>Perspective>Reset Perspective.

To open different perspectives, selectWindow>Perspective>Open Perspective.

To restore theSDx(default) perspective, click theSDxbuttonon the right side of the main toolbar.

SDx Assistant

The Assistant view provides anSDx-centric project tree to manage settings, builds, run times, profile, debug, and reports. It is a companion view to the Project Explorer and is opened by default directly below the Project Explorer view.

An example view of the Assistant and its tree structure is shown below. For the expanded Emulation-HW flow, it shows the binary container contents and the debug reports including theProfile Summary,Application Timeline, andWaveform.

Figure:Assistant Tree Structure Example

Each item in the tree has a type-specific right-click menu with actions for that item. The actions can open dialogs, reports or views, start processes, or launch external tasks.

For example, right-clicking the project (mixed_c_rtlin the following example) displays the following menu:

Figure:Assistant Right-Click

TIP:If the actions are disabled/grayed out, this means the project does not have the applicable information.

SelectSettingsto open the Project Settings dialog box.

Figure:Project Settings

You can select the settings for the various items listed in the tree. For example, if you select the setting for theEmulation-HWbuild configuration, it displays the following. The Assistant makes it easy to navigate through the design objects and view/update their settings.

Figure:Emulation-HW

TheView Menuincludes options that affect the Assistant view behavior, but do not affect project data. Select this option by left-clicking the downward pointing arrow shown in the following graphic.

Figure:Assistant View Menu

It displays the following options:

Show Reports
If checked, reports will be visible in the tree. If not checked, reports will not be shown in the tree. Reports open in the tree only when they exist in the project, usually after a project has been built or run, with specific settings.
Show Active Build Configurations Only
If checked, the tree will only show the activebuild configurations for each project. The active build configuration, in the assistant, will be the most-recently-built configuration. The active build configuration can also be changed to view the standard CDT methods ( Project>Build Configurations>Set Active, or Project>Build Configurations>Manage).

When using the assistant to iterate on a specific build, it can be helpful to see only the current build configuration.

Link with Console
If checked, the build console in the Console view switches automatically to match the current selection in the Assistant tree, if the selection is for a build configuration, or a descendant in the tree from a build configuration. If not checked, the console does not automatically switch when the Assistant selection changes.
Link with Guidance
If checked, the Guidancein the Console area automatically switches to match the current selection in the Assistant tree.

Figure:Assistant Link with Console View Menu

You can see that with a couple of clicks you can access many of the functions and features of the tool using the Assistant.

XOCC Linking and Compilation Options

Using the Assistant window, you can update both thexocccompile and link options. First, right-click abinary_containerfolder in the Assistant window and selectSettingsas shown below.

Figure:XOCC Settings from Assistant

The Binary Container Settings window is displayed as shown below. To add linkerxoccoptions, enter the options directly into theXOCC linker optionsfield. Your added options are updated in themakefile(located under theProject Explorer) and applied during building. In addition, the updated options are also displayed in theXOCC Linker Command Linebox for convenience.

Figure:XOCC Linker Options

Thexocclinker options differ slightly between the Emulation-HW, Emulation-SW, and System configurations. Specifically, the target (-toption) matches the respective configuration and debugging is not enabled in the System configuration.

To addxocccompile options to a particular kernel, click the desired kernel under thebinary_containerfolder. For instance, in the image below, kernelkrnl_vaddhas been selected under the System configuration. Compile options can be entered directly into theXOCC compile optionsfield. Your added options are only applied to that kernel and not shared across kernels. TheXOCC Compiler Command Linedisplays the updated options.

Figure:XOCC Compiler Options

There are options to set the number of instances (Compute Units) of the kernel and for setting the port data width. When modifying these options, the associatedxocccompile option is automatically generated and added to thexocccompiler command line for you.

Similar to thexocclinker options, the compiler options differ slightly between the Emulation-HW, Emulation-SW, and System configurations. Specifically, the target (-toption) matches the respective configuration and debugging is not enabled in the System configuration.

For Emulation-HW and System configurations, a Compute Unit Settings area is also displayed (outlined in yellow in the above image) which allows additional linker and compile options to be set. Since none of the additional options apply to Emulation-SW, the Compute Unit Settings area is not displayed for this configuration.

For Emulation-HW configuration, only Memory and SLR (seeSuper Logic Regionfor explanation of SLR) allocation options are displayed. However, for System configuration, additional protocol checker and profiling logic options are displayed. Depending on the options selected, this results in updates to both thexocclinker and compile options.

SDx Project Export and Import

SDxprovides a simplified method for exporting/importing one or moreSDxprojects within your workspace. You can optionally include associated project build folders.

Exporting an SDx Project

When exporting a project, it archives the project in a zip file with all the relevant files necessary to import into another workspace.
  1. To export a project, selectFile>Exportfrom the main menu.
  2. When the Export wizard opens, select the Project to import under the folder, as shown in the following figure, and clickNext.

    Figure:Select Export Wizard

  3. When the ExportSDxProjects window opens, the projects in the workspace will be displayed as shown in the following figure. Select the desired projects to be included in the archive by checking the respective check boxes. Enter the name of the archive file and the directory location to where you wish to save the file. In addition, you can optionally include the associated project build folders in the archive by checking the Include build folders check box. The build folders include all the build related files including reports and bit files for example.
  4. ClickFinishto save the archive zip file.

    Figure:Export Filename Build Folder

    TheSDxprojects have been successfully archived and can be imported into a different workspace.

Importing an SDx Project

  1. To import anSDxproject, selectFile>Importfrom the top menu.
  2. From the Import window, select theSDxProject import wizard under theXilinxfolder as shown in the following figure and clickNext.

    Figure:Import Select an Import Wizard

  3. This opens the Import Projects window to select the import file type. Select theSDxproject exported zip file shown in the following figure and clickNext.

    Figure:Import Projects – Import Type

  4. This opens the ImportSDxProjects window.
  5. Browse and select the desired archive file. It will display the archived projects.
  6. Select the projects to import using the check boxes and clickNext. In the following figure both projects are selected for import.
  7. ClickFinishto import the projects into your workspace.

    Figure:Import Archive Filename

Adding Sources

A project consists of many different sources including those for host application code, kernel functions and even pre-compiled.xofiles. With the project open in theSDxIDE, you can add these source files to the project by left-clicking theimport sources iconin the Project Explorer. This displays the Import Sources dialog box shown in the following image.

Figure:Import Sources Dialog Box

  1. In the dialog box, clickBrowseto select the directory from which you want to import sources. Select the desired sources and clickFinish.
  2. The source files in that directory will be displayed. Select the desired sources to import by selecting the appropriate check boxes and clickFinish. In the following image C/C++,OpenCL™and header files will be imported into the project.
    IMPORTANT:When you import source files into a workspace, it copies the file into the workspace. Any changes to the files are lost if you delete the workspace.
  3. Similarly you can import compiled kernels (.xofiles) into the project through theImport Sourcesselection. In the following image, thekrnl_vadd.xofile will be imported into the project.

    Figure:Import .xo Sources

  4. In addition to importing sources, you can also create and edit new source files in the GUI. With the project open in theSDxIDE, right-click thesrcfolder and selectNew>Fileas shown in the following image.

    Figure:New File Select

  5. Select the folder in which to create the new file and enter a file name as shown in the image below. ClickFinishto add the file to the project.

    Figure:New File Name

  6. After adding source files to your project, you are ready to begin configuring, compiling, and running the application. You can open a source file by expanding thesrcfolder in the Project Explorer and double-clicking on the file.