CA 06 Datapath
CA 06 Datapath
Edition
DESIGN Interface
The Hardware/Software
Week 6
The Processor Datapath
(Chapter 4)
§4.1 Introduction
Introduction
■ CPU performance factors
■ Instruction count
■ Determined by ISA and compiler
■ CPI and Cycle time
■ Determined by CPU hardware
■ We will examine two RISC-V implementations
■ A simplified version
■ A more realistic pipelined version
■ Simple subset, shows most aspects
■ Memory reference: ld, sd
■ Arithmetic/logical: add, sub, and, or
■ Control transfer: beq
A
Y
B
■ Arithmetic/Logic Unit
■ Multiplexer ■ Y = F(A, B)
■ Y = S ? I1 : I0
A
I0 M
u Y ALU Y
I1 x
B
S F
Clk
D Q
D
Clk
Q
Clk
D Q Write
Write D
Clk
Q
Increment by
4 for next
64-bit instruction
register
Sign-bit wire
replicated
ALU
opcode ALUOp Operation Opcode field ALU function control
ld 00 load register XXXXXXXXXXX add 0010
sd 00 store register XXXXXXXXXXX add 0010
beq 01 branch on equal XXXXXXXXXXX subtract 0110