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.

DSPLIB-C55X illegal instruction

dsp lib, unpack.asm file has  instruction somthing like this. 

SUB *AR0+, *AR1+, AC3 
|| SFTS AC0, #-1 

 both instruction at this moment use D-unit , so they can not be parallel. 

i have used same code with older compiler version and never get any error , code also seems to work fine . but now with latest c55 compiler i am getting compile time error. 

can somebody please help me understanding what is going on. 

  • This is a very interesting question - can the D functional unit do two operations at the same time?

    Obviously the answer is yes. The code was built and compiled and you can run it on hardware so how comes?

    Look at figure 1.5 of www.ti.com/.../swpu073e.pdf . This figure shows the internals of the D unit. You can see that the shift unit and the arithmetic unit are independent in execution. The input and the output to the D unit may be limited, but if you look at the parallel instructions that you specified, only two new values are read from the outside of the unit, and two registers output are generated. This all can be done in parallel

    Does it make sense? If so, close the thread please

    Ran
  • okey , i will look into documents.


    but if this is the case then why assembler is giving me error , illegal parallel?


    same code i have been using since many months with older version of CSS, i have never got any error.

    do you thing there could be a project setting which is not in correct shape?

  • Look again at the project setting and verify that the device is correct.

    Will you send me your project?  I may be wrong, but it is hard to believe that there will assembly error in a library

    Ran

  • Gaurav

    I tried to build the code and you are right - when I set the device to C5509 I get err0or message. However, when I set it to C5515 the file is compiled.

    I need to check if there is a difference in the DSP core between 5509 and 5515, but the compiler behave differently for sure.

    It requires further investigation. Stay tuned

    Ran
  • Gaurav

    I looked at the reference guide for the two cores (5515 and 5509) and I found one difference - the DT_BIT module that is attached to the Shifter. I do not see why this may change the ability to have the two instructions in parallel.

    More results - when I set the device to 5502 - compilation fails
    5503 Fails
    5504 - Passes - No error
    5505 - passes, no error
    5506 fails
    5509 - fails
    5514 - Passes, no error
    5515 - passes, no error

    I need you to help me. I do not have a 5509 board. Can you build the function unpack.asm under 5515 project (just this function) , and move the object code to a separate test program that will be 5509 project?, Then step through the instruction and see if the core accepts the parallel instruction and if the instruction is executed correctly

    Please report to this posting

    Best regards

    Ran
  • Yes, there was a change to the CPU core between revisions 2.2 and 3.0 was to add a data path allowing a shift operation to operate on the D unit at the same time as some other arithmetic operation on the D unit.  This is why it is important to specify the correct CPU core when using the C55x compiler.  For C5515, use -v5515

    Guarav, what device do you actually have?

    Please see the following wiki page, and the PDF file it refers to:

    What are the CPU versions for the different Silicon versions of the C55x devices?

    You will see that C5502 and C5509A are CPU 2.2, while C5515 is CPU 3.3

    Despite being numbered "lower" than C5509A, C5504 and C5505 are actually CPU 3.3