简单的8051IP核综合教程.docx
简单的805UP核综合教程By:Jack,请勿用于商业,谢谢。IP核:Oregano公司的8051免费IP核下载地址及说明文档地址:综合需要工具:SynplifyPro,quartusII解压文件到一个英文路径的文件夹里:打开Sy叩IifyPro ,官方网站上建议用这个来综合,我用QUARTUSn也综合过,但不知道 为什么,没有综合成功。直接OPen Project,然后直接OPen Project,然后在你刚刚解压到的文件夹里有一个mc805Lcore的工程文件,在SynPI文件夹里面,选它就好。我的文件路径是:E:mc8051mc8051_designsynplmc8O51_core这里说明一下,由于官方下载的源文件的805HP核是不带ROM和RAM的,所以说需要用QUARTUS生成ROM和RAM。然后需要修改805IIP核和ROM和RAM的连接映射的文件,然后按照一定顺序添加到SynPlify里面,就是这里我改过去改过来了很多次都不成功,最后才发现了文件夹里有一个现成的不含RoM,和RAM的805IIP,人家已经帮你排好了文件顺序的SynPIify文件,直接用这个现成的就行。然后选择器件:然后设置输出的文件名字:设置约束频率:Opti ons for iapleaentati on: Bc8051vvcore : rev_l×1Timing Report Place and Route VKDL Netlist RestructureDevice OptionsConstraints Implementation ResultsFrequency OllhZ)-( 25 T C Auto Constrain (Optimize to obtain maximum fre Us clock priod for unconstrind IOConstraint FilesCheck the "Sei" column for files that apply to thisImplementations :Synplicitye确定I取消I帮助然后RUN就可以了。综合完成后,我们所需要的mc8051.core.vqm文件就在rev_l的文件夹里,打开QUARTUS11就在rev_l文件夹里新建一个工程把Me<ProjectIizard:Directory,Base,Top-LevelEntitypage1of5Whatistheworkingdirectoryforthisproject?IE:mc8051mc8051_designsynplrev_1.Whatisthenameofthisproject?mc8051jop.Whatisthenameofthetop-leveldesignentityforthisproject?Thisnameiscasesensitiveandmustexactlymatchtheentitynameinthedesignfile.mc8051Jop.UseExistingProieCtSettings.I把mc8051_core.vqm添加进来然后工程建立好以后创建元件符号(注意是file标签里的):QuartusII-E:Bc8051ac8051-designsynplrev-l三c80!FileEditViewProjectAssignmentsProcessingToolsWir(口彦 Q 穹 S ¾ I接下来我们要用QUARTUS仓IJ建ROM和RAM: 新建一个block文件G C |mc8051_core我弄了一个8K的ROMGeneral Regs/ClkenS/Adrs Mem Init)rom)一)一address15.0 rw 1 ,q7-0>clkWhich ports should be regis 'data' input portH 'address' input portj 时 ClUEPUt PorEI I LL一 -l. .t-. J然后指定ROM初始化文件,以后你所要运行的8051单片机程序就是装在这个ROM初始化文件里面的。S?GeneralRegs/CIkenS/AdrsIPm rum。address(15.0 ,、q7.0>dockDo you want to specify the initial content of the memory?O No, leave it blank Initialize memory content data to X×.× on power-up in simulation,' Yesj use this file for the memory content data(You can use a Hexadecnal (Intel-format) File .hex or a MemoryInitialization File .mif)Browse. File name:JrOmjni.hexSelected Megat unctjs:ILM_FiAM_DDBrtse. I*N(Xe: Tocompite a protect scce«fu in the QUartU$ Il $oftwae, your design file* must be in the protect directory, in the global user ttxars specified in the Options dialog box (TOOk menu), or a user Iibraiy specified in the U$er Ltraries page of the Setting diabg box (Assg,menU menu).Your current user Ibcary directo<iesTheinitialcontentfileshouldconformtowhichport'sdimensions?匚ABowIn-SystemMemoryContentEditortocaptureandupdatecontent这步做完后finish就OK啦。然后我们要创建RAM了。步骤差不多,就在这个block文件里创建即可。WhiChtypeofoutputfiedoyouwanttocreate?CAHDLGYHDLCVefiogHDLWhatnamedoyouwantfortheoutputfile?EAmc8O51mc8051-desgnsynpxev1Varrj128个字节的RAM:ramdata7.0wrenaddress(6.0>clockq7.0Currentlyselecteddevicefamily:Howwideshouldthe,q,outputbusbe?Howmany8-bitwordsofmemory?CycloneII0MatchProject/defaultIEywordsWhatshouldthememoryblocktypebe?AutoOM-RAMOM512M4KIOptions.同样的取消掉这个并且勾上后面那个:ramdata(7.0jwrenaddress6.0>clockclkenq(7.0Whichportsshouldberegistered?H'data'and,wren'input0'address'inputport口'q,outputportyiCreateoneclockenablesignalforeachclocksignal.Allregisteredportsarecontrolledbytheenablesignal(s).MoreOptions.CreateabyteenableportIjUL.b一C-L.4._C-U.rIQwIUx.初始化RAM文件无需指定,直接finish即可ROM和RAM的创建已经完成,然后把mc8051.core的元件符号添加到这个block块中即可:Syabol1.ibraries:OProjectj号add$ub_coreadd$ub_cyaddsub_ovcyhbalucof“balumux!号comb_dividerh-bcomb-mltplr>QCOnUoLkmpbcontfol_memrfdcml_adjusthmc8051_alumc8051_controlName:mc8051coreRepeat-insertmode.I-Insertsymbolasblock!厂LaunchMegaWizardPlug-InMegaWizardPlug-InManager.然后弄一个锁相环出来-elkpo-。P。】rresetPI-WOi-*-rom-datajp.p2j>7.0-ram-datajp.p3j>7.0ritjp.all_n(d_oD.O一intijp.all_txd_op.OalH0jp.0all_rxdwr_op.O一-all_t1jp.rom_adr_o15.D一"all-rxdJ(D.Oram.data一o(7.0"一POJFOram_adr_o6.D三一p1JF.0ram-wrop2J7-0ram-en-o-P3JF.Odax-o7.0-dataxjp.adrx-o15.0Uln(_omc8051coreWhichtypeofoutputfiledoyouwarttocreate?CAHDLG睡BCVeriogHDLWhaInamedoyouwartlottheoutputfie?Browse.E:mc8051mc8051-desi5isynprev-1pJINoteTompileaprojectsuccessfullyrtheQuartusIlsoitware.yourdesignfilesmustbeintheprotectdreclocy,intheglobaluerlibraries$PeCfiedintheOptiortsdatogbox(Tookmenu),orauserIbfafy$PeCfiedintheUserUbferiespageoftheSetfrigsdialogbox(AlignmentsmenuJ.Yourcurrentuserttxaydrectociesare:这里我用了18MHZoRequested settingsActual settings:18.00000000 MHz V18,0000I (9 I <<copy V2S00 囹 deg V0.00闻8 a50.00cCorExtmalOutputClockAHetoimtemehttherequestedPLL2UsethisclockClockTapSettingsEntertputdockfrequency:Enteroutputdockparameters:dockMMcabcnfactorOockdvisionfactorClockPtPseshftClockdutycycle(%)生成好PLL后连线:Clk RanO。(d°) OC %)Co96 0.0050.00XTdkenXaddressfi2. 一>clockql7°1SCIKQIMkD fnoqu«ncy: 50 OOO WWz Operation Mode. HormalCyclone Hramdata(7.0 wren acWress(6.0 > ctockq7-0即就- nom-d3tajp.) ram-djt>j(7.0J-irtOJ(D.DJ- HIIM-3JOj(P .0alj1j(D.0J alncdjp.POmHpiJF 0)p2J(7 OJp3 JF-OJdjtjP.01NLOgJ PLoF Ol P2.op.0 p3q(7.Q aLwLolO all Jxd jop.X) 洲XdUr_q(D. xnadro(15.0) Cm_dat,_o7. .0 ram-adr-op.0 ram jwr_o Qmjen一。 datax_o7.。 adrx o15,i)lrort-addr15.OTr5rta7.Trara33o.Hren将这个block保存为和工程一样的名字,编译完成。我写了一个流水灯程序,仿真了一下成功。)PS8000ns1.6us10.775ns4.0us4.8USI