com.sun.electric.tool.simulation
Class AnalogAnalysis

java.lang.Object
  extended by com.sun.electric.tool.simulation.Analysis<AnalogSignal>
      extended by com.sun.electric.tool.simulation.AnalogAnalysis
Direct Known Subclasses:
EpicAnalysis

public class AnalogAnalysis
extends Analysis<AnalogSignal>

Analysis which contains analog signals


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.simulation.Analysis
Analysis.AnalysisType
 
Field Summary
 
Fields inherited from class com.sun.electric.tool.simulation.Analysis
ANALYSIS_AC, ANALYSIS_DC, ANALYSIS_MEAS, ANALYSIS_SIGNALS, ANALYSIS_TRANS
 
Constructor Summary
AnalogAnalysis(Stimuli sd, Analysis.AnalysisType type)
           
 
Method Summary
 AnalogSignal addSignal(java.lang.String signalName, java.lang.String signalContext, double[] values)
          Create new AnalogSignal with specified name.
 AnalogSignal addSignal(java.lang.String signalName, java.lang.String signalContext, double minTime, double maxTime, double minValue, double maxValue)
          Create new AnalogSignal with specified name.
 void addSweep(java.lang.Object obj)
          Method to add information about another sweep in this simulation data.
 void buildCommonTime(int numEvents)
          Method to construct an array of time values that are common to all signals.
 void finished()
          Free allocated resources before closing.
 double[] getCommonTimeArray()
          Method to get the array of time entries for this signal.
 int getNumSweeps()
          Method to return the number of sweep objects in this simulation data.
 java.lang.Object getSweep(int i)
          Method to return sweep object in a given position.
 Waveform getWaveform(AnalogSignal signal, int sweep)
          Method to return the waveform of specified signal in specified sweep.
 boolean isAnalog()
          Method to tell whether this simulation data is analog or digital.
protected  Waveform[] loadWaveforms(AnalogSignal signal)
           
 void setCommonTime(int index, double time)
          Method to load an entry in the common time array.
 
Methods inherited from class com.sun.electric.tool.simulation.Analysis
addSignal, findSignalForNetwork, findSignalForNetworkQuickly, getAnalysisType, getBounds, getLeftEdge, getRightEdge, getSignals, getStimuli, nameSignal, setBoundsDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalogAnalysis

public AnalogAnalysis(Stimuli sd,
                      Analysis.AnalysisType type)
Method Detail

finished

public void finished()
Free allocated resources before closing.

Overrides:
finished in class Analysis<AnalogSignal>

isAnalog

public boolean isAnalog()
Description copied from class: Analysis
Method to tell whether this simulation data is analog or digital.

Specified by:
isAnalog in class Analysis<AnalogSignal>
Returns:
true if this simulation data is analog.

addSweep

public void addSweep(java.lang.Object obj)
Method to add information about another sweep in this simulation data.

Parameters:
obj - sweep information (typically a Double).

getNumSweeps

public int getNumSweeps()
Method to return the number of sweep objects in this simulation data.

Returns:
number of sweep objects in this simulation data. If there is no sweep information, the list is empty.

getSweep

public java.lang.Object getSweep(int i)
Method to return sweep object in a given position.

Parameters:
i - the position to get.
Returns:
the sweep object for that position.

buildCommonTime

public void buildCommonTime(int numEvents)
Method to construct an array of time values that are common to all signals. Some simulation data has all of its stimuli at the same time interval for every signal. To save space, such data can use a common time array, kept in the Simulation Data. If a signal wants to use its own time values, that can be done by placing the time array in the signal.

Parameters:
numEvents - the number of time events in the common time array.

setCommonTime

public void setCommonTime(int index,
                          double time)
Method to load an entry in the common time array.

Parameters:
index - the entry number.
time - the time value at

getCommonTimeArray

public double[] getCommonTimeArray()
Method to get the array of time entries for this signal.

Returns:
the array of time entries for this signal.

addSignal

public AnalogSignal addSignal(java.lang.String signalName,
                              java.lang.String signalContext,
                              double[] values)
Create new AnalogSignal with specified name. Signal obtains waveform constructed from common time and specified values.

Parameters:
signalName - signal name.
signalContext - a common prefix for the signal name.
values - specified values
Returns:
new AnalogSignal of this AnalogAnalysis

addSignal

public AnalogSignal addSignal(java.lang.String signalName,
                              java.lang.String signalContext,
                              double minTime,
                              double maxTime,
                              double minValue,
                              double maxValue)
Create new AnalogSignal with specified name. Signal obtains range constructed from common time range and specified value bounds.

Parameters:
signalName - signal name.
signalContext - a common prefix for the signal name.
minValue - the minimum value.
maxValue - the maximum value.
Returns:
new AnalogSignal of this AnalogAnalysis

getWaveform

public Waveform getWaveform(AnalogSignal signal,
                            int sweep)
Method to return the waveform of specified signal in specified sweep.

Parameters:
signal - specified signal
sweep - sweep index
Returns:
the waveform of this signal in specified sweep.

loadWaveforms

protected Waveform[] loadWaveforms(AnalogSignal signal)