Reset set flop swapping is very common in functional netlist ECO. In RTL code, the default value changes in reset statement can cause reset/set type flop swapping in the synthesis netlist. An ECO that is DFT friendly and timing friendly should make the minimum change in the circuit. In Figure 1, the flop needs to be swapped to set type flop from reset type. After ECO, the optimal, DFT friendly and timing friendly solution is directly replacing the flop by set type flop and keep scan chain and reset signal network untouched. This is how GOF ECO does.
Figure 1: Reset set flop swap, keep DFT and reset network untouched
A DFT unfriendly ECO has one non-scan flop with set type inserted to replace the original scan flop. And an extra MUX is added to select scan shift mode or functional mode. As shown in Figure 2, it is DFT unfriendly solution, though the DFT still works. And also the reset signal network has been modified to use other signal. Conformal ECO has such behavior.
Figure 2: DFT unfriendly solution
In Metal Only ECO, a close by set type spare flop maybe hard to find. Phase inversion method can be used to achieve the same reset/set swapping effect. By inserting inverts in D input and Q output driving functional fanout as shown in Figure 3, the ECO is done with minimum cost in Metal Only ECO. The phase inversion logic should have a special command in logic equivalence checking, set_mapping_method. See Flip-flop Phase Inverted for more detail.
Figure 3: In metal only ECO, use phase inversion to achieve reset set swapping effect