Table of Contents

Class Read

Namespace
CsraTestMethods.Functional
Assembly
CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class Read : TestCodeBase
Inheritance
TestCodeBase
Read
Inherited Members
TestCodeBase.AbortTest()
TestCodeBase.DebugBreak()
TestCodeBase.TheExec
TestCodeBase.TheHdw
TestCodeBase.TheProgram
TestCodeBase.FlowDomains
TestCodeBase.ShouldRunPreBody
TestCodeBase.ShouldRunBody
TestCodeBase.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

pattern Pattern

The pattern to be executed during the test.

readPins PinList

Pins for data read, must contain at least 1 digital pin.

startIndex int

Index to start read.

bitLength int

Length of data read.

wordLength int

Length of each data word from 1 to 32.

msbFirst bool

Data bit order.

testFunctional bool

Whether to log the functional result.

testValues bool

Whether to log the read results.

setup string

Optional. 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);
    }
}