资源描述:
《coding_and_synthesis_with_verilog部分》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、1.0VerilogSynthesisMethodologyFinbarrO’Regan(finbarr@ee.ucd.ie)October2001Synthesisisacontraintdrivenprocessi.e.thesynthesisscriptneedstimingconstraintsFollowthefollowingmethodologyforbestresults1.Drawasimpleblockdiagram,labellingallsignals,widthsetc.2.Drawatimingdiagr
2、amwithasmuchdetailaspossible3.CodetheHDLaccordingtothesynthesizabletemplates4.Doaquick,loweffort,compile-justtoseeifitissynthesizablebeforesimulating.Comparethistotheblockdia-gram.Lookattheinferencereport:•countthenumberofflipflops-isitthesameasthenumberofflipflopsintheco
3、de.•checkforlatches-didyouwantthem.Ifnot,latchesareinferredincombinationalprocedures-theinferrencereporttellsyouwhichcombinationalprocedureandthenameofthelatch.Fullyspecifyallvariablesinallcasestoeliminatelatches.•Checkthecasestatementinferrence.Wasitfull/parallel?•Ch
4、eckanyincompleteeventlistwarnings?•Checktoseeifthereareanycombinationalfeedbackloops(typicallyonlyafteracompile).Combinationalfeed-backloopscanbeidentifiedbythesignalnamesinthetimingloop.•Checktheschematic-anyportsunconnected?•ChecktoseeifDesignwareandAmbitwarecomponen
5、tshavebeenbuiltcorrectly.Arethesethecomponentsthatyouwanted?Howmanydidyouwant?•Neverignoreanywarningthatthesynthesistoolflags.Allwarningsneedtobeunderstoodandtypicallysignedoff.5.Simulateandcomparewiththetimingdiagram•Ifyourdesigndoesn’tmeettimingbymorethan10%ofthecloc
6、kperiod,thengobacktothecode.Ifyouarewithin10%oftheclockperiod,thentryadifferentcompilestrategy.October18,200112.0SynthesizeableTemplates2.1CombinationalLogicacb//Usingareg//-----------------------------wirea,b;regc;always@(aorb)c=a&b;//Usingawire//--------------------
7、---------wirea,b,c;assignc=a&b;//usingabuiltinprimitive(withoutinstancename)//-----------------------------rega,b;wirec;and(c,a,b);//outputisalwaysfirstinthelist//usingabuiltinprimitive(withinstancename)//-----------------------------rega,b;wirec;andu1(c,a,b);//output
8、isalwaysfirstinthelist//ifcisanoutput//-----------------------------outputc;rega,b;assignc=a&b;October18,200122.2Multiplexer