It is used in the dataset exercise in the Model Sim Tutorial. Once the signals are in the Wave window, you can Restart the simulation by.
The following is a simple DO file that was saved from the Main window transcript. do file by hand instead of manipulating signal names from the Wave window. Alternatively, you can save the Main window transcript to a DO file (see "Saving the Main window transcript file" ). You can create DO files, like any other Tcl script, by typing the required commands in any editor and saving the file. You invoke these scripts with the Macro > Execute Macro (Main window) menu selection or the do command. At this time, we enter r and press Enter to run the simulation time we set, and the waveform window will display the waveform of the time period we set.Model Sim macros (also called DO files) are simply scripts that contain Model Sim and, optionally, Tcl commands. After compiling the modified The file needs to be re-simulated. When one or several source files are modified, you can directly enter c and press Enter to compile. After entering the simulation directory, first run do simulate.do once and then enter c and press Enter to compile all files. The do file can be used when simulation is needed next time. Then select the signal to add to the waveform window to simulate the design and save the waveform file as wave.do. After opening modelsim, first execute do complie.do in the console to compile all source files (of course, premise There is already a work library). #Set the simulation time period displayed in the waveform window WaveRestoreZoom Īfter writing these three do files, put the three do files into the simulation root directory, which is the directory where the work library folder is located. In the Create Project dialog window that appears, do not modify anything except the project. #Set the simulation run time run 1690415000 ps G.2.1 Creating a New ModelSim Project and Importing Files 1. #Set the minimum simulation time and whether to optimize, replace the * after work with your simulation top-level name. After setting the simulation waveform and saving the wave, there will be a line of command in the console, just replace this line of command in the sw quotation mark. main_.vm.paneset.cli_0.wf.clip.cs.pw.wfĬontent in #sw quotation marks is modified according to the actual situation. After executing do simulate.do once, #input r in the console and press Enter is equivalent to executing do restart.doĪlias sw "write format wave -window. #Define the abbreviation of the console command to facilitate the use of do files and do commands in the console. The specific content of simulate.do is as follows:
I wrote 3 do files: simulate.do, restart.do, complie.do. It is necessary to observe the simulation results in different time periods, so the do file is used to facilitate the simulation.Ĭreate a new text file and modify the suffix to do to create your own do file. If it is still simulated as before, just compile the source file and add It takes a lot of time to check the signal, and the simulation takes a long time.
The code developed by different people is placed in a separate folder.
Yes, so the joint simulation of the front and rear modules is more important, and there are many signals that need to be introduced in the WAVE window. The projects I have recently contacted are relatively large, and several people do it separately. Simulations with modelsim only need to simulate some separate modules. Some of the projects that I have come into contact with are not very large. Using the do file in modelsim is a very convenient way to simulate.