Please enable JavaScript.
Coggle requires JavaScript to display documents.
Overview Of Instruction Execution (Read A Word From Memory (Instruction…
Overview Of Instruction Execution
Single Bus Organization
REGISTER Y, Z AND TEMP
-Use only by the processor unit for temporary storage during the execution of some instructions.
-Programmer cannot access these registers the IR and the Instruction decoder
-Integral parts of the control circuitry in the processing unit.
-The data registers, ALU and the interconnecting bus is referred to as data path
Register R0 through R(n-1)
-Processor register: General Purpose Register and Special Purpose Register (stack pointer, index register and pointers)
-The Register and
ALU
are used for storing and manipulating data
-These are 2 option provides for A & B input of the
ALU
. Select by
MUX
Multiplexer (MUX)
-Select one of the two inputs
-If select (1) – select output of Y
-If select (0) – select Constant as input A for ALU
Constant number
used to increment the contents of program counter
Fetch and Execute
Instruction fetch phase
Fetching an instruction and loading it into the IR
Instruction execution phase.
Performing the operation specified in the instruction constitutes
Instruction execution cycle
-Fetch: fetch next instruction (using PC) from memory into IR.
-Decode: decode the instruction.
-Execute: execute instruction.
Execution of Various Instructions
1) Control unit fetches instruction
2) Control unit interprets the instruction and sends the 2 numbers to be added into the appropriate registers in the ALU.
3) Control unit executes the instruction by directing the ALU to add the 2 numbers in the register 1 and 2 then store the result in the processor register
4) Result is stored back in memory
Register Transfer
Register to register transfer
:
For each register Ri, two control signals:
-Ri
in used to load the data on the bus into the register.
-Ri
out to place the register’s contents on the bus.
Arithmetic/Logic Operation
ALU
: Performs arithmetic and logic operations on its A and B inputs.
-To perform
R3 R1 + R2
:
1)
R1
out,
Y
in
2)
R2
out, Select Y, Add
, Z
in
3)
Z
out,
R3
in
External Memory Bus
MDR
has four control signals:
MD
Rin,
MDR
out,
MDR
inE (for external) and
MDR
outE (for external).
Read A Word From Memor
y
Instruction Sequence of Action
1)MAR < [R1]
2)Start a Read operation on the memory bus
3)Wait for the MFC response from the memory –
MFC Memory-Function-Completed Signal
4)Load MDR from the memory bus
5)R2 < [MDR]
Sequence of control steps
1)
R1
out,
MAR
in, Read
2)
MDR
inE,
3)
WMFC
4)
MDR
out,
5)
R2
in
WMFC: Wait for arrival of MFC (Memory-Function-Completed) signal.
Arithmetic Instructions
-Add R1, (R2) /
R1 <- R1 + [R2]
-Adds the contents of a memory location pointed to by R2 to register R1.
-Sequence of actions:
-Fetch the instruction
-Fetch the operand from memory location pointed by R2
-Perform the addition
-Store the result in R1
Store A Word In Memory
Move R2, (R1) /
[R1] R2
Sequence of control steps:
-
R1
out,
MAR
in
-
*R2
out, MDRin, Write
-MDRoutE, WMFC