数字设计 第八章 时序逻辑设计实践 (3)学习课件_第1页
数字设计 第八章 时序逻辑设计实践 (3)学习课件_第2页
数字设计 第八章 时序逻辑设计实践 (3)学习课件_第3页
数字设计 第八章 时序逻辑设计实践 (3)学习课件_第4页
数字设计 第八章 时序逻辑设计实践 (3)学习课件_第5页
已阅读5页,还剩71页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Chapter8sequentiallogicdesignpractices本章重点:计数器:含触发器构成的计数器及MSI组件计数器,序列发生电路移位寄存器:作为数据移位的基本功能,和构成环形计数器、扭环计数器,序列发生电路,检测电路2/28/20258.1documentationstandardsInlogicblock,inputisontheright,outputisontheleft.inputoutput………………PRCLR……Edge-triggered……CCLKPulse-triggered2/28/2025chapter88.2latchesandflip-flops1.SSIlatchesandflip-flops74×74—dualDf-fs74×109—dualJ-K’f-fs74×375—quadDlatch2.Switchdebouncing

消除机械开关在开、关时产生的触点机械抖动3.Bus-holder

避免三态输出总线上长期无信号而由噪声、干扰等产生较大电流而损坏器件的问题。2/28/2025chapter8Switchdebouncing常用的按键、开关RS触发器为常用的硬件去抖。当机械触点断开、闭合时,电压信号如下图。抖动时间的长短由按键的机械特性决定,一般为5ms~10ms。2/28/2025chapter83.MultibitregistersandlatchesCollectionoftwoormoreDf-fswithacommonclockinput.Cabbeusedtostoredata.2/28/2025chapter88.4countersAnysequentialcircuitwhosestatediagramisasinglecycle.stores(andsometimesdisplays)thenumberoftimesaparticulareventorprocesshasoccurred,ofteninrelationshiptoaclocksignal.Modulus—thenumberofstatesinthecycleS1SjSmS3S2……Modulo-mcounterclock2/28/2025chapter8GeneraltypesofelectroniccountersIncountingsequenceupcounters,whichincrease(increment)invaluedowncounters,whichdecrease(decrement)invalueUp–downcounter–countsbothupanddown,undercommandofacontrolinputIncountercircuitAsynchronous(ripple)counterSynchronouscounterRingcounterJohnsoncounter2/28/2025chapter81、ripplecounters4-bit:CountingtimingdiagramQ0Q1Q2Q3Counteroutput(LSB)(MSB)CLKQ1Q0Q3Q2CLKCLKQQTCLKQQTCLKQQTCLKQQT11112/28/2025chapter84-bitcounter’sfunctionaltableQ3Q2Q1Q0Q3*Q2*Q1*Q0*0000000100010010001000110011010001000101010101100110011101111000Q3Q2Q1Q0Q3*Q2*Q1*Q0*10001001100110101010101110111100110011011101111011101111111100002/28/2025chapter8Issue1:howtomakeadowncounterbyTf-fs?Issue2:howtomaketheripplecounterbyusingDandJ-Kf-fs?Digitalfrequencydivider(divided-by-2n)divide-by-2CLKQ1Q0Q3Q2divide-by-4divide-by-8divide-by-162/28/2025chapter82、SynchronouscountersAllflip-flopschangetheirstatesatthesametriggeringtimeofacommonCLKsignal.Workingfeatures:

CNTENsignalpropagatesserially.transitionequations:

Q0*=EN0·Q0’+EN0’·Q0

Q1*=EN1·Q1’+EN1’·Q1

Q2*=EN2·Q2’+EN2’·Q2

Q3*=EN3·Q3’+EN3’·Q3EN0EN1EN2EN3(LSB)(MSB)synchronousserialcounter2/28/2025chapter8(LSB)(MSB)EN0EN1EN2EN3CNTENsignalcontrolsthef-fssimultaneously;thefastestbinarycounterstructure.判断该计数器是升序的或降序的?写出完整的转移方程、功能表和时序图。作为作业synchronousparallelcounter2/28/2025chapter8binarysynchronouscounterdesignwithDflip-flopsExp1:designa3-bitbinarysynchronousdowncounter,counteroutputQ2(msb),Q1,Q0。thefunctionaltable:Q2Q1Q0Q2*Q1*Q0*0001110010000100010110101000111011001101011111102/28/2025chapter8excitationtableofthecounterQ2Q1Q0Q2*Q1*Q0*D2D1D0J2K2J1K1J0K00001111111d1d1d0010000000d0dd10100010010dd11d0110100100dd0d1100011011d11d1d101100100d00dd1110101101d0d11d111110110d0d0d1excitationequations:D2=Q2Q1+Q2Q0+Q2’Q1’Q0’D1=Q1Q0+Q1’Q0’D0=Q0’……2/28/2025chapter8designsynchronouscounterwithmodulelessthan2nmoduleofthecounterm<2n,thedispositionofunusedstate:minimalriskminimalcost,needtoverifytheunusedstatethatassuresthecircuitcanbereturnedtothenormalExp2:designamodulo-5counter,itcounttheclockticksfrom000to100,synthesisbyDflip-flopinminimalcost.2/28/2025chapter83、MSIcountersandapplicationssynchronous4-bitbinarycounter74×163clearloadingENT=ENP=CLR_L=LD_L=1,countingRCO(ripplecarryoutput):whenQDQCQBQA=1111,andENT=1,RCO=1。hold2/28/2025chapter8workinginfree-runningmode(modulo-16counter)MSBLSB74×163isfullysynchronous,itsoutputschangeonlyontherisingedgeofclock.2/28/2025chapter8using74×163inm<16modecounterExp:modulo-11counter

