SPRUIG5E January   2018  – March 2023 TDA4VM , TDA4VM-Q1

 

  1.   Abstract
  2. 1About This Document
    1. 1.1 Related Documents
    2. 1.2 Trademarks
  3. 2Migrating C Source from C6000 to C7000
    1. 2.1  Compiler Options
    2. 2.2  Native Vector Data Types
    3. 2.3  Type Qualifiers: near and far
    4. 2.4  64-bit long Type
    5. 2.5  References to Control Registers
    6. 2.6  Memory-Mapped Peripherals
    7. 2.7  Run-Time Support
    8. 2.8  Contents of Migration Header File c6x_migration.h
      1. 2.8.1 Supported Macros
      2. 2.8.2 Non-Supported Macros
      3. 2.8.3 Legacy Data Types
      4. 2.8.4 Legacy Intrinsics
    9. 2.9  Galois Field Multiply Instructions
    10. 2.10 Performance Considerations for Migrated Code
      1. 2.10.1 UNROLL Pragma
      2. 2.10.2 Subvector Access
      3. 2.10.3 16x16 and 16x32 Bit Multiplies
      4. 2.10.4 __x128_t Type
      5. 2.10.5 Unsigned Array Offsets
      6. 2.10.6 Streaming Engine and Streaming Address Generator
      7. 2.10.7 Additional Optimization Guidance
  4. 3Host Emulation
  5. 4Revision History
    1.     29
    2.     30

References to Control Registers

References to control registers in C and C++ will need to be changed manually. The C7000 has a completely different set of control registers. Please see the C7000 CPU and Instruction Set Reference Guide for details.

Control register symbols supported by the compiler tools are listed in c6x.h for the C6000 Compiler Tools and in c7x_cr.h and c7x_ecr.h for the C7000 Compiler Tools. Control registers are declared in these header files using the __cregister keyword.

Common examples of code that requires changes are:

  • References to the C6000 Control Status Register (CSR). This includes references to the saturation (SAT) bit. For C7000, this is now a bit in the Flag Status Register (FSR). Note that the SAT bit interface is provided only to ensure compatibility for C6000-specific code. Referencing the SAT bit when writing new C7000 code is deprecated.

    The SAT bit can be accessed using the __get_C7X_FSR() API, which is defined in c6x_migration.h. An 8-bit value is returned in which the SAT bit is designated as "Bit 7".

  • References to the Floating-Point Configuration Registers (FADCR, FAUCR, FMCR). Bits pertaining to floating-point operations are now bits in the C7000 Flag Status Register (FSR) and the Floating Point Control Register (FPCR).

    The Floating Point Status bits can be accessed using the __get_C7X_FSR() API, which is defined in c6x_migration.h. An 8-bit value is returned in which the floating point status bits comprise bits 0-6.