首页 MODELSIM 教程

MODELSIM 教程

举报
开通vip

MODELSIM 教程1InstituteofArtificialIntelligenceandRoboticsModelModelSimSim详解详解李永李永西安交大西安交大SOCSOC设计中心设计中心2004.82004.8InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelModelSimSim仿真工具仿真工具•由Model技术公司开发•工业上最通用的仿真器之一•可在Verilog和VHDL仿真&ndas...

MODELSIM 教程
1InstituteofArtificialIntelligenceandRoboticsModelModelSimSim详解详解李永李永西安交大西安交大SOCSOC设计中心设计中心2004.82004.8InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelModelSimSim仿真工具仿真工具•由Model技术公司开发•工业上最通用的仿真器之一•可在Verilog和VHDL仿真–OEM版本允许Verilog仿真或者VHDL仿真3InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelModelSimSim产品产品•ModelSim/VHDL或者ModelSim/Verilog–OEM•ModelSim/LNL–许可Verilog或者VHDL,但是不同时许可•ModelSim/PLUS–设计者能立刻混合仿真Verilog和VHDL•ModelSim/SE–首要的版本–PLUS的所有功能连同附加功能4InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterDebussyDebussy是一个是一个VerilogVerilog\\VHDLVHDL调试工具调试工具•Debussy是一套很好的Verilog\VHDL调试工具,可以帮助设计者快速理解复杂的设计(设计小组中别人开发的复杂、不熟悉的代码或者IP),查找和定位设计中存在的bug,提高效率,缩短产品上市时间。•Debussy主要有以下几个模块:1、nTrace:超文本连接方式的源代码追踪及分析2、nSchema:原理图显示及分析3、nWave:波形显示及分析4、nState:有限状态机的显示及分析5、nCompare:分析仿真结果,比较其相异处5InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterInstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter课程安排课程安排•ModesimGUI的基本仿真流程•Modelsim使用中一些问 快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题 讨论1)命令行模式和批处理模式2)建库3)vcd格式文件输出4)时序仿真5)PLI函数与debussy支持•Debussy工具介绍7InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelModel技术公司的技术公司的ModelModelSimSimmain主窗口:structure结构窗口process处理窗口:Signal&variable信号和变量窗口dataflow数据流窗口source源窗口Wave&list波形和列表窗口8InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter仿真的目的与分类仿真的目的与分类•仿真的目的在软件环境下,验证电路的行为和设想中的是否一致•仿真的分类:a)功能仿真:在RTL层进行的仿真,其特点是不考虑构成电路的逻辑和门的时间延迟,着重考虑电路在理想环境下的行为和设计构想的一致性;b)时序仿真:又称为后仿真,是在电路已经映射到特定的工艺环境后,将电路的路径延迟和门延迟考虑进对电路行为的影响后,来比较电路的行为是否还能够在一定条件下满足设计构想。9InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelModelSimSim实现方法实现方法•交互式的命令行(Cmd)–唯一的界面是控制台的命令行,没有用户界面•图形用户界面(GUI)–能接受菜单输入和命令行输入•批处理模式–从DOS或UNIX命令行运行批处理文件10InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterGUIGUI基本仿真步骤基本仿真步骤1Ö建立工程(同时指定了工作库)2Ö编译源代码3Ö启动仿真器4Ö加入波形5Ö执行仿真11InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter11ÖÖ建立建立ModelModelSimSim工程工程GUI)从主菜单里面:flie->new->project12InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter指定指定ModelModelSimSim工作库工作库库的两个类型Working(缺省值work)包含当前被编译的设计单元编译前必须建立一个working库每个编译只允许一个Resource包含能被当前编译引用的设计单元在编译期间允许多个1)指定工程名2)指定工程目录3)指定工作库13InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterLibrarybrowserLibrarybrowserGUI)从主菜单里面:design->librarybrowser14InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter22ÖÖ加入源代码加入源代码•GUI)project->addfiletoproject15InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccentercompilecompile•GUI)project->compileorder•GUI)project->compileall•可通过在workspace的project窗口上点击右键来完成相应操作16InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter33ÖÖ启动仿真器(启动仿真器(loaddesign)loaddesign)„GUI)design->loaddesign17InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter44ÖÖ添加波形添加波形•GUI)view->structure选择需要显示的module•GUI)view->signals选择所要显示的信号•GUI)view->wave将所选择的信号调入波形窗口18InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter55ÖÖ运行运行((runrun))•GUI)run->run–all也可以通过点击wave窗口的•点击wave窗口停止仿真19InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterWaveWave窗口操作窗口操作通过在wave窗口可以通过菜单、工具栏和在选中信号后点右键来完成相应的调试工作。20InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelsimModelsim窗口命令记录窗口命令记录21InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter保存运行命令保存运行命令22InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter将命令存储成将命令存储成..dodo格式,并调用格式,并调用#test3.dovlog-workworkF:/test3/black_stretch.vvlog-workworkF:/test3/test.vvsimwork.testviewsignalsviewstructureviewwaveaddwavesim:/test/red_out_waddwavesim:/test/green_out_waddwavesim:/test/blue_out_wrun-all23InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter工程文件工程文件test.test.mpfmpf•[Library]•std=$MODEL_TECH/../std•ieee=$MODEL_TECH/../ieee•verilog=$MODEL_TECH/../verilog•std_developerskit=$MODEL_TECH/../std_developerskit•synopsys=$MODEL_TECH/../synopsys•modelsim_lib=$MODEL_TECH/../modelsim_lib•alter_lpm=D:/installed/quartus/eda/sim_lib/modelsim/alter_lpm•work=work•[vcom]•;TurnonVHDL-1993asthedefault.Defaultisoff(VHDL-1987).•;VHDL93=1.•;RangeCheck=1•[vlog]•;Turnoffinclusionofdebugginginfowithindesignunits.•[vsim]•Veriuser=novas.dll•;Defaultrunlength•RunLength=1001)当下次再次打开这个工程时,modelsim从mpf文件中读取关于库的定位、启动文件的定位、ModelSim其他缺省设定等信息2)在建立工程时,modelsim从初始化文件modelsim.ini中获取各种信息,包括[Library][vcom][vlog][vsim][lmc],因此有必要修改modelsim.ini文件以改变一些缺省信息。3)缺省modelsim.ini文件存在modelsim的安装目录下,为只读文件。4)modelsim.ini文件的搜索顺序为:a)环境变量所指的文件架b)当前的工作目录c)modelsim的安装目录24InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter工程文件工程文件test.test.mpfmpf((续)续);MaximumiterationsthatcanberunwithoutadvancingsimulationtimeIterationLimit=5000License=license.dat;VSIMStartupcommand;Startup=dostartup.do;FileforsavingcommandtranscriptTranscriptFile=transcript;FileforsavingcommandhistoryCommandHistory=cmdhist.do.[lmc];ModelSim'sinterfacetoLogicModeling'sSmartModelSWIFTsoftwarelibsm=$MODEL_TECH/libsm.sl[project]Project_Version=1Cur_Top_DUs=work.test25InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterModelsimModelsim使用中一些问题讨论使用中一些问题讨论1)命令行模式和批处理模式2)建库3)vcd格式文件输出4)时序仿真5)PLI函数与debussy支持26InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterCommandCommand--linemodelinemode((命令行模式)命令行模式)Thisanoperationalmodethathasonlyaninteractivecommandline;nointeractive,windowsareopened.Torunvsiminthismanner,invokeitwiththe-coptionasthefirstargumentfromeithertheUNIXpromptortheDOSpromptinWindows95/98/2000/NT.在前台运行,不显示modelsim的可视化界面。27InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter运行前工作目录下的文件运行前工作目录下的文件Allcode.txt文件中的内容1:test.v2:black_stretch.v28InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterDOSDOS下的命令行模式下的命令行模式29InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVlibVlib和和VmapVmap•Thevlibcommandcreatesadesignlibrary.Youmustusevlibratherthanoperatingsystemcommandstocreatealibrarydirectoryorindexfile.•Thevmapcommanddefinesamappingbetweenalogicallibrarynameandadirectorybymodifyingthemodelsim.inifile.Withnoarguments,vmapreadstheappropriatemodelsim.inifile(s)andprintsthecurrentlogicallibrarytophysicaldirectorymappings.Returnsnothing.30InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVlibVlib和和VmapVmap命令后结果命令后结果<library_name>•运行完Vlib后会产生work库目录,目录里存放_info文件,用于记录各种库中的各种模块。•运行完Vmap会将modelsim安装目录下的modelsim.ini复制到当前工作目录,并将库和目录对应起来,在[Library]在增加work=work语句。_infoany_verilog_moduleany_vhdl_unit_lock_primary.dat_primary.vhdverilog.asm_primary.dat<arch_name>.dat<arch_name>.asm31InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVlogVlog命令命令•vlog•ThevlogcommandisusedtoinvokeVLOG,theModelTechnologyVerilogcompiler.•Syntax•vlog•[-93][-help][-compat][-•[+define+<macro_name>[=<macro_text>]]•[+delay_mode_path][+delay_mode_unit]•[-fast[=<secondary_name>]•[-hazards][+incdir+<directory>][-incr]•[-line<number>][-lint][+mindelays][+maxdelays]•[+nocheckCLUP][+nocheckDNET][+nocheckOPRD]•[-nodebug[=ports|=pli]][-noincr][+nolibcell][-•[+nowarn<CODE>][-O0|-O1|-O4|-O5][-quiet][-R•[-source][+typdelays][-u][-v<library_file>]•[-version][-work<library_name>][-y32InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVlogVlog后后WorkWork目录下的信息目录下的信息•Where–_primary.dat-Verilogmodule或VHDLentity的编码格式–_primary.vhd-Verilog端口的VHDLentity陈述–verilog.asm和<arch_name>.asm–执行代码文件33InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVsimVsim•ThevsimcommandisusedtoinvoketheVSIMsimulator,ortoviewtheresultsofaprevioussimulationrun(wheninvokedwiththe-viewswitch).•Syntax•vsim•[-c][-coverage][-do“<command_string>”|•[-f<filename>][-g<Name>=<Value>...][-•[-help][-i][-installcolormap][-keeploaded][-•[-keepstdout][-l<filename>][-lib•[-multisource_delaymin|max|latest][-•[+no_tchk_msg][+notimingchecks][-quiet]•[-restore<filename>]•[-sdfmin|-sdftyp|-sdfmax•[-sdfnoerror][-sdfnowarn][+sdf_verbose][-t•[-tag<string>][-title<title>][-trace_foreign•[-view[<dataset_name>=]<WLF_filename>][-wlf•<size>]34InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterVsimVsim((续)续)[-wlftlim<duration>][-wlfnocompress][-absentisempty][-foreign<attribute>][-[-noglitch][+no_glitch_msg][-std_input[-std_output<filename>][-strictvital][-vcdread<filename>][-vital2.2b][+alt_path_delays][-hazards][-L[-Lf<library_name>...][+maxdelays][+mindelays][+multisource_int_delays][+no_neg_tchk][+nosdfwarn][+nosdferror][+nowarn<CODE>][-pli"<objectlist>"][+<plusarg>][+pulse_e_style_ondetect][+pulse_e_style_onevent][+pulse_int_e/<percent>][+pulse_int_r/<percent>][+sdf_nocheck_celltype][+transport_int_delays][+typdelays][<library_name>.<design_unit>]35InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterBatchmodeBatchmodeBatchmode•Batchmodeisanoperationalmodethatprovidesneitheraninteractivecommandline,norinteractivewindows.•其所有操作都在后台进行,用户看不到modelsim的界面,也不需要交互式输入命令。当工程很大,文件比较多时,用批处理比较方便。•增加了两个文件,一个是runallcode.bat(批处理文件),一个是runallcode.do(modelsim的脚本文件)。#runallcode.dovlibworkvmapworkworkvlog-workwork-fallcode.txtvsimwork.testrun100000000quit-f#runallcode.batvsim-c-dorunallcode.do36InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter运行批处理文件前后比较运行批处理文件前后比较•直接运行runallcode.bat文件,会在后台调用modelsim,执行runallcode.do文件,完成操作。•因为批处理和命令行格式没有调用modelsim的窗口,因此必须采用数据转存,将仿真数据存储成VCD格式或则FSDB格式,作off-line分析。37InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter仿真仿真AlterAlter宏函数、宏函数、LPMLPM•Alter提供的宏函数、LPM和通过MegaWizard插件等功能为FPGA设计提供了许多方便,在quartus\eda\sim_lib提供了220model.v和alter_mf.v,里面存在各种模型。•在仿真LPM,最直接的想法是将220model.v复制到工作目录,或者从220model.v中找出所需要的module,然后和源文件一起编译;或则为其建一个库alter_lpm(可以建立在任何目录下,我们这里库目录为D:/installed/quartus/eda/sim_lib/modelsim/alter_lpm),将220model.v中的module都编译到库里。•如果我们经常用到这个库的话,我们可以在modelsim的安装目录下将modelsim.ini进行修改,在[Library]增加alter_lpm=D:/installed/quartus/eda/sim_lib/modelsim/alter_lpm,这样当我们在新建工程时,alter_lpm库就会和其他的资源库一起出现在library里,不需要再从新编译。38InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter在在D:/installed/D:/installed/quartusquartus//edaeda//simsim_lib/_lib/modelsimmodelsim//目录下建立目录下建立alter_alter_lpmlpm库库•先将工作目录转换到D:/installed/quartus/eda/sim_lib/modelsim•GUI)design->createanewlibrary39InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter在在alter_alter_lpmlpm库下编译库下编译model220.vmodel220.v•GUI)design->compile•在library中选择alter_lpm,然后选择220model.v文件,并点击编译,那么在alter_lpm库中便存在了编译好的许多modele。40InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter在在modlesimmodlesim..iniini文件添加文件添加alter_alter_lpmlpm库库•[Library]•std=$MODEL_TECH/../std•ieee=$MODEL_TECH/../ieee•verilog=$MODEL_TECH/../verilog•std_developerskit=$MODEL_TECH/../std_developerskit•synopsys=$MODEL_TECH/../synopsys•modelsim_lib=$MODEL_TECH/../modelsim_lib•alter_lpm=D:/installed/quartus/eda/sim_lib/modelsim/alter_lpm•[vcom]•;TurnonVHDL-1993asthedefault.Defaultisoff(VHDL-1987).•;VHDL93=141InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterValueChangeDump(VCD)FilesValueChangeDump(VCD)Files•TheVCDfileformatisspecifiedintheIEEE1364standard.ItisanASCIIfilecontainingheaderinformation,variabledefinitions,andvariablevaluechanges.VCDisincommonuseforVerilogdesigns,andiscontrolledbyVCDsystemtaskcallsintheVerilogsourcecode.•可以通过在源代码中添加语句来实现initialbegin$Dumpfile("./test.fsdb");$Dumpvars(0,test);#60000000$finish;end•也可以通过modelsim的命令来实现vcdadd(CR-200)$dumpvars转储层次信号vcdfile(CR-210)$dumpfile打开一个文件准备转储波形数据vcdoff(CR-216)$dumpoff停止转储vcdon(CR-217)$dumpon开始转储42InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterSDF(StandardDelayFormat)SDF(StandardDelayFormat)timingannotation.timingannotation.•可以采用$sdf_annotate系统任务可进行反标:initialbegin$sdf_annotate(“black_stretch.sdf",black_stretch1);end•也可以采用vsim命令来进行反标vsim-sdfmax•还可以通过GUI窗口来实现延时文件的反标GUI)design->loaddesign点击loaddesign窗口的sdf选项,添加sdf文件43InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterGUIGUI窗口添加窗口添加SDFSDF文件文件44InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterDebussyDebussy::仿真辅助调试工具:仿真辅助调试工具:•a)看仿真波形无疑是代码排错的主要手段,在Modelsim中的波形窗口在大的仿真中有如下缺陷:a、只能显示出在仿真前设置好的信号波形,如果在仿真完成后想观察其他的信号,唯一的办法就是添加需要观察的信号从新开始仿真。b、波形只是简单显示,和代码没有对应和关联关系,不能借助波形直观的调试代码;c、如果观察的信号太多,由于其是实时全信号显示,在仿真时间较长后,仿真速度明显减慢,屏幕的刷新速度也明显减慢。•b)这些缺点不单Modelsim有,其他的优秀仿真工具也有,而且历史由来以久,因此很早人们就提出了“先转储后观察调试”方法,在verilog语言中以$dumpXXX开头的系统函数就是做波形转储用的。就是先将波形先存在文件中,等仿真结束后在调出来显示观察和调试。•c)这种观察功能很多EDA工具都有,并不足为奇;但Debussy的独特之处在于,它不但能显示波形,而且还能非常智能化的将波形中的任何一个变化和引起这个变化的RTL代码联系起来,使代码排错的效率大幅度提高。在原来IC所的一个大型项目中,由于引进了Debussy,使调试效率至少提高了3倍。45InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterDebussyDebussy的数据转存函数的数据转存函数•Debussy提供的新的波形文件格式FSDB(FastSignalDataBase),相比于VCD格式,压缩量大,比vcd文件小5-50倍,加载速度快。•Debussy提供了PLI(forVerilog)和FLI(forVHDL)接口,我们可以在仿真时直接导出FSDB文件。例如,在Verilog的测试模块中加入如下语句:initialbegin$fsdbDumpfile("test.fsdb");$fsdbDumpvars(0,test);end46InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterPLIPLI简介简介•PLI=VerilogProgramLanguageInterface,也称为VerilogPLI。简单来说,PLI提供一种接口,将用户编写的C或C++程序连接到verilog仿真器上,实现verilog仿真器的功能扩展和定制。•PLI接口主要提供以下三种功能。1。PLI接口允许用户编写自定义的systemtask和systemfunction。用户写出相应的PLI程序并连接到仿真器后,就可以在自己写的verilog程序中使用这些systemtask和function了。一旦这些task/function在仿真过程中被调用,仿真器就会找到对应的用户编写的PLI程序来执行,从而实现仿真器的定制。2。这个接口还允许用户在自己的PLI程序中与仿真器中实例化的verilog硬件进行交互,比如读一个wire的值,向一排reg写值,设置一个cell的delay,等等。不夸张地说,对于PLI程序而言,仿真器中的verilog实例完全是透明的,用户想对这些硬件做什么操作都可以。(当然,硬件结构不能修改)有了这个功能,用户就可以在自定义的task/function中对硬件执行某些用verilog语言难以完成的操作。3。某些特定的操作需要对仿真过程中一些信号的变化做出响应。虽然我们可以用always来监控少量信号的变化,但如果需要监测大量信号,这种机制并不现实。PLI接口提供了一种函数回调机制解决这个问题。用户可以将某个wire/reg等信号挂上一个PLI程序中的C函数,以后每当该信号变化,这个C函数都会被调用,从而很方便地实现信号监测。事实上,很多打波形的systemtask都是用这个方法实现的。47InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterLinkingDebussyPLIroutineswithMTILinkingDebussyPLIroutineswithMTIModelSimModelSim(5.2orlater)(5.2orlater)1.Locatepli.libandveriuser.c,whichDebussyprovidesinthefollowingdirectory:<install_dir>/share/PLI/modelsim_pli/WINNT/pli.lib<install_dir>/share/PLI/modelsim_pli/WINNT/veriuser.c2.IfyouareusingPLIapplicationswithyourModelSim,youneedtocombineyourexistingveriuser.candtheDebussy-providedveriuser.cintoasinglefile.IfyouarenotusingPLIapplicationswithyourModelSimyoucanusetheDebussy-providedveriuser.cfile.3.GeneratePLIdynamiclinklibrary(novas.dll)withthefollowingsteps:>cl-c-I/<modelsim_install_dir>/modeltech/includeveriuser.c>link-dll-out:novas.dll-nodefaultlib:libcmt-export:init_usertfsveriuser.objpli.libshell32.lib<modelsim_install_dir>\modeltech\WINNT\mtipli.libDebussyalsoprovidesabatchfile"make.bat"forusertomakea.dllfile.Youcanmodifyittofityourfiledirectory.Thefileisunder:<install_dir>\share\PLI\modelSim\WINNT4.Setthedynamiclinklibrarypathtothedirectorycontainingthelibraryproduced.Forinstance,youhavenovas.dllunder<user>/novas/PLI,add<user>/novas/PLItoyourLD_LIBRARY_PATHinyourwindowsenvironment.5.Edityourmodelsim.inifiletoinstructModelSimtoloadthesharedobjectproduced.*AddthisVeriuserentrytothe[VSIM]section:[VSIM].Veriuser=novas.dll48InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenterMODESIMMODESIM调用调用debussydebussy的系统函数的系统函数•CopyX:\Novas\Debussy\share\PLI\modelsim_pli\WINNT\novas.dlltoX:\modelsim\win32\•EditX:\modelsim\modelsim.iniandaddblockboxtext49InstituteofArtificialIntelligenceandRoboticsLiyongxjtu’soccenter编译编译(UI)(UI)点亮一个或多个文件并点击Compile ModelSim详解李永西安交大SOC设计中心2004.8 ModelSim仿真工具 ModelSim产品 Debussy是一个Verilog\VHDL调试工具 课程安排 Model技术公司的ModelSim 仿真的目的与分类 ModelSim实现方法 GUI基本仿真步骤 1?建立ModelSim工程 指定ModelSim工作库 Librarybrowser 2?加入源代码 compile 3?启动仿真器(loaddesign) 4?添加波形 5?运行(run) Wave窗口操作 Modelsim窗口命令记录 保存运行命令 将命令存储成.do格式,并调用 工程文件test.mpf ;MaximumiterationsthatcanberunwithoutadvancingsimulationtimeIterationLimit=5000License=license.dat;VSIMStar Modelsim使用中一些问题讨论 Command-linemode(命令行模式) 运行前工作目录下的文件 DOS下的命令行模式 Vlib和Vmap Vlib和Vmap命令后结果 Vlog命令 Vlog后Work目录下的信息 Vsim [-wlftlim<duration>][-wlfnocompress][-absentisempty][-foreign<attribute>][-nocollapse][-nofileshare][-noglitch][+no_g Batchmode 运行批处理文件前后比较 仿真Alter宏函数、LPM 在D:/installed/quartus/eda/sim_lib/modelsim/目录下建立alter_lpm库 在alter_lpm库下编译model220.v 在modlesim.ini文件添加alter_lpm库 ValueChangeDump(VCD)Files SDF(StandardDelayFormat)timingannotation. GUI窗口添加SDF文件 Debussy:仿真辅助调试工具: Debussy的数据转存函数 PLI简介 LinkingDebussyPLIroutineswithMTIModelSim(5.2orlater) MODESIM调用debussy的系统函数 编译(UI)
本文档为【MODELSIM 教程】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
春华秋实
人民教育工作者
格式:pdf
大小:1MB
软件:PDF阅读器
页数:0
分类:
上传时间:2020-03-13
浏览量:1