Skip to content

Instantly share code, notes, and snippets.

@connorjan
Last active May 3, 2017 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save connorjan/2e5387d488ff55eda3b45d1f3ba7affd to your computer and use it in GitHub Desktop.
Save connorjan/2e5387d488ff55eda3b45d1f3ba7affd to your computer and use it in GitHub Desktop.
Generating a SystemVerilog Functional Coverage Report Using IMC

Generating a SystemVerilog Functional Coverage Report Using IMC

  1. Be sure you are calling ncverilog with the following flags to enable coverage tracking: -coverage all -covoverwrite

  2. In your SystemVerilog program block be sure to call the following SystemVerilog system function: $set_coverage_db_name("database_name");. the "database_name" can be of your choosing

  3. After the simulation is complete, the simulator will write a database with the coverage information to the cov_work directory by default

  4. Create a file called imc_report.cmd and paste the commands that are below. This file simply tells imc to load the database and which information to save to the report file. Be sure to change the "database_name" so it matches with the parameter in step 2.

load ./cov_work/scope/database_name
exec mkdir -p report
report -out report/coverage.rpt -detail -metrics functional -all -aspect both -assertionStatus -allAssertionCounters -type *

To view more information about the imc report command simply run the following: imc -execcmd "help report"

  1. To generate the report run imc and pass it the command file created in the previous step: imc -exec imc_report.cmd
load ./cov_work/scope/database_name
exec mkdir -p report
report -out report/coverage.rpt -detail -metrics functional -all -aspect both -assertionStatus -allAssertionCounters -type *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment