UNIT III: Basic Processing Unit 08 Hrs
UNIT III: Basic Processing Unit 08 Hrs
CONTENTS
Some Fundamental Concepts, Register transfers, Performing
an Arithmetic or Logic operation, Fetching a word from
memory, Storing a word in memory, Execution of a complete
Instruction, Branch instructions, Multiple Bus Organization,
Hardwired Control(basic block diagram only), A complete
processor, Basic organization of Micro programmed Control
Unit.
SOME FUNDAMENTAL CONCEPTS
• To execute an instruction, processor has to perform following 3 steps:
• Instruction execution involves a sequence of steps in which data are transferred from one
register to another.
• For each register, two control-signals are used: Riin & Riout. These are called Gating Signals.
Riin = 1 data on bus is loaded into Ri.
Riout=1 content of Ri is placed on bus.
Riout=0, bus can be used for transferring data from other registers.
For example, Move R1, R4; This transfers the contents of register R1 to register R4. This can be
accomplished as follows:
1. Enable the output of registers R1 by setting R1out to 1 (Figure ).
This places the contents of R1 on processor-bus.
2. Enable the input of register R4 by setting R4in to 1.
This loads data from processor-bus into register R4.
• All operations and data transfers within the processor take place within time-periods defined
by the processor-clock.
• The control-signals that govern a particular transfer are asserted at the start of the clock cycle.
Register Transfers
PERFORMING AN ARITHMETIC OR LOGIC OPERATION
• The ALU performs arithmetic operations on the 2 operands applied to its A and B inputs.
• One of the operands is output of MUX and, the other operand is obtained directly from
processor-bus.
1. R1out, Yin
2. R2out, Select Y, Add, Zin
3. Zout, R3in
.
Instruction execution proceeds as follows:
Step 2 Contents from Y and from register R2 are applied to the A and B
inputs of ALU; Addition is performed & Result is stored in the Z register.
• The signals are activated for the duration of the clock cycle corresponding to
that step. All other signals are inactive
FETCHING A WORD FROM MEMORY
• When requested-data are received from memory, they are stored in MDR. From MDR, they are transferred to other
registers.
• The response time of each memory access varies (based on cache miss, memory-mapped I/O). To accommodate this, MFC
is used. (MFC Memory Function Completed).
• MFC is a signal sent from addressed-device to the processor. MFC informs the processor that the requested
operation has been completed by addressed-device.
•
Consider the instruction Move (R1),R2. The sequence of steps is (Figure 7.5):
1. R1out, MARin, Read ;desired address is loaded into MAR & Read command
is issued.
2. MDRinE, WMFC ;load MDR from memory-bus & Wait for MFC response
from memory.
3. MDRout, R2in ;load R2 from MDR.