Code coverage is used to know that how much code simulation able to cover. It is generated from simulation tool with extra arguments given. Here some of commands listed to generated code coverage by using different simulators.
Add following with compile command
- VCS : -cm line+cond+fsm+tgl+branch+assert -cm_dir $(PHY_SIM_LOG).vdb
- Questa : +cover=bcesxf -coveropt 1
- IRUN : -coverage all -covdut <dut_module> -covfile <file>.tcl . Here tcl file is optional which can be used to pass different coverage parameters
Example of IRUN tcl file commands
Simulation command :
- Questa : coverage save -onexit $(PHY_SIM_LOG).ucdb ( add in simulation do file)
To merge coverage from all tests following commands can be used .
- VCS. : bsub -I urg -report merge_rpt -dbname merge.vdb -f list_vdb
- Questa.: vcover merge -out merge.ucdb -inputs list_ucdb
- IRUN : imc merge -out <out_dir> <cov_1> <cov_2>