Thread: CRIO SIMD
View Single Post
  #12   Spotlight this post!  
Unread 09-08-2013, 07:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: CRIO SIMD

I applaud your curiosity to better understand computer architectures. To reiterate, the cRIO processor used in FRC does not support any vector operations in HW, no SIMD. Rather than wait for a new controller or look for opportunities to do this with robotics, I'd encourage you to do this on your desktop or laptop computer. SSE, MMX, and other vector technologies from Intel are readily available and great examples to learn from.

My own exposure to this was via Altivec a number of years ago when a bug caused me to break into disassembled code for the system's memcpy, copyMem, or whatever it was called then. I was puzzled to find an complex arrangement of vector and prefetch instructions being used. The complexity was there to optimize a various alignment situations, and the calling code was copying a large buffer from an even to an odd address. The architecture isn't generally efficient at dealing with odd accesses, so they used Altivec to unroll and vectorize the operation.

This led me to find other libraries hand-tuned with Altivec including those for image processing and sound processing.

My suggestion would be to find a project that interests you, perhaps sound processing or image processing and compare different implementation techniques for the same operation. You can write very simple C code to walk through the data, use vector iterators, and compare to optimized SSE libraries from Intel. Even better is to use the debugger or the disassembly option of the compiler to inspect what the compiler produced and what the CPU is executing. Use the reference manuals and white papers for SSE to better understand why the libraries were written that way. This sort of investigation is still something I do from time to time to understand newer architecture features and language features.

Greg McKaskle