Multimedia Extensions For General - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Multimedia Extensions For General

Description:

MMX has parallel subword multiply and accumulate instruction (Pmadd) ... two 32-bits FP multiply & accumulate FMAC units Variable Operands 4. instruction / Cycle ... – PowerPoint PPT presentation

Number of Views:134
Avg rating:3.0/5.0
Slides: 16
Provided by: student73
Category:

less

Transcript and Presenter's Notes

Title: Multimedia Extensions For General


1
Multimedia Extensions For General Purpose
Microprocessors
Theory and Comparative Evaluation
Abdullah Aldahlawi Dept. of Elect. Computer
Engineering The George Washington
University Dahlawi_at_ieee.org
2
Multimedia Extensions For General Purpose
Microprocessors
Three Microprocessor Families
  • HP PA-RISC MAX (Multimedia Acceleration
    eXtension)
  • Sun Ultra SPARC VIS (Visual Instruction Set)
  • 3. Intel Pentium MMX (MultiMedia eXtension)

3
Contents
  • Introduction
  • Subword Parallelism
  • Arithmetic Instructions
  • 3.1 Add Subtract
  • 3.2 Parallel Overflow and Saturation
    Arithmetic
  • 3.3 Multiply
  • Data Rearrangement Instructions
  • 4.1 Permute
  • 4.2 Mix
  • Formatting Instructions
  • Conditional Instructions
  • Complex Instructions
  • Memory Instructions
  • Conclusion

4
Introduction
  • Multimedia is an Integration Of Visual and Audio
    Information.
  • Multimedia Consume Huge Storage and Computation
    Resources.
  • - 24 fps ? MPEG Compression /
    Decompression
  • 3. Special Type of Instructions are Needed to
    Speed up Compression and Decompression ? High
    Performance ? High Quality Video
  • Most Microprocessors has extended their
    Instruction Set Architecture to with Multimedia
    Instruction
  • HP PA-RISC MAX (Multimedia Acceleration
    eXtension)
  • Sun Ultra SPARC VIS (Visual Instruction Set)
  • Intel Pentium MMX (MultiMedia eXtension)
  • First implemented 1994
  • MPGE 24fps decoder
  • on 80 Mhz WS

5
Subword Parallelism Fundamental Concept
  • Pixel Oriented Media Processing Programs Show
    High Degree of Parallelism of Low-Precision
    Data.
  • 2. Pixels Are Input in or Output from
    Computation as 16 bits Units.
  • Parallelism Could be Achieved by Packing These
    units in 64-Bits Words and Process them in
    Parallel (Subwording).
  • Multimedia Extended Instructions Take Advantage
    of Subwording and process These Subwords in
    Parallel (Similar to SIMD).
  • The Performance gain is obvious, 64-bits Integer
    Adder Can be Divided into Four 16-Bits Subword
    Integer Adder ? 4 16-Bits Integer Operation can
    be Executed in Single Processor Cycle.
  • Most Multimedia Instructions Extension are
    Designed to Execute Parallel Subwords in order to
    Enhanced the Multimedia Processing Performance.

6
(No Transcript)
7
Subword Arithmetic Instructions Add Multiply
  • It is know that most frequent operations in
    Multimedia programs are Add and Subtract.
  • 2. Multimedia Addition and Subtraction are
    usually 8 or 16 bits add Sub.
  • Padd Psub are are the Extended instructions
    for addition and subtraction based on subword
    parallelism concept .
  • MAX-2 Support 16-bits Padd Psub, VIS support
    16,32 and MMX support 8,16,32.

8
Parallel Overflows Saturation Arithmetic
  • Key difference in multimedia computation is
    handling of overflow.
  • Overflow is very likely because of small subword
    size ? inefficient handling of overflow ? effect
    quality of Multimedia data .
  • Overflow can be handled by two ways ..
  • - Modulo Arithmetic ? (2506) mod 256 ? 0
    , Dangerous !!.
  • - Saturation Arithmetic ? (2506) ? 255
  • MAX and MMX use Modulo arithmetic and saturation
    arithmetic.
  • VIS uses only modulo arithmetic ? Disadvantage
    compared to MMX MAX

