Contents

  1. Abstract
  2. GofCall Script
  3. Start GOF and find the ECO spot
  4. Do changes in the script
  5. Verify the changes
  6. Final ECO script

Change a state machine

Abstract

Inserting MUXs into data pins of state machine is very common in state machine ECO. It's a convenient way to change the logic of a state machine while keep the original existing untouched.

GofCall Script

# Insert MUXs to data pins of flops
use strict;
undo_eco;
my $cdir = "/projects/wifi/net";
my $libdir = "/projects/wifi/lib";
my $name = "eco1545";
setup_eco($name);
set_log_file("eco_compensates.log");
read_library("$libdir/art18/typical.lib", 
	     "$cdir/mtdat/vlib/analog_module.vlib",
	     "$cdir/mtdat/vlib/macro_cells.vlib");
read_design("-imp",  "$cdir/imp_sanity_multi.v");

set_top("mt_core");

Start GOF and find the ECO spot

Save the above script in a file, 'eco_compensate.pl'. Run the command in shell:

gof -run eco_compensate.pl

Figure 1 GOF Shell in Terminal

In the shell, start GUI window by command 'start_gui'

Collect all instances in one schematic and figure out the connections.

Do changes in the script

Back to the script, add this while loop to fix all 4 flops.

for(my $i=0;$i<4;$i++){
   # In the pin connections, "-" means connecting up the original driver   
   # Click change_pin below for detail or read GOF Manual  
   my $pin_connections = ".A(-),.B(u_kb/ir_key_val_reg[$i]/Q),.S0(u_rdwr/wr_setup3)";
   change_pin("u_rtc3/compensate_reg[$i]/D", "MX2X4", "", $pin_connections);
} 

Verify the changes

Run the script with while loop code added. Use 'sch' command in shell to launch a schematic to verify the ECO changed done by the script.

GOF > sch("u_rtc3/compensate_reg[0]")

Use mouse-middle-button to expand the schematic and mouse-left-button to move the gates around.

From the schematic, we can see that the new added MUXs are in the top level. To add the MUXs in the same hierarchy 'u_rtc3' as the state machine flops, simply put "." as the instance name which was empty in the previous command.

for(my $i=0;$i<4;$i++){
   my $pin_connections = ".A(-),.B(u_kb/ir_key_val_reg[$i]/Q),.S0(u_rdwr/wr_setup3)";
   change_pin("u_rtc3/compensate_reg[$i]/D", "MX2X4", ".", $pin_connections);
} 

Redo the ECO and verify the result with partial schematic again.

Final ECO script

# Insert MUXs to data pins of flops
use strict;
undo_eco;
my $cdir = "/projects/wifi/net";
my $libdir = "/projects/wifi/lib";
my $name = "eco1545";
setup_eco($name);
set_log_file("eco_compensates.log");
read_library("$libdir/art18/typical.lib", 
	     "$cdir/mtdat/vlib/analog_module.vlib",
	     "$cdir/mtdat/vlib/macro_cells.vlib");
read_design("-imp",  "$cdir/imp_sanity_multi.v");

set_top("mt_core");
for(my $i=0;$i<4;$i++){
   my $pin_connections = ".A(-),.B(u_kb/ir_key_val_reg[$i]/Q),.S0(u_rdwr/wr_setup3)";
   change_pin("u_rtc3/compensate_reg[$i]/D", "MX2X4", ".", $pin_connections);
} 
write_verilog("eco_compensates.v");


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