A apresentação está carregando. Por favor, espere

A apresentação está carregando. Por favor, espere

Circuitos Lógicos e Organização de Computadores Capítulo 8 –Circuitos Seqüenciais Síncronos Ricardo Pannain pannain@puc-campinas.edu.br http://docentes.puc-campinas.edu.br/ceatec/pannain/

Apresentações semelhantes


Apresentação em tema: "Circuitos Lógicos e Organização de Computadores Capítulo 8 –Circuitos Seqüenciais Síncronos Ricardo Pannain pannain@puc-campinas.edu.br http://docentes.puc-campinas.edu.br/ceatec/pannain/"— Transcrição da apresentação:

1 Circuitos Lógicos e Organização de Computadores Capítulo 8 –Circuitos Seqüenciais Síncronos
Ricardo Pannain

2 Forma geral de um circuito seqüêncial
Combinational Circuito Flip-flops Clock Q W Z Máquina de estados finitos (FSM – Finite State Machine)  o comportamento do circuito pode ser representado usando um número finito de estados. Máquina de MOORE  saídas dependem apenas do estado do circuito. Máquina de MEALY  saídas dependem do estado do circuito e de suas entradas primárias.

3 Etapas Básicas de Projeto
Exemplo: Supondo um circuito que tenha uma entrada w e uma saída z. Todas as mudanças ocorrerão na subida do clock. A saída z é igual a 1 se durante dois ciclos consecutivos imediatamente prescedente a entrada w for igual a 1. Caso contrário o valor é zero. A tabela abaixo ilustra o funcionamento para um padrão de w qualquer. Clockcycle: t 1 2 3 4 5 6 7 8 9 10 w : z

4 Etapas Básicas de Projeto
PRIMEIRO PASSO  Diagrama de estados Determinar quantos estágios são necessários e quais transições são possíveis de um estado para outro. No exemplo: Supondo o estado inicial A (com saída z = 0)  enquanto w = 0 ele permanece neste estado. Se w = 1, na subida do clock ele passará para o estado B (com z = 0). Uma vez no estado B, se w = 0 , ele passará para o estado A (z = 0) na subida do clock. Se w = 1, passará para um terceiro estado C (z = 1). No estado C, se w = 0, ele passará para o estado A (z = 0) na subida do clock. Se w = 1, Continuará no estado C (z = 1)

5 Diagrama de estados do exemplo anterior – Máquina de MOORE
C z 1 = Reset B A w

6 Tabela de estados w = 1 z Present Next state Output state A B C
SEGUNDO PASSO  Tabela de Estados Present Next state Output state w = 1 z A B C

7 Circuito seqüencial geral
Como temos 3 estados, precisaremos de 2 Flip-Flops e o circuito ficaria: Combinational Circuito Clock y 2 z w 1 Y

8 Tabela de estados assinalados
Next state Present Output state w = w = 1 z y y Y Y Y Y 2 1 2 1 2 1 A 00 00 01 B 01 00 10 C 10 00 10 1 11 dd dd d

9 Derivando as expressões lógicas dos próximos estados e da saída
Ignorando don't cares Usando don't cares Y 1 wy y 2 = + z Y 1 wy y 2 = + z w ( ) w 00 01 11 10 1 y 2 d w 00 01 11 10 1 d y 2 1 d y 2

10 Circuito Seqüencial do exemplo anterior

11 Diagrama de tempo do exemplo anterior
1 2 3 4 5 6 7 8 9 10 1 Clock 1 w 1 y 1 1 y 2 1 z

12 Exemplo – Troca de conteúdo entre dois registradores
Trocar o conteúdo dos registradores R1 e R2, utilizando o registador R3 com auxiliar R3  R2 R2  R1 R1  R3 Sinais necessários Control circuit w Clock Done R 1 out 2 in 3

13 Diagrama de estados , ¤ D R 3 1 = Done w C 2 B A No transfer Reset out
in Done , w C 2 B A No transfer Reset

14 Tabela de estados Present Next state Outputs state A B C 1 D w = 0
C 1 D w = 0 w = 1

