AN 780: Compiling and Customizing an Intel® Arria® 10 Custom Platform for OpenCL*

ID 683045
Date 10/30/2018
Public
Document Table of Contents

1.6.2.2.1. Creating the board_spec.xml File

To create a board_spec.xml file for your Custom Platform, specify the elements and attributes that describe your board hardware to the Intel® FPGA SDK for OpenCL™ .

A template of the board_spec.xml file is available in the INTELFPGAOCLSDKROOT/board/custom_platform_toolkit/board_package/hardware/template directory of the Custom Platform Toolkit.

All of the information in the board_spec.xml file should match the actual hardware files.

Table 7.  Specifications of XML Elements and Attributes in the board_spec.xml File
Element Attribute Description
board version, name
device device_model, used_resources
global_mem name, max_bandwidth,interleaved_bytes, config_addr, [default], interface
host kernel_config
[channels] interface
interfaces interface, kernel_clk_reset
compile project, revision, qsys_file, generic_kernel, generate_cmd, synthesize_cmd, auto_migrate
  1. For the top-level board element, specify the board name (that is, name) and the targeted Intel® Quartus® Prime software version (that is, version).
    In the example board_spec.xml file, the board name is a10gx_es3 and the Intel® Quartus® Prime software version is 16.0.
  2. Specify the device model file.
    The Intel® FPGA SDK for OpenCL™ includes device models for the most relevant devices in the INTELFPGAOCLSDKROOT/share/models/dm directory. Identify your FPGA’s .xml device model file in the dm directory and specify its file name in the device_model attribute of the device element. If the device model file pertaining to your FPGA is not listed in the dm directory, create a device model file for your FPGA and then store the file in your Custom Platform subdirectory in which the board_spec.xml file resides.
  3. For the used_resources element, specify information about the FPGA resources that are consumed by the Custom Platform.
    1. Update these values after the Intel® Quartus® Prime software finishes compiling the Custom Platform.
      The actual amount of resources available to custom kernels will be the total amount of hardware resources minus the resources used by the Custom Platform hardware for components such as the memory controller and the PCIe IP core.
  4. If your board contains global memory such as DDR3 or QDR, specify the global_mem element and corresponding attributes to describe the characteristics of the memory interface.
  5. If your board contains streaming interface such as Ethernet, specify the channels element and the corresponding interface attribute to identify the I/O channels as either sinks or sources and to describe their characteristics.
  6. With respect to information about the host interface to the kernel, specify the kernel_config attribute of the host element to instruct the compiler at what offset the kernel resides from the perspective of the kernel control register access master on the kernel_interface module.
    The offset value should be 0 because the access master does not master anything except for kernels. Leave the size attribute at the default value of 0x0100000.
  7. Specify the interfaces element and its corresponding attributes to describe the kernel interfaces that connect to the generated OpenCL kernels and control their behaviors.
    1. For each kernel interface, include one of the following interface type: master, irq, and streamsource.
      Similar to global memory interfaces, specify the name, port, and width attributes. For the streamsource interface type, specify the clock attribute with the name of the clock that is used for the snoop stream. Usually, this clock is the kernel clock.