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
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

Q. Illustration of a demon program? When the PVM initialize it inspects the virtual machine in that it's to operate and creates a process known as PVM demon or simply pvmd on e

What is the significance of the memory table 'SCREEN'? At runtime, attributes for every screen field are stored in the memory table called 'SCREEN'.  We need not declare this

Q. Explain types of Micro-instructions? In general micro-instruction can be classifiedin two general kinds. These are non-branching and branching. After execution of a non-bran


Standard Query Operators in LINQ can be used for working with collections for any of the following and more. 1. Get total count of elements in a collection. 2. Order the resu

Utility Functions - artificial intelligence: A goal based on an agent for playing chess is infeasible: at every moment it decides which move to play next, it sees whether that

Q. What do you mean by Communication Traffic? Communication Traffic offers a pictorial view of communication traffic in interconnection network with respect to time in progress

Magento supports installation of modules by a web-based interface accessible by the administration area of a Magento installation. Modules are hosted on the Magento eCommerce websi

How physical addressing is performed in WAN? WAN networks operate as similar to a LAN. All WAN technology classifies the exact frame format a computer uses while sending and re