﻿ Issues in Manual ECO

# Avoiding Pitfalls in Manual Functional ECO: Ensuring Logical Consistency

When performing a manual functional ECO, it is generally confined within the boundaries of a module. This approach is closest to RTL modifications, making it easier to understand and operate.

Figure 1: LEC basic diagram

The above image shows the basic principle diagram of a conventional LEC (Logic Equivalence Check). It maps key points (such as DFF, primary outputs, and blackbox inputs) in both the reference design and the implemented design, breaking the entire design into several logic cones. Each logic cone consists of N inputs and one output, with the middle being pure combinational logic circuits.

Applying stimuli to both the reference design and the implemented design simultaneously, each set of input stimuli will produce a determined output. If the reference design and the implemented design are logically equivalent, they will yield the same output. By traversing all possible inputs, it can be determined whether the two logic cones are equivalent. For example, with N inputs, there are 2^N possibilities. Applying all 2^N stimuli, if a different output is found for any set of stimuli, it can be concluded that the reference design and the implemented design are not logically equivalent, and the remaining stimuli do not need to be checked.

When performing functional ECO, the RTL is modified, typically using the module as the boundary, even if bug1, bug2, and bug3 are within the same logic cone. Therefore, when modifying the netlist, changes must be made to each module individually. If the changes span multiple modules, it may be necessary to add pins to the modules to pass signals.

Figure 2: Bugs cross module boundary

After making ECO modifications to each module, a top-level ECO is performed to resolve interconnection issues.

However, when making manual ECO modifications, often fixing one bug results in new bugs. Why does this happen?

Figure 3: Fixing one bug causes another

As shown in the above image, when the bug's fanout endpoint has more than one point, it may cause a situation where fixing one point results in failures at dozens of other points.

What should be done in such a situation? Follow the principle of "do not modify shared logic." If the logic is shared, copy the shared logic, leave the original logic untouched, and make modifications to the copied logic, as shown below.

Figure 4: Copying shared logic to avoid new bug introduced

In situations where a single net has multiple fanout endpoints, manual ECO might not easily detect this. It is necessary to use tools to trace all fanout endpoints to prevent inadvertently affecting other logic that originally passed.

This situation highlights a strong reason to adopt automatic functional ECO. In automatic ECO, any logic being fixed will have its fanout logic checked. Depending on the status of the fanout logic, the logic under fix can either be copied or fixed simultaneously with the fanout logic. This is the precise advantage of automatic functional ECO.