Code coverage Commands with VCS , Questa and IRUN

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

  • set_toggle_portsonly

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>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s