Contents

  1. Abstract
  2. ECO scenario
  3. Automatic Only ECO
  4. Mixed Automatic and Manual ECO
  5. Conclusion

Mixed Automatic and Manual ECO

Abstract

This use case shows how to use Gates On the Fly to do ECO by mixing Automatic Mode and Manual Mode. When Manual ECO is possible, it normally gives better solution than Automatic Mode. Pure manual work done on netlist text file directly is tedious and error-prone. Gates On the Fly supports GUI Mode and Script Mode to improve efficiency and accuracy of Manual ECO. In Script Mode, GOF has rich API sets to boost performance of Manual Mode ECO.

The following use case shows how to save hundred gates by mixing Automatic and Manual ECO.

ECO scenario

The netlist under ECO has one input bus port driving two combinational logic clouds (LOGIC A and LOGIC B) which may have overlap and drive two sets of flops STATE_A_reg and STATE_B_reg respectively.

Figure 1 The netlist under ECO has one input bus port drives two types of flops

The ECO requires a new input port "IN_B" being added to drive "LOGIC B" and flop "STATE_B_reg". And other flop "STATE_C_reg" has modifications as well which will be done by Automatic Mode.

 

Figure 2 The ECO requires to separate the two paths by a new port

Automatic Only ECO

The input bus port has width of 96 bits, when Automatic Mode ECO applies on the whole module, total ~120 new gates are needed in IN_A/IN_B separation. These new gates can be absorbed in full layer ECO. However in metal only ECO, it maybe impossible to find enough resources for these new gates.

# Automatic mode only
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
fix_design;

Automatic Mode only ECO script

Mixed Automatic and Manual ECO

Let's see how many gates we can save by mixing mode

A basic analysis on port "IN_A" shows, the port has two sets of fanouts, one is for "LOGIC A", the other is for "LOGIC B". If we can separate out the fanout for "LOGIC B" and reconnect the driver to port "IN_B", the ECO in this spot would be done without any new gate added. Or if there are few gates shared by "LOGIC A" and "LOGIC B", duplicate these gates and drive them separately. Gates On the Fly has APIs to do this type of Manual ECO.

Figure 3 Fanout analysis

So we decide to have two parts of ECOs, Fix 1 uses Manual mode, and Fix 2 uses Automatic mode.

Figure 4 Mixed ECO

# Mixed Automatic Mode and Manual Mode
# Any new gates added will be mapped to spare gates
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

# Fix the modified modules  
# Do Manual ECO first. For loop to separate IN_A and IN_B
set_top("state_control");
for(my $bit=0;$bit<96;$bit++){
  # Work on each 'IN_A' bit, get the loads of IN_A individual bit
  new_port("IN_B[$bit]");
  my @loads = get_loads("IN_A[$bit]"); # The result has Inst0 and Inst1 shown in figure 3
  foreach my $load (@loads){
    # The load is in (inst, pin) format for each load
    my ($inst, $pin) = @$load;
    my @out_pins = get_pins("-output", $inst);
    my @fanout_flops;
    foreach my $opin (@out_pins){
      my $out_net = get_net_of($opin);
      if($out_net){
        my @flop_endpoints = get_loads("-fanend", $out_net);
        push @fanout_flops, @flop_endpoits;
      }
    }
    my @flop_insts;
    # Only need flop instance names
    push @flop_insts, $_->[0] foreach @flop_endpoints;
    if(grep($_ =~ m/STATE_B_reg/, @flop_insts)){
      change_pin("$inst/$pin", "IN_B[$bit]");
    }
  }
}
# Then do Automatic ECO by 'fix_design' command
fix_design;

# Save final result
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 

Mixed Mode ECO script

 

The mixed mode has only 15 new gates added which are all for 'LOGIC C' changes.

Conclusion

Mixing Automatic ECO Mode and Manual ECO Mode can greatly improve ECO quality. It is especially important in Metal Only ECO where resource is very limited.


Follow us:
© 2024 NanDigits Design Automation. All rights reserved.