write_xsim_coverage - 2021.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2021-10-22
Version
2021.2 English

Dumps the current coverage database into the disk. A subsequent export_xsim_coverage should generate the corresponding coverage report.

Syntax

write_xsim_coverage [‑cov_db_name <arg>] [‑cov_db_dir <arg>] [‑quiet]
    [‑verbose]

Usage

Name Description
[-cov_db_name] Specify the coverage database that is to be saved. Default: <snapshot_name>, default snapshot_name is work.<simulation_top>
[-cov_db_dir] The output coverage database directory where the database will be saved. Default : .
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution

Categories

Description

Saves the Coverage databases into the disk from the C++ databases maintained by the simulator (XSim) kernel. The same command can be used to save both the Functional Coverage and Code Coverage databases. The code coverage database will only be written out when the design is compiled with code coverage options enabled. In order to enable code coverage 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 is 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

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.

-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.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

Examples

Write/Save XSIM coverage databases inside the directory cov_db1 with the database folder name as iter1.
write_xsim_coverage -cov_db_dir cov_db1 -cov_db_name iter1
Write/Save XSIM coverage databases inside the directory cov_db2 with the database folder name as the snapshot name.
write_xsim_coverage -cov_db_dir cov_db2
Write/Save XSIM coverage databases inside the current directory with the database folder name as the snapshot name.
write_xsim_coverage