method1:feedback-clearmode(反馈清零)—countthefirstmbinarynumberfrom0000.key:whencountingtothenumberm(m-1),thecounterreturnto0000.so,needafeedbackcircuitF,andwhenQDQCQBQA=1010,makeCLR_Lasserted.Q0Q1Q2Q3FCLR_L74×163QAQBQCQDCLR2/28/2025chapter8Q3Q2Q1Q0CLR_L0000100011001010011101001010110110101111100011001110100CLR_L=(Q3·Q1)’Q0Q1Q2Q3FCLR_L74×163QAQBQCQDCLR2/28/2025chapter8verifytheunusedstateUnusedstates1011~1111:

10110000110011011110111100010010011010101000………Itcanrunautomatically.CLR_L=(Q3·Q1)’2/28/2025chapter8using74×163inm<16modecounterMethod2:feedback-loadmode(反馈置数)—countthelastmstatesorarbitrarymcontinualstatesbetween0000and1111.key:makeLD_Lassertedwhencountingtotheendingstate,andtheinitialstateisloaded.①iftheendingstateis1111,usetheRCOoutputtoreloadtheinitialstate.Initialstate=endingstate–countingmodulo+1=15-11+1=5Soallthecountingstateis0101~1111.2/28/2025chapter8referencecircuitoffeedback-load2/28/2025chapter8②iftheendingstateisn’t1111,needacombinationalfeedbackcircuittoreloadtheinitialstate.

initialstate=endingstate–modulo+1or,endingstate=initialstate+modulo-1like,knowingtheendingstateis13,sotheinitialstate=13-11+1=3or,knowingtheinitialstateis2,sotheendingstate=2+11-1=12circuitdesign:besimilartofeedback-clearmode,noteditsoutputneedtobeconnectedtothe

LD_Lof74×163.2/28/2025chapter8referencecircuitoffeedback-loadcountingfrom3to13(0011~1101)2/28/2025chapter874×163cascadingapplicationifthecountingmodulo>16,multiple74×163couldbecascaded.key:countnestingn74×163→maximummodulo16n。connectinglowergradecounter’sRCOoutputtonexthighergradecounter’sENsignal.2/28/2025chapter8Modulo-256free-runcounter2/28/2025chapter816<modulo<256countersExp,amodulo-125countermethods:

feedback-clear—0~124;

feedback-reload—131~255,orarbitrarytwonumberswhosedifferenceis124between0and255.2/28/2025chapter8Othercounters74×161,asynchronousclear4-bitbinarycounter.

asynchronousclear:ifCLR_L=0,QDQCQBQAoutput0000immediately.otherfunctionisasthesameas74×163.use74×161tomodulo-11infeedback-clearmode,countending=1011,CountingNQ3Q2Q1Q0000001000120010300114010050101601107011181000910011010101110112/28/2025chapter8Othercountersdecadescounter74×160(asynchronousclear)74×162(fullysynchronous)74×1694-btup/downcounter2/28/2025chapter8FromcountertotimerncounterclockT=1sModulo-60BCD-7segmentdecoderdisplayer555多谐振荡器或与非门构成的双稳电路74×16274LS48或74LS49共阴型LED仿真作业,3人一组,用multisim10或proteus7.0仿真均可,提交仿真程序。2/28/2025chapter84、decodingbinary-counterstates以计数器的计数输出作为译码器的输入,可在译码器的输出端得到周期为8倍计数时钟的1:8的脉冲。也称为8路顺序脉冲发生电路2/28/2025chapter874×163iscombinedwith74×151toobtainasequence-generator.Exp:a“01100101”sequence-generator计数器+数据选择器法构成的序列发生器的工作特点:只要计数器是有效的,在时钟的触发下,循环地输出序列。2/28/2025chapter8supplement:buildingsequence-generatorwithDF-Fs设计方法:顺序计数+组合电路例:试设计一个密码产生器,能依次输出011010。用顺序计数器的每个计数值产生一个码位。000

