24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UM-320 12 - Profiling performance <strong>and</strong> memory use<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

If memory allocation during elaboration is not a concern, the memory allocation profiler<br />

can be enabled at any time after the design is loaded by doing any one of the following:<br />

select Tools > Profile > Memory<br />

use the -m argument with the profile on comm<strong>and</strong> (CR-228)<br />

profile on -m<br />

click the Memory Profiling icon<br />

H<strong>and</strong>ling large files<br />

To allow memory allocation profiling of large designs, where the design itself plus the data<br />

required to keep track of memory allocation exceeds the memory available on the machine,<br />

the memory profiler allows you to route raw memory allocation data to an external file.<br />

This allows you to save the memory profile with minimal memory impact on the simulator,<br />

regardless of the size of your design.<br />

The external data file is created during elaboration by using either the<br />

-memprof+file= or the -memprof+fileonly= argument with the<br />

vsim comm<strong>and</strong> (CR-373).<br />

The -memprof+file= option will collect memory profile data during both<br />

elaboration <strong>and</strong> simulation <strong>and</strong> save it to the named external file <strong>and</strong> makes the data<br />

available for viewing <strong>and</strong> reporting during the current simulation.<br />

The -memprof+fileonly= option will collect memory profile data during both<br />

elaboration <strong>and</strong> simulation <strong>and</strong> save it to only the named external file. No data is saved for<br />

viewing <strong>and</strong> reporting during the current simulation, which reduces the overall amount of<br />

memory required by memory allocation profiling.<br />

Alternatively, you can save memory profile data from the simulation only by using either<br />

the -m -file or the -m -fileonly argument with the profile on<br />

comm<strong>and</strong> (CR-228).<br />

The -m -file option saves memory profile data from simulation to the<br />

designated external file <strong>and</strong> makes the data available for viewing <strong>and</strong> reporting during the<br />

current simulation.<br />

The -m -fileonly option saves memory profile data from simulation to only the<br />

designated external file. No data is saved for viewing <strong>and</strong> reporting during the current<br />

simulation, which reduces the overall amount of memory required by memory allocation<br />

profiling.<br />

After elaboration <strong>and</strong>/or simulation is complete, a separate session can be invoked <strong>and</strong> the<br />

profile data can be read in with the profile reload comm<strong>and</strong> (CR-230) for analysis. It should<br />

be noted, however, that this comm<strong>and</strong> will clear all performance <strong>and</strong> memory profiling data<br />

collected to that point (implicit profile clear). Any currently loaded design will be<br />

unloaded (implicit quit -sim), <strong>and</strong> run-time profiling will be turned off (implicit profile off<br />

-m -p). If a new design is loaded after you have read the raw profile data, then all internal<br />

profile data is cleared (implicit profile clear), but run-time profiling is not turned back on.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!