Lockup latches/flops are used to fix hold time in scan chain. They don't affect non-scan functionality. However they would affect ECO result, if they are not taken care of properly.
The following paragraph describes a metal only ECO case which involves lockup latches. An optimal ECO can only be achieved when the lockups are handled specially.
The RTL changes involve gated clock enable signal logic update. Figure 1 shows the reference design has changes in gated clock enable signal logic.
Figure 1 Reference design has gated clock enable signal logic modification
The implementation design should have a corresponding patch in gated clock enable logic. However, the gated clock in the implementation design drives lockup latches which are not in the reference design.
Figure 2 Implementation design drives extra lockup latches
If no special treatment is done on the lockup latches, ECO result has redundant logic like a new gated clock cell, and duplicated enable signal logic as the items shown in Figure 3 in orange color. Either Automatic ECO flow of Gates On the Fly or other tool on the market like Conformal ECO gives the same result.
Figure 3 Redundant ECO logic created for the lockup latches
In this metal only ECO case, since no spare gated clock cell is available, 16 MUXs are needed to convert the gated clock which makes the resource even tighter and there is not enough spare gates to do the job at all.
Figure 4 Gated clock converted in metal only ECO
The right solution is to disconnect the lockup latches before automatic ECO. After ECO is done, connect back all lockup latches.
Figure 5 Solution to the lockup latches
# GofCall ECO script, run_metal_only_lockup_example.pl # Lockup latches are treated specially use strict; undo_eco; # Discard previous ECO operations # Setup ECO name, had better be unique to avoid naming confliction setup_eco("eco_example"); read_library("art.90nm.lib"); # Read in standard library read_design("-ref", "reference.gv"); # Read in the Reference Netlist read_design("-imp", "implementation.gv"); # Read in the implementation Netlist Which is under ECO # Disconnect lockup latches' clock pins before automatic fix set_top("state_control"); # Set to module 'state_control' my @locks = get_cells("lockup*"); # Get all cells with 'lockup' string my $oldcons = {}; foreach my $lock (@locks){ my @drv = get_driver("$lock/CK", "-nonbuf"); $oldcons->{$lock} = \@drv; change_pin("$lock/CK", ""); } fix_modules("state_control"); # Connect back lockup latches' clock pins set_top("state_control"); # Set to module 'state_control' foreach my $lock (@locks){ my ($inst, $pin, $dtype) = @{$oldcons->{$lock}}; change_pin("$lock/CK", "$inst/$pin"); } set_top("topmod"); # Set to the most top module # Now we need to map all new added ECO gates to spare type instances read_def("topmod.def"); # Read Design Exchange Format file, optional. # Specify spare cell pattern, when 'map_spare_cells' is done, # a new updated spare list file will be written out. # The updated spare list file has default name 'spare_cells_script_name.list'. # Click 'get_spare_cell' below for more usage detail get_spare_cells("*/*_SPARE*"); # Comment the above line and use the following line to use spare list file # if the spare list file has been generated already and gone through other ECOs # get_spare_cells("-file", "spare_list_file.txt"); map_spare_cells(); report_eco(); # ECO report write_verilog("eco_verilog.v"); # Write out ECO result in Verilog write_soce("eco_soce.tcl"); # Write out TCL script for SOC Encounter exit; # Exit when the ECO is done, comment it out to go to interactive mode when 'GOF >' appears
When there are multiple modules in 'fix_modules' command, a more complicated Perl data structure can be used for lockup handling.
my $oldcons = {}; foreach my $mod (@mods){ set_top($mod); # Set to module 'state_control' my @locks = get_cells("lockup*"); # Get all cells with 'lockup' string foreach my $lock (@locks){ my @drv = get_driver("$lock/CK", "-nonbuf"); $oldcons->{$mod}{$lock} = \@drv; change_pin("$lock/CK", ""); } } fix_modules("state_control"); # Connect back lockup latches' clock pins foreach my $mod (@mods){ set_top($mod); # Set to module 'state_control' my @locks = get_cells("lockup*"); # Get all cells with 'lockup' string foreach my $lock (@locks){ my ($inst, $pin, $dtype) = @{$oldcons->{$mod}{$lock}}; change_pin("$lock/CK", "$inst/$pin"); } }
In order to achieve optimal ECO solution, mixing Automatic ECO Mode and Manual ECO Mode is the best choice. It is especially important in Metal Only ECO where resource is very limited.