0001

1010

1011

0100

1101

0Q2Q1Q0Q2*Q1*Q0*SEQ000001000101010100111011100010010111010000110dddd111dddd2/28/2025chapter8circuitforsequence-generatorincountermodeU1A74LS74D1D21Q51Q61CLR11CLK31PR4U1B74LS74D1D21Q51Q61CLR11CLK31PR4U2A74LS74D1D21Q51Q61CLR11CLK31PR4U3A74LS00DU3B74LS00DU3C74LS00DU4A74LS10DU3D74LS00DU5A74LS00DU6A74LS32DD2D1D0Q2Q2'Q1Q1'Q0Q0'SEQ2/28/2025chapter8课堂练习(1)设计一个序列信号检测器,当电路的输入端X收到连续的“1011”时,输出F为1,并且状态可以重叠。状态赋值采用QmQm-1…,按gray码序。(2)设计一个5进制加/减计数器,当控制信号C=0,计数器按加1计数,当C=1,计数器按减1计数。用D触发器综合。2/28/2025chapter88.5ShiftRegisterAnn-bitregisterwithaprovisionforshiftingitsstoreddatabyonebitpositionatezchtickoftheclock.Classifybystructure:serial-in,serial-outserial-in,parallel-outparallel-in,serial-outparallel-in,parallel-outShift-rightClassifybyshiftingdirection:Shift-left2/28/2025chapter8Ann-bitnumberDn-1Dn-2……D1D0isstoredinann-bitshiftregister.Shiftleft:shiftfromLSBtoMSBShiftright:shiftfromMSBtoLSBDnewDn-1Dn-2……D1D0D1……Dn-2Dn-1Qn-1Qn-2Q1Q0…D0D1……Dn-2DnewQn-1Qn-2Q1Q0shiftleftshiftright2/28/2025chapter81、shift-registerstructure(1)、serial-in,serial-outAfternclockticks,aninputbitappearsattheserialoutput.itcanbeusedasapulse-postponedcircuit.inputoutputnclocktickt0tn2/28/2025chapter8(2)、serial-in,parallel-out并出serialinparalleloutserial-parallelconversion2/28/2025chapter8(3)、parallel-in,serial-outserialout数据并入U1U2D2

Q1

load/shift=1,loaddata,Di=iDload/shift=0,datashift,Di=Qi-11Dn

D10012/28/2025chapter8(4)、parallel-in,parallel-out2/28/2025chapter82、MSIshiftregister74×164,serial-in,parallel-outwithasynchronousclearinput(CLR_L).shiftdirectionSERA·SERBRXDTXDMCUU174HC164QA3QB4QC5QD6A1B2CLR9CLK8QE10QF11QG12QH132/28/2025chapter8MSIshiftregister74×194,4-bitbidirectional,parallel-in,parallel-outFunctioninputNextstatefunctionS1S0QA*QB*QC*QD*00QAQBQCQDHold01RINQAQBQCShiftright10QBQCQDLINShiftleft11ABCDload注意:此处的左移(QD到QA)、右移(QA到QD)是针对该器件定义的,与数据单元的左/右移不同。74×299,8位双向并入并出型,(通用型)2/28/2025chapter83、applicationofshiftregister:serial/parallelconversioncontrolcircuitparallel-serialconversionparallel-indataparallel-serialconversioncontrolcircuitparallel-outdatasourcedestinationserialdataclocksignalsynchronoussignal2/28/2025chapter8数字式程控交换机的时分多路复用系统。2/28/2025chapter82/28/2025chapter85、shift-registercountersbedifferfromthebinaryupordowncounters.ringcounterann-bitshiftregistercanbeusedtoobtainacounterwithnstates.4-bitringcounterQ0*=D0=Q3Q1*=D1=Q0Q2*=D2=Q1Q3*=D3=Q22/28/2025chapter8ringcounterinitialstate:Q3Q2Q1Q0=0001D0D1D2D3Q3Q2Q1Q0Q3*Q2*Q1*Q0*00010010001001000100100010000001(D1)Q0(D2)Q1(D3)Q2(D0)Q32/28/2025chapter8StatediagramofringcounterAsinglecircleincluding4statescouldbeusedasamodulo-4counter.(byusing4F-Fs)(是顺序脉冲发生器的一种)0001001001001000normalcycleNotself-correcting0011011011001001011111101101101101011010000011112/28/2025chapter8useMSIshiftregistertoobtainaringcounterRESET=1,loadABCD=0001;

