UVMTemplateGenerator1AmitSharma•New/EvolvingMethodology–Easyadoptionpath•ChangingAPIs/Recommendations–SyntaxNeedforatemplategenerator2–Syntax•MinimizeVIPandenvironmentdevelopmentcycle•DemonstratehowdifferentUVMclassescanbeusedindifferentcontexts•Recommended/OptimalapproachUVMGENOverview•ProvidestemplateswithrichsetofUVMfeatures•Aimedformaximumflexibility•Richwithoptions:WideUserInteractionmechanisms3mechanisms•Optionstogeneratecompleteverificationenvironmentorindividualtemplates•Customizable•Owesitsstructureto‘vmmgen’UVMGENFeatures•Completeenvironmentgeneration•Individualtemplatesgeneration•Enable/DisableUVMFieldAutomationMacros(Defaultisenabled)•Enable/DisableUVMREGHookup•HelpsGenerate–Agents(master/slave)4–Agents(master/slave)–Differenttypesofdrivers,monitors–Sequences–Sequencelibrary–MultiplexeddomainsupportinUVMREG•Multi-Drivergenerationsupport(Forvariousdifferenttypesoftransactions)•Defaultoruserselectednaming.•Supportforuserdefinedtemplatelibrary.•Command:uvmgen[-Llibdir][-X][-ofname][-O]-L:Takesuserdefinedlibraryfortemplategeneration.-X:Excludesstandardtemplatelibrary.-o:Generatetemplatesinspecifiedfile.-O:Overwriteiffilealreadyexists.-q:Quickmodetogeneratecompleteenvironemnt•Usermustsetoneofthebelowstandardlibrarypathbeforerunningvmmgenscript:1•GeneratedCode2•DefineRequiredMethods3•FinalCodeUsage–Commandlineoptions5runningvmmgenscript:–UVM_HOME–VCS_HOME–needtoaddsupportforVCS_UVM_HOME•Usercanexcludestandardlibraryasbelow:–uvmgen–X–LUsertemplatelibrarypathHere–Xisusedtoexcludethestandardlibrary.Inthiscaseusermustgivetheirowntemplatelibrarypathusing-L.UVMGENfeatures•Varioustypesofunidirectionalandbi-directionalTLMconnectionsbetweengeneratoranddriver.•Analysisports/exportscoverage.•Usageofresource/config_dbforvirtualinterfacesconnection•SupportforQuick(minimumqueries)andVerbose6•SupportforQuick(minimumqueries)andVerboseMode•Command-linesupportandsupportforfilebasedentryformatsImportantUVMGENoptions•-Lliblist:passtheuser-definedtemplatedirectories.•-d:displaysthestandardtemplatelocation•-ofname:providetheuser-definednametothegeneratedoutputfileforindividualtemplates•-O:Thisoptionenablestheuvmgentooverwritetheoutputfile•-X(user-template-path):Tousecustomtemplates7•-X(user-template-path):Tousecustomtemplates•-q:Enablesquickmodeofuvmgen,(minimumquestionsforcompleteenvironment)•-RAL[y/n]:Toenable/disableHookingupUVMREGmodelsintheenvironment•-ENV(name):-TR(name):•-BU(name):provideanIntermediateBUlayer•Eg:MasterAgent–//ToDo:adduvmagentpropertieshereprotecteduvm_active_passive_enumis_active=UVM_ACTIVE;–`uvm_component_utils_begin(mas)`uvm_field_object(mast_sqr,UVM_ALL_ON)–functionnew(stringname=mast_agt,uvm_componentparent=null);CapturingBest/RecommendedPracticesForReuseacrossBlocktoCluster8–functionnew(stringname=mast_agt,uvm_componentparent=null);–if(is_active==UVM_ACTIVE)beginmast_sqr=seq::type_id::create(mast_sqr,this);mast_drv=drv1::type_id::create(mast_drv,this);–if(!uvm_config_db#(vif)::get(this,,mst_if,mast_agt_if))`uvm_fatal(AGT/NOVIF,Novirtualinterfacespecifiedforthisagentinstance)uvm_config_db#(vif)::set(this,mast_drv,mst_if,mast_drv.drv_if);Factoryregistration‘create’onlywhenactive;supportsoverridesReusableAgentcodePassingVifsoptimally•Eg:MasterAgent(contd)virtualfunctionvoidconnect_phase(uvm_phasephase);super.connect_phase(phase);if(is_active==UVM_ACTIVE)beginmast_drv.seq_item_port.connect(mast_sqr.seq_item_export);endendfunctionCapturingBest/RecommendedPracticesBaseclassfunctionalityinvoked9endfunctionphase.raise_objection(this,slv_agt_main);//ToDo::Implementherephase.drop_objection(this);ConnectTLMportsappropriatelywhenrequiredRaiseobjectionstoensuredesiredphasecompletion•Callbacksatappropriateplacesinthetransactors•Analysisportsinthemonitors•Appropriatelysignalingseq_rsp_port.item_done();•Appropriatedebugmessageswiththecorrespondingverbosities•MonitortoCoveragecollectorcommunicationCapturingBestPractices(Others)10•MonitortoCoveragecollectorcommunication•AppropriateTLMportsandUVMComparatorusageinthescoreboard•Push/Pulldriver?•AdditionalTLMPortsifrequired•DummyRALFfile–TBD(DummyIPXACT)•DummyUVMRegSequence•UVMRegadaptertemplateforgenericRALbasedenvironments11•UVMRegadaptertemplateforgenericRegTrtoBFMspecificTrmapping•HookingupoftheRALadapterwiththeMasterAgentsequencer•Multiplexeddomainsupport•TBTOP+Interfacetemplates–Clockgeneration;DummyResetLogic–Master,slave,monitormodports/clockingblocks•Generates‘runnable’MakefilewillOthers12•Generates‘runnable’Makefilewillappropriateoptions–With+incdir,andpathtouvm_dpi.ccifUVM_HOMEdefined–-ntb_optsuvm,UVM_TR_RECORD–ralgenusageforRALBasedenvironmentsDoyouwanttocreateAgents?Select(y/Y/n/N)[Default:n]:yEnterMasteragentdataEnternameofmasteragent:masEnternameofsequencer:seq1Enternameofdriver:drv1EnvironmentGeneration(VerboseMode)•Option1:toCreateCompleteEnvironment•Multipledetailedquestionstoguide13Enternameofdriver:drv1Enternameofmonitor:mon1Enternameofinterface:intf1Enternameofthetransaction:tr1EnterSlaveagentdataEnternameofslaveagent:slvEnternameofsequencer