计算结构POC报告

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

TheDesignReportoftheparalleloutputcontroller(POC)1ComputerOrganizationandArchitectureCourseDesignTheReportoftheparalleloutputcontroller(POC)SchoolofInformationScienceandEngineeringSoutheastUniversityMarch2012NameShixiYuStudentNumber04009528TheDesignReportoftheparalleloutputcontroller(POC)2PurposeThepurposeofthisprojectistodesignandsimulateaparalleloutputcontroller(POC)whichactsaninterfacebetweensystembusandprinter.TheAltera’sMaxplusIIEDAtoolisrecommendedandprovidedforsimulation.PleaserefertoWilliam,Stallings.“ComputerOrganizationandArchitecture,DesigningforPerformance”,P.65~75;P.185~190.TaskandPrincipleBasicintroductionPOCisoneofthemostcommonI/Omodules,namelytheparalleloutputcontroller.Itplaystheroleofaninterfacebetweenthecomputersystembusandtheperipheral(suchasaprinterorotheroutputdevices).ArchitecturalModelFigure1PrinterConnectionFigure1showstheconnectingofaprintertothesystembusthroughthePOC.ThecommunicationbetweenPOCandtheprinteriscontrolledbya“handshake”protocolTheDesignReportoftheparalleloutputcontroller(POC)3illustratedinFigure2.Figure2Thehandshake-timingdiagrambetweenPOCandtheprinterThehandshakingprocessisdescribedasfollows:Whentheprinterisreadytoreceiveacharacter,itholdsRDY=1.ThePOCmustthenholdacharacteratPD(paralleldata)portandproduceapulseattheterminalTR(transferrequest).TheprinterwillchangeRDYto0,takethecharacteratPDandholdtheRDYat0untilthecharacterhasbeenprinted(e.g.5or10ms),thensetRDY=1againwhenitisreadytoreceivethenextcharacter.(Supposetheprinterhasonlyaonecharacter“buffer”register,sothateachcharactermustbeprintedbeforethenextcharacterissent).PrincipleofthemodelInordertoeaseyourdesignwork,thefurtherexplanationsofthePOCoperationsandsomedesignhintsaregivenasfollows:ThebufferregisterBRisusedtoholdacharacterthathasbeensentviathesystembuswhilethatthecharacterisbeingtransferredtotheprinter.ThestatusregisterSRisusedfortwocontrolfunctions:SR7servesasareadyflagforsystembustransferstoBR(liketheprinterRDYsignalfortransfersfromPOCtotheprinter),andSR0isusedtoenableordisableinterruptrequestsfromPOC.IfSR0=1,thenPOCwillinterruptwhenitisreadytoreceiveacharacter(i.e.,whenSR7=1).IfSR0=0,thenPOCwillnotinterrupt.TheotherbitsofSRarenotusedandempty.ThetransferofacharactertoPOCviathesystembusproceedsasfollows.POCindicatesthatitisreadybysettingSR7.TheprocessorreadsSR(byexecutingapollingorinterruptserviceroutine)and,findingSR7=1,writesacharactertoBR.ThePOCclearsSR7whenitloadsthischaracterintoBRtoindicatethatanothercharactershouldnotbesentforthemoment.POCthenproceedstotransferthecharacterinBRtotheprinterbygeneratingapulseatTR.Theprocessor,inthemeantime,continuestofetchandTheDesignReportoftheparalleloutputcontroller(POC)4executeinstructions.IfitshouldhappentoreadSR,itwillfindSR7=0andhencewillnotattempttosendanothercharactertotheprinter.Whentheprinterisreadytoreceiveanothercharacter,POCsetsSR7.Thetransfercyclecannowrepeat.TheoverallconnectionFigure3TheoverallconnectionofthesimulatedprinterandPOCenteredintoQuartusIIintheformoftopmodulesymbolsTherearethreemodulesinthefigure:theSCPU,thePrintandthePOC.Accordingtothehintsinthedirection,weknowthatinordertosimulatethePOCbycomputer,asimulatedprinterisbeenwritten..SimulationResultsFigure4SimulationwaveformNameoftheportsandsignalinthesimulation:TheDesignReportoftheparalleloutputcontroller(POC)5CLK:theclockwaveinsideCS:theenablesignal.RESET:thesignaltoresetthePOC.IRQ:theinterruptsignalfromPOCtoCUP.ItispulledlowwhenSR(0)=SR(7)=1;RW:theinputsignalthatcontrolsthewritingofdatafromCPUtoPOC.ADR:theaddresschoicethedataontheDATAwritetotheSRortheBR.TR:apulsesignaltomaketheRDYbelow-level.RDY:theinputsignalsendingtoPOCthatmeansprinterisreadytoreceivemessage.DATA:theinputsignalofdatatobeused.PD:an8bitssignalfromPOCtoPrinter.Explanation:Fromthesimulationwaveform,wecanfigureoutthatthePOCandprinterisworkingcorrectly.Weshallanalyzetheresultsasfollowing:First,DATArepresentsthecharactersthatwillbetransferredtoPOCandfurthertotheprinter.‘0’meansnosignalisbeingtransferred.Whena‘20’comes,itshouldbeputforwardtotheBRinthePOC.Second,aRWsignalisathighlevel,thisdemonstratethatPOCisreadytoreceivedatafromCPU.WhentheADRis0ThenDATAisloadedintheBR.theADRis1theDATAisloadedintheBRAtthemeanwhile,aRDYsignalispulledhighandthatmeanstheprinterisreadytoreceivedatafromPOC.TRisaseriesofpulsestoshowthatthePOCisreadytotransferdatatotheprinter.(Itsfunctionisnotsorequiredandcompletedinthisexperiment.)WhatisimportantisthatwhenRDYisathighlevel,theIRQshouldalsobehightoensurethatinterruptisnotenabledduringtheprocesswhendataistransferredfromPOCtoprinter.Afterafewseconds,theprocessisfinishedandIRQisatlowleveltoenableinterrupt.AsaresultdatacanbetransferredwithinbusfromCPUtothePOC,andtheprintercandoitsjobatthesametime.Thisdemonstratestheprocessofparalleloutput.Finally,thefunctionofPOCcanbeperfectlyachieved.Discussiontotheresultsoftheexperiment1.Aretheresultsequaltothetheory?Answer:WecanseetheresultsofthesimulationinFigure4.Itshowsacorrectresultsrequiredbythetasksandthefunctioniswellaccordingtotheprinciples.2.Isthereanythingthatcanbe

1 / 11
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功