e01.org

AltiVec

AltiVec is a single-precision floating-point and integer SIMD instruction set designed and owned by Apple, IBM, and Freescale Semiconductor (formerly Motorola's Semiconductor Products Sector) — the AIM alliance. It is implemented on versions of the PowerPC processor architecture, including Motorola's G4, IBM's G5 and POWER6 processors, and P.A. Semi's PWRficient PA6T. AltiVec is a trademark owned solely by Freescale, so the system is also referred to as Velocity Engine by Apple and VMX (Vector Multimedia Extension) by IBM and P.A. Semi. While AltiVec refers to an instruction set, the implementations in CPUs produced by IBM and Motorola are separate in terms of logic design. To date, no IBM... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

AltiVec is a single-precision floating-point and integer SIMD instruction set designed and owned by Apple, IBM, and Freescale Semiconductor (formerly Motorola's Semiconductor Products Sector) — the AIM alliance. It is implemented on versions of the PowerPC processor architecture, including Motorola's G4, IBM's G5 and POWER6 processors, and P.A. Semi's PWRficient PA6T. AltiVec is a trademark owned solely by Freescale, so the system is also referred to as Velocity Engine by Apple and VMX (Vector Multimedia Extension) by IBM and P.A. Semi. While AltiVec refers to an instruction set, the implementations in CPUs produced by IBM and Motorola are separate in terms of logic design. To date, no IBM core has included an AltiVec logic design licensed from Motorola or vice versa. AltiVec is a standard part of the Power ISA v.2.03 specification. It was never formally a part of the PowerPC architecture until this specification, although it used PowerPC instruction formats and syntax and occupied the opcode space expressly allocated for such purposes. ==Development history== The Power Vector Media Extension (VMX) was developed between 1996 and 1998 by a collaborative project between Apple, IBM, and Motorola. Apple was the primary customer for Power Vector Media Extension (VMX) until Apple switched to Intel-made, x86-based CPUs on June 6, 2005. They used it to accelerate multimedia applications such as QuickTime, iTunes and key parts of Apple's Mac OS X including in the Quartz graphics compositor. Other companies such as Adobe used AltiVec to optimize their image-processing programs such as Adobe Photoshop. Motorola was the first to supply AltiVec enabled processors starting with their G4 line. AltiVec was also used in some embedded systems for high-performance digital signal processing. IBM consistently left VMX out of their earlier POWER microprocessors, which were intended for server applications where it was not very useful. The POWER6 microprocessor, introduced in 2007, implements AltiVec. The last desktop microprocessor from IBM, the PowerPC 970 (dubbed the "G5" by Apple) also implemented AltiVec with hardware similar to that of the PowerPC 7400. AltiVec is a brandname trademarked by Freescale (previously Motorola) for the standard Category:Vector part of the Power ISA v.2.03 specification. This category is also known as VMX (used by IBM), and "Velocity Engine" (a brand name previously used by Apple). The Cell Broadband Engine, used in (amongst other things) the PlayStation 3, also supports Power Vector Media Extension (VMX) in its PPU, with the SPU ISA being enhanced but architecturally similar. Freescale is bringing an enhanced version of AltiVec to e6500 based QorIQ processors. #include typedef __vector unsigned char uint8x16_p; typedef __vector unsigned int uint32x4_p; ... int main(int argc, char* argv) { /* Natural alignment of vals is 4; and not 16 as required */ unsigned int vals[4] = { 1, 2, 3, 4 }; uint32x4_p vec; if defined(__VSX__) || defined(_ARCH_PWR8) vec = vec_xl(0, vals); else const uint8x16_p perm = vec_lvsl(0, vals); const uint8x16_p low = vec_ld(0, vals); const uint8x16_p high = vec_ld(15, vals); vec = (uint32x4_p)vec_perm(low, high, perm); endif } AltiVec prior to Power ISA 2.06 with VMX lacks 64-bit integer support. Developers who wish to operate on 64-bit data will develop routines from 32-bit components. For example, below are examples of 64-bit add and subtract in C using a vector with four 32-bit words on a big-endian machine. The permutes move the carry and borrow bits from columns 1 and 3 to columns 0 and 2 like in school-book math. A little-endian machine would need a different mask. #include typedef __vector unsigned char uint8x16_p; typedef __vector unsigned int uint32x4_p; ... /* Performs a+b as if the vector held two 64-bit double words */ uint32x4_p add64(const uint32x4_p a, const uint32x4_p b) { const uint8x16_p cmask = {4,5,6,7, 16,16,16,16, 12,13,14,15, 16,16,16,16}; const uint32x4_p zero = {0, 0, 0, 0}; uint32x4_p cy = vec_addc(vec1, vec2); cy = vec_perm(cy, zero, cmask); return vec_add(vec_add(vec1, vec2), cy); } /* Performs a-b as if the vector held two 64-bit double words */ uint32x4_p sub64(const uint32x4_p a, const uint32x4_p b) { const uint8x16_p bmask = {4,5,6,7, 16,16,16,16, 12,13,14,15, 16,16,16,16}; const uint32x4_p amask = {1, 1, 1, 1}; const uint32x4_p zero = {0, 0, 0, 0}; uint32x4_p bw = vec_subc(vec1, vec2); bw = vec_andc(amask, bw); bw = vec_perm(bw, zero, bmask); return vec_sub(vec_sub(vec1, vec2), bw); } Power ISA 2.07 used in Power8 finally provided the 64-bit double words. A developer working with Power8 needs only to perform the following. #include typedef __vector unsigned long long uint64x2_p; ... /* Performs a+b using native vector 64-bit double words */ uint64x2_p add64(const uint64x2_p a, const uint64x2_p b) { return vec_add(a, b); } /* Performs a-b using native vector 64-bit double words */ uint64x2_p sub64(const uint64x2_p a, const uint64x2_p b) { return vec_sub(a, b); } ===Motorola/Freescale=== ===IBM=== ===P.A. Semi=== PA6T AltiVec Technologies at Freescale; archived at the Wayback Machine on 2012-02-04 Using data-parallel SIMD architecture in video games and supercomputers at IBM; archived at the Wayback Machine on 2012-02-08 Velocity Engine at Apple; archived at the Wayback Machine on 2009-11-28 SIMD history and performance comparison

References

  1. Power ISA v.2.03 . Power.org . retrieved 2024-08-09 · 1723158000.0
  2. specification. This category is also known as VMX (used by IBM), and "Velocity Engine" (a brand name previously used by Apple). The Cell microprocessor|Cell Broadband Engine, used in (amongst othe . · 1775430000.0
  3. [https://web.archive.org/web/20120208052530/http://domino.research.ibm.com/comm/research.nsf/pages/r.arch.simd.html Using data-parallel SIMD architecture in video games and supercomputers] IBM Researc . (archived copy) · 1775430000.0
  4. [https://patents.google.com/patent/US7421566 Implementing instruction set architectures with non-contiguous register file specifiers] US Patent 7,421,566 . · 1775430000.0
  5. Workload acceleration with the IBM POWER vector-scalar architecture . IBM . 2016-03-01. retrieved 2017-05-02 · 1493679600.0
  6. Peter Bergner - [PATCH, COMMITTED] Add full Power ISA 3.0 / POWER9 binutils support . · 1775430000.0
  7. FAQ, Helios . Helios . retrieved 2021-07-09 · 1625785200.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"AltiVec". 1775495818. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1347443903

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·