15 Tabela de estados assinalados

16 Derivação da expressão do próximo estado

17 Circuito seqüencial correspondente

18 Problemas de assinalamento de estados
Suponha que, no primeiro exemplo, ao assinalar valores para os estados presentes, tenhamos escolhido conforma a tabela abaixo: Present Next state state w = 1 Output y 2 Y z A 00 01 B 11 C 10 dd d Y1 = D1 = w Y2 = D2 = w y1 z = y2

19 Circuito com a melhoria no assinalamento
D Q Y 2 1 w Clock z y Resetn

20 Tabela de estados com melhoria de assnalamento – exemplo 2

21 Derivação da expressão do próximo estado
y y 2 1 w 00 01 11 10 1 Y = wy + y y 1 2 1 2 1 1 1 y y 2 1 w 00 01 11 10 1 1 Y = y 2 1 1 1 1

22 Exemplo 3 – One hot encoding
Podemos também ter tantas variáveis quantos forem os estados. Supor um circuito one hot enconding, representado pela tabela abaixo: Present Nextstate state w = 1 Output y 3 2 Y z A 001 010 B 100 C

23 Assinalamento de estados - One-hot encoding

24 Máquina de Mealy Clock cycle: t w : z
Nos exemplos anteriores, os circuitos seqüenciais onde cada estado tem valores dos sinais de saídas associados a eles,são chamadas Máquinas de MOORE. Os circuitos seqüenciais onde os sinais das saídas estão associados tanto aos estados como às entradas são chamadas de Máquina de MEALY Tomando o primeiro exemplo visto anteriormente, que gerava z = 1 quando a ocorrência de w = 1 era detectada em dois períodos consecutivos de clock. Supondo agora que queiramos que z seja 1 no segundo ciclo que w = 1 seja detectado, como exemplifica a tabela abaixo: Clock cycle: t 1 2 3 4 5 6 7 8 9 10 w : z

25 Diagrama de estado No exemplo:
Supondo o estado inicial A  enquanto w = 0 ele permanece neste estado e produz a saída z = 0. Se w = 1 (z = 0 ), na subida do clock, ele passará para o estado B. Uma vez no estado B, se w = 0 (z = 0) , ele passará para o estado A na subida do clock. Se w = 1 produzirá a saída z = 1 e permanecerá neste estado.. A w = z 1 B Reset

26 Tabela de estados Present Next state Output z state w = 1 A B

27 Tabela de estados assinalados
Present Next state Output state w = 1 y Y z A B

28 Implementação da FSM Clock Resetn D Q w z (a) Circuito y t Clock y w z
1 2 3 4 5 6 7 8 9 10 Clock y w z (b) Diagrama de tempo

29 Implementação da FSM incluíndo um atraso na saída
OBS – Mesmo circuito do slide 19

30 Exemplo – troca de conteúdo de registradores
3 out 1 = in Done , w 2 A Reset B C

