CSN221_Lec_15.pdf MIPS ISA and Datapath design

ssuser034ce1 7 views 29 slides Sep 09, 2024
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

CSN221_Lec_15 MIPS ISA and Datapath design


Slide Content

Course Website: http://faculty.iitr.ac.in/~sudiproy.fcs/csn221_2015.html
Piazza Site: https://piazza.com/iitr.ac.in/fall2015/csn221  
Dr. SudipRoy
CSN‐221: COMPUTER ARCHITECTURE 
AND MICROPROCESSORS
MIPS ISA & DatapathDesign
(Lecture -15)

Dr. Sudip Roy2

Dr. Sudip Roy3

Dr. Sudip Roy4

Dr. Sudip Roy5

Dr. Sudip Roy6

Dr. Sudip Roy7

Dr. Sudip Roy8

Dr. Sudip Roy9

Dr. Sudip Roy10

Dr. Sudip Roy11

Dr. Sudip Roy12

Dr. Sudip Roy13
Use of MUX:

Dr. Sudip Roy14
Control Unit:

Dr. Sudip Roy15

Dr. Sudip Roy16

Dr. Sudip Roy17

Dr. Sudip Roy18

Dr. Sudip Roy19

Dr. Sudip Roy20

Dr. Sudip Roy21

Dr. Sudip Roy22
Recap: Computer Performance: Execution Time:

Dr. Sudip Roy23

Dr. Sudip Roy24

Dr. Sudip Roy25

Dr. Sudip Roy26

Dr. Sudip Roy27
= (100 x 10
9
) (1) (925 x 10
‐12
) seconds

Dr. Sudip Roy28
The datapathand the clock of the CPU:
In an instruction like add $t1, $t1, $t2, how do we know $t1 
is not updated until after its original value is read?
Read
address
Write
address
Write
data
Data
memory
Read
data
MemWrite MemRead
Read
register 1
Read
register 2
Write
register
Write
data
Read
data 2
Read
data 1
Registers
RegWrite
PC
1. STEP 1: A new instruction is loaded from memory. The 
control unit sets the datapath signals appropriately so that
registers are read,
ALU output is generated,
data memory is read and
branch target addresses are computed
2. STEP 2:
The register file is updated for arithmetic or lw
instructions.
Data memory is written for
 a sw instruction.
The PC is updated to point to the next instruction
In a single‐cycle datapatheverything in Step 1 must complete 
within one clock cycle.

Dr. Sudip Roy29
Slowest instruction determines the clock cycle time:
If all instructions must complete within one clock cycle, then the cycle time has to 
be large enough to accommodate the slowestinstruction.
For example, lw $t0, –4($sp) needs 8ns, assuming the delays shown here
reading the instruction memory 2ns
reading the base register $sp 1ns
computing memory address $sp-4 2ns
reading the data memory 2ns
storing data back to $t0 1ns
8ns
If we make the cycle time 8ns then every instruction will take 8ns, even if they 
don’t need that much time.
For example, the instruction add $s4, $t1, $t2really needs just 6ns.
6ns
reading the instruction memory 2ns
reading registers $t1 and $t2 1ns
computing $t1 + $t2 2ns
storing the result into $s0 1ns
Tags