Module-5_DDCO
Module-5_DDCO
Module-5_DDCO
• ALU
• Registers for temporary storage
• Various digital circuits for executing different micro
operations.(gates, MUX, decoders, counters).
• Internal path for movement of data between ALU and
registers.
• Driver circuits for transmitting signals to external units.
• Receiver circuits for incoming signals from external units.
PC:
❖ Keeps track of execution of a program
❖ Contains the memory address of the next
instruction to be fetched and executed.
MAR:
❖Holds the address of the location to be accessed.
❖I/P of MAR is connected to Internal bus and an O/p
to external bus.
MDR:
❖Contains data to be written into or read out of the
addressed location.
❖IT has 2 inputs and 2 Outputs.
❖Data can be loaded into MDR either from memory
bus or from internal processor bus.
❖The data and address lines are connected to the
internal bus via MDR and MAR.
Registers:
❖The processor registers R0 to Rn-1 vary considerably from one
processor to another.
❖Registers are provided for general purpose used by programmer.
❖Special purpose registers-index & stack registers.
❖Registers Y, Z & TEMP are temporary registers used by processor
during the execution of some instruction.
Multiplexer:
❖Select either the output of the register Y or a constant value 4 to
be provided as input A of the ALU.
❖Constant 4 is used by the processor to increment the contents of
PC.
ALU:
❖Used to perform arithmetic and logical operation.
Data Path:
❖The registers, ALU and interconnecting bus are collectively
referred to as the data path.
Input and output gating for the registers Internal processor
bus
R i in
Register Transfers
R i
Constant 4
2. Enable input of register R4 by
setting R4in=1. This loads the Select MUX
Z in
Z out
Performing an Arithmetic or Logic Operation
• The ALU is a combinational circuit that has no internal
storage.
• ALU gets the two operands from MUX and bus. The result
is temporarily stored in register Z.
• What is the sequence of operations to add the contents of
register R1 to those of R2 and store the result in R3?
1. R1out, Yin
2. R2out, SelectY, Add, Zin
3. Zout, R3in
Step 1: Output of the register R1 and input of the register Y are enabled,
causing the contents of R1 to be transferred to Y.
Step 2: The multiplexer’s select signal is set to select Y causing the
multiplexer to gate the contents of register Y to input A of the ALU.
Step 3: The contents of Z are transferred to the destination register R3.
Register Transfers
All operations and data transfers are controlled by the processor clock.
⚫ Move (R1), R2
1. R1out, MARin, Read
2. MDRinE, WMFC
3. MDRout, R2in
• Add (R3), R1
• Fetch the instruction
• Fetch the first operand (the contents of the memory location
pointed to by R3)
• Perform the addition
• Load the result into R1
Execution of a Complete Instruction
Add (R3), R1
Step Action
• Use faster circuit technology to build the processor and the main
memory.
• Arrange the hardware so that more than one operation can be
performed at the same time.
• In the latter way, the number of operations performed per second is
increased even though the elapsed time needed to perform any one
operation is not changed.
• Concurrent activities-Pipelining
• Pipelining commonly known as Assembly line operation.
• In computer, fetch and execute the instructions one after the other.
Traditional Pipeline Concept
• Laundry Example
• Ann, Brian, Cathy, Dave each have
one load of clothes to wash, dry,
A B C D
and fold.
• Washer takes 30 minutes
6 PM 7 8 9 10 11 Midnight
Time
30 40 20 30 40 20 30 40 20 30 40 20
D
Traditional Pipeline Concept
6 PM 7 8 9 10 11 Midnight
Time
T 30 40 40 40 40 20
a
s
k A
• Pipelined laundry takes 3.5
hours for 4 loads
O B
r
d C
e
r D
Traditional Pipeline Concept
T ime
I1 I2 I3
Time
Clock cycle 1 2 3 4
F1 E1 F2 E2 F3 E3
Instruction
I1 F1 E1
(a) Sequential execution
I2 F2 E2
Interstage buffer
B1
I3 F3 E3
Instruction Execution
fetch unit (c) Pipelined execution
unit
4-stage pipelining
Role of Cache Memory
Instruction
hazard
Idle periods –
stalls (bubbles)
Pipeline Performance
Load X(R1), R2
Structural
hazard