All Topics  
AltiVec

 

   Email Print
   Bookmark   Link






 

AltiVec



 
 
AltiVec is a floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
 and integer SIMD
SIMD

In computing, SIMD is a technique employed to achieve data level parallelism....
 instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
 designed and owned by Apple, IBM and Freescale Semiconductor
Freescale Semiconductor

Freescale Semiconductor, Inc. is an American semiconductor manufacturer. It was created by the divestiture of the Semiconductor Products Sector of Motorola in 2004....
, formerly the Semiconductor Products Sector of Motorola
Motorola

Motorola, Inc. is an United States, multinational, Fortune 100, telecommunications company based in Schaumburg, Illinois. It is a manufacturer of wireless telephone handsets, also designing and selling wireless network infrastructure equipment such as cellular transmission base stations and signal amplifiers....
, (the AIM alliance
AIM alliance

The AIM alliance was an Business alliance formed in September 1991 between Apple Computer, International Business Machines and Motorola to create a new computing standard based on the PowerPC architecture....
), and implemented on versions of the PowerPC
PowerPC

PowerPC is a RISC instruction set architecture created by the 1991 Apple Inc.?IBM?Motorola alliance, known as AIM alliance. Originally intended for personal computers, PowerPC CPUs have since become popular embedded system and high-performance processors....
 including Motorola's G4
PowerPC G4

PowerPC G4 is a designation used by Apple Computer to describe a fourth generation of 32-bit PowerPC microprocessors. Apple has applied this name to various different processor models from Freescale Semiconductor, a former part of Motorola....
, IBM
IBM

International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
's G5
PowerPC 970

The PowerPC 970, PowerPC 970FX, PowerPC 970GX, and PowerPC 970MP, are 64-bit Power Architecture central processing unit from IBM introduced in 2002....
 and POWER6
POWER6

The POWER6 microprocessor is IBM's follow-on to the POWER5. It is part of the eCLipz, said to have a goal of converging IBM's server hardware where practical ....
 processors, and P.A. Semi
P.A. Semi

P.A. Semi was a fabless semiconductor company founded in Santa Clara, California in 2003 by Dan Dobberpuhl who was the lead designer for the Digital Equipment Corporation DEC Alpha and StrongARM processors....
's PWRficient
PWRficient

PWRficient is the name of a series of microprocessors designed by P.A. Semi.PWRficient processors comply with the 64-bit Power Architecture, and are designed for high performance and extreme power efficiency....
 PA6T. AltiVec is a tradename owned solely by Freescale, so the system is also referred to as Velocity Engine by Apple and VMX by IBM and P.A.






Discussion
Ask a question about 'AltiVec'
Start a new discussion about 'AltiVec'
Answer questions from other users
Full Discussion Forum



Encyclopedia


AltiVec is a floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
 and integer SIMD
SIMD

In computing, SIMD is a technique employed to achieve data level parallelism....
 instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
 designed and owned by Apple, IBM and Freescale Semiconductor
Freescale Semiconductor

Freescale Semiconductor, Inc. is an American semiconductor manufacturer. It was created by the divestiture of the Semiconductor Products Sector of Motorola in 2004....
, formerly the Semiconductor Products Sector of Motorola
Motorola

Motorola, Inc. is an United States, multinational, Fortune 100, telecommunications company based in Schaumburg, Illinois. It is a manufacturer of wireless telephone handsets, also designing and selling wireless network infrastructure equipment such as cellular transmission base stations and signal amplifiers....
, (the AIM alliance
AIM alliance

The AIM alliance was an Business alliance formed in September 1991 between Apple Computer, International Business Machines and Motorola to create a new computing standard based on the PowerPC architecture....
), and implemented on versions of the PowerPC
PowerPC

PowerPC is a RISC instruction set architecture created by the 1991 Apple Inc.?IBM?Motorola alliance, known as AIM alliance. Originally intended for personal computers, PowerPC CPUs have since become popular embedded system and high-performance processors....
 including Motorola's G4
PowerPC G4

PowerPC G4 is a designation used by Apple Computer to describe a fourth generation of 32-bit PowerPC microprocessors. Apple has applied this name to various different processor models from Freescale Semiconductor, a former part of Motorola....
, IBM
IBM

International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
's G5
PowerPC 970

The PowerPC 970, PowerPC 970FX, PowerPC 970GX, and PowerPC 970MP, are 64-bit Power Architecture central processing unit from IBM introduced in 2002....
 and POWER6
POWER6

The POWER6 microprocessor is IBM's follow-on to the POWER5. It is part of the eCLipz, said to have a goal of converging IBM's server hardware where practical ....
 processors, and P.A. Semi
