This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: The behavior is different between on board (TDA4VM EVM) and on Host Emulation

Part Number: TDA4VM


Hi

I'm facing the trouble that the behavior is different between on board (TDA4VM EVM) and on Host Emulation.

Please refer to the below for more details and could you share the schedule of the fix and temporary WA please.

 

 

■Main complaint

Comparison operations between vector type pointers are not executed correctly in Host Emulation.

 

Evidence environment

 

Once some is assigned to here, I will share the test case directly to him.

 

The CHAR64 type pointer is incremented 128 times, and the loop count number is compared with assert to see if it is correct.

 

■Results

When the evidence is executed, the following results are obtained

TDA4VM-EVM

can be executed normally

Host emulator on PC

assertion occurs and stops abnormally

 

■What you need to check

Why can't I run it correctly?

It's not mentioned in the SPRUIG6E restrictions, so I'm hoping it will work!

 

Tools

 

Tool Chain

 

 

CCS

 

Host Emulation

version.h

Thanks and Best regards,

HaTa

  • Hi

    Do you have any update?

    Due data was 2021/3/31.

  • Hi,

    Some basic concepts:

    i) When you're using host emulation on your PC (x86), you're using a native compiler (say g++ in Linux) and you're linking to the host emulation library "libC7100-host-emulation.a" (for Linux). In this case C++ has no notion of vector data types natively, and the host emulation library implements these vector data types as classes.

    ii) When you're building for EVM (Target), you're now using TI's compiler (cl7x) for c7x which natively supports these vector data types.

    Coming to your code, I see that you're creating 2 vector pointers to scalar data, but when you try to do the comparison: ptr < ptr_limit 

    For the case of host emulation, you're comparing two objects (which is incorrect for what you're trying to do). Refer to SPRUIG6E (Section 5.8) for list of valid operations on vector pointers which will work for both host emulation and target.

    It works on EVM because as mentioned in ii), you're using cl7x which natively supports uchar64 as a data type, and pointer behavior is similar to scalar data types in C++.

    Let me know if you have any more questions.

    Thanks,

    Varun

  • Hi Varun

    I found the following list, but cannot find to "Equivalence comparison (==)" in it.

    Can I think of them as supported?

    Thanks and Best regards,

    HaTa

  • HaTa,

    The section describes all the supported operations for vector pointers. If not mentioned, it means its not supported.

    In fact the document mentions this in the same section as well, the older releases too, but in the latest public release (1.4.2) you'd see this :

    "No other operators are supported, including using the array (subscript) access operator ([index]). Using the array access operator may result in a segmentation fault, as an internal data structure that implements vectors and vector types might be used after its memory is freed."

    Thanks,

    Varun