Concept of LEC and DFT
Concept of LEC and DFT
• LEC is a critical step in the ASIC design cycle that ensures the logical
functionality of a design remains unchanged throughout the various
stages of design transformation, such as synthesis, place and route,
and ECOs (Engineering Change Orders).
• If the functionality is altered at any stage in the design process, it can
render the entire chip unusable. This makes LEC one of the most
crucial checks in the entire chip design process.
• With shrinking technology nodes and increasing design complexity, LEC
plays an indispensable role in verifying that the design’s logic remains
consistent from the RTL to the final layout.
Reference Design Standard Library Revised design
Compare
Yes
Diagnose
Fail
No
LEC complete
Setup Mode:
Input Files:
• Golden Design: Typically, this is the synthesized netlist, regarded as the
reference or correct version.
• Revised Design: This is the version that has undergone modifications after
synthesis, such as post-layout or post-ECO netlists.
• Standard Library: The library of standard cells used in the design, which is
essential for accurate comparison.
Supporting Files:
• <design_name>.lec file: A script file guiding the tool through various
commands systematically.
• <design_name>.scan_const file: Contains scan-related constraints.
• <design_name>.stdlib file: Points to the standard cell library used in the
design.
Flattening and Modelling:
After loading the input files, the tool flattens and models both the Golden
and Revised designs. It then automatically detects and maps critical
elements, including:
- Primary Inputs/Outputs
- D Flip-Flops
- D Latches
- TIE-E (Error) Gates
- TIE-Z (High Impedance) Gates
- Black Boxes
Mapping Mode
Automatic Mapping: In this phase, the tool works to align the key points
between the Golden and Revised designs.
Mapping Methods:
•Name-Based Mapping: This approach matches key points based on their
signal or gate names, which is effective for handling minor logic changes.
•No-Name Mapping: This method is used when the designs have different
naming conventions or undergo significant structural changes.
Unmapped Points: Key points that the tool cannot map are categorized
into three types:
•Extra Unmapped Points: Points that exist in only one of the designs.
•Unreachable Unmapped Points: Points that lack an observable connection,
such as those not connected to a primary output.
•Not-Mapped Unmapped Points: Points that are accessible but not correctly
aligned between the two designs.
Compare Mode
Comparison Process:
The tool analyzes the mapped key points to determine if they are
logically equivalent. The comparison yields one of the following
outcomes:
•Equivalent
•Non-Equivalent
•Inverted-Equivalent
•Aborted (Inconclusive results)
Vector 2: A = 0, B = 1
Vector 3: A = 1, B = 0 A
OR Stuck at 1
Vector 4: A = 1, B = 1 B
Faults to Detect:
Stuck-at-0 Fault: Suppose the output of the AND gate is stuck at 0.
Stuck-at-1 Fault: Suppose the output of the OR gate is stuck at 1.
Observations:
Applying Test Vectors: •If the AND gate is stuck-at-0: For all test
1.Apply Vector 1 (A = 0, B = 0) vectors, the AND gate output should be 0
Expected AND output: 0 regardless of input values.
Expected OR output: 0 •If the OR gate is stuck-at-1: For all test
2.Apply Vector 2 (A = 0, B = 1) vectors, the OR gate output should be 1
Expected AND output: 0 regardless of input values.
Expected OR output: 1
Vector 1: Output matches expected values.
3.Apply Vector 3 (A = 1, B = 0) Vector 2: Output of the AND gate is correct, but
Expected AND output: 0 OR gate output should be 1, not 0 if stuck-at-1.
Expected OR output: 1 Vector 3: Output of the AND gate is correct, but
4.Apply Vector 4 (A = 1, B = 1) OR gate output should be 1, not 0 if stuck-at-1.
Expected AND output: 1 Vector 4: Output of the AND gate is correct, but
Expected OR output: 1 OR gate output should be 1, not 0 if stuck-at-1.
combinational circuit: controllability and
observability
In combinational circuits, controllability and observability are critical
metrics used to evaluate the testability of a circuit. These metrics help in
determining how easy it is to set a circuit node to a particular logic value
(controllability) and how easy it is to observe the effect of a particular node
at the circuit's output (observability).
Input Port
Output Port
Fanin
XOR Fanout
Controllability:
Controllability refers to the ease with which a specific internal signal or
node in a circuit can be controlled (set to a desired logic value) through the
circuit's primary inputs.
• High Controllability: A signal or node has high controllability if it can be
easily set to a logic '1' or '0' through the available inputs. This is usually the
case when the node is directly connected to the primary inputs or when
there is a simple path from the inputs to the node.
• Low Controllability: A signal or node has low controllability if it is difficult
to set to a particular logic value. This might occur if the node is buried
deep within the circuit, has a complex logic path from the inputs, or is
dependent on multiple inputs that need to be set in a specific way.
Observability
Observability refers to how easily the value of a particular internal signal or
node can be observed at the circuit's primary outputs.
• High Observability: A node has high observability if changes in its value
can be easily detected at the circuit’s outputs. This usually happens when
there is a direct and uncomplicated path from the node to the output.
• Low Observability: A node has low observability if it is difficult to observe
its effect on the circuit's outputs. This might occur if the node is deep
inside the circuit or its effects are masked by other logic elements before
reaching the output.
Importance in Testing
1.Test Generation: High controllability and observability are desired
because they make it easier to generate test vectors that can thoroughly
test the circuit. If a circuit node has low controllability or observability, it
may be challenging to create a test that fully verifies that part of the circuit.
2.Fault Detection: Low controllability or observability can make certain
faults difficult to detect. For example, if a fault occurs on a node with low
controllability, it might be difficult to stimulate the fault condition.
Similarly, if the node has low observability, it might be challenging to
observe the fault at the output.
3.Design for Testability (DFT): Techniques like scan chains and built-in self-
test (BIST) are often employed to improve the controllability and
observability of circuit nodes, making the circuit easier to test and
improving fault coverage.
Sequential Circuit: Controllability and
Observability
Controllability: Input Combinational Logic Output
•Problem in Sequential
Circuits: In sequential
circuits, setting a specific XOR Feedback
Observability:
• Feedback Loop: The circuit has a feedback loop, meaning the outputs of
the combinational logic are fed back as inputs to the flip-flops, which store
the present state. This feedback complicates the observability, as the
effect of a particular input on the output may not be immediately visible.
• State Dependency: The observability of the circuit depends on the current
state stored in the flip-flops. To observe the impact of a particular input on
the output, the circuit may need to be in a specific state, adding complexity
to the observation process.
Solutions and Techniques for Sequential Circuit
In sequential circuits, where controllability and observability are challenging
due to the dependency on previous states and feedback loops, there are
several solutions and techniques to address these difficulties:
1. Scan Design (Scan Chains):
• Scan Chains: The most common solution is to design the sequential
circuit with scan chains. This technique involves converting flip-flops into
scan cells, allowing them to be configured as shift registers during the test
mode.
• Test Mode: In test mode, scan chains shift in test patterns, making it easier
to control (set) and observe (capture) the internal state of the circuit.
• Benefits: This technique improves controllability by allowing the direct
setting of flip-flop states and enhances observability by easily shifting out
the contents of flip-flops for comparison.
2. Built-In Self-Test (BIST):
• Self-Test Mechanisms: BIST is an approach where the circuit has built-in
hardware to test itself. This is especially useful for complex systems
where external testing is difficult.
• Test Pattern Generation and Analysis: BIST circuits generate test
patterns and compare the results internally. This approach bypasses the
need for external test pattern generation and response analysis, thus
simplifying controllability and observability.
3. Partial Scan Design:
• Targeting Specific Flip-Flops: In some cases, not all flip-flops are
included in the scan chain. Only those that are critical for achieving better
controllability and observability are targeted.
• Balancing Overhead: This approach strikes a balance between improving
testability and minimizing the design overhead (area, power, and timing)
associated with full scan chains.
4. Test Point Insertion (TPI):
• Adding Control and Observation Points: Test point insertion involves
adding additional logic (e.g., multiplexers or control points) into the circuit
to improve the ability to control or observe certain signals.
• Strategic Placement: These test points are strategically placed at
locations where controllability or observability is particularly challenging.
5. ATPG with Sequential Patterns:
• Advanced Pattern Generation: Using Automatic Test Pattern Generation
(ATPG) tools capable of handling sequential circuits is another solution.
These tools can generate test patterns that account for state
dependencies, though they are more complex and time-consuming than
those for combinational circuits.
• Sequential Analysis: ATPG tools perform state traversal and generate
patterns that ensure the desired values are set and observed through
multiple clock cycles.
Scan Chain in Design for Testability (DFT)
• A scan chain is a series of flip-flops connected in a shift register
configuration. This configuration allows data to be shifted in and out
sequentially, making it easier to control and observe the internal states of a
circuit during testing.
Memory Memory
D Q_out D Q_out
D Flip-
TE Scan Flop
Flop
SE SO
SI
Clk Clk
Key Modifications in the Design:
1. Addition of Extra Primary Ports:
Test Mode (TM): A control signal used to switch the circuit between
normal operation and test mode.
Scan Enable (SE): Enables the scan operation, allowing the shift of data
through the scan chain.
Scan In (SI): The input port for the scan chain where test data is fed into
the scan cells.
Scan Out (SO): The output port of the scan chain where data is shifted
out for observation.
2. Replacement of D Flip-Flops with Scan Cells:
The original D flip-flops in the memory are replaced with scan cells,
which are specialized flip-flops that can function in both normal and test
modes.
1. Normal Mode: The circuit operates
Input Output
normally, with scan cells acting as Combinational
Logic Feedback
regular flip-flops. Scan path is
inactive; Test Mode (TM) is off.
2. Shift Mode: Test data is shifted in Memory
and out through the scan chain. D Q_out
Scan Enable (SE) is on, allowing
TE Scan Flop
data to move through the scan SE SO
cells. SI
Clk
3. Capture Mode: Outputs from the
combinational logic are captured Mode TE SE
into scan cells after test vectors are Normal 0 0
applied. SE is off, capturing data
from logic into scan cells with a Shift 1 1
Test
Pattern
Generator BIST Controller