Reads coverage database generated by vivado simulator and exports it as HTML report.
Syntax
export_xsim_coverage [‑cov_db_name <args>] [‑cov_db_dir <args>]
[‑output_dir <arg>] ‑ccExclusionFile <arg> [‑report_format <arg>]
[‑merge_db_name <arg>] [‑merge_dir <arg>] [‑cc_fullfile]
[‑cc_instancescount <arg>] [‑file <arg>] [‑nolog] [‑log <arg>] [‑quiet]
[‑verbose]
Returns
Examples: export_xsim_coverage -cov_db_dir cov_db1 -cov_db_name cov_iter1 -output_dir cov_output1 -ccExclusionFile exclusion.txt export_xsim_coverage -cov_db_name db1 -cov_db_dir ./cRun1 -cov_db_name db2 -cov_db_dir ./cRun2 -output_dir ./report1 -merge_dir ./mergeDir -merge_db_name mergedDB -report_format all -nolog export_xsim_coverage -file ./cov_dbs.txt -output_dir ./report1 -cc_fullfile -cc_instancescount 200 -log ./custom.log.
Usage
| Name | Description |
|---|---|
[-cov_db_name]
|
Specify one or more coverage database names. Repeat for multiple: -cov_db_name db1 -cov_db_name db2. Default: ./xsim.covdb/<snapshot_name> |
[-cov_db_dir]
|
Specify one or more coverage database directories. Repeat for multiple: -cov_db_dir dir1 -cov_db_dir dir2. Default: . |
[-output_dir]
|
The HTML report files gets generated in report directory specified. Default: ./xsim_coverage_report |
-ccExclusionFile
|
Code coverage exclusion file |
[-report_format]
|
Specify desired format of Coverage report: html | text | all. Default: html |
[-merge_db_name]
|
Name for the merged coverage database output |
[-merge_dir]
|
Directory where the merged coverage database will be saved |
[-cc_fullfile]
|
Show the entire file in the code coverage report |
[-cc_instancescount]
|
Maximum number of instances shown in code coverage report. Default: 100 |
[-file]
|
Specify file with locations of coverage databases to restore |
[-nolog]
|
Suppress log file generation |
[-log]
|
Log file name. Default: xcrg.log |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
Categories
Description
Generates the Coverage report from the saved Coverage databases in the disk from the C++ databases maintained by the simulator (XSim) kernel. The same command can be used to generate coverage report for both the Functional Coverage or Code Coverage databases. The code coverage report will only be generated when the design is compiled with code coverage options enabled. In order to enable code coverage report generation user should turn on one of the following code coverage options in xelab:
-
-cc_celldefines- Specifies if code coverage information needs to be captured for libs/modules with cell define attribute set. OFF by default. -
-cc_libs- Specifies if code coverage information needs to be captured for all the libraries specified. OFF by default. -
-cc_db- Code Coverage DB Output will be saved inside<cc_dir_arg>/xsim.codeCov/<arg>. Default is<cc_dir_arg>/xsim.codeCov/<snapshot_name>. The database filename for code coverage would be xsim.CCInfo. -
-cc_dir- Code Coverage DB Output will be saved inside<arg>/xsim.codeCov/Default is./xsim.codeCov/ -
-cc_type- Specifies options for generating code coverage statistics (-bcst).-
b- Branch Coverage -
c- Condition Coverage -
s- Statement Coverage -
t- Toggle Coverage
-
The functional coverage report can only be dumped only when the design has System Verilog Functional Coverage constructs in the design. For functional coverage the database will be saved under <cov_dir_arg>/xsim.codeCov/<cov_db_arg>/xsim.covinfo.
Nothing is returned by this command.
Arguments
-cov_db_dir <arg> - (Optional) Specifies the database directory where the database is saved. The functional coverage database is saved under <cov_db_dir_arg>/xsim.covdb/<cov_db_name_arg>/xsim.covinfo and the code coverage database is written under <cov_db_dir_arg>/xsim.codeCov/<cov_db_name_arg>/xsim.CCInfo. The default value for this option is "." (the current directory).
-cov_db_name <arg> - (Optional) Specifies the database folder name inside the coverage database directory. The default value for this arguement is the simulation snapshot name.
-output_dir <arg> (Optional) Specifies the directory where the coverage report gets generated. The default value for this argument is ./xsim.covdb/report.
-open_html <arg> - (Optional) Specifies whether the HTML report is to be opened in a browser or not. The default value for this argument is false.
-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
set_msg_config command.Examples
Generate an export XSIM coverage report with databases inside the directory cov_db1 and the database folder named iter1. The HTML report is saved in report_dir and the open_html flag is set to open the report in a browser.
export_xsim_coverage -cov_db_dir cov_db1 -cov_db_name iter1 -output_dir report_dir -open_html true
Generate an export XSIM coverage report with databases inside the directory cov_db2 and the database folder name as the snapshot name. The HTML report is saved in report_dir and the open_html flag is set to open the report in a browser.
export_xsim_coverage -cov_db_dir cov_db2 -output_dir report_dir -open_html true
Generate an export XSIM coverage report with databases inside the current directory and the database folder named as the snapshot name. The HTML report is saved in report_dir and the open_html flag is set to open the report in a browser.
export_xsim_coverage -output_dir report_dir -open_html true
Generate an export XSIM coverage report with with databases inside the current directory and the database folder named as the snapshot name. The the HTML report is saved in the default report directory, and the open_html flag is set to open the report in a browser.
export_xsim_coverage -open_html true
Generate an export XSIM coverage report with with databases inside the current directory and the database folder named as the snapshot name. The HTML report is saved in the default report directory, and the open_html flag will take on the default value of false so the report is not opened in a browser.
export_xsim_coverage