Sign in



Don't have an account?

Signing up is free and easy
Home -> Our Services -> Programming Tools BU -> Open Source Tools -> GNU Compiler porting for DSP

GNU Compiler porting for DSP

Requirements

A prototype of GNU C Compiler ported to DSP architecture. The prototype should run on Windows OS. The prototype should successfully compile the basic DSP application namely the FIR Filter.

Challenges

  • No prior experience in GNU Compiler porting for DSP architecture
  • Complexity of the DSP architecture
  • Lack of clear documentation and available directions to perform GNU Compiler porting
  • Non-availability of tools (assembler, linker and simulator) for the DSP architecture

Solution

  • Environment
    OS
    Development Environment is Linux. The built compiler shall run on Windows. MinGW is used to build the executable for Windows environment.
    Language/Platform C
    Development model Incremental development model
    GCC version used
    4.4.0
  • Description

    Actual requirement is to port GNU C Compiler to DSP. Since we do not have knowledge in porting GNU to DSP, we decided to build the prototype.

    The prototype should support the basic DSP application namely FIR Filter.

    First we have defined the input/ output (by hand coding the expected assembly) based on the DSP application to be supported.

    In this prototype the following features of the DSP architecture needs to be supported:

    1. Pipelining
    2. Multiple ALU
    3. SIMD (DSP has multiple execution units)
    4. Hardware loop
    5. Post increment addressing mode
    6. Multiple memory banks

    We have restricted the C level feature which needs to be supported as per the DSP application program.

    The main challenge is that how to support the features which are specific to DSP.

    As a first step we have identified whether the support exist for the above features in GNU Compiler. We have studied and analyzed the existing GNU port (Example BlackFin) which supported the similar features required for DSP.

    We have identified that the required DSP features are already supported in GNU Compiler. So, the machine descriptions need to be added in-order to support the required DSP features.

    Now, we decided to do the experiment. We have added the machine descriptions and experiment the impact of the same. After successful experiment we incorporated each feature to the GNU port for DSP.

    GNU Compiler porting work is split into multiple defined increments. This division of task enables concentrating on a small defined set of tasks at a time.

    The following increments are defined for porting GNU Compiler for DSP.

    • First Increment (00.00.01):

      The following features are supported:

      1. Instructions as required by basic DSP application
      2. Multiple ALU
      3. Pipelining
      4. Post-increment addressing mode
    • Second Increment (00.00.02):

      The following features are supported:

      1. X and Y memory bank.
    • Third Increment (00.00.03):

      Currently we are proceeding with this increment. The following features are planned to be supported:

      1. Hardware loop
      2. Architecture restrictions
    • Forth Increment (00.00.04):

      The following features are planned to be supported:

      1. SIMD

      Each increment is planned ~1 to 1.5 months. Total duration of the prototype is 5 months.

    • Current status:

      Currently we have completed 2 increments (00.00.01 and 00.00.02). Assembly is generated for respective increments. Since we don’t have tools (Assembler, Linker and Simulator), assembly is verified manually.