您好,欢迎访问三七文档
Micro-programmedCPUReportCOACourseDesign止于至善1contentsPurpose..........................................................................................................................2ExperimentPrinciple......................................................................................................2InstructionSet.........................................................................................................2InternalRegistersandMemory..............................................................................3MAR(MemoryAddressRegister).....................................................................3MBR(MemoryBufferRegister)........................................................................4PC(ProgramCounter)......................................................................................4IR(InstructionRegister)...................................................................................4ACC(Accumulator)...........................................................................................5MR(MultiplierRegister)...................................................................................5DR(DivisionRegister).......................................................................................5LPM_RAM_DQ.................................................................................................5ALU(ArithmeticLogicUnit)..............................................................................6Micro-programmedControlUnit.....................................................................6CPUArchitecture.............................................................................................8ControlsignalsinControlMemory.................................................................8ContentsofControlMemory..........................................................................9Toplevelcircuitdiagram..............................................................................................11Simulationresults:.......................................................................................................12Problem1:Calculatethesumofallintegersfrom1to100.........................12Problem2:Calculate300and275................................................................14ResultsAnalysis.............................................................................................14FurtherImprovement..................................................................................................15Reference.....................................................................................................................15Appendix......................................................................................................................151.MBRmodule...........................................................................................152.BRmodule...............................................................................................163.ALUmodule.............................................................................................174.IRmodule..............................................................................................1885.PCmodule.............................................................................................1996.MARmodule...........................................................................................207.control_unitmodule...............................................................................218.MRmodule..............................................................................................22止于至善2PurposeThepurposeofthisprojectistodesignasimpleCPU(CentralProcessingUnit).ThisCPUhasbasicinstructionset,andwewillutilizeitsinstructionsettogenerateaverysimpleprogramtoverifyitsperformance.Forsimplicity,wewillonlyconsidertherelationshipamongtheCPU,registers,memoryandinstructionset.Thatistosayweonlyneedtoconsiderthefollowingitems:Read/WriteRegisters,Read/WriteMemoryandexecutetheinstructions.AtleastfourpartsconstituteasimpleCPU:thecontrolunit,theinternalregisters,theALUandinstructionset,whicharethemainaspectsofourprojectdesignandwillbestudied.ExperimentPrincipleInstructionSetSingle-addressinstructionformatisusedinoursimpleCPUdesign.Theinstructionwordcontainstwosections:theoperationcode(opcode),whichdefinesthefunctionofinstructions(addition,subtraction,logicoperations,etc.);theaddresspart,inmostinstructions,theaddresspartcontainsthememorylocationofthedatumtobeoperated,wecalleditdirectaddressing.Insomeinstructions,theaddresspartistheoperand,whichiscalledimmediateaddressing.Forsimplicity,thesizeofmemoryis256×16inthecomputer.Theinstructionwordhas16bits.Theopcodeparthas8bitsandaddressparthas8bits.TheinstructionwordformatcanbeexpressedinFigure1OPCODE[15:8]ADDRESS[7:0]Figure1theinstructionformatTheopcodeoftherelevantinstructionsarelistedinTable1.InTable1,thenotation[x]representsthecontentsofthelocationxinthememory.Forexample,theinstructionword00000011101110012(03B916)meansthattheCP
本文标题:东南大学CPU报告
链接地址:https://www.777doc.com/doc-4572166 .html