P.A. Semi

P.A. Semi was a fabless semiconductor company founded in Santa Clara, California in 2003 by Dan Dobberpuhl who was the lead designer for the Digital Equipment Corporation DEC Alpha and StrongARM processors....
's PWRficient
PWRficient

PWRficient is the name of a series of microprocessors designed by P.A. Semi.PWRficient processors comply with the 64-bit Power Architecture, and are designed for high performance and extreme power efficiency....
 PA6T. AltiVec is a tradename owned solely by Freescale, so the system is also referred to as Velocity Engine by Apple and VMX by IBM and P.A. Semi, although IBM has recently begun using AltiVec as well.

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 new Power ISA v.2.03
Power Architecture

Power Architecture is a broad term to describe similar RISC instruction sets for microprocessors developed and manufactured by such companies as IBM, Freescale, Applied Micro Circuits Corporation, Tundra Semiconductor and P.A....
 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.

Features and similarities to SSE


Both AltiVec and SSE
Streaming SIMD Extensions

In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! ....
 feature 128-bit vector registers that can represent sixteen 8-bit signed or unsigned chars, eight 16-bit signed or unsigned shorts, four 32-bit ints or four 32-bit
IEEE floating-point standard

The first IEEE Standard for Binary Floating-Point Arithmetic set the standard for floating-point computation for 23 years. It became the most widely-used standard for floating point computation, and is followed by many Central processing unit and floating point unit implementations....
 floating point variables. Both provide cache
CPU cache

A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access computer storage. The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory locations....
-control instructions intended to minimize cache pollution
Cache pollution

Cache pollution describes situations where an executing computer program loads data into CPU cache unnecessarily, thus causing other needed data to be evicted from the cache into lower levels of the memory hierarchy, potentially all the way down to main memory, thus causing a performance hit....
 when working on streams of data.

They also exhibit important differences. Unlike SSE2, AltiVec supports a special RGB
RGB color model

The RGB color model is an additive color in which red, green, and blue light are added together in various ways to reproduce a broad array of colors....
 "pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
" data type, but it does not operate on 64-bit double precision floats, and there is no way to move data directly between scalar and vector
Array

In computer science, an array is a data structure consisting of a group of element s that are accessed by index . In most programming languages each element has the same data type and the array occupies a contiguous area of computer memory....
 registers. In keeping with the "load/store" model of the PowerPC's RISC design, the vector registers, like the scalar registers, can only be loaded from and stored to memory. However, AltiVec provides a much more complete set of "horizontal" operations that work across all the elements of a vector; the allowable combinations of data type and operations are much more complete. Thirty-two 128-bit vector registers are provided, compared to eight for SSE and SSE2 (extended to 16 in x86-64
X86-64

x86-64 is a superset of the x86. x86-64 Central processing units can run existing 32-bit or 16-bit x86 programs at full speed, but also support new programs written with a 64-bit address space and other additional capabilities....
), and most AltiVec instructions take three register operands compared to only two register/register or register/memory operands on IA-32
IA-32

IA-32 , often generically called x86 or x86-32, is the instruction set architecture of Intel's most commercially successful microprocessors....
.

AltiVec is also unique in its support for a flexible vector permute instruction, in which each byte of a resulting vector value can be taken from any byte of either of two other vectors, parametrized by yet another vector. This allows for sophisticated manipulations in a single instruction.

Recent versions of the GNU Compiler Collection
GNU Compiler Collection

The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain....
, IBM Visual Age Compiler
VisualAge

VisualAge was the name of a family of computer integrated development environments from IBM, which included support for a few popular computer programming languages....
 and other compilers provide intrinsics
Intrinsic function

In compiler theory, an intrinsic function is a function available in a given computer language whose implementation is handled specially by the compiler....
 to access AltiVec instructions directly from C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 and C++
C++

C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
 programs. As of version 4, the GCC
GNU Compiler Collection

The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain....
 also includes auto-vectorisation capabilities that attempt to intelligently create Altivec accelerated binaries without the need for the programmer to use intrinsics directly. The "vector" type keyword is introduced to permit the declaration of native vector types, e.g., "vector unsigned char foo;" declares a 128-bit vector variable named "foo" containing sixteen 8-bit unsigned chars. The full complement of arithmetic and binary operators is defined on vector types so that the normal C expression language can be used to manipulate vector variables. There are also overloaded intrinsic functions such as "vec_add" that emit the appropriate op code based on the type of the elements within the vector, and very strong type checking is enforced. In contrast, the Intel-defined data types for IA-32 SIMD registers declare only the size of the vector register (128 or 64 bits) and in the case of a 128-bit register, whether it contains integers or floating point values. The programmer must select the appropriate intrinsic for the data types in use, e.g., "_mm_add_epi16(x,y)" for adding two vectors containing eight 16-bit integers.

