NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Processor SDK Library Architecture and Framework

From Texas Instruments Wiki
Jump to: navigation, search
{{#switchcategory:MSP430=<McuHitboxHeader/>|C2000=<McuHitboxHeader/>|Stellaris=<McuHitboxHeader/>|TMS570=<McuHitboxHeader/>|MCU=<McuHitboxHeader/>|MAVRK=<MAVRKHitboxHeader/>|<HitboxHeader/>}}

Library Architecture and Framework (LibArch) provides an abstraction layer for multi-core DSP library development. The LibArch API can be used by library developers as well as library integrators for fast development of portable software, by eliminating the need to deal with platform-dependent (K1, K2, etc) or OS-dependent (RTOS or OpenCL) complexities.

What's Inside LibArch[edit]

Current release of LibArch contains platform-independent and OS-independent API to do:

  • Dynamic memory allocations for both scratch and persistent memory.
  • Data transfers between DDR and L2/L1 and between any two memory locations of L1 and L2.
  • Cache configuration (or resizing) of L1D and L2.

For detailed API documentation, please refer to user's guide in the docs folder in the installed package.

Supported Devices and SDKs[edit]

Current release of LibArch supports the following devices and SDKs:

  • K2H, Processor-SDK Linux
  • AM572x, Processor-SDK Linux
  • C6678, Processor-SDK RTOS

For other devices not listed above, users can add LibArch support by themselves following the instructions given in Adding Device Support.

Recompile LibArch[edit]

The LibArch source code can be recompiled for various devices and under either Processor-SDK RTOS or Processor-SDK Linux. To rebuild LibArch, one needs to:

  • Locate the tools and software components in Processor-SDK
  • Define the device to build LibArch for
  • Specify whether to build for DSP-only version (RTOS) or ARM+DSP version (OpenCL)

Tools and Software Components[edit]

The tools and software components necessary for rebuilding LibArch are included in Processor-SDK. For RTOS, they are located in the installation root folder. For Linux, they are located in linux-devkit/sysroots/cortexa15hf-neon-linux-gnueabi/usr/share/ti.

Following environment variables need to be set:

  • export CGTROOT="<TI_CGT_INSTALLATION_ROOT>/cgt-c6x"
  • export PDK_DIR="<Processor-SDK-installation-root>/pdk_c667x_<version>"
  • export FC_DIR="<Processor-SDK-installation-root>/framework_components_<version>"
  • export XDAIS_DIR="<Processor-SDK-installation-root>/xdais_<version>"
  • export BIOS_DIR="<Processor-SDK-installation-root>/bios_<version>"
  • export OMP_DIR="<Processor-SDK-installation-root>/openmp_dsp_<version>"
  • export XDC_DIR="<Processor-SDK-installation-root>/xdctools_<version>"
  • export IPC_DIR="<Processor-SDK-installation-root>/ipc_<version>"
  • export EDMA3_DIR="<Processor-SDK-installation-root>/edma3_lld_<version>"
  • export PATH=<TI_CGT_INSTALLATION_ROOT>/cgt-c6x/bin:$PATH

Devices[edit]

Refer to Supported Devices for currently supported devices. Refer to Adding Device Support for how to add LibArch support for other devices.

The right device name needs to be specified when building LibArch, for example, SOC_K2H for K2H, SOC_C6678 for C6678, SOC_AM572x for AM572x, etc.

Operating Systems[edit]

From the view point of LibArch, the operating system may be either OpenCL for Processor-SDK Linux or RTOS for Processor-SDK RTOS.

Recompiling LibArch Source Code[edit]

Follow the steps below to rebuild LibArch:

  • Go to <LibArch installation root folder>/packages/ti/libarch
  • Type "make lib TARGET=<device_name> LIBOS=<os_name>", where
    • <device_name> must be one of SOC_K2H, SOC_C6678, SOC_AM572x.
    • <os_name> must be one of LIB_OPENCL or LIB_RTOS.
  • The rebuilt object library is located at: <installation root folder>/packages/ti/libarch/lib

Recompiling LibArch Examples[edit]

  • Set LIBARCH_DIR environment variable needed for recompiling LibArch examples: export LIBARCH_DIR="<installation root folder>"
  • Recompile DSP-only example:
    • go to folder examples/dsponly
    • type "make TARGET=<device_name>"
  • Recompile ARM+DSP example:
    • Set up additional environment variables:
      • export TI_OCL_INSTALL_DIR=<Processor-SDK-Linux-installation-root>/linux-devkit/sysroots/cortexa15hf-vfp-neon-linux-gnueabi/usr/share/ti/opencl
      • export TI_OCL_CGT_INSTALL=<Processor-SDK-Linux-installation-root>/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x
    • go to folder example/arm+dsp
    • type "make TARGET=<device_name>"


Adding Support for More Devices[edit]

For OpenCL version, verify that the Texas Instruments OpenCL implementation is supported on the device according to TI OpenCL.

For RTOS version, device support needs to be added to LibArch by defining the following macros for the specific device in src/ti/libarch/src/lib_cachecfg.h (this means source code change):

  • #define LIB_L1D_SIZE_TOTAL
  • #define LIB_L2_SIZE_TOTAL
  • #define LIB_L1D_BASE_ADDRESS
  • #define LIB_L2_BASE_ADDRESS

Then, follow instructions in Recompiling LibArch to recompile the source code.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Processor SDK Library Architecture and Framework here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Processor SDK Library Architecture and Framework here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Processor SDK Library Architecture and Framework here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Processor SDK Library Architecture and Framework here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity

{{#switchcategory:MSP430=<McuHitboxFooter/>|C2000=<McuHitboxFooter/>|Stellaris=<McuHitboxFooter/>|TMS570=<McuHitboxFooter/>|MCU=<McuHitboxFooter/>|MAVRK=<MAVRKHitboxFooter/>|<HitboxFooter/>}}