cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析_第1页
cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析_第2页
cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析_第3页
cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析_第4页
cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析_第5页
已阅读5页,还剩2页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

cpu影响matlab仿真速度吗,Proteus仿真速度很慢的分析类型:⾏业软件⼤⼩:1.1M语⾔:中⽂评分:6.5标签:⽴即下载这篇⽂章是我的个⼈实践经验:很多朋友在做Proteus硬件仿真的时候可能都碰上了仿真速度慢的问题,在点击了开始仿真之后,CPU过载,速度极慢,⽆法正常进⾏仿真;Proteus在信息栏提⽰CPU被使⽤情况,可能⾼达90%到100%,并没有按照真实速度仿真,点击信息栏中的提⽰信息就弹出⼀个对话框,说是SimulationisnotrunninginrealtimeduetoexcessiveCPUload,⿏标点击提⽰,会展开⼀个消息框,下⾯就是消息框内的内容:Thismessagehasbeengeneratedbecausethesimulationhasbeenunabletokeepupwithrealtimeformorethan20consecutivesimulationframes.Thisdoesnotaffecttheaccuracyofthesimulationinanyway,butitwillmeanthatthesimulatedsystemmayrespondmuchmoreslowlytointeractiveevents(e.g.pushbuttons).SeeAlso:Howtomakesimulationsrunfaster?这⾥的说明中可以看到⾄少两个信息:第⼀,速度慢并不影响仿真精度;第⼆,我们可以点击最下⽅那句话打开另⼀个链接来加速仿真;那么,我们就继续按照提⽰来寻找答案。(也许我们的Proteus版本不同,这些链接打开顺序和⽅法可能不⼀样,我是⽤的是7.1的版本)点击Howtomakesimulationsrunfaster?打开Proteus的帮助,进⼊⼀个英⽂界⾯,我把原⽂全部贴在这⾥,之后和你⼀起解读。ADVANCEDTOPICSHOWTOMAKEINTERACTIVESIMULATIONSRUNFASTERIntroductionAlthoughProteusVSMisabletorunmanyinteractivesimulationsinrealtime,itshouldbefairlyobviousthatthiscannotbethecaseforallcircuits.Forexample,itisperfectlypossibletodrawacircuitthatwilloscillateat1GHz,butthereisnowaythatthiscanbesimulatedinrealtimeonacomputerthatmaynotevenexecuteonemachineinstructionin1ns.Inthissection,wewillexplaininalittlemoredetailwhatdeterminesthecomplexityofasimulationandhowyoucanoptimizeacircuittomaximizethesimulationspeed.UsingDigitalResistorandDiodeModelsFirstandforemostinthiscontext,itisvitaltounderstandthedifferencebetweenanalogueanddigitalsimulationwithinProSPICE.Thisisbecausethesimulationofdigitalcircuitryistwoorthreeordersofmagnitude(i.e.upto1000times)fasterthanthesimulationofanaloguecircuitry.ItisforthisreasonthatProSPICEcontainsadigitalsimulatoratall-thatbyrepresentingtheoperationofdigitalcomponentsasaneventdrivenprocess,agreatdealofunnecessarycomputationcanbeavoided.Forexample,whilstaPCwith600MHzP3processorcansimulatearound2milliondigitaleventspersecond,thesamecomputerwillonlybeabletosimulateasinewavegeneratorrunninguptoabout2kHzbeforetheCPUloadreaches100%.Suchawaveformwillrequireabout60,000analoguetimepointstobecomputedpersecond,andeachtimepointwillrequireaconvergentsolutionofthecircuitnodalequationstobeestablished-aprocessvastlymorecomplexthanprocessingasimpledigitalevent.Formanycomponents,itshouldbefairlyintuitiveastowhetheranalogueordigitalsimulationwillberequired.Forexample,nearlyallTTLandCMOSpartsarerepresentedbydigitalmodels,whereasanalogueICssuchasop-amps,comparatorsandsofortharerepresentedbyanaloguemodels.AllcomponentswhicharerepresentedbystandardSPICEmodelsrequireanaloguesimulation.However,agreyareaarisesforcomponentswhich-thoughstrictlyanalogueinnature-canberepresentedbyadigitalmodelforsomepurposes.Inparticular,diodes-andperhapsmoresurprisingly-resistorsfallintothiscategory.Thisbecomeshighlyrelevantinthecontextofwire-orlogic,pull-upresistors,deviceswithopen-collectoroutputs,andindiode-resistorlogicnetworks.Example1-Wire-OrLogicThefollowingcircuitsectionshowsatypicalwire-orlogicnetwork:U1:AandU1:Bhaveopen-collectoroutputsandcanonlysinkcurrent.Alogic1outputlevelresultsinahighimpedancecondition.IntermsofDSIM,thismeansthatthegateoutputsdriveeitheranSLO(stronglow)oraFLT(floating)logicstate.NowifresistorR1ismodelledintheanaloguedomain,PROSPICEmustinsertadigitaltoanalogueinterfaceobjectbetweenthelogicgatesandtheresistor,andthenananaloguetodigitalinterfaceobjectbetweentheresistorandtheinputtoU2:A.Thiswillresultinwonderfullydetailedsimulationoftherise-fallwaveformsatthisnode,andthecurrentflowthroughR1,butwillalsoresultinagreatdealofcomputationeverytimetheoutputofU1:AorU1:Bchangesstate.AllthiscanbeavoidedifR1ismodelleddigitally.Inthiscase,itsbehaviouristoconverttheSHIlogicstateofVCCtoaWHI(weakhigh)logiclevel.WheneitherNANDgatepullslow,theSLOstateoverridestheWHIstatefromtheresistorandthenetstateisresolvedtobelogiclow.Butwhenneithergatesinkscurrent,theWHIstatebeatstheFLTstateandthenetrisestologichigh.Allthiscanbemanagedwithinthedigitalsimulationparadigmandnoanaloguesimulationisrequired.Therefore,pullupresistorsofanykindshouldalmostalwaysbemodelleddigitally.Example2-Diode-ResistorLogicAnothercasewhereseeminglyanaloguecircuitrycanbemodelledinthedigitaldomainisdiode-resistornetworksofthesortshownbelow.Theseareoftenfoundaroundkeypadscanningcircuitrywherethediodesservetopreventshortcircuitsbetweentherowdrivinglinesifmorethanmorethanonekeyisdepressedsimultaneously.Aswiththewire-orlogicexample,ProSPICEwillquitehappilymodelthisintheanaloguedomainbutitwillbecomputationallyexpensive.Ifadigitalresistormodelisusedasabove,andadiodeisseenasadevicewhichwillpassonlylowlogiclevelfromcathodetoanodeandonlyahighlogiclevelfromanodetocathode,thenthewholenetworkcanonceagainbemodelleddigitally.Sincekeypadscanningroutinestendtooperateatsomespeed,andthereareoftennumerousdiodesandresistors,thisisaveryimportantoptimizationtobeawareof.HowtoSelecttheDigitalResistorModel1.PointattheresistoryouwishtochangeandpressCTRL-E.2.ClicktheEditAllPropertiesasTextcheckbox.3.ChangethePRIMITIVEpropertytoreadPRIMITIVE=DIGITAL,RESISTORIfyouarebuildingacircuitfromscratch,andknowthatyouwillwantaparticularresistortobemodelleddigitally,youcanalsoachievethisbypickingthePULLUPorPULLDOWNmodelsfromthecomponentlibrary.ThisdevicesalreadycontainsthePRIMITIVEpropertyasabove.HowtoSelecttheDigitalDiodeModel1.PointatthediodeyouwishtochangeandpressCTRL-E.2.ClicktheEditAllPropertiesasTextcheckbox.3.ChangethePRIMITIVEpropertytoreadPRIMITIVE=DIGITAL,DIODE4.DeleteanyMODELproperty,asSPICEparametershavenomeaningforthedigitaldiodemodel.Ifyouarebuildingacircuitfromscratch,andknowthatyouwillwantaparticulardiodetobemodelleddigitally,youcanalsoachievethisbypickingtheDIODE-DIGITALdevicethecomponentlibrary.ThisdevicealreadycontainsthePRIMITIVEpropertyasabove.OptimizingMemoryAccessestoExternalRAMandROMManylargermicroprocessordesignsmakeuseofROM,RAMorEEPROMmemorydevicesexternaltothemicrocontrolleritself.Thesemaystoretheprogramcode,orbeusedtosupplementinternalSRAMpresentwithintheCPUchipitself.Givenacorrectaddressdecodingcircuit,andassumingthatthememorydeviceismodelled,ProteusVSMwillcorrectlysimulatesuchdesignsasdrawn.WhentheCPUaccessesexternalmemory,themodelwilldrivetheaddress,dataandcontrollinesappropriately,andexternaldecodelogicandmemorymodelwillrespondbyreadingorwritingtheappropriatelocations.Thisisquiteusefulifyouwishtoverifythatyourmemorydecodingcircuitryworksasdesigned,butisalsoextremelyexpensiveintermsofcomputation.Settingupa16bitaddresswillcreateaminimumof16digitaleventsandreadingorwritingabyteofdatato/fromdatabuswillgenerateanother8.Removingthedatafromthebusafterwardswillcreateanother8events.Whereaddressanddatalinesaremultiplexed,asintheaboveHC11design,evenmoreeventswillbegenerated.AllthiscomparesveryunfavourablywiththeabilityofaVSMCPUmodeltoexecuteaninstructionusingjustoneeventpermachinecycle.Therefore,wehaveprovidedtheCPUmodelswiththeabilitytosimulateaccessestoexternalmemoryinternallytothemodel.Atthetimeofwritingthisappliestothe8051,HC11andthelargerAVRCPUmodels.ExternalmemorymaybedeclaredusingEXTRAM,orEXTROMpropertieswhichspecifythememoryrangeforeachblockofexternalmemory.Fulldetailsareprovidedinthemodelspecifichelpfortheseprocessors,whichyoucanaccessfromtheEditComponentdialogueform,orfromtheStartMenu.Oncetheexternalmemorymaphasbeendefinedinthisway,instructionswhichaccessexternalmemorywithinthespecifiedrangescanbesimulatedwithoutgeneratinglargenumbersofdigitalevents.Accessestomemorymappedperipheralscanstillbefullysimulated,sincethesewilllieatlocationsoutsidethememoryrangesspecifiedintheEXTRAMandEXTROMproperties.这⾥就列出了所有问题的根源了;各位朋友不妨多看看这⾥的英⽂帮助,磨⼑不误砍柴⼯,这⾥的帮助内容⽐任何⼈的经验之谈要⾼明得多;好了,让我来读读这⾥的帮助,下⾯是我读出的基本内容之⼀:第⼀:使⽤数字式的电阻和⼆极管(UsingDigitalResistorandDiodeModels)这句话是我的翻译,原⽂的意思是

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论