instruction compression

17
INSTRUCTION COMPRESSION TECHNIQUES Department of E & TC, MITCOE, Pune

Upload: shudhanshu-janwadkar

Post on 22-Jul-2015

157 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Instruction compression

INSTRUCTION

COMPRESSION

TECHNIQUES

Department of E & TC, MITCOE,

Pune

Page 2: Instruction compression

Introduction

Feature of GPP- need for instructions tocontrol device operations

Efficiency of handling the applications, ofany architecture is determined by –

◦ Controlling of general purposeprocessing resources

◦ Area dedicated to hold the controllinginstructions

◦ No. of resources controlled per instruction

◦ Bandwidth provided for instructiondistribution

◦ How frequently the instructions canchange

Page 3: Instruction compression

Bits per instruction

Definition : The number of bits in an

instruction

Processor

◦ 32 bits per instruction

◦ Instructions describes on an average,

about 0.5 – 0.6 gate evaluations

FPGA

◦ 120 – 200 bits per 4-LUT

Page 4: Instruction compression

Need for Compression

Limitation- embedded systems useprocessors which have small addressesspaces for programs

Larger program, lesser the probability ofresiding the code in I-cache

Such missing code fragments is loadedfrom main memory thereby reducing theoverall performance

Code increase can be attributed to-◦ Embedded applications are becoming more

complex

◦ Aggressive (VLIW) compiler optimizations forcode speed (ILP enhancement) also increasescode size

Page 5: Instruction compression

Instruction Compression

After the code generation and register

allocation, the generated code stream are

analyzed to search for pattern

The pattern checker finds all distinct pattern

and counts the frequency of occurrence

throughout the code stream

Those patterns with highest frequency of

usage are assigned an opcode, the

sequence of instructions for that opcode is

saved in ROM

Page 6: Instruction compression

Instruction Decompression

During instruction fetch, the decoder checks

the opcode of the incoming instruction

During instruction decode, if the decoder

encounters a compressed instruction, the

entire sequence of instructions is retrieved

from ROM

It is dispatched through the execution

pipeline one instruction per cycle

Instruction fetch from the program memory

is stalled until the sequence completes

Page 7: Instruction compression

Compressing Instruction

Stream Requirements

We cannot afford to have full independent

cycle by cycle control of every bit operation

without instruction storage and distribution

requirements

Need for application to compute compactly

With high performance systems, the

bandwidth in the I-cache can be the limiting

factor for execution speed

Page 8: Instruction compression

Techniques employed to

reduce instruction size and

bandwidth

Wide Word Architectures

Broadcast Single Instruction to Multiple Stage

Units

Locally Configure Instruction

Broadcast Instruction Identifier, Lookup in Local

Store

Encode Length by Likelihood

Mode Bits for Early Bound Information

Themes

Page 9: Instruction compression

1. Wide Word Architectures

Processors do not, commonly, operate on

single bit data items

Sets of ‘w’ bit elements are grouped

together and controlled by a single

instruction in SIMD cycle

Reduced instruction bandwidth and

instruction storage requirement by a factor

of ‘w’

Page 10: Instruction compression

II. Broadcast Single

Instruction to Multiple

Compute Units

Same instruction is shared by the multiple

functional units operating on different words

This results in scaling up of the number of

bit operators without increasing word

granularity or instruction bandwidth

However, it increases operation granularity

Page 11: Instruction compression

III. Locally Configure

Instruction

Small instruction bandwidth is needed if the

instructions do not change on every cycle

Each bit processing element gets its own,

unique instruction which is stored locally

Limited bandwidth path is used to change

array instruction when necessary

Page 12: Instruction compression

IV. Broadcast Instruction

Identifier, Lookup in Local

Store

Hybrid form of instruction compression

Single instruction identifier is broadcasted

and it look up its meaning locally

This results in short, single instruction

across the entire array

Page 13: Instruction compression
Page 14: Instruction compression

V. Encode Length by

Likelihood

Un-uniformity in use of instruction

Instructions are divided into smaller words

giving common instruction, short encoding

Instruction bandwidth is reduced by a factor

of

s

[log2(|instruction|)]

Page 15: Instruction compression

VI. Mode Bits for Early Bound

Information

All bits in an instruction do not always need

to change at once

Include the infrequently changing portions

of the instruction

Those portions are factored out of the

broadcast instruction

Explicitly loaded with new values only when

they need to change

Page 16: Instruction compression

Themes

◦ Granularity : How many resources are

controlled by each instruction?

◦ Local Configuration Memory : How many

instructions are stored locally per active

computing elements?

Page 17: Instruction compression

References

Reconfigurable architectures for general

purpose computing – Andre Dehon

An instruction stream compression

technique – P. Bird and T. Mudge

http://researcher.watson.ibm.com/researche

r/files/us-lefurgy/micro30.net.compress.pdf