















































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
An in-depth analysis of single cycle processors, focusing on the roles of datapath and control. It covers the requirements of the instruction set, components of the datapath, and the importance of clocking. The document also discusses the concept of memory hierarchy and sequential logic.
Typology: Slides
1 / 55
This page cannot be seen from the preview
Don't miss anything!
















































Chapter 5.1 - Processor Design 1
Chapter 5.1 - Processor Design 1
-^ The five classic components of a computer •^ Today’s topic: design a single cycle processor
ControlDatapath
Memory
Processor
Input Output
Chapter 5.1 - Processor Design 1
-^
Chapter 5.1 - Processor Design 1
How to Design a Processor: Step-by-step
-^ 1. Analyze instruction set
Chapter 5.1 - Processor Design 1
ADD and SUB
rt, rs, imm
-^ LOAD / STORE Word - lw rt, rs, imm16– sw rt, rs, imm -^ BRANCH: - beq rs, rt, imm
op^
rs^
rt^
rd^
shamt
funct
0
6
11
16
21
26
31
6 bits
6 bits
5 bits
5 bits
5 bits
5 bits
op^
rs^
rt^
immediate
0
16
21
26
31
6 bits
16 bits
5 bits
5 bits
op^
rs^
rt^
immediate
0
16
21
26
31
6 bits
16 bits
5 bits
5 bits
op^
rs^
rt^
immediate
0
16
21
26
31
6 bits
16 bits
5 bits
5 bits
docsity.com
Chapter 5.1 - Processor Design 1
-^ Register Transfer Logic gives the meaning of the instructions •^ All start by fetching the instruction op | rs | rt | rd | shamt | funct = MEM[ PC ]op | rs | rt |
Imm
inst
Register Transfers
ADDU
R[rd]
R[rs] + R[rt];
R[rd]
R[rs] – R[rt];
ORi
R[rt]
R[rs] | zero_ext(Imm16);
R[rt]
MEM[ R[rs] + sign_ext(Imm16)];
MEM[ R[rs] + sign_ext(Imm16) ]
R[rt];
if ( R[rs] == R[rt] ) then PC
PC + 4 + sign_ext(Imm16)] || 00
else PC
Chapter 5.1 - Processor Design 1
Chapter 5.1 - Processor Design 1
Combinational Logic Elements (Basic Building Blocks)
-^ Adder •^ MUX •^ ALU
Chapter 5.1 - Processor Design 1
-^ Memory (idealized) - One input bus: Data In– One output bus: Data Out -^ Memory word is selected by: - Address selects the word to put on Data Out– Write Enable = 1: address selects the memoryword to be written via the Data In bus -^ Clock input (CLK) - The CLK input is a factor ONLY during write operation– During read operation, behaves as a combinational logic block:
Address valid
Data Out valid after “access time.”
Chapter 5.1 - Processor Design 1
-^ Example: MIPS registers (fast, but few)
-^ Cache: a small, fast memory; Holds a copy of part of a larger,slower memory •^ Imem, Dmem are really separate caches memories
Chapter 5.1 - Processor Design 1
high (1)low (0)^ °^ Clock determines
when
to write memory element
-^ level-triggered - store clock high (low) •^ edge-triggered - store only on clock edge °^ We will use negative (falling) edge-triggered methodology
Chapter 5.1 - Processor Design 1
Chapter 5.1 - Processor Design 1
-^ SR-latch with NAND Gates, also known as
-latch
-^ S = 0 and R = 0 not allowed^ °^
Chapter 5.1 - Processor Design 1
-^ SR-latch with NAND Gates and control input
= 1, change is allowed;^ •^
If^
S^ = 1 and
R
= 1,
Q
and
Q