9
Subword Arithmetic Instructions Multiplication
  • Multiply is a very important instruction, great
    difference performance difference can be found
    based on how different architecture implement
    Multiply instruction.
  • Multiply can cause an overflow and takes much
    time to execute.
  • VIS and MMX implement 16 bits H/W for
    multiplication (Pmul)
  • VIS try to avoid overflow by allowing ONLY 168
    bits multiplications, it needs 3 instructions to
    multiply 1616 bits.
  • MMX has parallel subword multiply and accumulate
    instruction (Pmadd)
  • MAX support multiplication without adding H/W
    ..
  • - two 32-bits FP multiply accumulate
    FMAC units ? Variable Operands ? 4
  • instruction / Cycle
  • - Integer Adder PshLadd PshRadd is
    used ? Constant Operands ?

? MMX Pmadd
10
Data Rearrangement Instructions
  • It is sometimes required to change the position
    of subwords during multimedia computation.
  • Permute is used in MAX-2 to change the position
    of subwords in the register.
  • VIS and MMX do NOT have permute, they use other
    instruction to perform the same function.
  • MixL MixR are used in MAX-2 to mix subwords
    from two registers and place the result into
    third register .
  • MixL interleaves subwords starting from left most
    subwords in the source
  • MixR interleaves subwords starting from right
    most subwords in the source .

MixL MixR ?
? Permute
11
Formatting Instructions
  • Level of precision during Multimedia computation
    may change very often .
  • Formatting instructions are used to convert one
    subword size to another.
  • UnPack instruction is used to expand smaller
    subwords into large ones.
  • Pack instruction is used to reduce large subwords
    into smaller ones.
  • MMX could unpack 8 ? 16, 16?32, 32?64 subwords..
  • MMX also pack 32 ? 16, 16 ? 8 (saturates).
  • MAX uses PshR, Pshl and Mix Instructions to pack
    and unpack Subwords
  • VIS Could Pack 32?16, 16?8, 32?8 subwords

Max VIS MMX
12
Conditional Instructions
  • Parallel Subword Compare (Pcmp) instruction
    perform the test by comparing pair of subword in
    two source registers and
  • - VIS generate one bit true of false
    indicator
  • - MMX generate full mask 1s or 0s
    indicator
  • The bit-mask instruction is used in VIS
    multimedia instruction set extension to control
    the Partial Store instruction (playing with
    colors)
  • MAX do NOT need Partial Store , its architecture
    already has Store Byte instruction
  • MMX has extension for Pcmp instructions

Max VIS MMX
13
Complex Instructions
  • The sum of absolute differences, which is used in
    MPEG video encoding, is a complex operation that
    might effect the performance if not processed
    efficiently
  • The Pdist instruction in VIS multimedia
    instruction set extension is used to calculate
    the sum of absolute difference (needed in MPEF
    encoding)
  • MMX and MAX use generic Padd and Psub
    instructions to calculate the absolute
    differences which might requires more cycles,
    this gives an advantage to VIS over MAX and MMX
    in term of handling the same MPEG encoding
    computation.

14
Memory Instructions
  • Most multimedia processing computations have very
    predictable memory access pattern (nature of
    Multimedia data)
  • Multimedia programs benefit from the use of
    prefetch instruction in order to reduce the cache
    misses
  • MAX has prefetch to cache instruction that would
    fetch the addressed word to cache
  • VIS has a special purpose instruction for loading
    a block of eight registers (block load)

15
Conclusion
  • Multimedia processing is based on the fundamental
    concept of subwording
  • MAX, MMX and VIS all implement extended
    instruction for Multimedia processing.
  • MMX and VIS have Parallel integer functional
    units , MAX does NOT.
  • Some Multimedia instructions has multiple usage ,
    Mix ? Pack Mix
  • The general purpose microprocessor with
    multimedia extension usually process difficult
    multimedia processing task.
  • Future multimedia instructions set architecture
    are likely .
  • The demand for high performance Multimedia
    computing will be required

End of Presentation
Write a Comment
User Comments (0)
About PowerShow.com