How to enable code coverage in truss script with modelsim

in

Hi All,
I need to run code coverage with model sim, please tell me the command and where to put that in truss run script.

Thanks in advance,
Mallesham Boini

Comments

look at .../truss/bin/truss

I can only help you with the second part (where to put it) as I haven't used code coverage through MTI.

But the place to put the commands are in the "truss/bin/truss" perl file.
The lines around line 88 to 131 defines the MTI compile options we use.
The lines 342 to 360 defines the run command.

I'm not sure how code coverage with MTI works, but you probably need to provide new compile time options (and probably not) run time options. Hopefully someone else know the procedure in more detail.

/Robert Ekendahl

Enabling code coverage in modelsim

Hi,
If you are using ModelSim SE, then you have the option of enabling code coverage at compile time using switch vlog or vcom -cover /metric options/ or during optimisation using vopt -cover /metric options/. (PE does not have opt functionality)
In order for the coverage statistics to be kept, the runtime option -coverage is also necessary (vsim -coverage)
The user manual has full details on using code coverage in ModelSim.
/gc

Back to top