DFT Rules Guide: Version J-2014.12 December 2014 Comments? E-Mail Your Comments About This Manual To
DFT Rules Guide: Version J-2014.12 December 2014 Comments? E-Mail Your Comments About This Manual To
Copyright 2014 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary
information that is the property of Synopsys, Inc. The software and documentation are furnished under a license agreement and
may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may
be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise,
without prior written permission of Synopsys, Inc., or as expressly provided by the license agreement.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Registered Trademarks ()
Synopsys, AMPS, Arcadia, C Level Design, C2HDL, C2V, C2VHDL, Cadabra, Calaveras Algorithm, CATS, CSim,
Design Compiler, DesignPower, DesignWare, EPIC, Formality, HSPICE, Hypermodel, iN-Phase, in-Sync, Leda, MAST,
Meta, Meta-Software, ModelAccess, ModelTools, NanoSim, OpenVera, PathMill, Photolynx, Physical Compiler,
PowerMill, PrimeTime, RailMill, Raphael, RapidScript, Saber, SiVL, SNUG, SolvNet, Stream Driven Simulator,
Superlog, System Compiler, Testify, TetraMAX, TimeMill, TMA, VCS, Vera, and Virtual Stepper are registered
trademarks of Synopsys, Inc.
Trademarks ()
abraCAD, abraMAP, Active Parasitics, AFGen, Apollo, Apollo II, Apollo-DPII, Apollo-GA, ApolloGAII, Astro, Astro-Rail,
Astro-Xtalk, Aurora, AvanTestchip, AvanWaves, BCView, Behavioral Compiler, BOA, BRT, Cedar, ChipPlanner, Circuit
Analysis, Columbia, Columbia-CE, Comet 3D, Cosmos, CosmosEnterprise, CosmosLE, CosmosScope, CosmosSE,
Cyclelink, Davinci, DC Expert, DC Expert Plus, DC Professional, DC Ultra, DC Ultra Plus, Design Advisor, Design
Analyzer, Design Vision, DesignerHDL, DesignTime, DFM-Workbench, DFT Compiler, Direct RTL, Direct Silicon
Access, Discovery, DW8051, DWPCI, Dynamic-Macromodeling, Dynamic Model Switcher, ECL Compiler, ECO
Compiler, EDAnavigator, Encore, Encore PQ, Evaccess, ExpressModel, Floorplan Manager, Formal Model Checker,
FoundryModel, FPGA Compiler II, FPGA Express, Frame Compiler, Galaxy, Gatran, HDL Advisor, HDL Compiler,
Hercules, Hercules-Explorer, Hercules-II, Hierarchical Optimization Technology, High Performance Option, HotPlace,
HSPICE-Link, iN-Tandem, Integrator, Interactive Waveform Viewer, i-Virtual Stepper, Jupiter, Jupiter-DP, JupiterXT,
JupiterXT-ASIC, JVXtreme, Liberty, Libra-Passport, Library Compiler, Libra-Visa, Magellan, Mars, Mars-Rail, MarsXtalk, Medici, Metacapture, Metacircuit, Metamanager, Metamixsim, Milkyway, ModelSource, Module Compiler, MS3200, MS-3400, Nova Product Family, Nova-ExploreRTL, Nova-Trans, Nova-VeriLint, Nova-VHDLlint, Optimum
Silicon, Orion_ec, Parasitic View, Passport, Planet, Planet-PL, Planet-RTL, Polaris, Polaris-CBS, Polaris-MT, Power
Compiler, PowerCODE, PowerGate, ProFPGA, ProGen, Prospector, Protocol Compiler, PSMGen, Raphael-NES,
RoadRunner, RTL Analyzer, Saturn, ScanBand, Schematic Compiler, Scirocco, Scirocco-i, Shadow Debugger, Silicon
Blueprint, Silicon Early Access, SinglePass-SoC, Smart Extraction, SmartLicense, SmartModel Library, Softwire,
Source-Level Design, Star, Star-DC, Star-MS, Star-MTB, Star-Power, Star-Rail, Star-RC, Star-RCXT, Star-Sim, StarSimXT, Star-Time, Star-XP, SWIFT, Taurus, Taurus-Device, Taurus-Layout, Taurus-Lithography, Taurus-Process,
Taurus-Topography, Taurus-Visual, Taurus-Workbench, TimeSlice, TimeTracker, Timing Annotator, TopoPlace,
TopoRoute, Trace-On-Demand, True-Hspice, TSUPREM-4, TymeWare, VCS Express, VCSi, Venus, Verification
Portal, VFormal, VHDL Compiler, VHDL System Simulator, and VMC are trademarks of Synopsys, Inc.
Contents
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Rules Are Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Manual Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Typographical and Symbol Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Leda Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Synopsys Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
7
7
8
8
8
9
9
Chapter 1
DFT Coding Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the DFT Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Limitations of DFT Policy with Respect to RTL DRC . . . . . . . . . . . . . . . . . . .
Data Capture Ruleset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFT_003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
11
12
13
14
14
Message: Avoid using both positive-edge and negative-edge triggered flip-flops in your
design
TEST_972 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Message: Clock affects both clock and data inputs of flipflops
TEST_973 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Message: Clock affects both clock and data inputs of latches
TEST_974 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Message: Latch enabled by a clock feeds latches enabled by the same clock
TEST_975 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Message: Latch enabled by a clock affects data input of flipflops clocked by the trailing edge
of the same clock
TEST_978 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Message: Latch data gates clocks of flipflops. Combination of latch data and clock signal to
clock a flipflop is not allowed
TEST_979 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Message: Latch data gates clocks enabling latches. Combination of latch data and clock
signal to clock a latch is not allowed
TEST_980 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Message: Flipflop data gates clocks to flipflops. Combination of flipflop data and clock
signal to clock a flipflop is not allowed
Contents
TEST_981 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Message: Flipflop data gates clocks enabling latches. Combination of flipflop data and clock
signal to clock a latch is not allowed
TEST_994 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Message: Clock affects multiple clock or async ports of register
DFT_008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Message: Tri-state is detected
DFT_009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Message: Register all outputs from the block for improved coverage: %s
TEST_960 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Message: Avoid asynchronous feedback loops
TEST_970 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Message: Clock affects data inputs of flipflops
TEST_971 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Message: Clock affects data inputs of latches
TEST_976 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Message: Latches capture only when more than one clock is on
TEST_977 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Message: Flipflops capture only when more than one clock is on
Informational Ruleset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
DFT_017 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Message: Synchronous reset/set/load <%item> detected
DFT_019 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Message: Asynchronous reset/set/load <%item> detected
DFT_021 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Message: Latch inferred
DFT_022 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Message: Incomplete case statement
TEST_953 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Message: Flipflops with clocks tied to a signal that is not driven by Test Clock. Flipflops'
clock signal is not reached by any Test Clock
TEST_954 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Message: Latches with clocks tied to a signal that is not driven by Test Clock. Latch clock
signal is not reached by any Test Clock
TEST_963 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Message: Flipflops have clocks with no off-state controllability. Test Clock reaches flipflops
but does not control them at beginning of cycle
Contents
TEST_964 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Message: Latches have clocks with no off-state controllability. Test Clock reaches latches
but does not control them at beginning of cycle
TEST_965 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Message: Latches not holding data in off-state. Test Clock reaches latch but does not hold
data in them at beginning of cycle
TEST_966 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Message: Flipflops have no asynch controllability. No Test Asynch reaches flipflop's async
control pin
TEST_967 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Message: Latches have no asynch controllability. No Test Asynch reaches latches async
control pin
TEST_968 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Message: Flipflops have asynchs that cannot be disabled. Test Asynch reaches flipflops but
cannot disable their asynch controls
TEST_969 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Message: Latches have asynchs that cannot be disabled. Test Asynch reaches latches but
cannot disable their asynch controls
Contents
Preface
Preface
About This Manual
This book contains reference information for prepackaged rules that come with the Leda
Checker tool. This information mirrors the information available in the HTML-based
help files that you access directly from the Leda Checker tools Error Report. The
purpose of this book is to provide a reference that you can view online or print out so
that you can review available prepackaged rules and decide which ones you want to use
before running the Checker tool on your HDL source files. On the other hand, the
HTML-based help system is designed to provide random access to this same
information from the Checker Error Report, so that you can quickly access more
information about a specific rule that was violated, including in some cases, circuit
diagrams and valid and invalid examples of Verilog or VHDL code.
This book is intended for use by hardware design and quality assurance engineers who
are already familiar with VHDL or Verilog.
There is a separate book for each policy (set of prepackaged rules) that Leda
supports.
Preface
Related Documents
This manual is part of the Leda document set. To see a complete listing or to navigate to
another online document in the set, refer to the Leda Document Navigator.
Manual Overview
This manual contains the following chapters and appendixes:
Preface
Chapter 1
DFT Coding Rules
Bold
Monospace
Italic or Italic
In body text:
In the previous example, prod_dir is the directory where your
product must be installed.
| (Vertical rule)
[ ] (Square brackets)
In this example, you must enter at least one pin name (pin1), but
others are optional ([pin2 pinN]).
Preface
Preface
10
1
DFT Coding Rules
Introduction
This chapter provides detailed reference information for the Design For Test (DFT)
policy for the Leda Checker tool. This set of rules checks for test design rule violations
within your RTL-level design. Most of the DFT rules have both flip-flop versions
(check on flip-flop) and latch versions (check on latch). The DFT rules are used to check
for design errors that can prevent scan insertion and data capture or reduce fault
coverage.
Note
There are more DFT rules in the DFT ruleset for the Design policy.
Most of the DFT rules are extracted from the set of rules used by the Synopsys RTL
DRC tool. Therefore, each DFT rule label in the Leda Checker tool exactly matches the
corresponding rule label prefixed with TEST in the RTL DRC tool. If you need more
detailed information on these DFT rules, see the RTL DRC help. Run dc_shell, and at
the prompt type:
% help TEST-rulenumber
For information about differences between the Leda DFT policy and the RTL DRC
checker, see Using the DFT Policy on page 12.
The Leda DFT rules are grouped into the following rulesets, each of which impose
constraints on different aspects of the applicable language:
Data Capture Ruleset on page 14
Fault Coverage Ruleset on page 30
Informational Ruleset on page 42
Scan Insertion Ruleset on page 46
11
Description
-test_asynch <RST>
-test_asynch_inverted <RST>
-test_clk_falling <CLK>
-test_clk_rising <CLK>
Note
12
13
DFT_003
Message: Avoid using both positive-edge and negative-edge
triggered flip-flops in your design
Description
This rule checks whether both rising and falling edge clocks exist
within the design.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Warning
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
14
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_003 (Clk, Reset, Din, Dout);
input Clk, Reset, Din;
output Dout;
reg Dout, Dout_temp;
always @(posedge Clk) // Posedege clock
begin
if (!Reset)
Dout_temp<= 0;
else
Dout_temp <= Din;
end
always @(negedge Clk)
begin
if (!Reset)
Dout <= 0;
else
Dout <= Dout_temp;
end
endmodule
Violations
14: always @(negedge Clk)
^
DFT_003.v:14: DATA_C> [WARNING] DFT_003: Avoid using both positive-edge
and negative-edge triggered flip-flops in your design
15
TEST_972
Message: Clock affects both clock and data inputs of
flipflops
Description
This rule checks if a clock signal drives both the data input and the
clock pin of a flip-flop.
For this rule to work, you must specify a test clock. For more
information, see Using the DFT Policy on page 12.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_972 ();
reg D, CP , CD, Q;
GTECH_FD2 U0 (.D(CP), .CP(CP), .CD(CD), .Q(Q));
endmodule
Violations
3: GTECH_FD2 U0 (.D(CP), .CP(CP), .CD(CD), .Q(Q));
^
TEST_972.v:3: DATA_C> [ERROR] TEST_972: Clock affects both clock and
data inputs of flipflops
16
D
Clk
FF
Ck
TEST-972
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
17
TEST_973
Message: Clock affects both clock and data inputs of latches
Description
This rule checks if a clock signal drives both the data input and the
clock pin of a latch.
For this rule to work, you must specify a test clock. For more
information, see Using the DFT Policy on page 12.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_973 (D, CP, CD, Q);
input D, CP, CD;
output reg Q;
GTECH_LD3 U0 (.D(CP), .G(CP), .CD(CD), .Q(Q));
endmodule
Violations
4:
18
Clk
Latch
Ck
TEST-973
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
19
TEST_974
Message: Latch enabled by a clock feeds latches enabled by
the same clock
Description
The rule detects if a latch output enabled by a given clock affects the
data input of latches using the same clock.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_974 (D, CP, CD, Q);
input D, CP, CD;
output reg Q;
reg Q_tmp;
GTECH_LD3 U0 (.D(D), .G(CP), .CD(CD), .Q(Q_tmp));
GTECH_LD3 U1 (.D(Q_tmp), .G(CP), .CD(CD), .Q(Q)); // TEST_974 flags here
endmodule
Violations
6:
20
Example
The following circuit diagram illustrates the problem:
C
k
D
C
k
L
atch
C
lk
L
atch
TE
ST-974
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
21
TEST_975
Message: Latch enabled by a clock affects data input of
flipflops clocked by the trailing edge of the same clock
Description
The rule detects if a latch output enabled by a given clock affects the
data input of flip-flops using the trailing edge of the same clock.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_975 (D, CP, CD, Q);
input D, CP, CD;
output reg Q;
reg Q_tmp;
GTECH_LD3 U0 (.D(D), .G(CP), .CD(CD), .Q(Q_tmp));
always @ (negedge CP)
Q <= Q_tmp;
// TEST_975 flags here
endmodule
Violations
7:
Q <= Q_tmp;
^
TEST_975.v:7: DATA_C> [ERROR] TEST_975: Latch enabled by a clock affects
data input of flipflops clocked by the trailing edge of the same clock
22
Example
The following circuit diagram illustrates the problem:
C
lk
C
k
L
atch
FF
C
k
TE
ST-975
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
23
TEST_978
Message: Latch data gates clocks of flipflops. Combination
of latch data and clock signal to clock a flipflop is not
allowed
Description
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
C
lk
C
k
L
atch
FF
C
k
TE
ST-978
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
24
TEST_979
Message: Latch data gates clocks enabling latches.
Combination of latch data and clock signal to clock a latch
is not allowed
Description
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
C
k
D
C
k
L
atch
C
lk
L
atch
TE
ST-979
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
25
TEST_980
Message: Flipflop data gates clocks to flipflops. Combination
of flipflop data and clock signal to clock a flipflop is not
allowed
Description
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
D
C
lk
FF
FF
C
k
C
k
TE
ST-980
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
26
TEST_981
Message: Flipflop data gates clocks enabling latches.
Combination of flipflop data and clock signal to clock a latch
is not allowed
Description
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
C
lk
FF
D
C
k
C
k
L
atch
TE
ST-981
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
27
TEST_994
Message: Clock affects multiple clock or async ports of
register
Description
This rule detects if a clock feeds into a clock pin and a asynchronous
control of a given register.
Policy
DFT
Ruleset
DATA_CAPTURE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_994 (D, CP, CD, Q);
input D, CP, CD;
output reg Q;
GTECH_FD2 U0 (.D(D), .CP(CP), .CD(CP), .Q(Q));
endmodule
Violations
4:
28
Example
The following circuit diagram illustrates the problem:
FF
Ck
Clk
TEST-994
29
DFT_006
Message: Multiple clocks in the unit
Description
None
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Block-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
30
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_006 (D, CP1, CP2, CD, Q1, Q2);
input D, CP1, CP2, CD;
output reg Q1, Q2;
reg Q_tmp;
wire CP_gate;
always @ (posedge CP1 or negedge CD)
if(CD)
Q1 <= 0;
else
Q1 <= D;
always @ (posedge CP2 or negedge CD)
if(CD)
Q2 <= 0;
else
Q2 <= D;
endmodule
Violations
12:
31
DFT_008
Message: Tri-state is detected
Description
None
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Block-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_008 ();
wire tristate, En;
assign tristate = En ? 0 : 1'bZ;
endmodule
Violations
3:
32
DFT_009
Message: Register all outputs from the block for improved
coverage: %s
Description
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_009 (din, dout);
input din;
output dout;
assign dout = din;
endmodule
Violations
3: output dout;
^
DFT_009.v:3: FAULT_> [ERROR] DFT_009: Register all outputs from the
block for improved coverage: DFT_009.dout
33
TEST_960
Message: Avoid asynchronous feedback loops
Description
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
34
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_960 ( CLK , RST , DATA_IN , AUX , DATA_OUT );
input CLK;
input RST;
input DATA_IN;
input [2:0] AUX;
output DATA_OUT;
reg FF_DATA_IN;
reg FF_DATA_OUT;
wire AND1 ,AND2;
wire OR1;
always @(posedge CLK or negedge RST)
if(!RST)
FF_DATA_IN <= 1'b0;
else
FF_DATA_IN <= DATA_IN;
assign OR1 = AUX[2] | AUX[1] | AUX[0] | AND2 | FF_DATA_IN ;
// TEST_960 flags in the above line
Violations
21: assign OR1 = AUX[2] | AUX[1] | AUX[0] | AND2 | FF_DATA_IN ;
^
TEST_960.v:21: FAULT_> [ERROR] TEST_960: Avoid asynchronous feedback
loops
35
TEST_970
Message: Clock affects data inputs of flipflops
Description
This rule checks if a clock interacts with the data input of a flip-flop.
For this rule to work, you must specify a test clock. For more
information, see Using the DFT Policy on page 12.
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_970 (D1, D2, CP1, CP2, CD1, CD2, Q1, Q2);
input D1, D2, CP1, CP2, CD1, CD2;
output reg Q1 , Q2;
GTECH_FD2 U0 (.CP(CP1), .D(D1), .CD(CD1), .Q(Q1));
GTECH_FD2 U1 (.CP(CP2), .D(CP1), .CD(CD2), .Q(Q2));// TEST_970 flags here
endmodule
Violations
6:
36
Clk2
FF
Ck
Clk1
TEST-970
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
37
TEST_971
Message: Clock affects data inputs of latches
Description
This rule checks if a clock interacts with the data input of a latch.
For this rule to work, you must specify a test clock. For more
information, see Using the DFT Policy on page 12.
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following example of invalid Verilog code exhibits this problem:
module TEST_971_fail (D1, D2, CP1, CP2, CD1, CD2, Q1, Q2);
input D1, D2, CP1, CP2, CD1, CD2;
output reg Q1 , Q2;
GTECH_LD3 U0 (.G(CP1), .D(D1), .CD(CD1), .Q(Q1));
GTECH_LD3 U1 (.G(CP2), .D(CP1), .CD(CD2), .Q(Q2)); // TEST_971 flags here
endmodule
Violations
6:
38
Example
The following circuit diagram illustrates the problem:
Ck
Clk1
Latch
Clk2
TEST-971
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
39
TEST_976
Message: Latches capture only when more than one clock is
on
Description
This rule checks if a latch can be used as a part of a scan chain. If so,
a latch having multiple clocks to enable data must be able to capture
data with one clock active and all others off.
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
D
Latch
C lk 2
C lk 1
Ck
L o g ic m u st b e a c o m b in a tio n o f g a te s
re sp e c tin g th e fo llo w in g ru le s :
- C lo c k a n d d a ta a re A N D e d
- T w o c lo c k s a re O R e d
T E S T -9 7 6
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
40
TEST_977
Message: Flipflops capture only when more than one clock
is on
Description
Policy
DFT
Ruleset
FAULT_COVERAGE
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
FF
Clk2
Clk1
Ck
TEST-977
41
Informational Ruleset
The following rules are from the informational ruleset:
DFT_017
Message: Synchronous reset/set/load <%item> detected
Description
None
Policy
DFT
Ruleset
INFORMATIONAL
Language
VHDL/Verilog
Type
Block-level
Severity
Warning
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_017 (SyncRst, B, Clk, C);
input SyncRst;
input B;
input Clk;
output C;
reg C;
always @ (posedge Clk)
begin
if (SyncRst == 1)
C <= 0;
end
endmodule
Violations
9:
if (SyncRst == 1)
^^^^^^^
DFT_017.v:9: INFORM> [WARNING] DFT_017: Synchronous reset/set/load
SyncRst detected
42
DFT_019
Message: Asynchronous reset/set/load <%item> detected
Description
None.
Policy
DFT
Ruleset
INFORMATIONAL
Language
VHDL/Verilog
Type
Block-level
Severity
Note
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
43
DFT_021
Message: Latch inferred
Description
Policy
DFT
Ruleset
INFORMATIONAL
Language
VHDL/Verilog
Type
Block-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following example of invalid Verilog code exhibits this problem:
module DFT_021 (B, Clk, C);
input B;
input Clk;
output C;
reg C;
always @ (Clk)
begin
if (B)
C <= B;
end
endmodule
Violations
9:
C <= B;
^
DFT_021.v:9: INFORM> [ERROR] DFT_021: Latch inferred for C
44
DFT_022
Message: Incomplete case statement
Description
This rule fires if all the alternatives of the case statement are not
covered and if there is no default clause.
Policy
DFT
Ruleset
INFORMATIONAL
Language
Verilog
Type
Block-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following examples show valid and invalid coding styles:
module DFT_022 (gate, q);
input [1:0] gate;
output q;
reg q;
always @gate begin // DFT_022:Incomplete case statement
case (gate)
// DFT_022 flags here
2'b00: q = 1'b0;
2'b10: q = 1'b1;
endcase
end
endmodule
Violations
7:
case (gate)
^^^^
DFT_022.v:7: INFORM> [ERROR] DFT_022: Incomplete case statement
45
DFT_002
Message: Internally generated clock detected
Description
This rule verifies that all clocks are controllable from the top level of
the design and not internally generated via a sequential block.
Rationale: internally generated clocks may not be controllable from
the boundary of the chip. This reduces test coverage.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
Example
The following examples show valid and invalid coding styles:
module DFT_002 ();
reg Clk, Din, Dout;
always @ (posedge Clk)
Dout <= Din;
endmodule
Violations
2:
46
TEST_953
Message: Flipflops with clocks tied to a signal that is not
driven by Test Clock. Flipflops' clock signal is not reached
by any Test Clock
Description
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_953 (TstClk, Din, Dout);
input TstClk;
input Din;
wire Clk; // Not driven by Test Clock
output reg Dout;
reg Dout1;
always @ (posedge Clk)
Dout <= Din;
// TEST_953 flags here
always @ (posedge TstClk)
Dout1 <= Din;
endmodule
Violations
8:
47
D
Test_C
k
FF
C
k
C
P
TEST-953
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
48
TEST_954
Message: Latches with clocks tied to a signal that is not
driven by Test Clock. Latch clock signal is not reached by
any Test Clock
Description
This rule checks whether the latch clock is uncontrollable. That case
occurs when the test clock does not reach any signal which drives the
clock input pins of latches.
For this rule to work, you must specify a test clock. For more
information, see Using the DFT Policy on page 12.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_954 (TstClk, Din, Dout);
input TstClk;
input Din;
wire Clk; // Not driven by Test Clock
output reg Dout;
reg Dout1;
GTECH_LD1 U0 (.D(Din), .G(Clk), .Q(Dout));
// TEST_954 flags here
GTECH_LD1 U1 (.D(Din), .G(TstClk), .Q(Dout1));
endmodule
Violations
8:
49
D
Test_C
k
C
k
L
atch
Example
The following circuit diagram illustrates the problem:
EN
TEST-954
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
50
TEST_963
Message: Flipflops have clocks with no off-state
controllability. Test Clock reaches flipflops but does not
control them at beginning of cycle
Description
This rule detects if the test clock reaches flip-flops but the flip-flop
clocks cannot change state as result of test clock toggling.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_963 (TstClk, Din, Dout);
input TstClk;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
assign Clk = TstClk | Dout;
GTECH_FD1 U0 (.D(Din), .CP(Clk), .Q(Dout));
GTECH_FD1 U1 (.D(Din), .CP(TstClk), .Q(Dout1));
endmodule
Violations
8:
51
FF
FF
Test_Ck
CP
TEST-963
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
52
TEST_964
Message: Latches have clocks with no off-state
controllability. Test Clock reaches latches but does not
control them at beginning of cycle
Description
This rule detects if the test clock reaches latches but the latch clocks
cannot change state as result of test clock toggling.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_964 (TstClk, Din, Dout);
input TstClk;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
assign Clk = TstClk | Dout;
GTECH_LD1 U0 (.D(Din), .G(Clk), .Q(Dout));
GTECH_LD1 U1 (.D(Din), .G(TstClk), .Q(Dout1));
endmodule
Violations
8:
53
FF
Q
Latch
Test_Ck
EN
TEST-964
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
54
TEST_965
Message: Latches not holding data in off-state. Test Clock
reaches latch but does not hold data in them at beginning of
cycle
Description
This rule detects if the test clock does not hold data at the beginning
of the test clock cycle.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_965 (TstClk, Din, Dout);
input TstClk;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
assign Clk = ~TstClk;
GTECH_LD1 U0 (.D(Din), .G(Clk), .Q(Dout));
GTECH_LD1 U1 (.D(Din), .G(TstClk), .Q(Dout1));
endmodule
Violations
8:
55
T
e
s
t
_
C
k
E
N
T
E
S
T
9
6
5
D
T
e
s
t
_
C
k
L
a
t
c
h
L
a
t
c
h
E
N
T
E
S
T
9
6
5
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
56
TEST_966
Message: Flipflops have no asynch controllability. No Test
Asynch reaches flipflop's async control pin
Description
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following circuit diagram illustrates the problem:
Rst
D
Test_Async
FF
TEST-966
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
57
TEST_967
Message: Latches have no asynch controllability. No Test
Asynch reaches latches async control pin
Description
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_967 (TstClk, Din, Dout, TstRst);
input TstClk, TstRst;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
assign Clk = TstClk | Dout;
GTECH_LD3 U0 (.D(Din), .CD(),
.G(TstClk), .Q(Dout)); // TEST_967 flags here
GTECH_LD3 U1 (.D(Din), .CD(TstRst), .G(TstClk), .Q(Dout1));
endmodule
Violations
8:
58
Rst
Q
Latch
D
Test_Async
TEST-967
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
59
TEST_968
Message: Flipflops have asynchs that cannot be disabled.
Test Asynch reaches flipflops but cannot disable their
asynch controls
Description
This rule detects if the test asynch reaches flip-flops but cannot
disable their async controls.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_968 (TstClk, Din, Dout, TstRst);
input TstClk, TstRst;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
wire RstOred, Rst;
assign RstOred = TstRst | Rst;
GTECH_FD2 U0 (.D(Din), .CD(RstOred), .CP(TstClk), .Q(Dout));
// TEST_968 flags in the above line
GTECH_FD2 U1 (.D(Din), .CD(TstRst), .CP(TstClk), .Q(Dout1));
endmodule
Violations
9:
60
Test_Async
D
Test_Async must disable
the asynchronous pin of the
flipflop
FF
TEST-968
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
61
TEST_969
Message: Latches have asynchs that cannot be disabled.
Test Asynch reaches latches but cannot disable their
asynch controls
Description
This rule detects if the Test_async reaches latches but cannot disable
their async controls.
Policy
DFT
Ruleset
SCAN_INSERTION
Language
VHDL/Verilog
Type
Chip-level
Severity
Error
Example
The following examples show valid and invalid coding styles:
module TEST_969 (TstClk, Din, Dout, TstRst);
input TstClk, TstRst;
input Din;
wire Clk;
output reg Dout;
reg Dout1;
wire RstOred, Rst;
assign RstOred = TstRst | Rst;
GTECH_LD3 U0 (.D(Din), .CD(RstOred), .G(TstClk), .Q(Dout));
// TEST_969 flags in the above line
GTECH_LD3 U1 (.D(Din), .CD(TstRst), .G(TstClk), .Q(Dout1));
endmodule
Violations
9:
62
Test_Async
Q
Latch
TEST-969
For information on differences between Leda DFT checks and RTL DRC checks, see
Using the DFT Policy on page 12.
63
64