~ubuntu-branches/ubuntu/maverick/electric/maverick

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/io/input/PSpiceOut.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2010-01-09 16:26:04 UTC
  • mfrom: (1.1.4 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100109162604-1ypvmy8ijmlc6oq7
Tags: 8.10-1
* New upstream version.
* debian/control
  - Add libjava3d-java and quilt build dependencies.
  - Update standards version to 3.8.3.
  - Add libjava3d-java as recommends to binary package.
* debian/rules
  - Use quilt patch system instead of simple patchsys.
  - Add java3d related jar files to DEB_JARS.
* debian/patches/*
  - Update as per current upstream source. Convert to quilt.
* debian/ant.properties
  - Do not disable 3D plugin anymore.
  - Use new property to disable compilation of OS X related classes.
* debian/wrappers/electric
  - Add java3d related jar files to runtime classpath.
* debian/README.source
  - Change text to the appropriate one for quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        /**
52
52
         * Method to read an PSpice output file.
53
53
         */
54
 
        protected Stimuli readSimulationOutput(URL fileURL, Cell cell)
 
54
        protected void readSimulationOutput(Stimuli sd, URL fileURL, Cell cell)
55
55
                throws IOException
56
56
        {
57
57
                // open the file
58
 
                if (openTextInput(fileURL)) return null;
 
58
                if (openTextInput(fileURL)) return;
59
59
 
60
60
                // show progress reading .spo file
61
61
                startProgressDialog("PSpice output", fileURL.getFile());
62
62
 
63
63
                // read the actual signal data from the .spo file
64
 
                Stimuli sd = readPSpiceFile(cell);
 
64
                readPSpiceFile(cell, sd);
65
65
 
66
66
                // stop progress dialog, close the file
67
67
                stopProgressDialog();
68
68
                closeInput();
69
 
 
70
 
                // return the simulation data
71
 
                return sd;
72
69
        }
73
70
 
74
 
        private Stimuli readPSpiceFile(Cell cell)
 
71
        private void readPSpiceFile(Cell cell, Stimuli sd)
75
72
                throws IOException
76
73
        {
77
74
                boolean first = true;
78
 
                Stimuli sd = new Stimuli();
79
75
                AnalogAnalysis an = new AnalogAnalysis(sd, AnalogAnalysis.ANALYSIS_SIGNALS, false);
80
76
                sd.setCell(cell);
81
77
                List<String> signalNames = new ArrayList<String>();
97
93
                                        {
98
94
                                                System.out.println("This is an HSPICE file, not a SPICE3/PSPICE file");
99
95
                                                System.out.println("Change the SPICE format (in Preferences) and reread");
100
 
                                                return null;
 
96
                                                return;
101
97
                                        }
102
98
                                }
103
99
 
128
124
                                else
129
125
                                {
130
126
                                        System.out.println("Missing value after '='.  This may not be a PSpice output file.");
131
 
                                        return null;
 
127
                                        return;
132
128
                                }
133
129
                        }
134
130
 
148
144
                        {
149
145
                                System.out.println("Line of data has " + position + " values, but expect " + numSignals +
150
146
                                        ". Unable to recover from error.  This may not be a PSpice output file.");
151
 
                                return null;
 
147
                                return;
152
148
                        }
153
149
                }
154
150
 
156
152
                if (numSignals == 0)
157
153
                {
158
154
                        System.out.println("No data found in the file.  This may not be a PSpice output file.");
159
 
                        return null;
 
155
                        return;
160
156
                }
161
157
                int numEvents = values[0].size();
162
158
                an.buildCommonTime(numEvents);
171
167
                                doubleValues[i] = values[j].get(i).doubleValue();
172
168
                        an.addSignal(signalNames.get(j), null, doubleValues);
173
169
                }
174
 
                return sd;
175
170
        }
176
171
 
177
172
}