Upload
alice-shelton
View
249
Download
3
Tags:
Embed Size (px)
Citation preview
CHAPTER 6CHAPTER 6Sequential Circuits’ AnalysisSequential Circuits’ Analysis
Sichuan University Software College
Synchronous Sequential Synchronous Sequential Circuit AnalysisCircuit Analysis
Analysis PinciplesAnalysis Pinciples 1. Determine the system variables: input, state, and output.1. Determine the system variables: input, state, and output. 2. Determine the flip-flop type. Write the characteristic 2. Determine the flip-flop type. Write the characteristic
equations. equations. 3. write the excitation equations.3. write the excitation equations. 4. write the next state equations.4. write the next state equations. 5. Write the output variable equations.5. Write the output variable equations. 6. Construct a transition table.6. Construct a transition table. 7. Assign symbols to the states and construct a table or 7. Assign symbols to the states and construct a table or
state diagram. state diagram. 8. When possible, construct a timing diagram.8. When possible, construct a timing diagram. 9. Functionality analysis9. Functionality analysis
Analysis ExamplesAnalysis Examples
E.g.1: Analysis the E.g.1: Analysis the following synchronous following synchronous sequential circuit, sequential circuit, suppose the present suppose the present state is 00, the input state is 00, the input sequence is sequence is 0000011111, give the 0000011111, give the timing diagram.timing diagram.
1K 1J 1J1K
FF1 FF0&=1
Z
Y1' Y0'Y1 Y0
CP “ 1”
X
1. Determine the system variables: input, state, and output.1. Determine the system variables: input, state, and output.
input=xinput=x
output=Zoutput=Z
state variables=ystate variables=y11 and y and y00
2. Determine the flip-flop type. Write the characteristic eq2. Determine the flip-flop type. Write the characteristic equations.uations.
yyn+1n+1=Jy=Jynn’+k’y’+k’ynn
3. write the excitation equations.3. write the excitation equations.
KK00=J=J00=1=1
KK11=J=J11=x y⊕=x y⊕ 00
Analysis ExamplesAnalysis Examples
4. write the next state equations.4. write the next state equations.
yy11n+1n+1=J=J11yy11’+k’y’+k’y1 1 yy11
n+1n+1=x’y=x’y11’y’y0 0 +x’y+x’y11yy00’+xy’+xy11’y’y00’+xy’+xy11yy00
yy00n+1n+1=J=J00yy00’+k’+k00’y’y0 0 yy00
n+1n+1=y=y00’’
5. Write the output variable equations.5. Write the output variable equations.
Z=(xyZ=(xy11’)’=x’+y’)’=x’+y11
6. Construct a transition table.6. Construct a transition table.
Analysis ExamplesAnalysis Examples
Analysis ExamplesAnalysis ExamplesX
Y1 Y0 0 1
00
01
02
03
0 1
1
0
1
0
1
0
XY1 Y0 0 1
00
01
02
03
1 1
0
0
1
0
0
1
XY1 Y0 0 1
00
01
02
03
1 0
1
1
1
0
1
1
Next state x/z
X=0 X=1
Y0+ Y1+ / Z Y0+ Y1+ /Z
Present state
Y0 Y1
00
01
11
10
01/1
10/1
00/1
11/1
11/0
00/0
10/1
01/1
Y1n+1 K-Map Z K-MapY0
n+1 K-Map
transition tabletransition table
yy11n+1n+1= x’y= x’y11’y’y0 0 +x’y+x’y11yy00’ ’
+xy+xy11’y’y00’+xy’+xy11yy00
yy00n+1n+1=y=y00’’
Z=(xyZ=(xy11’)’=x’+y’)’=x’+y11
注:02 = 1103 = 10
注:表中应为 Y1 Y0
7. Assign symbols to the states and construct a 7. Assign symbols to the states and construct a table or state diagram.table or state diagram.
Analysis ExamplesAnalysis Examples
Next state x/z
X=0 X=1
Y0+ Y1+ / Z Y0+ Y1+ /Z
Present state
Y0 Y1
Q1
Q2
Q3
Q4
Q2/1
Q3/1
Q4/1
Q1/1
Q4/0
Q1/0
Q2/1
Q3/1
Q1 Q2
Q3Q4
0/1
1/0
0/11/1
0/1
1/1
1/00/1
8. construct a timing diagram.8. construct a timing diagram.
Analysis ExamplesAnalysis Examples
1 2 3 4 5 6 7 8 9 10
Cp
X
Y0
Y1
Z
0 0 0 0 0 1 1 1 1 1
Analysis ExamplesAnalysis Examples E.g.2: Analysis the following circuitE.g.2: Analysis the following circuit
Q4 Q1Q2Q3
Q4' Q1
'
D DDDCK CKCKCK
QQQQ Q Q
CLK
&
1. Determine the system variables: input, state, and output.1. Determine the system variables: input, state, and output.
state variables: Qstate variables: Q11,Q,Q22,Q,Q33, and Q, and Q44
2. Determine the flip-flop type. Write the characteristic 2. Determine the flip-flop type. Write the characteristic equations. equations.
QQn+1n+1=D=D 3. excitation equations.3. excitation equations.
DD44=Q=Q33
DD33=Q=Q22
DD22=Q=Q11
DD11=Q=Q44’(Q’(Q33QQ11’)’=Q’)’=Q44’Q’Q33’+Q’+Q44’Q’Q11
Analysis ExamplesAnalysis Examples
4. the next state equations.4. the next state equations.
QQ44n+1n+1=Q=Q33
QQ33n+1n+1=Q=Q22
QQ22n+1n+1=Q=Q11
QQ11n+1n+1=Q=Q44’Q’Q33’+Q’+Q44’Q’Q11
Analysis ExamplesAnalysis Examples
5. Construct a transition table.5. Construct a transition table.
Analysis ExamplesAnalysis Examples
Q4 Q3 Q2 Q1 Q4n+1
Q3n+1 Q2
n+1 Q1n+1
0 0 0 0
0 0 1 00 0 1 10 1 0 0
0 0 0 1
1 1 0 11 1 0 01 0 1 11 0 1 01 0 0 11 0 0 00 1 1 10 1 1 00 1 0 1
1 1 1 01 1 1 1
0 0 0 1
0 1 0 10 1 1 11 0 0 0
0 0 1 1
1 0 1 01 0 0 00 1 1 00 1 0 00 0 1 00 0 0 01 1 1 11 1 0 01 0 1 1
1 1 0 01 1 1 0
Analysis ExamplesAnalysis Examples
6. Assign symbols to the states and construct a table or state 6. Assign symbols to the states and construct a table or state diagram.diagram.
Q4 Q3 Q2 Q1
Q4n+1Q3
n+1Q2n+1Q1
n+1
S0 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15
S1 S3 S5 S7 S8 S11 S12 S15 S0 S2 S4 S6 S8 S10 S12 S14
S0
S2
S5
S13
S10
S4
S11
S6
S8
S12
S14
S15
S7
S3
S1
S9
Analysis ExamplesAnalysis Examples
E.g.3: Find the E.g.3: Find the transition table and the transition table and the state table for the Mealy state table for the Mealy sequential circuit below.sequential circuit below.
Z
1. Determine the system variables: input, state, and output.1. Determine the system variables: input, state, and output.input: xinput: x11,x,x22
output: Zoutput: Z
state variable: Dstate variable: Daa , D , Dbb ,D ,Dcc 2. Determine the flip-flop type. Write the characteristic eq2. Determine the flip-flop type. Write the characteristic eq
uations.uations.QQn+1n+1=D=D
3. Excitation equations and output equations.3. Excitation equations and output equations.DDaa=Q=Qaa X⊕X⊕ 22
DDbb=Q=Qbb X⊕X⊕ 11
DDcc=X=X11XX22QQcc’Q’Qaa
Z=XZ=X11XX22QQcc’Q’Qaa
Analysis ExamplesAnalysis Examples
Analysis ExamplesAnalysis Examples
4. write the next state 4. write the next state equations.equations.
QQaan+1n+1=Q=QaaXX22’+Q’+Qaa’X’X22
QQbbn+1n+1=Q=QbbXX11’+Q’+Qbb’X’X11
QQccn+1n+1=X=X11XX22QQcc’Q’Qaa
5. Construct a transition 5. Construct a transition table.table.
QaQbQc
Qa+ Qb+ Qc+/Z
X=00 X=01 X=10 X=11000
010
001
111110101
100
011
110/0110/0100/0
100/0
010/0
010/0
000/0000/0
010/0010/0000/0
000/0
110/0
110/0
100/0100/0
100/0100/0110/0
110/0
000/0
000/0
010/0010/0
000/0001/1010/0
011/1
100/0
100/0
110/0110/0
Analysis ExamplesAnalysis Examples
6. Assign symbols to the states and construct a 6. Assign symbols to the states and construct a state tablestate table
QaQbQc
Qa+ Qb+ Qc+/Z
X=00 X=01 X=10 X=11A
C
B
HGF
E
D
G/0G/0E/0
E/0
C/0
C/0
A/0A/0
C/0C/0A/0
A/0
G/0
G/0
E/0E/0
E/0E/0G/0
G/0
A/0
A/0
C/0C/0
A/0B/1C/0
D/1
E/0
E/0
G/0G/0
6.4 Construction of State Diagrams6.4 Construction of State Diagrams
Up-Down Decade CounterUp-Down Decade Counter Sequence DetectorsSequence Detectors
Page 263, example6.4Page 263, example6.4 Page266, example6.6Page266, example6.6
Registers and CountersRegisters and Counters
A A nn-bit -bit registerregister is a set of is a set of nn flip-flops that is capable flip-flops that is capable of storing of storing nn bits of binary information. bits of binary information.
With added combinational gates, the register can With added combinational gates, the register can perform data-processing tasks.perform data-processing tasks.
A A countercounter is a register that goes through a is a register that goes through a predeterminedpredetermined sequence of states upon the application sequence of states upon the application of clock pulses.of clock pulses.
Register OverviewRegister Overview
Parallel Load RegisterParallel Load Register Shift RegistersShift Registers
Serial LoadSerial Load Serial AdditionSerial Addition
Shift Register with Parallel LoadShift Register with Parallel Load Bidirectional Shift RegisterBidirectional Shift Register
RegistersRegisters
Example (next slide) generic 4-bit register.Example (next slide) generic 4-bit register. The common The common ClockClock input triggers all flip-flops input triggers all flip-flops
on the rising edge of each pulse, and the on the rising edge of each pulse, and the binary data available at the four D inputs are binary data available at the four D inputs are transferred into the 4-bit register.transferred into the 4-bit register.
Registers with parallel loadRegisters with parallel load
Next page shows a 4-bit register with a control input Next page shows a 4-bit register with a control input LoadLoad that is directed through gates into the D inputs that is directed through gates into the D inputs of the flip-flops.of the flip-flops.
When When LoadLoad is 1, the data on the four inputs is is 1, the data on the four inputs is transferred into the register with the next positive transferred into the register with the next positive transition of a clock pulse. transition of a clock pulse.
When When LoadLoad is 0, the data inputs are blocked, and the is 0, the data inputs are blocked, and the D inputs of the flip-flops are connected to their D inputs of the flip-flops are connected to their outputs.outputs.
Shift registersShift registers
A register capable of shifting its stored bits A register capable of shifting its stored bits laterally in one or both directions is called a laterally in one or both directions is called a shift registershift register..
The logical configuration of a shift register The logical configuration of a shift register consists of a chain of flip-flops in cascade, consists of a chain of flip-flops in cascade, with the output of one flip-flop connected to with the output of one flip-flop connected to the input of the next FF.the input of the next FF.
Shift RegisterShift Register
Q0 Q1 Q2 Q3
0 1 2 3
Shift registers (cont.)Shift registers (cont.)
The next figure shows how the serial transfer of The next figure shows how the serial transfer of information from register A to register B can be done. information from register A to register B can be done. One clock cycle per bit of data is required. One clock cycle per bit of data is required.
Serial addition using shift registersSerial addition using shift registers
The two binary numbers to be added serially are stored in two The two binary numbers to be added serially are stored in two shift registers. shift registers.
Bits are added one pair at a time through a Bits are added one pair at a time through a singlesingle full-adder full-adder circuit.circuit.
The The carry outcarry out of the full adder is transferred into a D flip- of the full adder is transferred into a D flip-flop. The output of the carry FF is then used as the carry input flop. The output of the carry FF is then used as the carry input for the next pair of bits.for the next pair of bits.
The sum bit on the S output of the full adder is transferred into The sum bit on the S output of the full adder is transferred into the result register A.the result register A.
Serial Serial vsvs. parallel addition. parallel addition
The parallel adder is a combinational circuit, whereas the The parallel adder is a combinational circuit, whereas the serial adder is a sequential circuit.serial adder is a sequential circuit.
The parallel adder has The parallel adder has nn full adders for full adders for nn-bit operands, -bit operands, whereas the serial adder requires only one full adder.whereas the serial adder requires only one full adder.
The serial circuit takes The serial circuit takes nn clock cycles to complete an addition. clock cycles to complete an addition. In summary, the parallel adder in space is n times larger than In summary, the parallel adder in space is n times larger than
the serial adder, but it is the serial adder, but it is nn times faster. times faster. The serial adder, although it is The serial adder, although it is nn times slower, is times slower, is nn times times
smaller in space.smaller in space.(It’s a trade-off!)(It’s a trade-off!)
Shift register with parallel loadShift register with parallel loadShiftShift LoadLoad OperationOperation
00 00 NothingNothing
00 11 Load parallelLoad parallel
11 XX ShiftShift
Bidirectional Shift RegisterBidirectional Shift RegisterSS11SS00 ActionAction
0000 NothingNothing
0101 Shift downShift down
1010 Shift upShift up
1111 Parallel loadParallel load
homeworkhomework
P282: 3-c, 4, 5-(2), 6P282: 3-c, 4, 5-(2), 6 P282: 11P282: 11 P284: 13, to realize the state machine using P284: 13, to realize the state machine using
C program.C program.