您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > VCS-S11-Unit-07
7-1SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryAgenda:Day2DAY2TopicLabUnitDebuggingSimulationMismatches5UsingPLIRoutineswithVCS6FastRTLLevelVerification7FastGateLevelVerification8Appendix:VCS/VCM97-2SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryUnitObjectivesAftercompletingthisunityoushouldbeableto:ImproveRTLsimulationperformancewithgoodcodingstylesImproveRTLsimulationperformancebyusingthe+radcompiletimeswitchImproveRTLsimulationperformancebyusingthe+2statecompiletimeswitch7-3SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySimulationPerformanceDependsOnGoodcodingpracticesGooduseoftooloptimizationfeaturesGoodcontrolinuseofdebuggingswitchesGoodcontrolofneedforre-compile7-4SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryVCSArchitectureThreemajorcomponentsinVCStoimproveperformance:ParserzParseaccelerate-ablecodetocodegeneratorsEventcodegeneratorzAcceleraterandomlogicsimulationCyclecodegeneratorzAcceleratesequentialblocksimulationPerformancestartsattheparserVCSCompilerEventcodegeneratorParserCyclecodegeneratorVerilogCodeSimulationExecutable7-5SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietaryGeneralCodingGuidelinesUsesynthesizablesubsetofVeriloglanguagezGiveVCSbetterchanceofperformingcodeoptimizationRaiseyourlevelofabstractionzGivesimulatorlessworktodoAvoidinefficientconstructszSwitchlevelprimitives(trans)andbidirectionalzStrengthmodelingUsesmallstimulusblockszAvoidlargeinitialblocks(10,000linesofcode)zUsefilebasedstimulus(e.g.$readmemh)7-6SynopsysProfessionalServicesHTCWorkshop.Confidential©2002SynopsysProprietarySequentialRTLInferenceRulesAllsequentialcontrolsmustinsensitivitylistalways@(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;NOTINFERREDAvoidbitselectvariablesina“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©2002SynopsysProprietaryThingstoAvoidforSequentialLogicAvoidtheseconstructsinsequentiallogic:zr
本文标题:VCS-S11-Unit-07
链接地址:https://www.777doc.com/doc-5811395 .html