~ubuntu-branches/ubuntu/jaunty/electric/jaunty

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/io/output/MOSSIM.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2009-01-08 02:05:08 UTC
  • mfrom: (1.1.2 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090108020508-0h3li7zt9mu5gf0i
Tags: 8.08-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
import java.util.HashMap;
44
44
import java.util.Iterator;
 
45
import java.util.Map;
45
46
 
46
47
/**
47
48
 * This is the netlister for MOSSIM.
112
113
 
113
114
                // gather strength information
114
115
                Netlist netList = cni.getNetList();
115
 
                HashMap<Network,String> strengthMap = new HashMap<Network,String>();
 
116
                Map<Network,String> strengthMap = new HashMap<Network,String>();
116
117
                for(Iterator<ArcInst> it = cell.getArcs(); it.hasNext(); )
117
118
                {
118
119
                        ArcInst ai = it.next();
189
190
                                PrimitiveNode.Function type = ni.getFunction();
190
191
 
191
192
                                // if it is a transistor, write the information
192
 
                                if (type != PrimitiveNode.Function.TRANMOS && type != PrimitiveNode.Function.TRADMOS && type != PrimitiveNode.Function.TRAPMOS)
193
 
                                        continue;
 
193
                                if (!type.isFET()) continue;
194
194
 
195
195
                                // gate is port 0 or 2, source is port 1, drain is port 3
196
196
                                PortInst gate = ni.getTransistorGatePort();
199
199
 
200
200
                                // write the transistor
201
201
                                StringBuffer infstr = new StringBuffer();
202
 
                                if (type == PrimitiveNode.Function.TRANMOS) infstr.append("n"); else
203
 
                                        if (type == PrimitiveNode.Function.TRAPMOS) infstr.append("p"); else
204
 
                                                if (type == PrimitiveNode.Function.TRADMOS) infstr.append("d");
 
202
                                if (type.isNTypeTransistor()) infstr.append("n"); else
 
203
                                        if (type.isPTypeTransistor()) infstr.append("p"); else
 
204
                                                infstr.append("d");
205
205
 
206
206
                                // write the strength of the transistor
207
207
                                Variable var = ni.getVar(MOSSIM_STRENGTH_KEY);
266
266
        /** Method to report whether input and output names are separated. */
267
267
        protected boolean isSeparateInputAndOutput() { return true; }
268
268
 
 
269
        /** Abstract method to decide whether netlister is case-sensitive (Verilog) or not (Spice). */
 
270
        protected boolean isCaseSensitive() { return true; }
 
271
 
269
272
        /**
270
273
         * Method to adjust a network name to be safe for MOSSIM output.
271
274
         */