Hello dear Electric's developers,

Could you please implement into Electric a new function.
This describes design summary info in the Cell/Cell\ Info section.

1) Insert the following

new EMenuItem("Design _Summary") { public void run() {

                   CellLists.designSummaryCommand(); }},

               SEPARATOR,


into section

   new EMenu("Cell In_fo",


in the file /tool/user/menus/CellMenu.java
/
2) Insert the following

/**

    * This method implements the command to describe Design Summary like 
Cadence of the current Cell.

    */

   public static void designSummaryCommand()

   {

       Cell curCell = WindowFrame.needCurCell();

       if (curCell == null) return;

       Library curLib = curCell.getLibrary();

       URL url = curLib.getLibFile();

       String editMode = "?";

       System.out.println("                Show Environment                      
");

       
System.out.println("******************************************************");

       System.out.println("Library   : " + curLib.getName());

       System.out.println("Cell      : " + curCell.noLibDescribe());

       if (url != null)

       {

           File f = new File(url.getPath());

           if (f.canRead())

               editMode = "Read";

           if (f.canWrite())

               editMode = "Write";

           System.out.println("Path      : " + url.getPath());

       }

       else

       {

           System.out.println("Path      : *Not Saved*");

           editMode = "Write";

       }

       System.out.println("Edit Mode : " + editMode);

       
System.out.println("******************************************************");

       TreeMap<Layer,GenMath.MutableInteger> layerTable = new 
TreeMap<Layer,GenMath.MutableInteger> ();

       TreeMap<Cell,GenMath.MutableInteger> instanceTable = new 
TreeMap<Cell,GenMath.MutableInteger> ();

       // Perform Arc layers

       for(Iterator<ArcInst> it = curCell.getArcs(); it.hasNext(); )

       {

           ArcInst ai = it.next();

           ArcProto ap = ai.getProto();

           for(int idx = 0; idx < ap.getNumArcLayers(); idx++)

           {

               Layer layer = ap.getLayer(idx);

               GenMath.addToBag(layerTable, layer);

           }

       }

       // Perform Node layers

       for(Iterator<NodeInst> it = curCell.getNodes(); it.hasNext(); )

       {

           NodeInst ni = it.next();

           if (ni.isCellInstance())

           {

               Cell subcell = (Cell) ni.getProto();

               GenMath.addToBag(instanceTable, subcell);

           }

           else

           {

               NodeProto np = ni.getProto();

               PrimitiveNode pn = (PrimitiveNode) np;

               Technology.NodeLayer[] nodeLayerList = pn.getNodeLayers();

               for (Technology.NodeLayer nl: nodeLayerList)

               {

                   if (nl.isPseudoLayer()) continue;

                   Layer layer = nl.getLayer();

                   GenMath.addToBag(layerTable, layer);

               }

           }

       }

       System.out.println("");

       System.out.println("              Layer Object Statistics                 
");

       
System.out.println("******************************************************");

       System.out.println("Count\tLayer");

       
System.out.println("******************************************************");

       int totalVal = 0;

       for (Map.Entry<Layer,GenMath.MutableInteger> e: layerTable.entrySet())

       {

           Layer layer = e.getKey();

           GenMath.MutableInteger count = e.getValue();

           System.out.printf("%5s\t%s\n", count, layer.getFullName());

           totalVal += count.intValue();

       }

       if (!layerTable.isEmpty())

           
System.out.println("******************************************************");

       System.out.println("Total: " + totalVal);

       System.out.println("");

       System.out.println("                Instance Statistics                   
");

       
System.out.println("******************************************************");

       System.out.println("Count\tInstance");

       
System.out.println("******************************************************");

       totalVal = 0;

       for (Map.Entry<Cell,GenMath.MutableInteger> e: instanceTable.entrySet())

       {

           Cell subcell = e.getKey();

           GenMath.MutableInteger count = e.getValue();

           System.out.printf("%5s\t%s\n", count, subcell.describe(false));

           totalVal += count.intValue();

       }

       if (!instanceTable.isEmpty())

           
System.out.println("******************************************************");

       System.out.println("Total: " + totalVal);

   }


in the file /tool/user/dialogs/CellLists.java/


--
Yours sincerely,
  Artem

--
You received this message because you are subscribed to the Google Groups "Electric 
VLSI Editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/electricvlsi?hl=en.

Reply via email to