234262 tutorial #6 controller + datapath part ii 234262 – © yohai devir 2007 © dima elenbogen...
Post on 21-Dec-2015
225 views
TRANSCRIPT
![Page 1: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/1.jpg)
234262
Tutorial #6
Controller + DataPath
part II
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 2: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/2.jpg)
GCD (Euclid's algorithm)
a is given at the first cycle and that b is given at the following cycle
ALUOpCC
A B
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 3: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/3.jpg)
Other hardware
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 4: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/4.jpg)
DP construction
Variables…
Operations…
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 5: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/5.jpg)
DP flow chart (Moore)(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
*
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 6: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/6.jpg)
Switch implementation
LdA A B
ALUOpCC
In
SelB
LdB
SelA 0 1 0 1
(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 7: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/7.jpg)
A B
ALUOpCC
In
SelB
LdB
SelA 0 1 0 1
(a)selA=1LD_A
(c)
OP=A-B
(f)
ready
(e)Sel_A=0
LD_AOP=A-B
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg CC=pos
(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
Implementation – just as in tutorial 4…
LdA
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 8: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/8.jpg)
GCD – slower ALU
A B
ALUOpCCALU
In
SelB
LdB
SelA 0 1 0 1
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 9: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/9.jpg)
GCD – slower ALU(a)
selA=1LD_A
(c)
OP=A-B
(f)
ready
(e)Sel_A=0
LD_AOP=A-B
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg CC=pos
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 10: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/10.jpg)
GCD – slower ALU
(a)selA=1LD_A
(c)
OP=A-B
(f)
ready
(e)Sel_A=0
LD_AOP=A-B
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg CC=pos
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 11: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/11.jpg)
(a)selA=1LD_A
(c)
OP=A-B
(f)
ready
(e)Sel_A=0
LD_AOP=A-B
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg CC=pos
GCD – slower ALU
?
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 12: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/12.jpg)
(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
*
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 13: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/13.jpg)
*
GCD – slower ALU
A B
ALUOpCCALU
In
SelB
LdB
SelA 0 1 0 1
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 14: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/14.jpg)
GCD – slower ALU
A B
ALUOp
CCALU
In
SelB
LdB
SelA 0 1 0 1
CC
'0'
ReadCC
01
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 15: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/15.jpg)
A B
ALUOpCCALU
In
SelB
LdB
SelA0 1 0 1
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 16: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/16.jpg)
ALUop
אות הסטטו
ס
234262 © – Dima Elenbogen 2009 Technion - IIT
![Page 17: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/17.jpg)
ALUop
אות הסטטו
ס
234262 © – Dima Elenbogen 2009 Technion - IIT
![Page 18: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/18.jpg)
A B
ALUOp
CCALU
In
SelB
LdB
SelA 0 1 0 1
CC
'0'
ReadCC
10
ALUop
Output comb. logics
Transition comb. logics
..
..
234262 © – Dima Elenbogen 2009 Technion - IIT
![Page 19: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/19.jpg)
ספחת סטטית
FF של ALUOP חסר ספחת סטטית חייב להיות!
היא תופעה שבה יחידה יכולה לשנות ספחת סטטית את המוצא שלה כאשר הכניסות שלה לא השתנו
234262 © – Dima Elenbogen 2009 Technion - IIT
![Page 20: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/20.jpg)
(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
000
001
010
100101
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 21: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/21.jpg)
DP mealy (regular ALU)
(a)
A ß a
(c)If (A-B>0)A ß A-B
(f)
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0
A-B > 0
(a)
A ß a
(c)
A-B
(f)
(e)
A ß A-B
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0 A-B > 0
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 22: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/22.jpg)
Controller Mealy(a)
selA=1Ld_A
(c)OP=A-B
Sel_A = 0If (CC=pos)
LD_A
(f)
ready
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg
CC = pos
(a)
A ß a
(c)If (A-B>0)A ß A-B
(f)
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0
A-B > 0
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 23: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/23.jpg)
234262 © – Yohai Devir 2007Technion - IIT
Controller Mealy(a)
selA=1Ld_A
(c)OP=A-B
Sel_A = 0If (CC=pos)
LD_A
(f)
ready
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg
CC = pos
(a)
A ß a
(c)If (A-B>0)A ß A-B
(f)
A-B == 0
(b)
B ß b
(d)
B ß B-A
A-B < 0
A-B > 0
?
![Page 24: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/24.jpg)
selA=0selB=0if (CC==pos) ldA, OP=A-Bif (CC==neg) ldB, OP=B-A
CC=posCC=neg
?
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 25: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/25.jpg)
ALUOP depends on CCALU!
A B
ALUOpCCALU
In
SelB
LdB
SelA 0 1 0 1
Combinatorial Logics NS
CS
LdA
234262 © – Dima Elenbogen 2009 Technion - IIT
![Page 26: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/26.jpg)
ALUOP depends on CCALU!
A B
ALUOpCCALU
In
SelB
LdB
SelA 0 1 0 1
Comb. LogicsNS
CS
LdA
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 27: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/27.jpg)
Mistake by standard notations
(a)
(c)
(f)
CC=zero
(b)
CC=neg/Sel_B=0LD_B
OP=B-ACC = pos/OP=A-B
Sel_A = 0LD_A
/selA=1Ld_A
/Sel_B=1LD_B
/ready
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT
![Page 28: 234262 Tutorial #6 Controller + DataPath part II 234262 – © Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT](https://reader030.vdocuments.net/reader030/viewer/2022032704/56649d555503460f94a32025/html5/thumbnails/28.jpg)
Mealy Controller (a)selA=1Ld_A
(c)OP=A-B
Sel_A = 0If (CC=pos)
LD_A
(f)
ready
CC=zero
(b)Sel_B=1
LD_B
(d)Sel_B=0
LD_BOP=B-A
CC=neg
CC = pos
234262 © – Yohai Devir 2007 © Dima Elenbogen 2009 Technion - IIT