Design Issues of RISC                                                                                                                                   Print this page
<< Previous |  First |  Last |  Next >>       

Register Window :

The use of a large set of registers should decrease the need to access memory. The design task is to organize the registers in such a way that this goal is realized.

Due to the use of the concept of modular programming, the present day programs are dominated by call/return statements. There are some local variables present in each function or procedure.

1.  On every call,  local variables must be saved from the registers into memory, so that the registers can be reused by the called program. Furthermore, the parameters must be passed.
2.  On return, the variables of the parent program must be restored (loaded back into registers) and results must be passed back to the parent program.
3.  There are also some global variables which are used by the module or procedure.

Thus the variables that are used in a program can be categorized as follows :

  • Global variables         :  which is visible to all the procedures.
  • Local variables           :  which is local to a procedure and it can be accessed inside the procedure only.
  • Passed parameters   :  which are passed to a subroutine from the calling program. So, these are visible to both  called and calling program.
  • Returned variable     :  variable to transfer the results from called program to the calling program. These are also visible to both called and calling program.
<< Previous |  First |  Last |  Next >>