



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




L22 â Pipelining the Beta 1
4/30/
betta
('be-t&)
n.^ Any of various species of small, brightly colored, long-finnedfreshwater fishes of the genus
Betta,
found in southeast Asia. beta^
(âbA-
t&, âb
E-)^ n.
1.^ The second letter
of the Greek alphabet.
2.^ The exemplary
computer system used in 6.004. I donât think they mean the fish...
maybe theyâllgive me partialcredit...
modified 4/27/09 11:
Lab #7 due Tonight!
6.004 â Spring 2009
4/30/
FreqCPI
L22 â Pipelining the Beta 3
4/30/
New PC
PC+^
Fetch Inst.
Control Logic
Read Regs
RA2SEL mux ASEL mux
BSEL mux ALU
Fetch data
+OFFSET
WDSEL muxRF setup
PC setup
Mem setup
PCSEL mux
=0?
CLK
CLK
New PC
PC+
Control Logic
RA2SEL mux ASEL mux
Fetch Inst. BSEL mux Read Regs
Fetch data
+OFFSET
WDSEL muxRF setup
PC setup
Mem setup
PCSEL mux
=0?
CLK
CLK
PC+
ALU
+OFFSET
6.004 â Spring 2009
4/30/
L22 â Pipelining the Beta 5
4/30/
6.004 â Spring 2009
4/30/
ASEL^
(^01)
Data Memory
WD RD Adr
R/W
WDSEL WA^0 1
<25:21>^ XP^10
JT IFPC^ +
Instruction A Memory D
<15:11> <20:16>
<25:21>^ RA2SEL
RegisterFile RA^
RA RD^
RD2^ BSEL^01
Z
A^^ ALU
B WA^ JT
WDWE
ALUFN
PC+
0 1
Wr
(^01) (^23) ILLXAdrOP 4
WASEL
WERF
00
PCSEL
<15:0>
EXE^ PC 00
EXEIR
L22 â Pipelining the Beta 7
4/30/
..ADDC(r1, 1, r2)SUBC(r1, 1, r3)XOR(r1, r5, r1)MUL(r2, r6, r0)...
i^
i+^
i+^
i+^
i+^
i+^
i+
TIME (cycles) XOR
Pipeline
6.004 â Spring 2009
4/30/
i^
i+^
i+^
i+^
i+^
i+^
i+
ADD(r1,
r3,
r3)
CMPLEC(r3,
r0)
BT(r0,
XOR(r3,
r3)
MUL(r1,
r2,
r2)
L22 â Pipelining the Beta 13
4/30/
i^
i+^
i+^
i+^
i+^
i+^
i+
ADD Branch taken
ADD(r1,r3,r3) LOOPx: CMPLEC(r3,100,r0)
BT(r0,LOOPx)ADD(r1,r3,r3) SUB(r3,r1,r3) XOR(r3,-1,r3)MUL(r1,r2,r2)...
We need toadd this sillyinstructionto UNDO theeffects ofthat lastADD
6.004 â Spring 2009
4/30/
i^
i+^
i+^
i+^
i+^
i+^
i+
ADD Branch taken
ADD(r1,
r3,
r3)
LOOPx:
CMPLEC(r3,
r0)
BT.taken(r0,
LOOPx)
ADD(r1,
r3,
r3)
XOR(r3,
r3)
MUL(r1,
r2,
r2)
L22 â Pipelining the Beta 15
4/30/
IF instruction InstructionFetch
ALU
ALU^
CL
A^
B
instruction RegisterFile
CL
RF(read)
instruction instruction
Y
WriteBack^
CL
RF(write)
instruction
Y
Memory
CL
Wow! I guess those guys reallywere thinking when they made upall those instructions
6.004 â Spring 2009
4/30/
RF ALUPC MEMPC
Rb: <15:11> Ra <20:16>
Rc <25:21>^ RA2SEL
Instruction A Memory D RF^ IR
InstructionFetch
+^ C: <15:0> << 2sign-extended
RD
WA^^ RegisterFile
0 1 2 WDSELWDWE MEM IR
MEMD
MEMY
ALUD B
ALU^ IR
A
01 BSEL
Z
A^^ ALU
B Y
WDAdr (^) Data Memory RegisterFile ALU R/W WriteBack
ASEL^
(^01) Rc <25:21>
PCSEL
ILLXAdrOP^ JT^01234 IF^ PC
00
XP 0 1 WASEL
Register WA File RA^
RA RD^
RD JTC: <15:0>sign-extended ALUFN
WERF
L22 â Pipelining the Beta 17
4/30/
...ADDC(r1, 1, r2)SUBC(r1, 1, r3)XOR(r1, r5, r1)MUL(r2, r6, r0)...
TIME (cycles)
Pipeline
i^
i+^
i+^
i+^
i+^
i+^
i+
L22 â Pipelining the Beta 18
6.004 â Spring 2009
4/30/
r3fetched r available
ADD(r1,
r2,
r3)
CMPLEC(r3,
r0)
MULC(r1,
r4)
SUB(r1,
r2,
r5)
i^
i+^
i+^
i+^
i+^
i+^
i+
L22 â Pipelining the Beta 19
4/30/
ADD(r1, r2, r3)MULC(r1, 100, r4)SUB(r1, r2, r5)CMPLEC(r3, 100, r0)
L22 â Pipelining the Beta 20
6.004 â Spring 2009
4/30/
i^
i+^
i+^
i+^
i+^
i+^
i+