VCS-S11-Unit-07

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

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

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

资源描述

7-1SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryAgenda:Day2DAY2TopicLabUnitDebuggingSimulationMismatches5UsingPLIRoutineswithVCS6FastRTLLevelVerification7FastGateLevelVerification8Appendix:VCS/VCM97-2SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryUnitObjectivesAftercompletingthisunityoushouldbeableto:„ImproveRTLsimulationperformancewithgoodcodingstyles„ImproveRTLsimulationperformancebyusingthe+radcompiletimeswitch„ImproveRTLsimulationperformancebyusingthe+2statecompiletimeswitch7-3SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySimulationPerformanceDependsOn„Goodcodingpractices„Gooduseoftooloptimizationfeatures„Goodcontrolinuseofdebuggingswitches„Goodcontrolofneedforre-compile7-4SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryVCSArchitecture„ThreemajorcomponentsinVCStoimproveperformance:„ParserzParseaccelerate-ablecodetocodegenerators„EventcodegeneratorzAcceleraterandomlogicsimulation„CyclecodegeneratorzAcceleratesequentialblocksimulation„PerformancestartsattheparserVCSCompilerEventcodegeneratorParserCyclecodegeneratorVerilogCodeSimulationExecutable7-5SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryGeneralCodingGuidelines„UsesynthesizablesubsetofVeriloglanguagezGiveVCSbetterchanceofperformingcodeoptimization„RaiseyourlevelofabstractionzGivesimulatorlessworktodo„AvoidinefficientconstructszSwitchlevelprimitives(trans)andbidirectionalzStrengthmodeling„UsesmallstimulusblockszAvoidlargeinitialblocks(10,000linesofcode)zUsefilebasedstimulus(e.g.$readmemh)7-6SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules„Allsequentialcontrolsmustinsensitivitylistalways@(d)NOTINFERRED@(posedgeclk)q=d;alwaysbeginNOTINFERREDwaitclk;q=d;@dalways@(clkord)INFERREDif(clk)q=d;7-7SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules(cont)„AllcontrolflowinsequentialblockspecifiedinIF-ELSEstructurealways@(posedgeclkornegedgeresetN)q=resetN?(scan_en_?d:scan_in):0;NOTINFERREDalways@(posedgeclkornegedgeresetN)if(resetN==0)beginif(scan_en_)q=d;elseq=scan_in;endelseq=0;INFERRED7-8SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules(cont)„Asynchronousset&resetactiveconditionsmustbefirstalways@(posedgeclkornegedgeresetN)if(resetN==1)q=d;elseq=0;NOTINFERREDalways@(posedgeclkornegedgeresetN)if(resetN==0)q=0;elseq=d;INFERRED7-9SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules(cont)„Firstlevelif-else-ifconditionsmustspecifyonlyonevariableintheconditionalways@(posedgeclk)if(!resetN&&!sc)q=0;elseif(sc)q=scan_in;elseq=d;NOTINFERREDalways@(posedgeclk)if(!resetN)if(!sc)q=0;elseq=scan_in;elseif(sc)q=scan_in;elseq=d;INFERRED7-10SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules(cont)„Taskmustbetheonlystatementandwithnodelaysalways@(posedgeclk)if(reset)task_sync(a);NOTINFERRED-resetalways@(posedgeclk)#10task_sync(a);NOTINFERRED-delaysalways@(posedgeclk)task_sync(a);INFERRED7-11SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRules(cont)„Avoidusingdelayswithnon-blockingassignmentalways@(posedgeclk)if(reset==0)q=#1d;elseq=0;NOTINFERRED„Avoidbitselectvariablesina“loop”structureintegeri;reg[3:0]busdata;always@(posedgeclk)for(i=0;i=3;i=i+1)busdata[i]=ser_data;NOTINFERRED7-12SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryEventCodingRulesAvoidstrengthsincontinuousassignments:Insteadofthisassign(strong1,pull0)net1=flag1;Dothisassignnet1=flag1;7-13SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryEventCodingRules(cont)„PlaceeventcontrolinsensitivitylistDothis:always@(enableorb)beginif(enable)a=b;endNotthis:alwaysbegin@(enableorb)if(enable)a=b;end7-14SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryEventCodingRules(cont)„Blockingsimulatesfasterthannon-blockingThiscode:always@(enableorb)if(enable)a=#10b;//delaypreventsraceconditionSimulatesfasterthan:always@(enableorb)if(enable)a=b;7-15SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryEventCodingRules(cont)„AvoiddelaysintasksThiscode:taskpassthrough;inputin1,in2;outputout1,out2;beginout1=in1;out2=in2;endendtaskSimulatesfasterthan:taskpassthrough;inputin1,in2;outputout1,out2;begin#10out1=in1;out2=#10in2;endendtask7-16SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryEventCodingRules(cont)„CalltaskswithinadedicatedalwaysblockThiscode:always@enablepassthrough(ra,rb);always@enablebegin#10ra=xx;rb=yy;endSimulatesfasterthan:always@enablebeginpassthrough(ra,rb);ra=xx;rb=yy;end7-17SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryThingstoAvoidforSequentialLogic„Avoidtheseconstructsinsequentiallogic:zr

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

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

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

×
保存成功