您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > 东南大学信息学院-poc实验报告
ComputerOrganizationandArchitectureCOURSEDESIGNAParallelOutputController------(POC)SoutheastuniversitySchoolofInformationScienceandEngineering1.Designpurposea.Thepurposeofthisprojectistodesignandsimulateaparalleloutputcontroller(POC)whichactsaninterfacebetweensystembusandprinter.TheISE14.7EDAtoolisrecommendedandprovidedforsimulation.b.LearnabouttheusingofBi-directionalDataBus(BDB),anduseaparallelBi-directionalDataBustofinishthedatatransmissionbetweenCPUandPOC.2.IntroductionandTasksPOCisoneofthemostcommonI/Omodules,namelytheparalleloutputcontroller.ItplaystheroleofaninterfacebetweenthecomputersystembusandtheperipheralFigure1.SystemstructurediagramAsFig.1showstheinnerconnectingofaprintertothesystembusthroughthePOC.Thecom-municationbetweenPOCandtheprinteriscontrolledbya“handshake”protocolgiveninFig.2.Figure2.Thehandshake-timingdiagrambetweenPOCandtheprinterThehandshakingprocessisdescribedasfollows:Whentheprinterisreadytoreceiveachar-acter,itholdsRDY=1.ThePOCmustthenholdacharacteratPD(paralleldata)portandproduceapulseattheterminalTR(transferrequest).TheprinterwillchangeRDYto0,takethecharacteratPDandholdRDYat0untilthecharacterhasbeenprinted(e.g.delay5or10ms),thensetRDYto1againwhenitisreadytoreceivethenextcharacter.ThebufferregisterBRisusedtotemporarilyholdacharactersentfromtheprocessor,whichchar-acterwillbetransferredtotheprinterlater.ThestatusregisterSRisusedfortwocontrolfunctions:①SR7servesasareadyflagtoindicatePOCisreadyornottoreceiveanewcharacterfromtheprocessor.②SR0isusedtoenabletheinterruptrequestssentbyPOC.Ininterruptmode,IfSR0=1,thenPOCwillsendaninterruptrequestsignaltoprocessorwhenitisreadytoreceiveacharacter(i.e.,whenSR7=1).IfSR0=0,thenPOCwillnotinterrupt.ThetransferofacharactertoPOCviathesystembusproceedsasfollows:Ininterruptmode,SR0isalways1.Aftersendingcharactertoprinter,POCsetstheSR7to1,sinceSR0=1,theinterruptrequestsignal(IRQ)issetto0,whichindicateaneffectiveinterruptsignaltotheprocessor.1、processorsetsthevalueofSR7&setsthevalueofBR①WhentheprocessordetectstheeffectiveIRQsignal,theprocessordirectlyselectsBRandwritesacharacterintoBR,(processorwillneverreadthestateofSR7,whichisdifferentwithpollingmode.)②ThentheprocessorsetstheSR7to0,whichindicatesthatthenewcharacterhasbeenwrittenintoBRandnotprintedyet.2、POCreadsandsetsthevalueofSR7&handshakesoperationswiththeprinter①WhenPOCdetectsthatSR7issetto0,POCthenproceedstostartthehandshakingoperationswiththeprinter.②Aftersendingcharactertoprinter,POCsetstheSR7to1,whichindicatesPOCisreadytoreceiveanothercharacterfromtheprocessor.Thetransfercyclecannowrepeat.(①and②aresamewiththepollingstate)PS:DuringthehandshakingoperationsbetweenPOCandprinter,theprocessordoesnottrytoaccessPOCuntilitreceivestheinterruptrequestsignal3.TheoverallconnectionofthesimulatedprinterandPOCexpressedinthetopmoduleformFigure3.Thetopmoduleformoftheproject4.DesigndescriptionofthesimulationinputwaveformsTheinputandoutputofCPU,POCandprinterareshownbelow:ProcessorjPinsDescriptionInputclkInputtheclockfortheCPUrunning.modeChoosethemodeforprinting.Whenmode=’1’,selectainterruptmode.IRQReceivetheinterruptsignalIRQ.WhenIRQ='1',newdatacanbesent.DIN[7..0]Readdatafrompoc.DOUT[7..0]Writedataintopoc.OutputrwShowthedirectionoftheDOUT[7..0]andDIN[7..0]Whenrw='0',readdatafromPOC.When'rw'='1',writedatatoPOC.A0ControltheaddressreadandwriteonPOC.WhenA0='0',chooseSR.WhenA0='1',chooseBR.CSCS=‘1’,pocwork.data[7..0]ThedatasendtoPOCtobeprintedPOCPinsDescriptionInputclkInputtheclockforthePOCrunning.RWShowthedirectionoftheDOUT[7..0]andDIN[7..0]Whenrw='0',senddatatoCPU.When'rw'='1',readdatafromCPU.A0Inputaddress,WhenA0='0',chooseBR.WhenA0='1',chooseSR.RDYInputthereadysignalfromprinter.WhenRDY='1',theprinterisidle.WhenRDY='0',theprinterisbusy.CSInputthemodeofthePOC.WhenCS=’0’,selectapollingmode.WhenCS=’1’,selectainterruptmode.data[7..0]ThedatareceivefromCPUtobeprinted.OutputPD[7..0]Outputthedatatoprinter.IRQOutputtheinterruptsignalIRQtoCPU,showingthePOCandprinterisready.TRTheresponsetoprint'RDYsignal,aone-cyclepulseattheportTR(transferrequest)showsthatnewdataissenttoprinter.DOUT[7..0]CS=0POCsendthestateofSRtoCPU;CS=1CPUreadthedatawriteinBRSignalSR[7..0]TheregistercontainstheflagsforthePOC.WhenSR(7)='1',it'sidle.WhenSR(7)='0',it'sbusy.BR[7..0]Theregisterholdsthevalueofdatatoprint.printerPinsDescriptionInputclkInputtheclockfortheprinterrunning.TRInputthepulsesignalfromPOC,toshownewdataiscoming.PD[7..0]InputthedatafromPOC.OutputRDYOutputRDYsignal,whenRDY='1',itshowsprinteriswaitingfornewdata.5.SimulationresultsConnectionbetweencpuandpocConnectionbetweenpocandprinterHerearetheexplanationsofthesimulationwave:interruptmode:1、Intheinterruptmode,modeisalwaysset1,theprintprocessoccuresbytheIRQsignalfrompoc.2、WhenS(7)=0,IRAsend‘0’tocpu,itmeansthereisaprintrequirementandcpubegintohandleit.3、IntheinterruptprocessRWandA0aresingalsfromcputopoctocontroltheactionofpoc.RW=’1’andA0=’1’writedatafromcpu(D)topoc(BR),meansthebeginoftheinterruptprocess.RW=’x’andA0=’x’meansthereisnointerruptrequirement.4、AftersendingdatastoBRandsetsrto“00000000
本文标题:东南大学信息学院-poc实验报告
链接地址:https://www.777doc.com/doc-5437504 .html