Bsteckler
28-12-2008, 18:48
I sent this out to the programmers and electricians on my team, thought this might be of some help to the community:
Those who attended the workshops know that the cRIO that we will be using is powered by a Freescale 400 MHz PowerPC processor, this is substantially different then the PIC chip that we have used in the past, and I have compiled some stuff on the archetecture of the chip to aid in programming. Most of this probably won't make sence to you if you don't know much about microarchitectures, but its useful nonetheless.
These are some pages about the workings of the chip:
http://www.go-ecs.com/ppc/ppctek1.htm
http://www.ibm.com/developerworks/linux/library/l-powarch/
http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_diffs/chapter_3_section_1.html#//apple_ref/doc/uid/TP40002217-CH240-TPXREF101
For those who don't want to read that, here is what it all means:
1) we have a ful 32 bit desktop grade processor to play with.
2) the PowerPC has 32 general purpose registers, and varying numbers of special purpose regisers, and some also have floating point registers. (in compairison, an x86 has a total of 8 registers).
3) being a 32 bit processor, it can address up to 4 GB of space (Physical RAM)
2) it can support strings up to 128 bytes in length, and can natively support byte, word, halfword, and doubleword data types
3) PowerPCs use big-endian byte ordering, so the most significant byte in any of the above data types is given the lowest address
4) the calling convention of the PowerPC passes arguments to functions into the registers (has no stack) whereas an x86 sends them to the stack, as such, programming errors and adressing variables outside of an array are less likely to cause a crash on a PPC
5) However, the EABI creates a "virtual stack" by reserving GPRs as stack pointers.
6) PowerPCs use shorter pipelines with complex stages, wereas an x86 uses longer, skinnier ones (basically, an x86 can run fast, but a PowerPC can do more stuff)
7) PowerPC instructions are 4 bytes in size and must be alligned, whereas x86 ones are variable in size and do not need to be alligned
8) the type 'bool' is four bytes on PowerPC, rather than one on x86
9) an integer divide by zero operation returns a 0 on PowerPCs, but floating point divide by zero operations cause a crash
Those who attended the workshops know that the cRIO that we will be using is powered by a Freescale 400 MHz PowerPC processor, this is substantially different then the PIC chip that we have used in the past, and I have compiled some stuff on the archetecture of the chip to aid in programming. Most of this probably won't make sence to you if you don't know much about microarchitectures, but its useful nonetheless.
These are some pages about the workings of the chip:
http://www.go-ecs.com/ppc/ppctek1.htm
http://www.ibm.com/developerworks/linux/library/l-powarch/
http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_diffs/chapter_3_section_1.html#//apple_ref/doc/uid/TP40002217-CH240-TPXREF101
For those who don't want to read that, here is what it all means:
1) we have a ful 32 bit desktop grade processor to play with.
2) the PowerPC has 32 general purpose registers, and varying numbers of special purpose regisers, and some also have floating point registers. (in compairison, an x86 has a total of 8 registers).
3) being a 32 bit processor, it can address up to 4 GB of space (Physical RAM)
2) it can support strings up to 128 bytes in length, and can natively support byte, word, halfword, and doubleword data types
3) PowerPCs use big-endian byte ordering, so the most significant byte in any of the above data types is given the lowest address
4) the calling convention of the PowerPC passes arguments to functions into the registers (has no stack) whereas an x86 sends them to the stack, as such, programming errors and adressing variables outside of an array are less likely to cause a crash on a PPC
5) However, the EABI creates a "virtual stack" by reserving GPRs as stack pointers.
6) PowerPCs use shorter pipelines with complex stages, wereas an x86 uses longer, skinnier ones (basically, an x86 can run fast, but a PowerPC can do more stuff)
7) PowerPC instructions are 4 bytes in size and must be alligned, whereas x86 ones are variable in size and do not need to be alligned
8) the type 'bool' is four bytes on PowerPC, rather than one on x86
9) an integer divide by zero operation returns a 0 on PowerPCs, but floating point divide by zero operations cause a crash