Functioning of registers, Computer Engineering

Assignment Help:

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.


Related Discussions:- Functioning of registers

Arithmetic pipeline, Arithmetic Pipeline The complex arithmetic operati...

Arithmetic Pipeline The complex arithmetic operations like floating point and multiplication operations use a lot of the time of the ALU. These operations can also be pipelined

Implementation of a simple arithmetic, Q. Implementation of a Simple Arithm...

Q. Implementation of a Simple Arithmetic? So, by now we have concerned how logic and arithmetic micro-operations can be applied individually. If we combine these 2 circuits alo

Explain about indirect addressing, Q. Explain about Indirect Addressing? ...

Q. Explain about Indirect Addressing? In this technique the operand field of instruction specifies the address of address of intended operand for example if instruction LOAD

Explain cache-only memory access model (coma), Cache-Only Memory Access Mod...

Cache-Only Memory Access Model (COMA) As we have considered earlier, shared memory multiprocessor systems can use cache memories with each processor for decreasing the execution

Dataset accept changes and data adapter update method, Explain Dataset Acce...

Explain Dataset Accept Changes and Data Adapter Update methods?  Data Adapter Update method Calls the respective INSERT, UPDATE, or DELETE statements for every inserted, update

Move the layout table, You can select and move a layout table to other area...

You can select and move a layout table to other areas in a particular document. You can't, though, move a layout table so that it overlaps another. Next you will move the table

Explain about transmission media, Q. Explain about Transmission Media? ...

Q. Explain about Transmission Media? These, also known as physical channels, can be either bounded or unbounded. Bounded media, in which signals representing data are confined

System for an online furniture shop, As an XML expert you are needed to mod...

As an XML expert you are needed to model a system for an online furniture shop. After an interview with the shop manager you have the certain information: The detail of th

Explain the working of a half subtractor, With the help of a truth table ex...

With the help of a truth table explain the working of a half subtractor. Draw the logic diagram using gates. Ans: Half Subtractor: For the subtraction of B (subtrahend) f

Why we need to construct state transition diagram, Why we need to construct...

Why we need to construct state transition diagram Basically you need to construct a state transition diagram for each object with important behaviour. You need not construct on

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd