Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A (2ND SEM)
Use of Large Register Files 3/28/2013
OUTLINES
Large Register File Register Window Circular Buffer Diagram Global Variable Register File Vs Cache
Use of Large Register Files 3/28/2013
Quick access of operand is desirable. Strategy is needed to store most frequently access operand into registers and reduce register-memory operations Reason to register storage Faster in operation Small Size(compared to memory and cache)
Two Strategy
Software solution Require compiler to allocate registers Allocate most used variables in a given time Requires sophisticated program analysis Hardware solution Have more registers Thus more variables will be in registers
3/28/2013
Fact Statistically, most operand references are to local scalars - 80% Local scalars cannot be accessed by other procedure(s) Problem Local changes with each procedure CALL/RETURN CALL/RETURN occurs frequently Parameters need to be passed around
3/28/2013
Observations Statistically, a few parameters(<6) and local variables(<6) Statistically, depth of procedure activation fluctuates within relatively narrow range(<8) Solution Multiple small sets of registers Each set is assigned to a different procedures Windows for adjacent procedures overlap to allow parameter passing
3/28/2013
...
...
...
...
Set 1
set 2
set 3
set m
Three areas within a register set 1. Parameter registers 2. Local registers 3. Temporary registers
Use of Large Register Files 3/28/2013
Temporary registers from one set overlap with parameter registers from the next This allows parameter passing without moving data
Window i
Procedure i Parameter
Registers
Local Registers
Temporary Registers
CALL
RETURN
Window i+1
Local Registers Temporary Procedure i+1 Registers
Exchange of parameters
Parameter Registers
3/28/2013
3/28/2013
When a call is made, a current window pointer is moved to show the currently active register window If all windows are in use, an interrupt is generated and the oldest window (the one furthest back in the call nesting) is saved to memory A saved window pointer indicates where the next saved windows should restore
3/28/2013
10
Assign to memory locations by compiler Straight forward but inefficient for the frequently accessed global variables because of frequent memory accesses Set aside a set of Global Variable registers Available to all procedures Unified register numbering system to simplify instruction format e.g. R0 ~ R7: Global R8 ~ R13: Current window
Use of Large Register Files 3/28/2013
11
Cache
Individual variables
Compiler assigned global variables Save/restore based on procedure
Blocks of memory
Recently used global variables
Register addressing
Memory addressing
Use of Large Register Files 3/28/2013
12
3/28/2013
13
Explain strategy of Large Register File. Explain register window and its actual organization Explain the circular buffer diagram. Explain large register file Vs cache? which is better for local scalar?
3/28/2013
14
3/28/2013
15
3/28/2013
16