TD7
CPU (3)
Implémentation de la
machine à états finis
●
découpage de chaque instructions en une série de pas
●
un pas est exécuté à chaque top de l'horloge
●
un pas peut être constitué de plusieurs opérations exécutées en parallèle
●
à l’intérieur d’un pas, certaines opérations pourront se révéler inutiles, mais cela n’aura pas rallongé le temps d’exécution
●
en général
●
aller chercher l'instruction
●
décoder l'instruction
●
exécuter l'instruction
●
terminer l'exécution de l'instruction
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
implémentation multicycle
5 2 8
3
4
MemRead ALUSrcA = 0
IorD= 0 IRWrite ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0
MemWrite IorD = 1 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
7
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
exécution
PCWrite PCSource=10
exécution 9
4 bits pour décrire les 10 états des machines : S3 S2
S1 S0
ALUSrcA = 0 ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
[S3,S2,S1,S0] = [1000]
S3. S2 . S1 . S0
chargement
[S3,S2,S1,S0] = [0110]
S3 . S2 . S1 . S0
●
les entrées de la logique de contrôle sont :
●
les 6 bits de poids fort de l'instruction Op5 Op4 Op3 Op2 Op1 Op0
●
l'état courant de la machine décrit par les 4 bits
S3 S2 S1 S0
●
les sorties sont :
●
les lignes de contrôle
●
l'état suivant de la machine décrit par les 4 bits
NS3 NS2 NS1 NS0
écrit dans le registre d'état et validé comme état courant au tick d'horloge suivant
State n
NextState n
●
2 parties dans la logique combinatoire du bloc de contrôle :
●
les lignes de contrôle du chemin de données
●
l'état suivant de la machine à états finis
Sorties État courant Op PCWrite
PCWriteCond IorD
MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NextState0 NextState1 NextState2 NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
5 2 8
3
4
MemRead ALUSrcA = 0
IorD= 0 IRWrite ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0
MemWrite IorD = 1 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
7
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
exécution
PCWrite PCSource=10
exécution 9
ALUSrcA = 0 ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
l'activation des lignes de commandes est le OU des états pour lesquels elles sont à 1
chargement
Sorties État courant Op PCWrite state0 + state9
PCWriteCond IorD
MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NextState0 NextState1 NextState2 NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
Sorties État courant Op PCWrite state0 + state9
PCWriteCond state8
IorD state3 + state5 MemRead state0 + state3 MemWrite state5
IRWrite state0 MemtoReg state4 PCSource1 state9 PCSource0 state8 ALUOp1 state6 ALUOp0 state8
ALUSrcB1 state1 + state2 ALUSrcB0 state0 + state1
ALUSrcA state2 + state6 + state8 RegWrite state4 + state7
RegDest state7 NextState0
NextState1 NextState2 NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
Sorties État courant Op PCWrite state0 + state9
PCWriteCond state8
IorD state3 + state5
MemRead state0 + state3 MemWrite state5
IRWrite state0
MemtoReg state4 PCSource1 state9 PCSource0 state8
ALUOp1 state6
ALUOp0 state8
ALUSrcB1 state1 + state2 ALUSrcB0 state0 + state1
ALUSrcA state2 + state6 + state8 RegWrite state4 + state7
RegDest state7
NextState0 state4 + state5 + state7 + state8 + state9 NextState1
NextState2 NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' ) (O
p = 'BE Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
Sorties État courant Op PCWrite state0 + state9
PCWriteCond state8
IorD state3 + state5
MemRead state0 + state3 MemWrite state5
IRWrite state0
MemtoReg state4 PCSource1 state9 PCSource0 state8
ALUOp1 state6
ALUOp0 state8
ALUSrcB1 state1 + state2 ALUSrcB0 state0 + state1
ALUSrcA state2 + state6 + state8 RegWrite state4 + state7
RegDest state7
NextState0 state4 + state5 + state7 + state8 + state9 NextState1 state0
NextState2 NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' )
(Op = 'BE
Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
7
exécution 9 8
4
5 2
3
MemRead ALUSrcA = 0
IorD= 0 ALUSrcB = 01
ALUOp= 00 PCWrite PCSource = 00
(Op = 'LW' ou Op = 'SW' )
(Op = 'BE
Q') 0
ALUSrcA = 1 ALUSrcB = 10
ALUOp = 00
MemRead IorD = 1
RegWrite MemtoReg = 1
RegDst = 0 (Op='LW')
(Op='SW') calcul de
l'adresse mémoire
accès mémoire
fin de la lecture mémoire
accès mémoire
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 10
RegDst = 1 RegWrite MemtoReg = 0
exécution
fin de l'opération 6
ALUSrcA = 1 ALUSrcB = 00
ALUOp = 01 PCWriteCond PCSource=01
PCWrite PCSource=10
exécution ALUSrcA = 0
ALUSrcB =11 ALUOp = 00
(Op = type R) (O
p = 'J') 1
décodage
Les états suivants NextStaten sont les OU des prédécesseurs
chargement
MemWrite IorD = 1
Sorties État courant Op PCWrite state0 + state9
PCWriteCond state8
IorD state3 + state5
MemRead state0 + state3 MemWrite state5
IRWrite state0
MemtoReg state4 PCSource1 state9 PCSource0 state8
ALUOp1 state6
ALUOp0 state8
ALUSrcB1 state1 + state2 ALUSrcB0 state0 + state1
ALUSrcA state2 + state6 + state8 RegWrite state4 + state7
RegDest state7
NextState0 state4 + state5 + state7 + state8 + state9 NextState1 state0
NextState2 state1 (Op='lw') + (Op='sw')
NextState3 NextState4 NextState5 NextState6 NextState7 NextState8 NextState9
Sorties État courant Op PCWrite state0 + state9
PCWriteCond state8
IorD state3 + state5
MemRead state0 + state3 MemWrite state5
IRWrite state0
MemtoReg state4 PCSource1 state9 PCSource0 state8
ALUOp1 state6
ALUOp0 state8
ALUSrcB1 state1 + state2 ALUSrcB0 state0 + state1
ALUSrcA state2 + state6 + state8 RegWrite state4 + state7
RegDest state7
NextState0 state4 + state5 + state7 + state8 + state9 NextState1 state0
NextState2 state1 (Op='lw') + (Op='sw')
NextState3 state2 (Op='lw')
NextState4 state3
NextState5 state2 (Op='sw')
NextState6 state1 (Op='R-type')
NextState7 state6
NextState8 state1 (Op='beq')
NextState9 state1 (Op='jmp')
●
chaque futur état NextStatex est le OR des états courants Statex qui peuvent y conduire.
●
si il y a une condition sur l'Opcode de l'instruction qui y conduit, on fait un AND avec ces conditions
etc...
NextState1 = State0 = S3 . S2 . S1 . S0
NextState3 = State2. Op [ 5 − 0 ] = lw
= S3 .S2 . S1 .S0 . Op5 .Op4. Op3.Op2 .Op1 .Op0 NextState2 = State1. { Op [ 5 − 0 ] = lw Op [ 5 − 0 ] = sw }
= S3 .S2 . S1 .S0 .
Op5 .Op4 .Op3. Op2.Op1 .Op0 Op5 .Op4 .Op3 .Op2.Op1 .Op0
= S3 .S2 . S1 .S0 . Op5 .Op4. Op2.Op1 .Op0
●
Les états NextStatex sont rprésentés par le codage binaire de x avec NS3, NS2 , NS1 et NS0
NS3 NS2 NS1 NS0
NextState0 0 0 0 0
NextState1 0 0 0 1
NextState2 0 0 1 0
NextState3 0 0 1 1
NextState4 0 1 0 0
NextState5 0 1 0 1
NextState6 0 1 1 0
NextState7 0 1 1 1
NextState8 1 0 0 0
NextState9 1 0 0 1
●
NS0 sera actif (VRAI) à chaque fois que l'état suivant NexState x aura NS0=1dans son encodage
●
c'est le cas de NextState1, NextState3, NextState5, NextState7 et NextState9
●
NS0 = NextState1+NextState3+NextState5+
NextState7+NextState9
●
NS0 = S3.S2.S1.S0
S3.S2.S1.S0. Op5 .Op4 .Op3.Op2.Op1.Op0
S3.S2.S1.S0.Op5.Op4 .Op3.Op2.Op1 .Op0
S3.S2.S1.S0
S3.S2.S1.S0.Op5.Op4.Op3.Op2.Op1.Op0
●
de même
●
NS1 = NextState2 + NextState3 + NextState6 + NextState7
●
NS2 = NextState4 + NextState5 + NextState6 + NextState7
●
NS3 = NextState8 + NextState9
S3 S2 S1 S0
0 0 0 0
1 0 0 1
PCWrite
S3 S2 S1 S0
1 0 0 0
PCWritCond
S3 S2 S1 S0
0 0 1 1
0 1 0 1
IorD
S3 S2 S1 S0
0 0 0 0
0 0 1 1
MemRead
S3 S2 S1 S0
0 1 0 1
MemWrite
S3 S2 S1 S0
0 0 0 0
IRWrite
S3 S2 S1 S0
0 1 0 0
MemtoReg
S3 S2 S1 S0
1 0 0 1
PCSource1
S3 S2 S1 S0
1 0 0 0
PCSource0
S3 S2 S1 S0
0 1 10
ALUOp1
S3 S2 S1 S0
1 0 0 0
ALUOp0
S3 S2 S1 S0
0 0 0 1
0 0 1 0
ALUSrcB1
S3 S2 S1 S0
0 1 1 1
RegDest
S3 S2 S1 S0
0 0 0 0
0 0 0 1
ALUSrcB0
S3 S2 S1 S0
0 0 1 0
0 1 1 0
1 0 0 0
ALUSrcA
S3 S2 S1 S0
0 1 0 0
0 1 1 1
RegWrite
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
0 0 0 0 1 0 0 0 0 1
0 0 0 1 0 0 0 0 0 1
NS3
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
0 0 0 0 0 0 0 0 0 1
1 0 1 0 1 1 0 0 1 0
X X X X X X 0 0 1 1
X X X X X X 0 1 1 0
NS2
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
0 0 0 0 0 0 0 0 0 1
1 0 X 0 1 1 0 0 0 1
1 0 0 0 1 1 0 0 1 0
X X X X X X 0 1 1 0
NS1
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
X X X X X X 0 0 0 0
1 0 0 0 1 1 0 0 1 0
1 0 1 0 1 1 0 0 1 0
X X X X X X 0 1 1 0
0 0 0 0 1 0 0 0 0 1
NS0
Implémentation avec un PLA
●
qu'est ce qu'un PLA ?
●
combinaison de portes ET et OU permettant de réaliser de façon programmable des somme canoniques de produits
●
caractérisés par
●
le nombre d'entrées n
●
le nombre de sorties m
●
le nombre de minterms p
Implémentation avec un PLA
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
10 entrées
20 sorties
PCWrite
PCWriteCond
IorD MemRead
MemWrite
IRWrite
MemtoReg
PCSource1
PCSource0
ALUOp1
ALUOp0
ALUSrcB1
ALUSrcB0
ALUSrcA
RegWrite
RegDest
NS3 NS2
NS1 NS0
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
Minterms des "Staten"
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0
porte ET
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9
NS0 Op5
Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9Minterms des "NextStatesn"
dépendants des codes opératoires
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9
nextState 9 = (Op = J).state 1
= Op 5. Op 4.Op 4 .Op 3 .Op 2 .Op 1 .Op0.S 3. S2 .S 1.S 0
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9
nextState 9 = (Op = J).state 1
= Op 5. Op 4.Op 4 .Op 3 .Op 2 .Op 1 .Op0.S 3. S2 .S 1.S 0
Op5 Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0 Op5
Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
réalisation des lignes de contrôle
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0 Op5
Op4 Op3 Op2 Op1 Op0 S3 S2 S1 S0
state0 state1
porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
réalisation des lignes de contrôle
PCWrite = state0 + state9
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
réalisation des lignes de contrôle
PCWrite = state0 + state9
porte
OU
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
porte
OU
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
porte OU
réalisation des lignes NSn
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
porte OU
réalisation des lignes NSn
NS3 = nextState8 + nextState9
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
porte OU
réalisation des lignes NSn
NS3 = nextState8 + nextState9
PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUOp1 ALUOp0 ALUSrcB1 ALUSrcB0 ALUSrcA RegWrite RegDest NS3 NS2 NS1 NS0
state0 state1porte ET
state2 state3 state4 state5 state6 state7 state8 state9 nextState9 nextState8 nextState6 nextState5 nextState3 nextState2
porte OU
réalisation des lignes NSn
●
taille des mots ?
●
16 lignes de commandes + 4 bits pour l'état suivant
●
20 bits
●
taille de la mémoire ?
●
10 bits : Op[5-0 ] S[3-0]
●
2 10 mots = 1024 mots
●
20 Kbits
Implémentation dans une ROM
Implémentation dans une ROM
adresse :
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
D19 D18 D17 D16 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
●
dans quels mots le bit D19 sera vrai ?
●
PCWrite vrai pour State0 et State9
●
XXXXXX0000 et XXXXXX1001
●
0000000000
0000001001
0000010000
0000011001
etc...
Implémentation dans une ROM
●
comment le réaliser avec des blocs mémoires de 256 octets ?
●
bloc mémoire de 1024 octets
8
A0 A8 A0 A8 A0 A8 A0 A8
CE CE CE CE
S0 S1 S2 S3 Op0 Op1 Op2 Op3
Op5 Op4
0 1
2 3
Implémentation dans une ROM
●