The use cases show how to do metal only ECOs manually with GofCall ECO scripts. Directly editing netlist is error prone. The scripts avoid tedious netlist strings handling. The following examples assume that the ECO locations are known by users.
In the following ECO script, click the GofCall APIs to read the detail usage descriptions.
# Manual Metal Only ECO, manual_metal_eco_1.pl use strict; undo_eco; setup_eco("metal_eco0123"); set_log_file("metal_eco0123.log"); read_library("/prj/lib/tsmc40.lib"); read_design("-imp", "/prj/netlist/imp_net.v"); set_top("mtop"); # A MUX is inserted to instance 'rego' input pin 'D', # The input pin of the MUX 'A' connects to the original net # The input pin of the MUX 'B' connects to the other signal 'my_enable_signal' # The input pin of the MUX 'S' connects to 'select', # when high, 'my_enable_signal' is selected. change_pin("rego/D", "MX2X4", "", ".A(-),.B(my_enable_signal),.S(select)"); read_def("/prj/def/imp_net.def"); get_spare_cells("Spare_*/*_SPARE_GATE*"); map_spare_cells; # Synthesis is bypassed since all added ECO gates are spare types report_eco; write_verilog("imp_eco0123.v");
# Manual Metal Only ECO, manual_metal_eco_2.pl # User pick the exact spare instance name use strict; undo_eco; setup_eco("metal_eco0123"); set_log_file("metal_eco0123.log"); read_library("/prj/lib/tsmc40.lib"); read_design("-imp", "/prj/netlist/imp_net.v"); set_top("mtop"); # A MUX is inserted to instance 'rego' input pin 'D', # The input pin of the MUX 'A' connects to the original net # The input pin of the MUX 'B' connects to the other signal 'my_enable_signal' # The input pin of the MUX 'S' connects to 'select', # when high, 'my_enable_signal' is selected. # Pick the exact spare instance from the spare list change_pin("Spare_i0/U0_SPARE_GATE_mx0/A", "rego/D"); change_pin("Spare_i0/U0_SPARE_GATE_mx0/B", "my_enable_signal"); change_pin("Spare_i0/U0_SPARE_GATE_mx0/S", "select"); change_pin("rego/D", "Spare_i0/U0_SPARE_GATE_mx0/Y"); report_eco; write_verilog("imp_eco0123.v");
# Manual Metal Only ECO, manual_metal_eco_3.pl use strict; undo_eco; setup_eco("metal_eco0123"); set_log_file("metal_eco0123.log"); read_library("/prj/lib/tsmc40.lib"); read_design("-imp", "/prj/netlist/imp_net.v"); set_top("mtop"); new_port("nout7", "-output"); # Create a new port 'nout7' # Place the port to 60000, 1000000. It's approximate position, the main purpose is for # spare instances selection place_port("nout7", 60000, 100000); new_port("nout8", "-output"); # Create another port place_port("nout8", 120000, 81000); # 'nout8' is driven by an invert first, and the invert's input is driven by pin 'cmpmod/rego/QN' change_port("nout8", "INV_X1M", "", "cmpmod/rego/QN"); # Drive the 'nout7' by 'INV_X1M' and leave the input unconnected, but the mapped # spare instance name is returned. my $inst = change_port("nout7", "INV_X1M", "", ""); # Drive the new instance's input by a flop, and specify the flop's connection in the 4th argument change_pin("$inst/A","DFFRPQ_X4M","",".CK(cmpmod/rego/CK),.D(cmpmod/rego/QN),.R(1'b0)"); read_def("/prj/def/imp_net.def"); get_spare_cells("Spare_*/*_SPARE_GATE*"); map_spare_cells; # Synthesis is bypassed since all added ECO gates are spare types report_eco; write_verilog("imp_eco0123.v");