Development history

AltiVec was developed between 1996 and 1998 by a collaborative project between Apple, IBM, and Motorola. Apple was the primary customer for AltiVec although Apple switched to Intel-made, x86-based CPUs in 2006. They used it to accelerate multimedia
Multimedia

Multimedia is media and content that utilizes a combination of different content format. The term can be used as a noun or as an adjective describing a medium as having multiple content forms....
 applications such as QuickTime
QuickTime

QuickTime is a multimedia framework developed by Apple Inc., capable of handling various formats of digital video, media clips, sound, text, animation, music, and QuickTime VRs....
, iTunes
ITunes

iTunes is a Proprietary software digital media media player application, used for playing and organizing digital music and video files. The program is also an interface to manage the contents on Apple's popular iPod digital media players as well as the iPhone....
 and key parts of Apple's Mac OS X
Mac OS X

Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
 including in the Quartz graphics compositor
Quartz (graphics layer)

Quartz specifically refers to a pair of Mac OS X technologies, each part of the Core Graphics framework: Quartz 2D and Quartz Compositor. It includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card....
. Other companies such as Adobe use it for optimization of their image-processing programs such as Adobe Photoshop
Adobe Photoshop

Adobe Photoshop, or simply Photoshop, is a Graphics software developed and published by Adobe Systems. It is the current and primary Market dominance for commercial Raster graphics and manipulation, and is the flagship product of Adobe Systems....
. Motorola was the first to supply AltiVec enabled processors starting with their G4 line. AltiVec was also used in some embedded systems that are used for high-performance digital signal processing.

IBM consistently left VMX out of their POWER
IBM POWER

POWER is a RISC instruction set architecture designed by International Business Machines. The name is a backronym for Performance Optimization With Enhanced RISC....
 systems, which were intended for mainframe and server applications where it was not very useful. However, the last desktop CPU from IBM, PowerPC 970
PowerPC 970

The PowerPC 970, PowerPC 970FX, PowerPC 970GX, and PowerPC 970MP, are 64-bit Power Architecture central processing unit from IBM introduced in 2002....
 (dubbed the G5 by Apple) did include the AltiVec unit similar to the original PowerPC 7400
PowerPC G4

PowerPC G4 is a designation used by Apple Computer to describe a fourth generation of 32-bit PowerPC microprocessors. Apple has applied this name to various different processor models from Freescale Semiconductor, a former part of Motorola....
. The core included a multiplier/adder unit and a full VMX unit.

AltiVec is the standard Category.VEC part of the Power ISA v.2.03
Power Architecture

Power Architecture is a broad term to describe similar RISC instruction sets for microprocessors developed and manufactured by such companies as IBM, Freescale, Applied Micro Circuits Corporation, Tundra Semiconductor and P.A....
 specification.

The Cell
Cell microprocessor

Cell is a microprocessor architecture jointly developed by Sony Computer Entertainment, Toshiba, and IBM, an alliance known as "STI". The architectural design and first implementation were carried out at the STI Design Center in Austin, Texas over a four-year period beginning March 2001 on a budget reported by IBM as approaching United States...
 Broadband Engine, used in (amongst other things) the Playstation 3
PlayStation 3

The PlayStation 3 is the third home video game console produced by Sony Computer Entertainment, and the successor to the PlayStation 2 as part of the PlayStation ....
, is also AltiVec enabled.

The POWER6
POWER6

The POWER6 microprocessor is IBM's follow-on to the POWER5. It is part of the eCLipz, said to have a goal of converging IBM's server hardware where practical ....
, introduced in 2007 also includes AltiVec, the implementation is similar to the one in 970 and Cell.

VMX128

IBM enhanced VMX for use in Xenon
Xenon (processor)

Xenon is a Central processing unit that is used in the Xbox 360 game console. The processor, internally codenamed "Waternoose" by IBM and "XCPU" by Microsoft, is based on IBM PowerPC instruction set architecture, consisting of three independent Multi-core on a single die....
 (Xbox 360) and called this enhancement VMX128. The enhancements comprise new routines targeted at gaming (accelerating 3D graphics and game physics) and a total of 128 registers. VMX128 is not entirely compatible with VMX/Altivec, as a number of integer operations were removed to make space for the larger register file and additional application-specific operations.

Issues

In C++, AltiVec support is mutually exclusive with use of the Standard Template Library "vector<>" class template due to the treatment of "vector" as a reserved word when the compiler does not implement the context sensitive keyword version of vector.

External links