Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the purpose of the PC and IR registers? 2. function of the Immed regi

ID: 3596129 • Letter: 1

Question

1. What is the purpose of the PC and IR registers?

2. function of the Immed register?

3. Describe the possible sources for data stored in the register file (i.e., the inputs to the MUX whose output can be written to the register file).

4. Describe the various sources for data placed on the address bus (i.e., the inputs to the MUX whose output goes on the address bus).

address bus MUX dbus sbus PC MU posel Immed aluop PC Adder sregsel dregsell imload sbus RAMGatain MUX datain bus dbus Regs IR bus egsel dwrite readwribe iload ALU dataout bus

Explanation / Answer

1 . What is the purpose of the PC and IR registers?

IR:

The instruction register (IR) is used to hold the instruction that is currently being executed. The contents of IR are available to the control unit, which generate the timing signals that control the various processing elements involved in executing the instruction.

PC:

The Program Counter is one of the most important registers in the CPU. A program is a series of instructions stored in the memory. These instructions tell the CPU exactly how to get the desired result. It is important that these instructions must be executed in a proper order to get the correct result. This sequence of instruction execution is monitored by the program counter. It keeps track of which instruction is being executed and what the next instruction will be.

2. Function of the Immed register?

Immediate addressing mode

Although the DPTR register is 16-bit, it can also be accessed as two 8-bit registers, DPH and DPL, where DPH is the high byte and DPL is the low byte. Look at the following code.

In this addressing mode, the source operand is a constant. In immediate addressing mode, as the name implies, when the instruction is assembled, the operand comes immediately after the opcode. Notice that the immediate data must be preceded by the pound sign, “#”. This addressing mode can be used to load information into any of the registers, including the DPTR register.

3. Describe the possible sources for data stored in the register file (i.e., the inputs to the MUX whose output can be written to the register file).

Register File

The register file (RF) is a hardware device that has two read ports and one write port (corresponding to the two inputs and one output of the ALU). The RF and the ALU together comprise the two elements required to compute MIPS R-format ALU instructions. The RF is comprised of a set of registers that can be read or written by supplying a register number to be accessed, as well (in the case of write operations) as a write authorization bit.

Since reading of a register-stored value does not change the state of the register, no "safety mechanism" is needed to prevent inadvertent overwriting of stored data, and we need only supply the register number to obtain the data stored in that register.

4. Describe the various sources for data placed on the address bus (i.e., the inputs to the MUX whose output goes on the address bus).

Address Bus :

Address bus is a part of the computer system bus that is dedicated for specifying a physical address.

When the computer processor needs to read or write from or to the memory, it uses the address bus to specify the physical address of the individual memory block it needs to access (the actual data is sent along the data bus).

More correctly, when the processor wants to write some data to the memory, it will assert the write signal, set the write address on the address bus and put the data on to the data bus.

Similarly, when the processor wants to read some data residing in the memory, it will assert the read signal and set the read address on the address bus. After receiving this signal, the memory controller will get the data from the specific memory block (after checking the address bus to get the read address) and then it will place the data of the memory block on to the data bus.