



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
The differences between complex instruction set computers (cisc) and reduced instruction set computers (risc), the concept of instruction pipelining, and the types of control hazards that can occur. It includes examples and diagrams to help illustrate the concepts.
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




3-bit synchronous counter
reset
reset
3-to-8 Decoder T T T T T T T T (^0 1 2 3 4 5 )
IR, Instruction Register
3-to-8 Decoder 0 1 2 3 4 5 6 7
Memory Write
Memory Read
0
1
F 2
MAR
MBR
PC
IR
R
R
MBR_B
PC_B
IR_B
R0_B
R1_B
MBR_C
R0_C
R1_C
Chassis Motor Interior Exterior
a) If the stages take the following amounts of time, then what is the time between completions of automobiles? Chassis 1 hour Motor 1 hour Interior 1 hour Exterior 1 hour
b) If the stages take the following amounts of time, then what is the time between completions of automobiles? Chassis 45 minutes Motor 1 hour Interior 1 hour & 15 minutes Exterior 1 hour
Fetch Instruction - read instruction pointed at by the program counter (PC) from memory into Instr. Reg (IR) Decode Instruction - figure out what kind of instruction was read Fetch Operands - get operand values from the memory or registers Execute Instruction - do some operation with the operands to get some result Write Result - put the result into a register or in a memory location
Two approaches for designing a computer is CISC (Complex Instr. Set Computer - pre-1980) and RISC (Reduced Instruction Set Computer post 1985). A CISC philosophy was to make assembly language (AL) as much like a high-level language (HLL) as possible to reduce the “ semantic gap ” between AL and HLL. The rational for CISC at the time was to: reduce compiler complexity and aid assembly language programming. Compilers were not too good during the 50’s to 70’s, (e.g., they made poor use of general purpose registers so code was inefficient) so some programs were written in assembly language. reduce the program size. More powerful/complex instructions reduced the number of instructions necessary in a program. Memory during the 50’s to 70’s was limited and expensive. improve code efficiency by allowing complex sequence of instructions to be implemented in microcode. For example, the Digital Equipment Corporation (DEC) VAX computer had an assembly-language instruction “MATCHC substrLength, substr, strLength, str ” that looks for a substring within a string.
The architectural characteristics of CISC machines include: complex, high-level like AL instructions variable format machine-language instructions that execute using a variable number of clock cycles many addressing modes (e.g., the DEC VAX had 22 addressing modes)
a) Why are complex instructions of CISC (Complex Instr. Set Computer) machines difficult to pipeline?
b) Why are RISC machines usually Load & Store machines (i.e., only Load and Store instructions access memory)?
latch
latch
latch latch
Fetch Decode Execute Write
Decoder
ALU
Data Register (^) Memory Register File File
Instr. Memory
Result Result Value Value
Memory
b) Complete the following timing diagram assuming by-pass signal paths as shown above.
signal paths
ADD R4, R5, R6 /* ADD should not be executed if the branch is taken / SUB R8, R5, R . . B END_IF ELSE MUL R3, R3, R2 / MUL should not be executed if the previous B executes*/ . . END_IF
a) During which stage is the target address (addr. of “ELSE” label) calculated for the BEQ instruction?
b) During which stage of BEQ instruction is the comparison between registers (R3 and R8) performed (i.e., when is the outcome ( taken or not taken ) of the branch known)?
If we always (statically) continue to fetch sequentially until the outcome of a conditional branch is known : c) How many cycle branch penalty for a taken outcome?
d) How many cycle branch penalty for a not-taken outcome?
Chapter 8: “Beyond RISC” - goal of multiple instructions completed per clock cycle
superpipelined (e.g., MIPS R4000)- split each stage into substages to create finer-grain stages
Instruction 2
Instruction 3 Instruction 4 Instruction 5
Instruction 1
time
superscalar (e.g., Intel Pentium, AMD Athlon)- multiple instructions in the same stage of execution in duplicate pipeline hardware
Instruction Fetch - obtain “next” instruction(s) from memory (I cache) Instruction Decode - decode instr(s) and rename user-visible registers to avoid data hazards (WAW & WAR) introduced by out-of-order execution SUB R3, R2, R ADD R4, R3, # ADD R3, R5, # MUL R7, R3, R
Instruction issue - sent instruction to reservations unit associated with an appropriate execution unit (integer ALU, fl. pt. ALU, LOAD/STORE memory unit, etc.) to await execution Reservation station - dispatch instruction to execution unit when unit becomes free and all of the instruction’s operand values are known Instruction retire - writes results of potentially out-of-order instructions back to registers to ensure correct in-order completion. Also, communicates with the reservation stages when instruction completion frees resources (e.g., “virtual” registers used in register renaming)