SPRUIG6J January   2018  – December 2023

 

  1.   1
  2.   C7000 Host Emulation
  3. About This Document
    1. 1.1 Related Documentation
    2. 1.2 Disclaimer
    3. 1.3 Trademarks
  4. Getting Started with Host Emulation
    1. 2.1 System Requirements
    2. 2.2 Installation Instructions
    3. 2.3 Summary of Differences: Host Emulation Coding vs. Native C7000 Coding
  5. General Coding Requirements
    1. 3.1 Required Header Files
    2. 3.2 Package Dependencies
    3. 3.3 Example Program
  6. Intrinsics
    1. 4.1 OpenCL-Like Intrinsics
    2. 4.2 Streaming Address Generator Intrinsics
    3. 4.3 C6000 Legacy Intrinsics
    4. 4.4 Memory System Intrinsics
  7. TI Vector Types
    1. 5.1 Constructors
    2. 5.2 Accessors
    3. 5.3 Vector Operators
    4. 5.4 Print Debug Function
  8. Streaming Engine and Streaming Address Generator
  9. Lookup Table and Histogram Interface
    1. 7.1 Lookup Table and Histogram Data
  10. C6000 Migration
    1. 8.1 __float2_t Legacy Data Type
  11. Matrix Multiply Accelerator (MMA) Interface
  12. 10Compiler Errors and Warnings
    1. 10.1 Key Terms Found in Compiler Errors and Warnings
    2. 10.2 Host Emulation Specific Syntax
  13. 11Revision History
  14.   35

Host Emulation Specific Syntax

C7000 Host Emulation both introduces and omits some syntax used with the C7000 compiler. While these differences are detailed throughout this document, the Host Emulation compiler cannot be relied on to emit warnings and errors in all of these cases. This is due to the fact that some of the original syntax allowed by the C7000 compiler constitutes legal C++ code, which the Host Emulation compiler would have no reason to warn the user about. While using the original C7000 compiler syntax in some cases may be syntactically correct, the results cannot always be guaranteed. Table 10-2 lists the host compiler errors and warnings, or lack thereof, which may arise when using the original C7000 syntax with C7000 Host Emulation.

Table 10-2 Syntax change related compile errors and warnings
Description Example Compiler Output
Using cl7x cast-style constructor syntax with Host Emulation
// Works with cl7x but not Host Emulation
(long8)(1,2,3,4,5,6,7,8)
vs.
// Recommended; works on Host Emulation and cl7x
long8(1,2,3,4,5,6,7,8)
No errors or warnings. Results are incorrect/unexpected using cast-style constructor syntax.
Ternary operator with vector as "boolean expression" res = vec1 ? vec2 : vec3 Compiler error: "Cannot convert vec_type to bool".
Using swizzle accessor with member data syntax example.s0121 Compiler error: "Member does not exist".
Using swizzle accessor with function data syntax example.a0121() Compiler error: "Member function does not exist"
Not using function syntax with accessors . . . = vect.s0; Compile time error.
Using an invalid value within SE/SA parameters Setting VECLEN to a negative number At run-time, Host Emulation will state which field is invalid.