Table of Contents
To properly evaluate the effectiveness of any coverage tool, it is necessary to understand what kinds of logic are able to be analyzed and which kinds of logic are unable to be analyzed (along with a reason for why the logic cannot be adequately covered). Understanding the limitations of tools up front can often guide the user of those tools to make better decisions in their usage. In the case of Covered and the open source community, it may also help drive ideas to how to correct or get around these limitations.
For these reasons, a list of what type of logic can be analyzed and what type of logic cannot be currently analyzed is listed below. Note that both of these lists may not be exhaustive and are subject to change between releases of the tool. Also note that it is the goal of Covered to be able to parse all of the Verilog-1995, Verilog-2001, and a subset of SystemVerilog constructs though some portions of these may be ignored for coverage purposes.
All expressional logic which is comprised of the following data types and operators which exist in an assign block, always block, initial block, task, function or named begin/end block:
Nets: wire, tri, tri0, tri1, wor, wand, trior, triand, supply0, suppl1
Triregs: trireg
Registers: reg
Parameter values
String values
Integer values
Unary operators: +, -, ~, &, |, ^, ~&, ~|, ~^
Arithmetic operators: +, -, *, /, %
Logical operators: &&, ||, !
Relational operators: >, <, >=, <=
Equality operators: ==, ===, !=, !==
Bitwise operators: &, |, ^, ~&, ~|, ~^
Shift operators: <<, >>
Concatentation/replication operators: {}, {{...}}
Bit select operators: [], [:]
Conditional operator: ?:
case, casex, casez statements
if, if/else statements
Delays when delay value is integer
Delayed procedural assignments (i.e., "a = #5 b;
" or "a = @(c) b;
")
Event waits and triggers: wait, @(posedge), @(negedge), @(), ->
Repetition statements: for, while, repeat
Fork/join statements
Memories
$finish and $stop system calls
$time and $random system functions
Real numbers
Real number system tasks: $rtoi, $itor, $realtobits, $bitstoreal
$test$plusargs system function
The following system tasks are allowed within logic blocks being considered for coverage:
$display, $dumpall, $dumpfile, $dumpflush, $dumplimit, $dumpvars, $dumpoff, $dumpon, $fdisplay, $fmonitor, $fstrobe, $fwrite, $history, $key, $list, $log, $monitor, $monitoroff, $monitoron, $nokey, $nolog, $printtimescale, $showscopes, $showvariables, $showvars, $strobe, $timeformat, $write
`ifndef and `elsif directives
`file and `line directives
Constant functions calls
Inline parameter passing by name
Localparam support
Implicit event sensitivity lists: @*
Comma-separated event lists (alternative to the "or
" keyword)
Signed value support
Immediate register assignment (i.e., reg a = 1'b0
)
Variable multi-bit selects (i.e., a[b+:3]
, a[b-:3]
)
Exponential power operator: a**b
Arithmetic shift operators: <<<, >>>
Pre-port parameter listing (i.e., module foo #(parameter a=0) (...);
)
Inline port listing (i.e., module foo (input wire a, output reg b);
)
Attributes (note: Covered only performs attributes that it recognizes)
Arrays of instances
Generate blocks
"Automatic" or reentrant tasks/recursive functions
$value$plusargs system function call
The following system tasks are allowed within logic blocks being considered for coverage:
$dumpports, $dumpportsall, $dumpportsoff, $dumpportson, $dumpportslimit, $dumpportsflush, $fclose, $ferror, $fflush, $swrite, $swriteb, $swriteh, $swriteo, $ungetc
New integer types: char, byte, bit, logic, int, shortint, longint
Op-and-assign statements: +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=, <<<=, >>>=, ++, --
Proper support for always_comb, always_latch, always_ff, final
blocks
do..while
loops
Enumerations
Typedefs
$root scope support
Unnamed scope support
Multi-dimensional arrays including packed/unpacked dimensions and bit-select, part-select and slicing
Parsing support for unique
and priority
if/case labels
Parsing support for implicit .name ports (i.e., foo f( .a, .b, .c );
)
Parsing support for implicit .* ports (i.e., foo f( .* );
)
Parsing support for assertions, properties and sequences
Functional support for $urandom, $urandom_range, $srandom, $shortrealtobits, $bitstoshortreal
All gate types (i.e., buf, not, or, and,
etc.)
All user defined primitives (UDPs)
System task calls (or any $... call) that are not mentioned in the supported list above
When logic is encountered that cannot be analyzed within an always, initial, task, function or named block, Covered will disregard the entire always block. If the entire block cannot be analyzed, it does not try to get coverage statistics as these will most likely be incorrect (i.e., disregarded logic could affect the state of the logic that is being covered).