com.sun.electric.tool.ncc.processing
Class SerialParallelMerge

java.lang.Object
  extended by com.sun.electric.tool.ncc.processing.SerialParallelMerge

public class SerialParallelMerge
extends java.lang.Object

Merge parallel Transistors into one. Merge stacks of Transistors into one stacked Transistor.

Tricky: The process of merging requires the deletion of Parts and Wires. My first attempt to handle deletion efficiently was to use Sets to hold Parts and Wires. However, this was bad because it used too much storage. My new approach is to mark Parts and Wires "deleted" and later in a single pass remove "deleted" objects from lists after all merging is complete. Note that "deleted" Parts and Wires should never exist before or after serial parallel merge.

More Tricky: This phase gets executed before Wires get put in cannonical form. That means we must be prepared for a Part to occur more than once on a Wire's parts list. We must also be prepared to enounter "deleted" parts. One implication is that I can't check the number of parts on a wire by simply calling Wire.getNumParts() because I need to add extra code to exclude deleted and duplicate Parts!


Method Summary
static void doYourJob(NccGlobals globals)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doYourJob

public static void doYourJob(NccGlobals globals)