Friday, 12 August 2016

design issues of RISC

There is large proportion of assignment statements in HLL programs, and many of these are of the simple form A B. Also there are significan... thumbnail 1 summary
There is large proportion of assignment statements in HLL programs, and many of these are of the simple form A B. Also there are significant number of operand accesses per HLL Statement. Also it is observed that most of the accesses are local scalars. To get a fast response, we must have an easy excess to these local scalars, and so the use of register storage is suggested. Since registers are the fastest available storage devices, faster than both main memory and cache, so the uses of registers are preferable. The register file is physically small, and on the same chip as the ALU and Control Unit. A strategy is needed that will allow the most frequently accessed operands to be kept in registers and to minimize register-memory operations. Two basic approaches are possible, one is based on software and the other on hardware. 


● The software approach is to rely on the compiler to maximize register uses. The compiler will attempt to allocate registers to those variables that will be used the most in a given time period. 

● The hardware approach is simply to use more registers so that more variables can be held in registers for longer period of time.


From the studies it is observed that a typical procedure employs only a few passed parameters and local variables. Also the depth of procedure activation remains within a relatively narrow range. To exploit these properties, multiple small sets of registers are used, each assigned to a different procedure. A procedure call automatically switches the processor to use a different fixed size window of registers, rather than saving registers in memory. Windows for adjacent procedures are overlapped to allow parameter passing.

At any time, only one window of registers is visible which corresponds to the currently executing procedure. The register window is divided into three fixed-size areas. 

● Parameter registers hold parameters passed down from the procedure that called the current procedure and hold results to be passed back up. 

● Local registers are used for local variables.

● Temporary registers are used to exchange parameters and results with the next lower level (procedure called by current procedure) The temporary registers at one level are physically the same as the parameter registers at the next lower level. This overlap permits parameter to be passed without the actual movement of data. To handle any possible pattern of calls and returns, the number of register windows would have to be unbounded. But we have a limited number of registers, it is not possible to provide unlimited amount of registers. It is possible to hold the few most recent procedure activation in register windows. Older activations must be saved in memory and later restored when the nesting depth decreases. It is observed that nesting depth is small in general.

No comments

Post a Comment