24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Toggle coverage<br />

Enabling Toggle coverage<br />

Toggle coverage UM-343<br />

Toggle coverage is the ability to count <strong>and</strong> collect changes of state on specified nodes,<br />

including Verilog nets <strong>and</strong> registers <strong>and</strong> the following VHDL signal types: bit, bit_vector,<br />

std_logic, <strong>and</strong> std_logic_vector. Toggle coverage is integrated as a metric into the coverage<br />

tool so that the use model <strong>and</strong> reporting are the same as the other coverage metrics.<br />

There are two modes of toggle coverage operation - st<strong>and</strong>ard <strong>and</strong> extended. St<strong>and</strong>ard toggle<br />

coverage only counts Low or 0 High or 1 transitions. Extended toggle coverage counts<br />

these transitions plus the following:<br />

Z --> 1 or H<br />

Z --> 0 or L<br />

1 or H --> Z<br />

0 or L --> Z<br />

This extended coverage allows a more detailed view of testbench effectiveness <strong>and</strong> is<br />

especially useful for examining coverage of tri-state signals. It helps to ensure, for example,<br />

that a bus has toggled from high 'Z' to a '1' or '0', <strong>and</strong> a '1' or '0' back to a high 'Z'.<br />

Toggle coverage will ignore zero-delay glitches.<br />

In the Enabling code coverage (UM-337) section we explained that toggle coverage could be<br />

enabled during compile by using the ’t’ or ’x’ arguments with vcom -cover or vlog -cover.<br />

This section describes two other methods for enabling toggle coverage:<br />

1 using the toggle add comm<strong>and</strong> (CR-279)<br />

2 using the Tools > Toggle Coverage > Add or Tools > Toggle Coverage > Extended<br />

selections in the Main window menu.<br />

Using the toggle add comm<strong>and</strong><br />

The toggle add comm<strong>and</strong> allows you to initiate toggle coverage at any time from the<br />

comm<strong>and</strong> line. (See the Comm<strong>and</strong> Reference (CR-279) for correct syntax <strong>and</strong> arguments.)<br />

Upon the next running of the simulation, toggle coverage data will be collected according<br />

to the arguments employed (i.e., the -full argument enables collection of extended toggle<br />

coverage statistics for the six transitions mentioned above).<br />

Using the Main window menu selections<br />

You can enable toggle coverage by selecting Tools > Toggle Coverage > Add or Tools ><br />

Toggle Coverage > Extended from the Main window menu. These selections allow you<br />

to enable toggle coverage for Selected Signals, Signals in Region, or Signals in Design.<br />

After making a selection, toggle coverage statistics will be captured the next time you run<br />

the simulation.<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!