You are on page 1of 9

Usage Rules

W34 :
Macro defined but never used
Rule Severity : Info
Suggested Fix : Check all such cases. If you see a
macro reported that you think should be used,
suspect a possible typing error.
W88 : All elements of a memory are not set
The W88 rule does not check for memory elements
having non-static index. When testing logic, this
indicates that the model does not fully exercise
all paths into the memory and thus possible
errors in address selection may be masked.
Rule Severity : Warning

W120 :

A variable has been defined but is not


used (Verilog)
A signal/variable has been declared
but is not used (VHDL)
Rule Severity :
Warning
Suggested Fix:
Check all such cases. If you see a
variable reported that you think should be used,
suspect a possible typing error:

W121 :

A variable name collides with and may


shadow another
variable
Rule Severity :
Warning
Suggested Fix : In general, this is considered as loose
coding style. It is best to ensure that variables within
a given scope have unique names. Take cases reported
by this rule and change names so the rule is not

W123 :

Identifies the signals and variables that


are read but not set
Rule Severity :
Warning
Suggested Fix:
Check all such cases. If you see a
variable reported that you think should be used,
suspect a possible typing error:

W143 :

Macro has been redefined


Rule Severity :
Warning
Suggested Fix : If the macro is redefined with a
different value, rewrite the code to use a different
macro in the second case. Redefining the same macro
with a different value can make the code error-prone.

W154 :

Do not declare nets implicitly


Rule Severity :
Warning
Suggested Fix:
Explicitly declare all nets found by
this rule (after checking they are not a result of
spelling errors).

W175 :

A parameter/generic has been defined


but is not used
Rule Severity :
Warning
Suggested Fix : Confirm that parameter/generic is
really redundant. Remove it if possible to reduce
clutter in the design and to reduce warning messages
from SpyGlass.

W188 :

Do not write to input ports


Rule Severity :
Warning
Suggested Fix:
Buffer or gate the internal feedback
to ensure it cannot drive back out through the input
port.

W215 : Reports inappropriate bit-selects of


integer or time variables
When to Use : Use this rule to identify inappropriate
bit-selects of integer or time variables.
Rule Severity :
A violation is reported when a bitselect is used for an integer or time variable.
Suggested Fix : To fix the violation, remove the bitselect. If you want to select a bit from an integer
variable, either mask and shift, or assign the integer to
a reg and then do bit-select on the reg.

W216 :

Reports inappropriate range select for


integer or time variable
When to Use : Use this rule to identify inappropriate bitselects of integer or time variables.
Rule Severity :
A violation is reported when a bit-select
is used for an integer or time variable.
Suggested Fix : Remove the range select. If you want to
select a range from an integer variable, either mask and
shift, or assign the integer to a reg and then do range
select on the reg.

W240

: An input has been declared but is not read


Rule Severity : Warning
Suggested Fix : In most cases, you should remove the
input. This will force a change in design units instantiating
this module. In some special cases, for example scanenable, an unconnected input appears as a place holder
for later logic insertion. These cases should be waived.

W241

: Output is never set


Rule Severity : Warning
Suggested Fix : In most cases, you should remove the output.
This will force a change in design units that are instantiating this
module. In some special cases, an undriven output appears as a
place holder for later logic insertion. These cases should be
waived.

W333

: Unused UDP
Rule Severity : Warning
Suggested Fix : Check all such cases to make sure you expect the
UDP not to be instantiated in the design. To exclude such cases
from analysis, use the set_option top command.
W423 : A port with a range is redeclared with a different
range
Rule Severity : Warning
Suggested Fix : In some cases this may be a neat way of
compactly managing a calculation, but it can be confusing.
Recommend in general you avoid this style. If necessary, declare
and assign to a temporary bus of the appropriate width.

W468

: Index variable is too short


When a variable used to index a bit-select or array has a width narrower
than the width of the bus or the size of the array, some elements of the
bus or array will not be accessible.
Rule Severity : Warning
Suggested Fix : If possible, use an index large enough to span the full
range of the vector. If you intend to access only a lower subset of
bits, make this explicit by using a concat of the correct width with
upper bits set to zero, for example.

W493

: A variable is not declared in the local scope, that is, it


assumes global scope
Rule Severity : Fatal (Verilog) / Warning (VHDL)
Suggested Fix : It is always best to avoid coding which depends on
or creates side-effects. Pass values from other contexts explicitly as
parameters/arguments.

W529

: `ifdef is not supported by all tools


Rule Severity : Warning
Suggested Fix : Avoid using these directives in synthesizable logic.