Class Read
- Namespace
- CsraTestMethods.Functional
- Assembly
- CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class Read : TestCodeBase
- Inheritance
-
TestCodeBaseRead
- Inherited Members
-
TestCodeBase.AbortTest()TestCodeBase.DebugBreak()TestCodeBase.TheExecTestCodeBase.TheHdwTestCodeBase.TheProgramTestCodeBase.FlowDomainsTestCodeBase.ShouldRunPreBodyTestCodeBase.ShouldRunBodyTestCodeBase.ShouldRunPostBody
Methods
Baseline(Pattern, PinList, int, int, int, bool, bool, bool, string)
Executes a functional read from the device and logs the results.
[TestMethod]
[Steppable]
[CustomValidation]
public void Baseline(Pattern pattern, PinList readPins, int startIndex, int bitLength, int wordLength, bool msbFirst, bool testFunctional, bool testValues, string setup = "")
Parameters
patternPatternThe pattern to be executed during the test.
readPinsPinListPins for data read, must contain at least 1 digital pin.
startIndexintIndex to start read.
bitLengthintLength of data read.
wordLengthintLength of each data word from 1 to 32.
msbFirstboolData bit order.
testFunctionalboolWhether to log the functional result.
testValuesboolWhether to log the read results.
setupstringOptional. Setup to be applied before the pattern is run.
Details
Test Technique
- to be added
Implementation
The Validation section validates the test method inputs and creates the pattern and pins objects.
The PreBody section applies levels and timing from the test instance context. Optionally, applies a specified config.
The Body section sets up the capture, executes the pattern, retrieves the functional results and data read back from the device.
The PostBody optionally logs the functional and parametric test records.
Platform Specifics
Supports stepping capability for PreBody/Body/PostBody. Uses the HRAM for setup and capture.
Pre Conditions
- none
Post Conditions
- none
Limitations
- Only performs reads on digital pins.
Code Reference
[TestMethod, Steppable, CustomValidation]
public void Baseline(Pattern pattern, PinList readPins, int startIndex, int bitLength, int wordLength, bool msbFirst, bool testFunctional,
bool testValues, string setup = "") {
if (TheExec.Flow.IsValidating) {
TheLib.Validate.Pins(readPins, nameof(readPins), out _pins);
TheLib.Validate.Pattern(pattern, nameof(pattern), out _patternInfo);
TheLib.Validate.GreaterOrEqual(startIndex, 0, nameof(startIndex));
TheLib.Validate.GreaterOrEqual(bitLength, 1, nameof(bitLength));
TheLib.Validate.InRange(wordLength, 1, 32, nameof(wordLength));
_bitOrder = msbFirst ? tlBitOrder.MsbFirst : tlBitOrder.LsbFirst;
}
if (ShouldRunPreBody) {
TheLib.Setup.LevelsAndTiming.Apply(true);
Services.Setup.Apply(setup);
}
if (ShouldRunBody) {
TheLib.Setup.Digital.ReadAll();
TheLib.Execute.Digital.RunPattern(_patternInfo[0]);
if (testFunctional) _patResult = TheLib.Acquire.Digital.PatternResults();
_readWords = TheLib.Acquire.Digital.ReadWords(_pins, startIndex, bitLength, wordLength, _bitOrder);
}
if (ShouldRunPostBody) {
TheLib.Setup.Digital.ReadHram(0, CaptType.None, TrigType.Never, false, 0);
if (testFunctional) TheLib.Datalog.TestFunctional(_patResult, pattern);
if (testValues) TheLib.Datalog.TestParametric(_readWords);
}
}