Professional Documents
Culture Documents
Module -1
I Introduction to Microprocessors
I Instruction Set Architecture
I Micro-architecture
I Scalar Processor
I Super-scalar Processor
I Simultaneous Multi-threading Processor
I Flynn’s classification
Module -4
I Interrupts: Internal and External Interrupts
I 8086 Interrupt Types
I Accessing I/O Devices: I/O mapped I/O and Memory Mapped I/O
I Interrupted I/O
Module -5
I Graphics Processing Units
I Case Study on Intel X - Series Processors
I Case study on AMD Zen -Series Processors
I Case study on Arm Processors.
Reference Books:
1 Microprocessors and Interfacing, 3rd edition (3e), Douglas V Hall and
SSSP Rao, McGraw Hill.
3 https://en.wikichip.org/wiki/WikiChip
Intel-i7-7920-4C-8T Intel-i9-9900-8C-16T
AMD-Ryzen-3900-12C-24T Threadripper-3990x-64C-128T
Dr. Praveen (Mahindra University) MPI CS3106 7 / 61
Single-core with Hyper Threading
Stack frame:61
Dr. Praveen (Mahindra University) MPI CS3106 20 / 61
x86-64-bit Processor Registers
I Valid bit says whether the cache block has a valid data or not.
I Dirty bit (modify bit) says whether the contents of the cache
line/block are different to what are there in main memory.
I Inclusive Cache: L1 ⊂ L2 ⊂ L3
I Exclusive Cache: L1 ∩ L2 ∩ L3 = ∅
3 The memory responds by placing the data from the addressed location
onto datalines,and issues MFC (Memory Function Complete) signal.
4 Upon receiving MFC signal, the processor loads the data on the data
lines into the MDR register.
Memory Access Time (MAT) is the time between the Read and
MFC signal.
3 Place the contents of MDR into data bus and wait for MFC (Memory
Function Complete) signal.
Let h1, h2, h3 be the hit ratios of L1, L2 and L3 caches and ’tmm ’, ’tcm1 ’,
’tcm2 ’, and ’tcm3 ’ be the access times of main memory, L1, L2, and L3,
respectively. Then Average Memory Access Time (AMAT)=
h1.tcm1 +(1−h1).h2.tcm2 +(1−h1).(1−h2).h3.tcm3 +(1−h1).(1−h2).(1−h3).tmm
Address of instruction
Instruction Fetch ATU Cache
Instruction word
Instruction Decode Control Unit
Addresses of
source
operands Operand Fetch Register File
Address of instruction
Instruction Fetch ATU Cache
Instruction word
Instruction Decode Control Unit
Addresses of
source Register File
operands Operand Fetch
ATU Cache
Opcode, Operands
Execute Arithmetic and Logic Unit
Address of destination
operand, Result Register File
Writeback Result
ATU Cache
14
A technique for moving data between main memory and secondary storage.
A technique for moving data between main memory and secondary storage.
I Numerical Data
I Integers
I Reals
I Character Data
I char
I varchar
I Signal Data
I Audio
I Video
I Speech
I Image
I Data types
I Integers: Unsigned, Signed, Byte, Short, Long
I Real numbers: Single-precision (float), Double-precision (double)
I Operations
I Addition, Subtraction, Multiplication, Division
I Data Transfer
I Register Transfer: Move
I Memory transfer: Load, Store
I I/O transfer: In, Out
I Control Transfer: Unconditional and Conditional
I Logical instructions: AND, OR, XOR, SHIFT
I Arithmetic instructions: ADD, SUB, MUL, DIV
I Procedure Call
I Return
Instruction 1 IF ID OF EX WB
Instruction 2 IF ID OF EX WB
Instruction 3 IF ID OF EX WB
Instruction N-1 IF ID OF EX WB
Instruction N IF ID OF EX WB
1
Instruction 1 2 3 4 5 6 7 8 9 10
I1 IF ID OF EX WB
I2 IF ID OF EX WB
I3 IF ID OF EX WB
I4 IF ID OF EX WB
I5 IF ID OF EX WB
I6 IF ID OF EX WB
For the following assembly code, give a pipelined execution using 5-stage
pipeline (5-stages are IF, ID, OF, EX, and WB).
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 ADD R1, R2, R3 IF ID OF EX WB
I2 SUB R4, R5, R6 IF ID OF EX WB
I3 ADD R7, R8, R9 IF ID OF EX WB
I4 MUL R10, R11, R1 IF ID OF EX WB
I5 MUL R12, R3, R14 IF ID OF EX WB
I6 MUL R2, R5, R6 IF ID OF EX WB
I7 MUL R4, R1, R11 IF ID OF EX WB
I.No. Instruction 1 2 3 4 5 6 7 8 9 10 11 12 13 14
I1 ADD R1,R2,R3 IF ID OF EX WB
I5 MUL R12,R3,R14 IF ID OF OF OF EX WB
I2 SUB R4,R5,R6 IF ID - - OF EX WB
I3 ADD R7,R8,R9 IF - - ID OF EX WB
I4 MUL R10,R11,R1 IF ID OF EX WB
I6 MUL R2,R5,R6 IF ID OF EX WB
I7 MUL R4,R1,R11 IF ID OF OF EX WB
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 ADD R1, R2, R3 IF ID OF EX WB
I2 JMP I7 IF ID
I3 ADD R7, R8, R9 IF
I4 MUL R10, R11, R1
I5 MUL R12, R3, R14
I6 MUL R2, R5, R6
I7 MUL R4, R1, R11 IF ID OF EX WB
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 SUB R4, R4, R4 IF ID OF EX WB
I2 JZ I7 IF ID OF EX
I3 ADD R1, R2, R3 IF ID OF
I4 MUL R10, R11, R1 IF ID
I5 MUL R12, R3, R14 IF
I6 MUL R2, R5, R6
I7 MUL R4, R1, R11 IF ID OF EX WB
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 ADD R1, R2, R3 IF ID OF EX WB
I2 SUB R4, R5, R6 IF ID OF EX WB
I3 ADD R7, R8, R9 IF ID OF EX WB
I4 MUL R10, R11, R12 IF ID OF EX WB
I5 MUL R3, R14, R15 IF ID OF OF EX WB
I6 MUL R2, R5, R2 IF ID OF EX WB
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 ADD (R1), R2, R3 IF ID OF MEM MEM MEM MEM MEM EX WB
I2 SUB R4,R5,R6 IF ID OF EX WB
I.No. Instruction. 1 2 3 4 5 6 7 8 9 10 11
I1 ADD (R1), R2, R3 IF ID OF MEM MEM MEM MEM MEM EX WB
I2 SUB R4,R5,R6 IF ID OF EX WB
CISC RISC
Only load and store use memory operands
Any instruction can use memory operands
(all other instructions use register operands)
Many addressing modes Few addressing modes
Complex Instruction Formats: Variable Length Simple Instruction Formats: Fixed length
Control Unit: Micro-programmed Control Unit: Hardwired
Difficult to implement pipelined execution Suitable for pipelining
Back to slide:16
Back to slide 20
Dr. Praveen (Mahindra University) MPI CS3106 61 / 61