RESET=0,shiftleft其结构一般都是Di接前一级的Qi-1,最后Qn反馈回D0端。2/28/2025chapter8Self-correctingringcounterChangethefeedbackcircuitconnectedtoD0.将环形计数器的低三位经或非门连到LIN端构成校正电路,即LIN=Q2’Q1’Q0’。So,itisaself-correctingringcounter.2/28/2025chapter8Iftheringcounteradoptactive-low1-out-of-ncode,thentheself-correctingcircuitisa3-inputNANDgatewhichhasQ0~Q3input.11101101101101112/28/2025chapter87、JohnsonCounters(twisted-ringcounter)stucture电路特点:Q3’——D0Q0*=D0=Q3’Q1*=D1=Q0Q2*=D2=Q1Q3*=D3=Q2D0DCLKQQCLRPRDCLKQQCLRPRDCLKQQCLRPRDCLKQQCLRPRQ0Q1Q2Q3CLK2/28/2025chapter8StatediagramofnormalcycleSetinitialQ3Q2Q1Q0=0000,Ann-bitJohnsoncounterhas2nstate.Itcouldbeusedasamodulo-8counter.Q3Q2Q1Q0000000011100100000110111111011112/28/2025chapter8TimingdiagramEachQioutputapulsewhichhas8timesoftheclockperiodand50%dutycycle.也可作为顺序脉冲发生器2/28/2025chapter8用MSI构成扭环计数器

RESET_L=0,clear

RESET_L=1,soS1S0=10maketheshiftregistershiftleft,Q3Q2Q1Q0:0000—0001—0011—……—1000。

2/28/2025chapter8JohnsoncounterstatedecoderstateQ3Q2Q1Q0decordingS10000Q3’·Q0’S20001Q1’·Q0S30011Q2’·Q1S40111Q3’·Q2S51111Q3·Q0S61110Q1·Q0’S71100Q2·Q1’S81000Q3·Q2’Eachstatecanbedecodedwitha2-inputANDorNANDgate.Theoutputareglitchfree.JohnsoncounterCLKdecoderQ3Q2Q1Q0Y0Y1Y2Y3Y4Y5Y6Y72/28/2025chapter8Q3Q2Q1Q0Y7Y6Y5Y4Y3Y2Y1Y0decording000001Q3’·Q0’00011Q1’·Q000111Q2’·Q101111Q3’·Q211111Q3·Q011101Q1·Q0’11001Q2·Q1’100010Q3·Q2’2/28/2025chapter8Self-correctingofJohnsoncounterTheother8unusedstateisabnormalcycle.Neithernormalcyclenorabnormalcycleisself-correcting.01011011100100100110110101001010Q3Q2Q1Q02/28/2025chapter8具有自启动能力的Johnson计数器:反馈置数方式校正过程:当前状态Q3Q2Q1Q0为0××0时,令计数器重新装载计数初值,下一状态到0001。00000001110010000011011111101111010110111001001001101101010010102/28/2025chapter8具有自启动能力的Johnson计数器:反馈置数方式校正过程:当前状态Q3Q2Q1Q0为0××0时,U1的输出LOAD=1,令S1S0=10,74×194重新装载数据,下一状态到0001。00000001110010000011011111101111010110111001001001101101010010102/28/2025chapter8移位寄存器在序列检测和序列发生中的应用例1、设计一个序列检测器,当串行输入X为1010时,输出F为1,用移位寄存器实现。数据左移1100检测电路2/28/2025chapter8移位寄存器在序列检测和序列发生中的应用例1、设计一个序列检测器,当串行输入X为1010时,输出F为1,用移位寄存器实现。数据右移检测电路11002/28/2025chapter8序列发生器移位寄存器式计数器作为序列发生电路的一般结构:序列输出F下一位产生电路D0QD1QD2QD3Q序列的长度即为电路的状态个数,按状态个数S确定触发器(状态变量)个数N,以连续的N位bit为一个状态,在所需生成的序列中按照依次移动1bit的顺序找出S个独立的状态。2/28/2025chapter8例2:某序列信号发生器输出信号为…011010011010…。试用D触发器设计该电路。找状态……011010011010……Q2Q1Q0Q2*Q1*Q0*D0(F)011110011010111010100010100010000110010111000dddd111ddddD2=Q1D1=Q0D0=Q2·Q0’+Q2’·Q1’2/28/2025chapter8电路自启动检查:Q2Q1Q0=000,Q2*Q1*Q0*=001Q2Q1Q0=111,Q2*Q1*Q0*=110能返回有效状态2/28/2025chapter8例3、用移位寄存器产生序列1001101011分析:序列长度10位,设置10个状态,左移方式,用每个状态产生下一个将要移入的位Q3Q2Q1Q0Q3*Q2*Q1*Q0*D01001001110011011000110110111101101001010010110101101111011011110111111001110110001100100112/28/2025chapter88、lin

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论