eco - Synopsys DC

ECO Flow in Synopsys Design Compiler (DC):

ECO can be done by using Synopsys DC to manually add/remove cells or wires by using DC cmds.

DC cmds for ECO:

In all of below cmds, we need to set current design using "current_design" cmd before running any of below cmds, since these cmds work on current design.

1. create_cell => Creates leaf or hierarchical cells in the current design or its subdesigns. The created cells are unplaced. To place them use "set_cell_location" cmd. cell can be removed by using cmd remove_cell.

ex: create_cell {mid1/cell1} my_lib/AND2 => creates a cell named cell1 under the subdesign corresponding to the mid1 cell. This new cell references lib cell my_lib/AND2. Ports on the reference determine the name, number, and direction of pins on the new cell. The actual reference library cell to be used is determined by the current link library settings (i.e not necessarily from my_lib). Reference cell is needed unless we are using "-logic 0" or "-logic 1"  which specifies cell is logic0 or logic1 cell (tie-off cells).

ex: create_cell eco121_inv [get_lib_cells */INV1_LVT] => creates leaf cell named "eco121_inv" which references INV1_LVT

2. create_net => Creates nets in the current design or its subdesign.

ex: create_net {eco121_net1 eco121_net2} => creates these 2 nets. By default, it creates signal net. To create power or ground net, use option -power or -ground

3. create_port => Creates ports in the current design or its subdesign. Default direction for port is "in" or input port (possible values are in, out, inout)

ex: create_port -direction "out" {A1 A2 A3 A4} => creates 4 o/p ports

4. disconnect_net => it breaks the connections between a net or a net instance and its pins or ports. The net, pins, and ports are not removed.

ex: disconnect_net NET0 [get_pins U1/A] => Disconnectes net 'NET0' from pin 'U1/A'.

ex: disconnect_net MY_NET_1 -all => -all option causes all pins and ports connected to this net to be disconnected.

5. connect_net => Connects the specified net to the specified pins or ports. There are 2 rules for connect_net cmd to work:

  1. Connection can't be done across hierarchical bdry. The net can be at any level of hierarchy (by providing full hier of the net) but the pins or ports must be at the same level.Since ports are only at top level, that implies that to connect to ports, your net has to be at top level.
  2. You can't connect net to a pin/port that is already connected. I believe this is because the net will get connected to another net with different name, i.e same net with 2 different names. You should first disconnect existing net from the pin/port, and then connect to your new net. NOTE: A net can be connected to many pins or ports; however, you cannot connect a pin or port to more than one net.

syntax: connect_net  <net_name> <pins_or_ports_list>

ex: connect_net  [get_net net_eco1] [get_pin eco1_and_gate/A*] => connects net to i/p pins (A1 and A2) of and gate

6. connect_pin => Connects pins or ports at any level of hierarchy. This cmd can punch thru ports automatically across hier (make new ports and nets in submodules if needed), so useful since "connect_pin" cmd doesn't allow the pin or port to be at different hier. New nets are created to make connections. Name of new net is name of connecting port or new name is generated.

NOTE: This cmd is avilable in DC, but NOT in PT.

ex: connect_pin -from [get_pins U1/Z] -to [get_pins mid1/bot1/U3/A] => connects specified pins.

ex: connect_pin -from [get_pins U1/Z] -to [get_pins mod1/U2/A]  -port_name mod1_port1 => creates a port named mod1_port1 on "mod1" module, and connects the o/p and i/p pins they this port

 

ECO flow:

Above 6 cmds used extensively during ECO process. To view and make sure that all connections are as intended, we can use following cmds to help us view connections:

Finding all connections on a net => To display pins and ports on a net, use either the all_connected or get_nets -of $net command. This is needed when doing connect/disconnect nets for an eco, as many times it's not easy to see all the places the net is connected to. So, connect/disconnect cmds may leave nets in incorrect state. "report_net -connections" and "report_cell -connections" are also useful cmds to view connections.

Finding pins/nets of objects => Sometimes, we may not want to put exact net name connected to pin of a gate in eco script, as name of that net may be prone to change from netlist to netlist. Also, sometimes it may just be too time consuming trying to find net name connected to some cell by tracing the netlist. In such cases, it's easier to use get_net cmd with -of_objects option, i.e "get_net -of_objects mod1/cell1/A1". This will give the net name correctly all the times, so can be used in eco.tcl script below, instead of using "get_net mod1/net1".

Below is a sample of cmds that can be added to a tcl file to be sourced in DC.

ex: eco.tcl: Adds an inverter to flop i/p

current_design mod1
create_cell         eco_inv_I0 [get_lib_cells */INV_D1]
create_net         eco_net1_bar


connect_net      [get_net -of [get_pin my_reg/D]]   [get_pin eco_inv_I0/A] #connect net from i/p pin of flop to i/p pin of new inverter

disconnect_net  [get_net -of [get_pin my_reg/D]]  [get_pin my_reg/D]      #now disconnect net from i/p pin of flop. Thus D pin to net connection is broken. This disconnect needs to come to come after connect cmd above, order can't be reversed.
connect_net      [get_net eco_net1_bar]         [get_pin eco_inv_I0/Y]        #connect o/p pin of new inverter to new net
connect_net      [get_net eco_net1_bar]         [get_pin my_reg/D]            #now connect this new net to i/p pin of flop