Class MultiCondition
- Namespace
- CsraTestMethods.Parametric
- Assembly
- CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class MultiCondition : TestCodeBase
Overview
TestClass for all generic parametric TestMethods using diverse (multi) conditions.
Platform Specifics
Uses per test-instance test class object persistence ([TestClass(Creation.TestInstance)] attribute).
- Inheritance
-
TestCodeBaseMultiCondition
- Inherited Members
-
TestCodeBase.AbortTest()TestCodeBase.DebugBreak()TestCodeBase.TheExecTestCodeBase.TheHdwTestCodeBase.TheProgramTestCodeBase.FlowDomainsTestCodeBase.ShouldRunPreBodyTestCodeBase.ShouldRunBodyTestCodeBase.ShouldRunPostBody
Methods
Baseline(PinList, string, string, string, string, string, string, PinList, double, string)
Parametric measurement by setting up all force Pins, then measuring all force or optionally different measurement Pins.
[TestMethod]
[Steppable]
[CustomValidation]
public void Baseline(PinList forcePinList, string forceModes, string forceValues, string clampValues, string measureModes, string measureRanges, string sampleSizes = "1", PinList measPinList = null, double waitTime = 0, string setup = "")
Parameters
forcePinListPinListComma separated list of pin or pin groups representing the DC setup and/or measurement.
forceModesstringComma separated list of the force modes for each pin or pin group.
forceValuesstringComma separated list of force voltages or currents for each pin or pin group.
clampValuesstringComma separated list of clamp voltages or currents for each pin or pin group.
measureModesstringComma separated list of the measurement modes for each pin or pin group.
measureRangesstringComma separated list of the measurement ranges for each pin or pin group.
sampleSizesstringOptional. Comma separated list of number of samples to average for each pin or pin group.
measPinListPinListOptional. Comma separated list of measurement pin or pin groups, if different from forcePinList.
waitTimedoubleOptional. The wait time before the measurement.
setupstringOptional. Setup set to configure the dib or device.
Details
Test Technique
- to be added
Implementation
The Validation section creates the Pins objects, converts the comma separated value (CSV) lists into cached value arrays, and determines force & measure modes and confirms valid combinations.
The PreBody section applies levels and timing from the test instance context. Optionally, applies the specified setup.
For all pins specified in the pinList it disconnects any pin electronics, connects the dc path and turns on the gate.
The Body section applies the force condition(s) on all pins, sets the measurement mode(s) and performs the measurement on all pins in parallel after the specified waitTime.
The PostBody section restores the pin electronics connection for digital pins after gating off and disconnecting the dc path. Finally, a parametric datalog is logged.
Platform Specifics
Supports stepping capability for PreBody/Body/PostBody.
Pre Conditions
- none
Post Conditions
- none
Limitations
- support for non-uniform (mixed) instrument types in pinList not yet available
Code Reference
[TestMethod, Steppable, CustomValidation]
public void Baseline(PinList forcePinList, string forceModes, string forceValues, string clampValues, string measureModes, string measureRanges,
string sampleSizes = "1", PinList measPinList = null, double waitTime = 0, string setup = "") {
if (TheExec.Flow.IsValidating) {
TheLib.Validate.Pins(forcePinList, nameof(forcePinList), out _pins);
_containsDigitalPins = _pins.ContainsFeature(InstrumentFeature.Digital);
TheLib.Validate.MultiCondition(forcePinList, p => new Pins(p), nameof(_pinsForceGroups), out _pinsForceGroups);
if (string.IsNullOrEmpty(measPinList)) _pinsMeasureGroups = _pinsForceGroups;
else {
TheLib.Validate.Pins(measPinList, nameof(measPinList), out _);
TheLib.Validate.MultiCondition(measPinList, p => new Pins(p), nameof(_pinsMeasureGroups), out _pinsMeasureGroups);
_pins.Add(measPinList);
}
TheLib.Validate.MultiCondition(forceModes, nameof(forceModes), out _outputModes, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(forceValues, double.Parse, nameof(forceValues), out _forceValues, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(clampValues, double.Parse, nameof(clampValues), out _clampValues, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(measureModes, nameof(measureModes), out _measureModes, _pinsMeasureGroups.Length);
TheLib.Validate.MultiCondition(measureRanges, double.Parse, nameof(measureRanges), out _measureRanges, _pinsMeasureGroups.Length);
TheLib.Validate.MultiCondition(sampleSizes, int.Parse, nameof(sampleSizes), out _sampleSizes, _pinsMeasureGroups.Length);
}
if (ShouldRunPreBody) {
TheLib.Setup.LevelsAndTiming.Apply(true);
Services.Setup.Apply(setup);
if (_containsDigitalPins) TheLib.Setup.Digital.Disconnect(_pins);
TheLib.Setup.Dc.Connect(_pins);
}
if (ShouldRunBody) {
TheLib.Setup.Dc.Force(_pinsForceGroups, _outputModes, _forceValues, _forceValues, _clampValues, [true]);
TheLib.Setup.Dc.SetMeter(_pinsMeasureGroups, _measureModes, _measureRanges);
TheLib.Execute.Wait(waitTime);
_measureValues = TheLib.Acquire.Dc.Measure(_pinsMeasureGroups, _sampleSizes);
}
if (ShouldRunPostBody) {
TheLib.Setup.Dc.Disconnect(_pins);
if (_containsDigitalPins) TheLib.Setup.Digital.Connect(_pins);
TheLib.Datalog.TestParametric(_measureValues);
}
}
PreconditionPattern(PinList, string, string, string, Pattern, string, string, string, PinList, double, string)
Parametric measurement by running preconditioning pattern, setting up force Pins and then measuring all force or optionally different measurement Pins.
[TestMethod]
[Steppable]
[CustomValidation]
public void PreconditionPattern(PinList forcePinList, string forceModes, string forceValues, string clampValues, Pattern preconditionPat, string measureModes, string measureRanges, string sampleSizes = "1", PinList measPinList = null, double waitTime = 0, string setup = "")
Parameters
forcePinListPinListComma separated list of pin or pin groups representing the DC setup and/or measurement.
forceModesstringComma separated list of the force modes for each pin or pin group.
forceValuesstringComma separated list of force voltages or currents for each pin or pin group.
clampValuesstringComma separated list of clamp voltages or currents for each pin or pin group.
preconditionPatPatternPattern to run to precondition the device before the parametric test.
measureModesstringComma separated list of the measurement modes for each pin or pin group.
measureRangesstringComma separated list of the measurement ranges for each pin or pin group.
sampleSizesstringOptional. Comma separated list of number of samples to average for each pin or pin group.
measPinListPinListOptional. Comma separated list of measurement pin or pin groups, if different from forcePinList.
waitTimedoubleOptional. The wait time before the measurement.
setupstringOptional. Setup set to configure the dib or device.
Details
Test Technique
- to be added
Implementation
The Validation section creates the Pins and PatternInfo objects, converts the comma separated value (CSV) lists into cached value arrays, and determines force & measure modes and confirms valid combinations.
The PreBody section applies levels and timing from the test instance context. Optionally, applies the specified setup.
The preconditioning pattern is executed.For all pins specified in the pinList it disconnects any pin electronics, connects the dc path and turns on the gate.
The Body section applies the force condition(s) on all pins, sets the measurement mode(s) and performs the measurement on all pins in parallel after the specified waitTime.
The PostBody section restores the pin electronics connection for digital pins after gating off and disconnecting the dc path. Finally, a parametric datalog is logged.
Platform Specifics
Supports stepping capability for PreBody/Body/PostBody.
Pre Conditions
- none
Post Conditions
- none
Limitations
- support for non-uniform (mixed) instrument types in pinList not yet available
Code Reference
[TestMethod, Steppable, CustomValidation]
public void PreconditionPattern(PinList forcePinList, string forceModes, string forceValues, string clampValues, Pattern preconditionPat,
string measureModes, string measureRanges, string sampleSizes = "1", PinList measPinList = null, double waitTime = 0, string setup = "") {
if (TheExec.Flow.IsValidating) {
TheLib.Validate.Pins(forcePinList, nameof(forcePinList), out _pins);
_containsDigitalPins = _pins.ContainsFeature(InstrumentFeature.Digital);
TheLib.Validate.MultiCondition(forcePinList, p => new Pins(p), nameof(forcePinList), out _pinsForceGroups);
if (string.IsNullOrEmpty(measPinList)) _pinsMeasureGroups = _pinsForceGroups;
else {
TheLib.Validate.Pins(measPinList, nameof(measPinList), out _);
TheLib.Validate.MultiCondition(measPinList, p => new Pins(p), nameof(measPinList), out _pinsMeasureGroups);
_pins.Add(measPinList);
}
_patternSpecified = !string.IsNullOrEmpty(preconditionPat);
if (_patternSpecified) TheLib.Validate.Pattern(preconditionPat, nameof(preconditionPat), out _pattern);
else Services.Alert.Error("Invalid Pattern. The pattern is null or empty.");
TheLib.Validate.MultiCondition(forceModes, nameof(forceModes), out _outputModes, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(forceValues, double.Parse, nameof(forceValues), out _forceValues, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(clampValues, double.Parse, nameof(clampValues), out _clampValues, _pinsForceGroups.Length);
TheLib.Validate.MultiCondition(measureModes, nameof(measureModes), out _measureModes, _pinsMeasureGroups.Length);
TheLib.Validate.MultiCondition(measureRanges, double.Parse, nameof(measureRanges), out _measureRanges, _pinsMeasureGroups.Length);
TheLib.Validate.MultiCondition(sampleSizes, int.Parse, nameof(sampleSizes), out _sampleSizes, _pinsMeasureGroups.Length);
}
if (ShouldRunPreBody) {
TheLib.Setup.LevelsAndTiming.Apply(true);
Services.Setup.Apply(setup);
if (_patternSpecified) TheLib.Execute.Digital.RunPattern(_pattern[0]);
if (_containsDigitalPins) TheLib.Setup.Digital.Disconnect(_pins);
TheLib.Setup.Dc.Connect(_pins);
}
if (ShouldRunBody) {
TheLib.Setup.Dc.Force(_pinsForceGroups, _outputModes, _forceValues, _forceValues, _clampValues, [true]);
TheLib.Setup.Dc.SetMeter(_pinsMeasureGroups, _measureModes, _measureRanges);
TheLib.Execute.Wait(waitTime);
_measureValues = TheLib.Acquire.Dc.Measure(_pinsMeasureGroups, _sampleSizes);
}
if (ShouldRunPostBody) {
TheLib.Setup.Dc.Disconnect(_pins);
if (_containsDigitalPins) TheLib.Setup.Digital.Connect(_pins);
TheLib.Datalog.TestParametric(_measureValues);
}
}