1、1 1 Determine the excitation equations(F).Substitute the excitation equations into the flip-flop characteristic equations to obtain transition equations.Determine the output equations(G).Use the transition equations and output equations to construct a transition/output table.Name the states,and obta
2、in a state/output table.(optional)Draw a state diagram and timing diagram.(optional)Describe the logic function.Di=?Ji=?Ki=?Qi*=?注意区别注意区别MealyMealy机机/Moore/Moore机机 Ti=?The detailed steps for analyzing state machine:可与同时完成可与同时完成.2 2 Construct a state/output table State minimization(状态最小化)(状态最小化)State
3、 assignment(状态赋值)(状态赋值)Construct a transition/output table Choose a flip-flop type(确定特征方程)(确定特征方程)Construct an excitation table Derive excitation equations Derive output equations Draw a logic diagram7.4 7.4 Clocked Synchronous State-Machine DesignClocked Synchronous State-Machine DesignReverse of t
4、he analysis Basic steps:逻辑抽象逻辑抽象(由当前状态、未来状由当前状态、未来状态推导激励信号取值态推导激励信号取值)组合逻辑设计组合逻辑设计(当前状态和输入的函数当前状态和输入的函数)3 3Example 1.Example 1.design a sequence detector:if the sequence design a sequence detector:if the sequence of input is 11111,then the output is 1,else 0.of input is 11111,then the output is 1,el
5、se 0.(如果如果5 5个连续输入都为个连续输入都为1 1,则输出为,则输出为1)1)input-A A,output-Z Z(1)Construct a state/output tableSA0 1S*ZInitial stateGot 0Got 1Got 11Got 111Got 1111Got 11111S0S0S0S0S0S0S0S1S1S2S3S4S5S50000001INIS0S1S2S3S4S5MooreMoore machinemachine4 4S0S0S0S0S0S0S0S1S1S2S3S4S5S50000001INIS0S1S2S3S4S5(2)State minim
6、ization Find equivalent state(等效状态)(等效状态)Two states produce the same output;Two states have the same or equivalent next state.S0S0S0S0S0S0S1S2S3S4S5S5000001S0S1S2S3S4S5SA0 1S*Z(3)State assignment(6(6种状态,至少需种状态,至少需3 3位状态变量位状态变量)0 0 00 0 10 1 00 1 11 0 01 0 1(4)Construct a transition/output tableQ2Q1Q
7、05 5(5)Choose D flip-flopcharacteristic equation:Q*=DQ2Q1Q0A0 1Z0000000010 0 00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*transition/output table(2)State minimization Find equivalent state(等效状态)(等效状态)Two states produce the same output;Two states have the same or equivalent nex
8、t state.(3)State assignment(6(6种状态,至少需种状态,至少需3 3位状态变量位状态变量)(4)Construct a transition/output table(6)Construct an excitation table6 6Q2Q1Q0A0 1Z0000000010 0 00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*transition/output tableexcitation tableD2D1D0(5)Choose D flip-flopcharacteri
9、stic equation:Q*=D(6)Construct an excitation table(2)State minimization Find equivalent state(等效状态)(等效状态)Two states produce the same output;Two states have the same or equivalent next state.(3)State assignment(6(6种状态,至少需种状态,至少需3 3位状态变量位状态变量)(4)Construct a transition/output table(对于对于D D触发器,激励表与转移表内容
10、相同触发器,激励表与转移表内容相同)7 7Q2Q1Q0A0 1Z0000000010 0 00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*transition/output tableexcitation tableD2D1D0=Q2A+Q1Q0AQ1Q0AQ200 01 11 1000011110dddd111(7)Derive excitation equationscurrent state,input excitation equationsD28 8Q2Q1Q0A0 1Z0000000010 0
11、00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*transition/output tableexcitation tableD2D1D0Q1Q0AQ200 01 11 1000011110dddd111(7)Derive excitation equationsA Q2Q1Q0Z0 0 0 0D2 D1 D00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01
12、1 1 10 0 0 0 0 0 0 0 00 0 00 0 00 0 0d d dd d d 0 0 1 0 1 00 1 1 1 0 0 1 0 1 1 0 1 d d d d d d 00000 1dd000001dd也可借助于真值表进行推导也可借助于真值表进行推导current state,input excitation equations=Q2A+Q1Q0AD29 9Q1Q0AQ200 01 11 10000111101D1=Q1Q0A+Q2Q1Q0Adddd1Q1Q0AQ200 01 11 10000111101D0=Q0A+Q2Adddd111(8)Derive output
13、equationscurrent state,input output equationsQ1Q0AQ200 01 11 1000011110Z=Q2Q0d11ddd(9)Draw a logic diagram(omitted)(7)Derive excitation equationscurrent state,input excitation equations1010Change to Using MealyChange to Using Mealy modelmodelS0,0S0,0S0,0S0,0S0,0S1,0S2,0S3,0S4,0S4,1S0S1S2S3S4SA0 1S*,
14、ZMealy machinethe output has to do with the input.少了一个少了一个状态状态S5 一般说来,实现相同的功能,Mealy机比Moore机所需状态数可能要少。在状态在状态S4,再,再输入一个输入一个1,输出输出Z就为就为1。11 11Synthesis using J-KSynthesis using J-K flip-flopsflip-flops (Moore model)(Moore model)(1)-(4)omitted(同前,假设已得到转移/输出表)(5)Choose J-K flip-flopcharacteristic equatio
15、n:Q*=JQ+K QQ2Q1Q0A0 1Z0 0 00000010 0 00 0 10 1 00 1 11 0 01 0 10 0 10 0 00 1 00 0 00 1 10 0 00 0 01 0 01 0 10 0 0 1 0 1Q2*Q1*Q0*transition/output table由转移表推导激励表,由转移表推导激励表,需借助应用表需借助应用表.application tableQ Q*0 00 11 01 1J K0 d1 dd 1d 01212Q2Q1Q0A0 1Z0 0 00000010 0 00 0 10 1 00 1 11 0 01 0 10 0 10 0 00
16、1 00 0 00 1 10 0 00 0 01 0 01 0 10 0 0 1 0 1Q2*Q1*Q0*transition/output tableapplication tableQ Q*0 00 11 01 1J K0 d1 dd 1d 0d0,0d,d00d,0d,0d 0d,0d,1d0d,0d,d1 0d,1d,d10d,d1,0d 0d,d0,1d0d,d1,d1 1d,d1,d1d1,0d,0d d0,0d,1dd1,0d,d1J2K2,J1K1,J0K00d,0d,0d0d,0d,d10d,d1,0d0d,d1,d1d1,0d,0dd1,0d,d1 d0,0d,d00d,0
17、d,1d0d,1d,d10d,d0,1d1d,d1,d1d0,0d,1dQ2Q1Q0A0 1Z0000010 0 00 0 10 1 00 1 11 0 01 0 1J2K2,J1K1,J0K0excitation table(6)Construct an excitation tableSynthesis using J-KSynthesis using J-K flip-flopsflip-flops (Moore model)(Moore model)13130d,0d,0d0d,0d,d10d,d1,0d0d,d1,d1d1,0d,0dd1,0d,d1 d0,0d,d00d,0d,1d
18、0d,1d,d10d,d0,1d1d,d1,d1d0,0d,1dQ2Q1Q0A0 1Z0000010 0 00 0 10 1 00 1 11 0 01 0 1J2K2,J1K1,J0K0excitation table(7)Derive excitation equationsJ2=AQ1Q0Q1Q0AQ200 01 11 100001111001dddddd0000dd00K2=J1,K1,J0,K0(6)Construct an excitation tableSynthesis using J-KSynthesis using J-K flip-flopsflip-flops (Moor
19、e model)(Moore model)1414(7)Derive excitation equations(6)Construct an excitation tableJ2=AQ1Q0K2=AJ1=AQ2Q0K1=A+Q0J0=AK0=A+Q2Z=Q2Q0(8)Derive output equations(9)Draw a logic diagram(omitted)Moore机,只与状态有关机,只与状态有关Synthesis using J-KSynthesis using J-K flip-flopsflip-flops (Moore model)(Moore model)1515
20、 The above method to derive excitation equations is:The second method to derive excitation equations is:(Construct it directly using the transition equations and characteristic equation.)application tableexcitation tableexcitation equationtransition tableKarnaugh mapSynthesis using J-KSynthesis usin
21、g J-K flip-flopsflip-flops (Moore model)(Moore model)transition equationexcitation equationtransition tablecharacteristic equation1616Q2Q1Q0A0 1Z0000000010 0 00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*transition/output table The second method to derive excitation equations2)
22、Rewrite the transition equations as the form of characteristic equation,and derive the excitation equations.1)Construct transition equations according to the transition tableQ2*=Q2A+(Q2+Q2)Q1Q0A=Q1Q0AQ2+AQ2Q1*=Q2Q0AQ1+Q0AQ1Q0*=AQ0+Q2AQ0J2=Q1Q0A K2=AJ1=Q2Q0A K1=Q0+AJ0=A K0=Q2+AQ2*=Q2A+Q1Q0AQ1*=Q1Q0A+
23、Q2Q1Q0AQ0*=Q0A+Q2ASynthesis using J-KSynthesis using J-K flip-flopsflip-flops (Moore model)(Moore model)1717Disposition of unused statesDisposition of unused states Minimal costThe next-state entries of the unused states can be marked as“dont-cares”(include the output).maybe simplify the excitation/
24、output logic.Shortcoming:If the machine enters an unused state,its behavior may be weird.More worse,it may be cycle in the unused states,and cause“sysage”(死机死机).Minimal risk auto-startup designAssign the next-state of the unused state to be an“safe”state.(some used state,such as initial state)1818 I
25、n example 1,there are two unused states:110 and 111.we can definitely assign the next-states and the output of them.transition/output tableQ2Q1Q0A0 1Z0000000010 0 00 0 10 1 00 1 11 0 01 0 1001000010000011000000100101000101Q2*Q1*Q0*00001 1 000100001 1 1001未用状态S0S1D2D1D0excitation tableD2=Q2Q1A+Q2Q1Q0
26、AQ1Q0AQ200 01 11 1000011110111Derive the excitation equation:Disposition of unused statesDisposition of unused states Minimal risk auto-startup design1919Q1Q0AQ200 01 11 1000011110111D1=Q2Q1Q0A+Q2Q1Q0AD0=Q0A+Q2AZ=Q2Q1Q0Output equation:Derive the excitation equation:In example 1,there are two unused states:110 and 111.we can definitely assign the next-states and the output of them.Disposition of unused statesDisposition of unused states Minimal risk auto-startup designD2=Q2Q1A+Q2Q1Q0A2020第四次作业7.46用用J-K触发器重做触发器重做7.46
侵权处理QQ:3464097650--上传资料QQ:3464097650
【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。