DSP

DM8168多核软件框架---之syslink

2019-07-13 20:22发布

     DM8168中采用了多核内核增强应用性能。其中有ARM cortex A8 ,DSP, VPSS M3,HDVICP M3他们之间在用户应用层可以采用LinkAPI进行通信。如下图所示。         其实McFW可以看作是各种应用实例的常用功能(usecase)的封装,它能使典型的开发更加迅速;LinkAPI要比McFW低一层,它更加通用更加完整的提供给用户来操作各个运行在同一或不同处理核心之间的线程。(个人理解)。而这些API都是通过对Syslink进行操作实现的。Syslink/IPC看起来更像是一个驱动,其实它由多个驱动模块构成。         下面是此篇文章的主要内容,基于TIwiki的Syslink/IPC介绍。 官方介绍:http://processors.wiki.ti.com/index.php/SysLink_UserGuide

术语与缩略语

Abbreviation Description HLOS Higher Level Operating System RTOS Real Time Operating System CCS Code Composer Studio IPC Inter-Processor Communication GPP General Purpose Processor e.g. ARM DSP Digital Signal Processor e.g. C64X CGTools Code Gen Tools, e.g. Compiler, Linker, Archiver

1.什么是Syslink

    SysLink is runtime software.是为了简化在嵌入式应用中,GPP(通用处理器)或者DSPs相互通信的一套软件与相关的移植工具。SysLink产品提供了多个处理器之间的软件连接。每个处理器可以运行任何一个HLOS(高级操作系统)如LinuxWinCE下等,或RTOS,如SYS/BIOSQNX。处理器可以制定为host并负责和控制slave processors的执行(包括引导装入)。         所以在DM8168的demo中只需要在cortex a8上面烧写与运行软件,系统可以通过syslink来为其他处理核引导装入程序,并控制其运行。        SysLink框架和应用程序提供以下服务:
  • Processor Manager
  • Inter-Processor Communication
  • Utility modules

2.特点

SysLink封装了以下子模块:
  • System Manager
  • Processor Manager
  • Inter-Processor Communication (IPC)
  • Utility modules
SysLink需要与IPC一起使用 syslink是运行在HLOS端的,一般RTOS端采用IPC

  • The common header files for IPC implemented by both the IPC product (on RTOS-side) and the SysLink product (on HLOS-side) are available within ti/ipc package.
  • The SysLink product, 为了在HLOS端实现所有的RTOS IPC的模块,在SysLink product中增加了:
    • ProcMgr
    • FrameQ (HLOS & RTOS)
    • RingIO (HLOS & RTOS)

3架构介绍

syslink在HLOS和RTOS端都有实现。并且依赖于系统的一些属性:

Dependencies

The SysLink product has dependencies on other several other components:On HLOS side:
  1. Base port: SysLink has a dependency on the base port to the target device.
  2. OSAL: In user-space, SysLink utilizes the Operating System Adaptation Layer
  3. Kernel utils: In kernel-space, the SysLink product utilizes the services available within the kernel utils. This includes OSAL services as well as generic utilities such as trace, string functions etc.
  4. Types: SysLink uses types matching those defined within xdc/std.h available with the xdctools product.
  5. Configuration: SysLink provides dynamic configuration for all modules in both user-side and kernel-side. For the Linux product, kernel configuration mechanisms shall be used.
On SYS/Bios-side:
  1. SYS/Bios: SysLink depends on SYS/Bios port available on the target device.
  2. Build: The SysLink product uses xdc build mechanism
  3. Configuration: SysLink uses XDC configuration.
  4. XDC runtime: SysLink uses services available within XDC runtime such as trace, asserts etc.

SysLink SYS/BIOS Module Architecture

The architecture of each module on SYS/BIOS shall follow the following structure: SysLink SYS/BIOS Module Architecture Each module (System Manager/Processor Manager/IPC) on SYS/BIOS is a RTSC module. It uses the XDC configure and build mechanism to ensure that the advantages of whole-program optimization are fully utilized. It also makes use of XDC runtime utils, asserts and tracing mechanisms. Each module implements the common C Header interface APIs defined for SysLink. The module additionally defines internal interfaces as required to ensure plug-and-play of different types of implementations of the physical drivers. In SYS/BIOS, all module initialization get plugged into the startup sequence of the Operating System itself. Due to this, users do not need to call specific initialization functions for the modules.

SysLink HLOS Module Architecture

The architecture of each module on the HLOS shall follow the following structure: SysLink HLOS Module Architecture
HLOS modules采用makefile的编译系统,在内核空间进行工作与配置。在RTOS中,syslink的每个模块都是RTSC模块,采用xdc编译机制,实现通用的C 头文件接口API,所有模块在系统启动时自动启动。

4.模块介绍

4.1System Manager

IPC模块(system manager)集成所有individual Processor Managers和IPCs 到一个综合的组件(product),还提供了系统资源管理的功能,如系统内存。 所有processors的IPC模块提供基本的功能有:
  • Initialization and Finalization of the SysLink product
    • This includes internally calling the initialization and finalization functions for the individual modules included in the build, including IPCs and Processor Managers.
    • Providing memory (for example, shared memory) to the other SysLink modules. This includes interaction with the IPCs and Processor Manager as required.
  • System configuration
    • Any system level configuration information is taken by the System Manager.
    • The Ipc module also consolidates configuration information for other modules to present a unified SysLink view.
    • The Ipc module on HLOS also configures itself with the information from the slave-side when the slave executable is loaded. This enables the HLOS-side to configure itself with the identical configuration as the slave-side (for example, shared memory configuration). This ensures that the user is not required to modify HLOS-side configuration whenever the slave-side configuration changes.

4.2 Processor Manager

The ProcMgr module provides the following services for the slave processor:
  • Slave processor boot-loading
  • Read from or write to slave processor memory
  • Slave processor power management

系统中所有的处理器必须由一个唯一的处理器ID来标示,PocMgr使从机支持多重格式的装载。支持COFF和ELF格式。

4.3 Inter-Processor Communication Protocols

The Inter-Processor Communication (IPC) Protocols supported by SysLink are generally defined by TI's IPC product. They include:
  • Notify
  • MessageQ
  • ListMP
  • GateMP
  • HeapBufMP
  • HeapMemMP
另外,还支持2种适用于多媒体框架的IPC
  • FrameQ (typically used for raw video data)
  • RingIO (typically used for audio data)

4.4 Utility modules

The following utility modules are supported by SysLink:
  • SharedRegion管理处理器核之间的共享内存。
  • List支持创建于管理本地双链接环形链
  • Trace调试追踪
  • MultiProc管理处理器ID
  • NameServer管理本地名称/值对,使应用程序和其他模块基于一个名字存储和检索值