31 Código VHDL para uma FSM simples
USE ieee.std_logic_1164.all ; ENTITY simple IS PORT ( Clock, Resetn, w : IN STD_LOGIC ; z : OUT STD_LOGIC ) ; END simple ; ARCHITECTURE Behavior OF simple IS TYPE State_type IS (A, B, C) ; SIGNAL y : State_type ; BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN y <= A ; ELSIF (Clock'EVENT AND Clock = '1') THEN con’t ...

32 Código VHDL para uma FSM simples - continuação
CASE y IS WHEN A => IF w = '0' THEN y <= A ; ELSE y <= B ; END IF ; WHEN B => y <= C ; WHEN C => END CASE ; END PROCESS ; z <= '1' WHEN y = C ELSE '0' ; END Behavior ;

33 Alternativa de estilo para um código de uma FSM
(ENTITY declaration not shown) ARCHITECTURE Behavior OF simple IS TYPE State_type IS (A, B, C) ; SIGNAL y_present, y_next : State_type ; BEGIN PROCESS ( w, y_present ) CASE y_present IS WHEN A => IF w = '0' THEN y_next <= A ; ELSE y_next <= B ; END IF ; WHEN B => y_next <= C ;

34 Alternativa de estilo para um código de uma FSM - continuação
WHEN C => IF w = '0' THEN y_next <= A ; ELSE y_next <= C ; END IF ; END CASE ; END PROCESS ; PROCESS (Clock, Resetn) BEGIN IF Resetn = '0' THEN y_present <= A ; ELSIF (Clock'EVENT AND Clock = '1') THEN y_present <= y_next ; z <= '1' WHEN y_present = C ELSE '0' ; END Behavior ;

35 Uso de definição de ATTRIBUTE para assinalamento manual de estados
(ENTITY declaration not shown) ARCHITECTURE Behavior OF simple IS TYPE State_TYPE IS (A, B, C) ; ATTRIBUTE ENUM_ENCODING : STRING ; ATTRIBUTE ENUM_ENCODING OF State_type : TYPE IS " " ; SIGNAL y_present, y_next : State_type ; BEGIN con’t ...

36 Uso de constantes para assinalamento manual de estados
LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY simple IS PORT ( Clock, Resetn, w : IN STD_LOGIC ; z : OUT STD_LOGIC ) ; END simple ; ARCHITECTURE Behavior OF simple IS SIGNAL y_present, y_next : STD_LOGIC_VECTOR(1 DOWNTO 0); CONSTANT A : STD_LOGIC_VECTOR(1 DOWNTO 0) := "00" ; CONSTANT B : STD_LOGIC_VECTOR(1 DOWNTO 0) := "01" ; CONSTANT C : STD_LOGIC_VECTOR(1 DOWNTO 0) := "11" ; BEGIN PROCESS ( w, y_present ) CASE y_present IS WHEN A => IF w = '0' THEN y_next <= A ; ELSE y_next <= B ; END IF ; … con’t

37 Uso de constantes para assinalamento manual de estados
WHEN B => IF w = '0' THEN y_next <= A ; ELSE y_next <= C ; END IF ; WHEN C => WHEN OTHERS => y_next <= A ; END CASE ; END PROCESS ; PROCESS ( Clock, Resetn ) BEGIN IF Resetn = '0' THEN y_present <= A ; ELSIF (Clock'EVENT AND Clock = '1') THEN y_present <= y_next ; z <= '1' WHEN y_present = C ELSE '0' ; END Behavior ;

38 Código VHDL máquina de Mealy
LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mealy IS PORT ( Clock, Resetn, w : IN STD_LOGIC ; z : OUT STD_LOGIC ) ; END mealy ; ARCHITECTURE Behavior OF mealy IS TYPE State_type IS (A, B) ; SIGNAL y : State_type ; BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN y <= A ; ELSIF (Clock'EVENT AND Clock = '1') THEN CASE y IS WHEN A => IF w = '0' THEN y <= A ; ELSE y <= B ; END IF ; … con’t

39 Código VHDL máquina de Mealy - continuação
WHEN B => IF w = '0' THEN y <= A ; ELSE y <= B ; END IF ; END CASE ; END PROCESS ; PROCESS ( y, w ) BEGIN CASE y IS WHEN A => z <= '0' ; z <= w ; END Behavior ;

40 Exemplo – somador serial
Sum A B + = Shift register Adder FSM a b s Clock

41 Somador serial – diagrama de estados - Mealy

42 Somador serial – Tabela de estados - Mealy
Present Next state Output s state ab =00 01 10 11 00 G H 1

43 Somador serial – Tabela de estados assinalados - Mealy
Present Next state Output state ab =00 01 10 11 00 y Y s 1 carry out Y = a b + a y + b y s = a b y Full adder soma

44 Somador serial – Mealy FSM
Full adder a b s D Q carry-out Clock Reset Y y

45 Somador serial – diagrama de estados - Moore
H 1 s = Reset 01 10 11 G 00

46 Somador serial – tabela de estados - Moore
Present Nextstate Output state ab =00 01 10 11 s G 1 H

47 Somador serial – tabela de estados assinalados - Moore
Present Nextstate state ab =00 01 10 11 Output y 2 1 Y s 00 soma Y1 = a b y2 Y2 = a b + a y2 + b y2 s = y1 Full adder carry out

48 Somador serial –Moore FSM
Full adder a b D Q Carry-out Clock Reset s Y 2 1 Sum bit y

49 Código de um shift register left-to-right com enable
LIBRARY ieee ; USE ieee.std_logic_1164.all ; -- left-to-right shift register with parallel load and enable ENTITY shiftrne IS GENERIC ( N : INTEGER := 4 ) ; PORT ( R : IN STD_LOGIC_VECTOR(N-1 DOWNTO 0) ; L, E, w : IN STD_LOGIC ; Clock : IN STD_LOGIC ; Q : BUFFER STD_LOGIC_VECTOR(N-1 DOWNTO 0) ) ; END shiftrne ; ARCHITECTURE Behavior OF shiftrne IS BEGIN PROCESS … con’t

50 Código de um shift register left-to-right com enable - continuação
WAIT UNTIL Clock'EVENT AND Clock = '1' ; IF E = '1' THEN IF L = '1' THEN Q <= R ; ELSE Genbits: FOR i IN 0 TO N-2 LOOP Q(i) <= Q(i+1) ; END LOOP ; Q(N-1) <= w ; END IF ; END PROCESS ; END Behavior ;

51 Código VHDL – somador serial
LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY serial IS GENERIC ( length : INTEGER := 8 ) ; PORT ( Clock : IN STD_LOGIC ; Reset : IN STD_LOGIC ; A, B : IN STD_LOGIC_VECTOR(length-1 DOWNTO 0) ; Sum : BUFFER STD_LOGIC_VECTOR(length-1 DOWNTO 0) ); END serial ; ARCHITECTURE Behavior OF serial IS COMPONENT shiftrne GENERIC ( N : INTEGER := 4 ) ; PORT ( R : IN STD_LOGIC_VECTOR(N-1 DOWNTO 0) ; L, E, w : IN STD_LOGIC ; Clock : IN STD_LOGIC ; Q : BUFFER STD_LOGIC_VECTOR(N-1 DOWNTO 0) ) ; END COMPONENT ; SIGNAL QA, QB, Null_in : STD_LOGIC_VECTOR(length-1 DOWNTO 0) ; SIGNAL s, Low, High, Run : STD_LOGIC ; SIGNAL Count : INTEGER RANGE 0 TO length ; TYPE State_type IS (G, H) ; SIGNAL y : State_type ; … con’t

52 Código VHDL – somador serial - continuação
BEGIN Low <= '0' ; High <= '1' ; ShiftA: shiftrne GENERIC MAP (N => length) PORT MAP ( A, Reset, High, Low, Clock, QA ) ; ShiftB: shiftrne GENERIC MAP (N => length) PORT MAP ( B, Reset, High, Low, Clock, QB ) ; AdderFSM: PROCESS ( Reset, Clock ) IF Reset = '1' THEN y <= G ; ELSIF Clock'EVENT AND Clock = '1' THEN CASE y IS WHEN G => IF QA(0) = '1' AND QB(0) = '1' THEN y <= H ; ELSE y <= G ; END IF ; WHEN H => IF QA(0) = '0' AND QB(0) = '0' THEN y <= G ; ELSE y <= H ; END CASE ; END PROCESS AdderFSM ; … con’t

53 Código VHDL – somador serial - continuação
WITH y SELECT s <= QA(0) XOR QB(0) WHEN G, NOT ( QA(0) XOR QB(0) ) WHEN H ; Null_in <= (OTHERS => '0') ; ShiftSum: shiftrne GENERIC MAP ( N => length ) PORT MAP ( Null_in, Reset, Run, s, Clock, Sum ) ; Stop: PROCESS BEGIN WAIT UNTIL (Clock'EVENT AND Clock = '1') ; IF Reset = '1' THEN Count <= length ; ELSIF Run = '1' THEN Count <= Count -1 ; END IF ; END PROCESS ; Run <= '0' WHEN Count = 0 ELSE '1' ; -- stops counter and ShiftSum END Behavior ;

54 Minimização de estados
Definição 1 – Sejam 2 estados Si e Sj. Eles são ditos equivalentes se somente se para todas as possíveis seqüências de entradas, a mesma seqüência de saída é produzida, independente de qual estado (Si ou Sj) seja produzido. OBS – É mais fácil mostrar os estados que não são equivalentes. Procedimento de Particionamento

55 Minimização de estados
Tabela de Estados Present Next state Output state w = 1 z A B C D F E G

56 Figure 8.52 Minimized state table for Example 8.5
Next state Present Output state z w = w = 1 A B C 1 B A F 1 C F C F C A Figure Minimized state table for Example 8.5

57 Figure 8.53 Signals for the vending machine
Clock sense N sense D N D (a) Timing diagram N sense N D Q D Q Clock Q Q (b) Circuit that generates N Figure Signals for the vending machine

58 Figure 8.54 State diagram for Example 8.6
DN Reset DN DN S1 DN DN DN D N D S4 1 S2 S3 S7 1 N D N DN S5 1 S6 DN DN N D S8 1 S9 1 Figure State diagram for Example 8.6

59 Figure 8.55 State table for Example 8.6
Next state Present Output state z DN =00 01 10 11 S1 S1 S3 S2 S2 S2 S4 S5 S3 S3 S6 S7 S4 S1 1 S5 S3 1 S6 S6 S8 S9 S7 S1 1 S8 S1 1 S9 S3 1 Figure State table for Example 8.6

60 Figure 8.56 Minimized state table for Example 8.6
Next state Present Output state z DN =00 01 10 11 S1 S1 S3 S2 S2 S2 S4 S5 S3 S3 S2 S4 S4 S1 1 S5 S3 1 Figure Minimized state table for Example 8.6

61 Figure 8.57 Minimized state diagram for Example 8.6
DN S1 N DN S3 D DN N DN D DN S2 S5 1 N D S4 1 Figure Minimized state diagram for Example 8.6

62 Figure 8.58 Mealy-type FSM for Example 8.6
DN S1 N D 1 DN N 1 S3 D N D 1 S2 DN Figure Mealy-type FSM for Example 8.6

63 Figure 8.59 Incompletely specified state table for Example 8.7
Next state Output z Present state w = w = 1 w = w = 1 A B C B D C F E 1 D B G E F C 1 F E D 1 G F Figure Incompletely specified state table for Example 8.7

64 Figure 8.60 State diagram for a counter
w = w = w = w = w = 1 w = 1 w = 1 A/0 B/1 C/2 D/3 w = 1 w = 1 H/7 G/6 F/5 E/4 w = 1 w = 1 w = 1 w = w = w = w = Figure State diagram for a counter

65 Figure 8.61 State table for the counter
Next state Present Output state w = w = 1 A A B B B C 1 C C D 2 D D E 3 E E F 4 F F G 5 G G H 6 H H A 7 Figure State table for the counter

66 Figure 8.62 State-assigned table for the counter
Next state Present Count state w = w = 1 y y y z z z 2 1 2 1 Y Y Y Y Y Y 2 1 2 1 A 000 000 001 000 B 001 001 010 001 C 010 010 011 010 D 011 011 100 011 E 100 100 101 100 F 101 101 110 101 G 110 110 111 110 H 111 111 000 111 Figure State-assigned table for the counter

67 Figure 8.63 Karnaugh maps for D flip-flops for the counter
y y y y 1 1 wy wy 2 00 01 11 10 2 00 01 11 10 00 1 1 00 1 1 01 1 1 01 1 1 11 1 1 11 1 1 10 1 1 10 1 1 Y = wy + wy Y = wy + y y + wy y 1 1 1 1 y y 1 wy 2 00 01 11 10 00 01 1 1 1 1 11 1 1 1 10 1 Y = wy + y y + y y + w y y y 2 2 2 1 2 1 2 Figure Karnaugh maps for D flip-flops for the counter

68 Diagrama do circuito do contador
Q Clock y w 1 2 Y Resetn Diagrama do circuito do contador

69 Figure 8.65 Excitation table for the counter with JK flip-flops
Flip-flop inputs Present Count state w = w = 1 y y y z z z 2 1 2 1 Y Y Y J K J K J K Y Y Y J K J K J K 2 1 2 2 1 1 2 1 2 2 1 1 A 000 000 0d 0d 0d 001 0d 0d 1d 000 B 001 001 0d 0d d0 010 0d 1d d1 001 C 010 010 0d d0 0d 011 0d d0 1d 010 D 011 011 0d d0 d0 100 1d d1 d1 011 E 100 100 d0 0d 0d 101 d0 0d 1d 100 F 101 101 d0 0d d0 110 d0 1d d1 101 G 110 110 d0 d0 0d 111 d0 d0 1d 110 H 111 111 d0 d0 d0 000 d1 d1 d1 111 Figure Excitation table for the counter with JK flip-flops

70 Mapa Karnaugh - contador
00 01 11 10 d 1 y wy 2 J w = K

71 Diagrama do circuito usando flip-flop JK

72 Figure 8.68 Factored-form implementation of the counter

73 Figure 8.69 State table for the counterlike example
Present Next Output state state z z z 2 1 A B 000 B C 100 C D 010 D E 110 E F 001 F G 101 G H 011 H A 111 Figure State table for the counterlike example

74 Figure 8.70 State-assigned table
Present Next Output state state y y y Y Y Y z z z 2 1 2 1 2 1 000 1 00 00 100 10 1 00 010 1 10 10 110 01 1 10 001 1 01 01 101 11 1 01 011 1 11 11 111 00 1 11 Figure State-assigned table

75 Figure 8.71 Circuit for the counterlike example
D Q z 2 Q D Q z 1 Q D Q z w Q Figure Circuit for the counterlike example

76 Figure 8.72 State diagram for the arbiter
Reset 000 Idle 0xx 1xx gnt1 g = 1 1 x0x 1xx 01x gnt2 g = 1 2 xx0 x1x 001 gnt3 g = 1 3 xx1 Figure State diagram for the arbiter

77 Figure 8.73 Alternative style of state diagram for the arbiter
Reset 1 2 3 Idle r r 1 1 gnt1 g = 1 1 r r r r 2 1 1 2 gnt2 g = 1 2 r r 2 r r r 3 1 2 3 gnt3 g = 1 3 r 3 Figure Alternative style of state diagram for the arbiter

78 Figure 8.74a VHDL code for the arbiter
LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY arbiter IS PORT ( Clock, Resetn : IN STD_LOGIC ; r : IN STD_LOGIC_VECTOR(1 TO 3) ; g : OUT STD_LOGIC_VECTOR(1 TO 3) ) ; END arbiter ; ARCHITECTURE Behavior OF arbiter IS TYPE State_type IS (Idle, gnt1, gnt2, gnt3) ; SIGNAL y : State_type ; BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN y <= Idle ; ELSIF (Clock'EVENT AND Clock = '1') THEN CASE y IS WHEN Idle => IF r(1) = '1' THEN y <= gnt1 ; ELSIF r(2) = '1' THEN y <= gnt2 ; ELSIF r(3) = '1' THEN y <= gnt3 ; ELSE y <= Idle ; END IF ; … con’t Figure 8.74a VHDL code for the arbiter

79 Figure 8.74b VHDL code for the arbiter (con’t)
WHEN gnt1 => IF r(1) = '1' THEN y <= gnt1 ; ELSE y <= Idle ; END IF ; WHEN gnt2 => IF r(2) = '1' THEN y <= gnt2 ; WHEN gnt3 => IF r(3) = '1' THEN y <= gnt3 ; END CASE ; END PROCESS ; g(1) <= '1' WHEN y = gnt1 ELSE '0' ; g(2) <= '1' WHEN y = gnt2 ELSE '0' ; g(3) <= '1' WHEN y = gnt3 ELSE '0' ; END Behavior ; Figure 8.74b VHDL code for the arbiter (con’t)

80 Figure 8.75 Incorrect VHDL code for the grant signals
PROCESS( y ) BEGIN IF y = gnt1 THEN g(1) <= '1' ; ELSIF y = gnt2 THEN g(2) <= '1' ; ELSIF y = gnt3 THEN g(3) <= '1' ; END IF ; END PROCESS ; END Behavior ; Figure Incorrect VHDL code for the grant signals

81 Figure 8.76 Correct VHDL code for the grant signals
PROCESS( y ) BEGIN g(1) <= '0' ; g(2) <= '0' ; g(3) <= '0' ; IF y = gnt1 THEN g(1) <= '1' ; ELSIF y = gnt2 THEN g(2) <= '1' ; ELSIF y = gnt3 THEN g(3) <= '1' ; END IF ; END PROCESS ; END Behavior ; Figure Correct VHDL code for the grant signals

82 Figure 8.77 Simulation results for the arbiter circuit

83 Figure 8.78 Output delays in the arbiter circuit
a) Output delays using binary encoding b) Output delays using one-hot encoding Figure Output delays in the arbiter circuit

84 Figure 8.80 Circuit for Example 8.8

85 Figure 8.81 Tables for the circuit in Example 8.8
Next State Present Output state w = w = 1 Next state Present Output y y z 2 1 state z Y Y Y Y w = w = 1 2 1 2 1 01 A A B 1 10 B A C 1 11 C A D 1 1 11 1 D A D 1 (a)State-assigned table (b)State table Figure Tables for the circuit in Example 8.8

86 Figure 8.82 Circuit for Example 8.9
J y 1 1 w J Q z K Q K 1 J y 2 2 J Q Clock K Q K 2 Resetn Figure Circuit for Example 8.9

87 Figure 8.83 Excitation table
Flip-flop inputs Present Output state w = w = 1 y y z 2 1 J K J K J K J K 2 2 1 1 2 2 1 1 00 01 1 1 1 01 01 1 1 1 1 10 01 1 1 11 01 1 1 1 1 Figure Excitation table

88 Figure 8.84 Circuit for Example 8.10

89 Figure 8.85 Excitation table
Flip-flop inputs Present Output state w = w = 1 y y z 2 1 T D T D 2 1 2 1 01 1 10 1 1 01 1 1 1 01 1 Figure Excitation table

90 Figure 8.86 Elements used in ASM charts
State name Output signals 0 (False) 1 (True) Condition or actions expression (Moore type) (a) State box (b) Decision box Conditional outputs or actions (Mealy type) (c) Conditional output box Figure Elements used in ASM charts

91 Please see “portrait orientation” PowerPoint file for Chapter 8
Figure ASM chart for a simple FSM

92 Figure 8.88 ASM chart for the FSM in Figure 8.23

93 Figure 8.89 ASM chart for the arbiter
Reset Idle 1 r 1 gnt1 1 g 1 r 1 1 r 2 gnt2 1 g 2 r 2 1 r 3 gnt3 1 g 3 r 3 Figure ASM chart for the arbiter

94 Figure 8.90 The general model for a sequential circuit
w z 1 1 Inputs Outputs w Combinational z n m circuit y k Y k Present-state Next-state variables variables y 1 Y 1 Figure The general model for a sequential circuit

95 Figure P8.1 State-assigned table for problems 8.1 and 8.2
Present Next state Output state w = w = 1 y y z 2 1 Y Y Y Y 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Figure P State-assigned table for problems 8.1 and 8.2

96 Figure P8.2 Circuit for problem 8.29


Carregar ppt "Circuitos Lógicos e Organização de Computadores Capítulo 8 –Circuitos Seqüenciais Síncronos Ricardo Pannain pannain@puc-campinas.edu.br http://docentes.puc-campinas.edu.br/ceatec/pannain/"

Apresentações semelhantes


Anúncios Google