



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In the lecture notes of the intro to computer architecture the main points are listed below:Machine Cycle, Instruction Cycle, Stored-Program Computer, Execute Instruction, Fetch Operands, Serial Execution, Decode-Execute Cycle, Instruction Pipelining, Instruction Completion Rate, Pipelined Execution
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




PSW-process status word
R
R
R
R
PC, program counter
IR, instruction register
MAR
MDR
ALU
Address Bus
Data Bus Control Bus
System Bus Memory
CPU/Processor
(+,-,*, etc)
Add R1,R2,R
Control Unit
Register File
Load R2, X
Load R3, Y
Store R1, SUM
Program Area
(X) (Y) (SUM)
5 3 0
DataGlobal
Heap
Stack
Unused
Operating System Area
0 1 2 3..
.
.
.
.
(Addresses)
A Program's Address Space
Disk
I/O Controller
Instruction/Machine Cycle of stored-program computer - repeat all day
Note: Sometime during the above steps, the PC is updated to point to the next instruction.
Lecture 3 - 1
Serial Execution - complete fetch-decode-execute cycle before starting the next instruction
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Instruction 1
time
Instruction Pipelining - assembly-line idea used to speed instruction completion rate
Assume that an automobile assembly process takes 4 hours.
Chassis Motor Interior Exterior
If you divide the process into four equal stages, then ideally
time between completions =
time to complete one car
Problems: stages might not be balanced overhead of moving cars between stages two stages need same specialized tool (structural hazard)
Pipelined Execution - goal is to complete one instruction per clock cycle
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Instruction 1
time
Lecture 3 - 2
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Solution Alternatives:
SUB R4, R3, R5 FI DI CO stall stall FO EI WO
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
latch
latch
latch
latch
latch
Decoder
ALU
ALU
ALU
Data (^) Data Memory (^) Memory
Register
Register
Register File
File
File
Instr. Memory
Copy of Instr.
Decoded CO-ALU do +
Opcode operand 1 addr. operand 2 addr (or reg#)
old value of R
value of R
SUB
dest. addr/reg
dest. reg R
R3 result value
EI-ALU do *
M
M
U
U
X
X
ADD
a bypass-signal path
No stalls needed in this case.
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
What would control the MUX?
Lecture 3 - 4
MUX Operation:
Inputs^ Output
Control Signals - (binary #) to select which input gets sent to output
Consider the following code: ADD R3, R2, R LOAD R4, 4(R3)
What would the timing be without bypass-signal paths/forwarding?
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
This assumes that R3 cannot be written and the new value read in the same stage.
If we assume that R3 can be written in the first half of the WO stage and its new value read in the last half of the DI stage, then we get:
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
What would the timing be with bypass-signal paths?
Lecture 3 - 5
Consider a larger section of code. What would the timing be without bypass-signal paths/forwarding (use “stalls” to
solve the data hazard)? (This code might require more or less that 15 cycles)
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(Assume that a register cannot be written and the new value read in the same stage.)
b. What would the timing be with bypass-signal paths?
(This code might require more that 15 cycles)
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(Assume that a register cannot be written and the new value read in the same stage.)
c. Draw ALL the bypass-signal paths needed for the above example.
latch
latch
latch
latch
latch
Decoder
ALU
ALU
ALU
Data (^) Data Memory (^) Memory
Register
Register
Register File
File
File
Instr. Memory
Copy of Instr.
Decoded CO-ALU do +
Opcode operand 1 addr. operand 2 addr (or reg#)
operand 1 value
operand 2 value
opcode
dest. addr/reg
dest addr/reg
result value
EI-ALU do *
Lecture 3 - 7