Spare Cells

I have been writing an article on ECO flows.Of course I cannot talk about freeze_silicon ECOs without talking about spare cells.When I was a wee intern sitting through PnR training, spare cells confused me. I thought I had to insert the spares and use them in the same session! So here’s a small note about spare cells.

Spare cells are just that.They are extra cells placed in your layout in anticipation of a future ECO.When I say future, I mean after you taped out and got your silicon back.After silicon tests complete, it might become necessary to have some changes to the design.There might be a bug, or a very easy feature that will make the chip more valuable.This is where you try to use the existing “spare” cells in your design to incorporate the design change.For example, if you need a logic change that requires addition of an AND cell, you can use an existing spare AND to make this change. This way, you are ensuring that the base layer masks need no regeneration. The metal connections have changed, and hence only metal masks are regenerated for the next fabrication.

Inserting Spare Cells

Spare cells need to added while the initial implementation. There are two ways to do this.

  1. The designer adds separate modules with the required cells. You start your PnR with spare cells included, and must make sure that the tool hasn’t optimized them away. There can be more than one such spare modules, and they will be typically named spare* or some such combination. The inputs are tied to power or ground nets, as floating gates shouldn’t be allowed in the layout. The outputs are left unconnected.
    module spare_cells (  );
      INVX5 spare_inv1 ( .A(1'b0) );
      INVX5 spare_inv2 ( .A(1'b0) );
      DFFCPX2 spare_dff2 ( .D(1'b0), .CP(1'b0), .CLR(1'b0), .PREZ(1'b1) );
      DFFCPX2 spare_dff2 ( .D(1'b0), .CP(1'b0), .CLR(1'b0), .PREZ(1'b1) );
    spare_cells spare_i_1 (  );
    spare_cells spare_i_2 (  );
  2. Use a command provided by the PnR tool to add the spare cells to the netlist in placement stage. An example using ICCompiler command is given below.
    insert_spare_cells -lib_cell    {INVX5 \
                                    DFFCPX2 \
    		                } \
                                    -cell_name spare -num_instances 4 -tie -skip_legal
  3. Spare Cell Placement

    You need to give some thought as to where to place your spare cells in layout.They are not timing critical, and if you do not give any constraints, PnR tool will place them all together.However, you do not know which area of the layout will eventually require a connection to the spares.You can have two placement approaches.

    Sprinkled Spares

    Sprinkled Spares

    • Sprinkle the individual spare cells in your layout, so from any point you may have a reasonably close library cell.
    • Group the spare cells in multiple groups and sprinkle/place each group in the layout.
    Grouped Spares

    Grouped Spares

    If the spare cells are included in the netlist, you need to set an attribute `spare_cell` so that the PnR tool does no optimize these. If you do not set them as `spare_cell` or set a `dont_touch`, you will find that after placement all spare cells are gone.

    Given below is an example of spare cell placement as grouped instances. Here it is assumed that the spare cells are instantiated in the netlist as `spare_i_1 & spare_i_2`.

    	set physopt_tie_spare_cells true
    	set_attribute [get_cells  spare_i*/*] is_spare_cell true
    	spread_spare_cells [get_cells spare_i_1/*] -bbox {{30 30} {80 80}}
    	spread_spare_cells [get_cells spare_i_2/*] -bbox {{300 100} {350 150}}

    And here’s an example of inserting & placing spare cells using ICC. You can group the cells by giving cell names, which I haven’t done below. It is sprinkled individually instead.

    set physopt_tie_spare_cells true
    insert_spare_cells -lib_cell    {INVX5 \
                                    DFFCPX2 \
    				} \
                                    -cell_name spare -num_instances 2 -tie -skip_legal
    legalize_placement -incremental
    spread_spare_cells [get_cells spare*] -bbox {{30 30} {350 150}}

    Note that I have used a command `set physopt_tie_spare_cells true` in the examples above. This ensures that the inputs are tied to TIE cells in the subsequent placement stage, instead of connecting directly to the power or ground lines. If you want to control the number of pins connected to a TIE cell, use the command `set_max_fanout 1 libname/TIE*` before running the above commands.

33 comments on “Spare Cells

  1. Pingback: ECO | VLSI Pro

  2. Pingback: Physical Design Flow II:Placement | VLSI Pro

    1. Sini Post author

      Spare cells are not special cells. The existing cells from the used standard cell library are included as ‘spare’ cells. The only difference is that the input pins are tied to VDD/VSS instead of signals. So the internal structure is the same as any other NAND/NOR/AND/FF in the library.

      Some libraries may have special cells that can be metal programmed into any kind of cell that can be used as spare cells.

      1. Prashant

        Madam please tell me wat are spare cells and y do we use them and at which stage we use them?
        and tell me that what are the checks that we do after floorplanning and placement steps?

  3. renjith

    Could you please give a detailed description including pictures on Tie high and tie low cell. How it is helpful since we are using it to avoid the direct connection of gate of unused pins with VDD and GND…

  4. Sagar

    How do I insert/add a spare cell in the netlist which is generated by cadence rc labs.
    I want to know how it done and see it the placement stage.

    1. Sini Mukundan Post author

      If you are using Cadence EDI for placement, use the following command

      setPlaceMode -moduleAwareSpare true
      createSpareModule -moduleName spare_module -cell {DFF INV AND NAND NOR .... } -tie TIE0
      placeSpareModule -moduleName spare_module -channel -minWidth 5 -maxWidth 10 -minLength 11 -stepx 10 -stepy 10 -util 0.7

      After placement check the netlist to verify the spares.

  5. Sarath chandra

    Hi mam,
    Whats the difference between Link library and Target library?I have gone through EDA board website and got some clarity regarding this. But I want to know in what way these 2 libraries differ ?

    Thanks in advance

    1. Sini

      Consider you have the following components in your design
      1. Std cells from library stdA
      2. memory from memA
      3. A hard macro from AnaA
      4. Level shifters from lsA

      In this scenario, your link_library will have the paths to the .db files for all of the above libraries.

      Your target_library will be the .db of stdA, your standard cell library. This is the library the tool will use to synthesize(in case of synthesis) and optimize (in case of P&R).

  6. Sarvang Sanghavi

    If suppose after tapeout, i find that my spare cells aren’t of any use than is there any way to remove them ? Because as inputs of spare cells are connected to VDD/VSS , there would be some power drop at input of spare cells so is there any way to remove spare cells after tapeout ?

  7. Srinivas Kotha


    For spare cell which is a Flipflop , is clk pin of FF connected to any clock of design or is it floating?

  8. sanjeev

    Hi Ma’am
    Can you please tell, what is the command to add decap cells in ICC (to reduce the dynamic IR drop) at specific locations?


  9. Navunattha

    When I am adding spare cells it spreads everywhere. What if I want to group together all the spare cells(like you explained in 2 placement approaches) at particular coordinates .I am using cadence encounter tools and have used
    createSpareModule and placeSpareModule commands. When I use these commands a spare module is created with no instances in it despite giving TU as 70%. After placing of standard cells all spare cells get scattered away

    1. Sini Mukundan Post author

      You will have to group the spare cells and place them using a script.
      An easy way would be to have modules that you can group. Then create a group and region for that module. Write a script to place them.

      1. Navunattha

        I grouped all the spare modules using placeSpareModule -area command. When I create a region the spare modules donot get placed in that region. I need to place spare module in shape of + . All module are equidistant to each other. Is there any option to place spare modules with only 1 command

        1. Sini Mukundan Post author

          Write a script..
          An example you can edit…

          set sizeX 2000
          set sizeY 2000
          set xstart 0
          set ystart 0

          set xdiv 5
          set ydiv 3

          set xbox [expr $sizeX/$xdiv]
          set ybox [expr $sizeY/$ydiv]

          set count 1
          for {set i $xstart} {$i <= [expr {$sizeX-$xbox}]} {incr i $xbox} { for {set j $ystart} {$j <= [expr {$sizeY-$ybox}]} {incr j $ybox} { puts "createRegion inst$count\_spares $i $j [expr {$i+$xbox}] [expr {$j+$ybox}]" createRegion inst$count\_spares $i $j [expr {$i+$xbox}] [expr {$j+$ybox}] incr count } }

  10. shafi

    I am having trouble spreading spares cell coming from netlist in EDI.
    When I am adding the spares using CreateSpareModule it works fine, but when the gate netlist already includes the spare cells EDI places all of them clustered in a corner of the floorplan.
    I tried setPlaceMode -moduleAwareSpare false and specifySpareGate -inst before placeDesign, but it seems EDI do not understand these are spares and needs to be distributed (sprinkled).
    Could you please suggest me what else I can try?

    TIA and Regards

    1. Sini Mukundan Post author

      If the spare cells are connected to each other, use the following command before placeDesign
      ‘setPlaceMode -ignoreSpare true’

  11. bhaskar

    I included a flop in my group of spare cells and connected clk pin of flop to the main clock. Now I am seeing a huge skew between this pin and another flop driven by the same clock i.e. main clock. How should I address this issue? Should I excluded this spare cell in my cts spec file i.e using excludedpin in cts spec file?

    1. Sini Mukundan Post author

      I usually only connect the flop clock pin to 1’b0. However there is a chance of timing violation due to unbalanced sync when you finally use this flop. Your call.

  12. bhaskarg

    how do we know that, how much percentage of spare cells are required for a particular design…. or is there any formulae to know spare cells percentage with respect to no.of standered cells in design

    thanks in advance madam

    1. Sini Mukundan Post author

      No such numbers as I know of. The designer has to make an estimate of the cells he might need for any functional ECO in the later stages.

    1. Sini Mukundan Post author

      There is an option to connect the clock pins to any of your existing clock. This will help in making the spare flop part of the clock tree.
      You can also chose to connect the clk input to 1’b0. In this case, when the flop is used, you will need to connect it to an appropriate brach of clock tree manually.

  13. Maheswara reddy

    Hi maam,

    i added spare cells properly and tied with tie cells,

    but i am getting maxtran violations at input pins of spare cells,

    can help me what could be the reason fir that.

    thanks in advance

    1. Sini Mukundan Post author

      You need to check the fanout of the tie cells, and increase the number of cells if needed. There will be automatic commands to do that in you P&R tool.


    why we need to place spare cell at placement stage?why we didn’t place at time of ECO stage?while giving place_opt cmt it will move or not?could you plz explain madam.


Leave a Reply

Your email address will not be published. Required fields are marked *