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.

AM5706: Extract odd/even bits from 128 bits data

Genius 5840 points
Part Number: AM5706
Other Parts Discussed in Thread: SYSBIOS

Hello,

I would like to repeat the process of dividing one 128-bit data into two data of odd bit and even bit and saving each.

Is it best for these processing to be done by DSP?
Is there an optimal processing method?
Should I use OpenCV or OpenCL?

Regards,

U-SK

  • Hello!

    C66x has instruction named DEAL, which sorts even/odd bits of 32 bit word and pack them back into 32 bit word, but with 16 bits of odd followed by 16 even bits. Then one may extract these halfwords too. One may apply that instruction 4 times and get job done for 128 bit value. This instruction is accessible as _deal() intrinsic in C. One may design schedule using something like _packh2() intrinsic.

    Hope this helps.

  • Hi rrlagic,

    Thank you for your reply.

    I understand!

    If so, is it most efficient to run bare metal without using OpenCV or OpenCL?

    Regards,

    U-SK

  • Hello!

    I have no experience with neither OpenCL, nor OpenCV, so I'd better refrain from judging on that matter. My point is that C66x core has dedicated hardware to solve your task, which in turn can be accessed with as simple tool as C intrinsic, so if your job was just sort bits, then you look no more. However, I believe there is more processing job for the data streams being splitted, so may happen those frameworks may bring some benefit.

    One more thing, which makes me surprised all the time, is so many people choose bare metal. My work is with real time systems, I know how much time and efforts it takes to make preemptive scheduling, so we always use RTOS: it was DSP/BIOS before, SYSBIOS now. They do their job very well, they help so much, so we never had a project without RTOS.

  • Thanks rrlagic for your answer!

    Paula