~ubuntu-branches/ubuntu/oneiric/electric/oneiric

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/io/input/HSpiceOut.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:
42
42
import java.util.Arrays;
43
43
import java.util.HashMap;
44
44
import java.util.List;
 
45
import java.io.*;
 
46
import com.sun.electric.tool.io.input.*;
 
47
import com.sun.electric.database.geometry.btree.*;
 
48
import com.sun.electric.tool.simulation.*;
45
49
 
46
50
/**
47
51
 * Class for reading and displaying waveforms from HSpice output.
121
125
                                        double[] values = new double[times.length];
122
126
                                        for (int eventNum = 0; eventNum < values.length; eventNum++)
123
127
                                                values[eventNum] = theSweep.get(eventNum)[sigIndex + 1];
124
 
                                        waveform = new WaveformImpl(times, values);
 
128
                    if (!isUseLegacySimulationCode()) {
 
129
                        BTree<Double,Double,Serializable> tree = NewEpicAnalysis.getTree();
 
130
                        int evmax = 0;
 
131
                        int evmin = 0;
 
132
                        double valmax = Double.MIN_VALUE;
 
133
                        double valmin = Double.MAX_VALUE;
 
134
                        for(int i=0; i<times.length; i++) {
 
135
                            tree.insert(times[i], values[i]);
 
136
                            if (values[i] > valmax) { evmax = i; valmax = values[i]; }
 
137
                            if (values[i] < valmin) { evmin = i; valmin = values[i]; }
 
138
                        }
 
139
                        waveform = new BTreeNewSignal(evmin, evmax, tree);
 
140
                    } else {
 
141
                        waveform = new WaveformImpl(times, values);
 
142
                    }
125
143
                                }
126
144
                                waveforms[sweep] = waveform;
127
145
                        }
133
151
 
134
152
        /**
135
153
         * Method to read HSpice output files.
 
154
     * @param sd Stimuli associated to the reading.
136
155
         * @param fileURL the URL to one of the output files.
137
156
         * @param cell the Cell associated with these HSpice output files.
138
157
         */
139
 
        protected Stimuli readSimulationOutput(URL fileURL, Cell cell)
 
158
        protected void readSimulationOutput(Stimuli sd, URL fileURL, Cell cell)
140
159
                throws IOException
141
160
        {
142
 
                // create the Stimuli object
143
 
                Stimuli sd = new Stimuli();
144
161
                sd.setCell(cell);
145
162
 
146
163
                // figure out file names
184
201
                addMeasurementData(sd, fileURL);
185
202
 
186
203
                // return the simulation data
187
 
                return sd;
 
204
//              return sd;
188
205
        }
189
206
 
190
207
        /**
842
859
                                context = name.substring(0, lastDotPos);
843
860
                                name = name.substring(lastDotPos+1);
844
861
                        }
845
 
                        an.addSignal(name, context, minTime, maxTime, minValues[k], maxValues[k]);
 
862
                        AnalogSignal as = an.addSignal(name, context, minTime, maxTime, minValues[k], maxValues[k]);
 
863
            an.getWaveform(as, 0);
846
864
                }
847
865
                stopProgressDialog();
848
866
                System.out.println("Done reading " + analysisType.toString() + " analysis");