东南大学CPU报告

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

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

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

资源描述

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

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

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

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

×
保存成功