Functioning of registers, Computer Engineering

Functioning of registers: at any instance of time global registers and only one window of registers is visible and is addressable as if it were only set of registers. So for programming purpose there can be only 32 registers. Window in the above illustration though has a total of 138 registers. This window comprises: 

  • Global registers that are shareable by all functions.
  • Parameters registers for holding parameters passed from previous function to current function. They also hold results which are to be passed back.
  • Local registers which hold the local variables as assigned by compiler.
  • Temporary registers: They are physically same as the parameter registers at subsequent level. This overlap allows parameter passing without actual movement of data.

However what is the maximum function calls nesting can be permitted through RISC? Let's elaborate it with the help of a circular buffer diagram technically registers as above have to be circular in the call return hierarchy.

This organization is displayed in the following figure. The register buffer is filled as function Aknown as function B, function B known as function C, function C known as function D. The function D is current function. Current window pointer (CWP) points to register window of the most recent function (function D in this case). Any register references by a machine instruction is added with contents of this pointer to decide the actual physical registers.  Instead the saved window pointer recognizes the window most recently saved in memory. This action will be required if a further call is made and there is no space for that call. If function D now calls function E arguments for function E are placed in D's temporary registers denoted by D temp and CWP is advanced by one window.


2306_Functioning of registers.png

Figure: Circular-.Buffer Organization of Overlapped Windows

If function E now makes a call to function F, the call can't be made with current status of buffer unless we free space equivalent to precisely one window. This circumstance can easily be determined as current window pointer on incrementing will be equivalent to saved window pointer. Now we need to create space; how can we do it? The simplest way would be to swap FA register to memory and use that space. So an N window register file can support N -1 level of function calls. 

So the register file arranged in the form as above is a small fast register buffer which holds most of the variables which are likely to be used heavily. From this point of view register file acts nearlyas a cache memory.

Posted Date: 7/30/2013 5:55:56 AM | Location : United States

Related Discussions:- Functioning of registers, Assignment Help, Ask Question on Functioning of registers, Get Answer, Expert's Help, Functioning of registers Discussions

Write discussion on Functioning of registers
Your posts are moderated
Related Questions
Give an account of modems used in data transfer. Modem: Modems are usually provided through network operators (Department of Telecommunication in India) or through vendors wh

Define the full form of SSL SSL has become fundamental to the spread of Internet community, and commerce and trade over Internet. Over years, the spread of its use for an incr

Multiple Instruction and Multiple Data stream (MIMD): In this categorization, numerous processing elements and multiple control units are ordered as in MISD. However the differ

What is meant by bitwise operations? C has distinction of supporting special operators known as bit wise operators for manipulation of data at bit level. These operators are us

Data packets: USB communication takes the form of packets. Originally, all packets are sent from the host, using the root hub and possibly more hubs, to components. Some of th

How adaptive transmission helps TCP to maximize throughput on each connection? To know how adaptive retransmission helps TCP maximize throughput upon all connection, see a case

A program is backward compatible if it can use files from an older version of itself. For a file saved in the program to be backward compatible, it must be possible to open the fil

TARGET = "_parent" "_parent" is used in a situation where a frameset file is nested inside another frameset file. A link in one of the inner frameset documents that uses "_par

The memory allocation scheme subject to “external” fragmentation is? Segmentation is the memory allocation scheme subject to “external” fragmentation.

Q. Explain Status and Control Registers? For control of numerous operations several registers are used. These registers can't be used in data manipulation though content of som