1 // ============================================================================= 2 // APPLICATION: functional testing at multiple speeds. Useful when the timing at 3 // various speeds doesn't scale. 4 5 // DESCRIPTION: Iterates over categories in "acspec" and bins on softbin axis 6 // "passBin" in tandem, beginning at index 0, executing a StdFunctional test 7 // with each iteration. Sets pass bin corresponding to category on first pass 8 // and exits. Sets fail bin if none of the iterations pass. 9 10 // REQUIREMENTS: 11 // - Parameters "acspec" and "passBin" must be equal in size. 12 // 13 // - The Nth category in "acspec" and the Nth bin along axis "passBin" shall 14 // correlate, i.e., if the first category causes pattern execution at 100MHz 15 // then the first pass bin should be the 100MHz bin. 16 // 17 // - The category and bin order shall be fast to slow, e.g., 500MHz, 250MHz, 18 // 166MHz. 19 // ----------------------------------------------------------------------------- 20 TestType SpeedCatBased { 21 Inherit TestBase { 22 passAxis = None { BinType Axis; } // Adds BinType Axis to TestBase data-member passAxis constraints 23 } 24 Parameters { 25 InOut PatternBurst patburst; 26 InOut Timing tim; 27 InOut DCLevels dclev; 28 InOut Spec acspec; // Used to step through categories in acspec 29 InOut Const Selector acsel; 30 InOut Category dccat { Optional; } 31 InOut Const Selector dcsel { Optional; } 32 } 33 FlowVariables { 34 Integer idx = 0; // Indexes acspec and passAxis in tandem 35 } 36 PreActions { 37 If (acspec.size() != passAxis.size()) // Insure that acspec and passAxis axis are the same size 38 Stop; // **** STIL.4 has no mechanism for outputting an error message **** 39 } 40 // The following TestExec statement creates an anonymous instance of 41 // StdFunctional when TestType SpeedCatBased is instantiated. 42 TestExec StdFunctional { 43 // The following assignments occur only once at TestType StdFunctional instantiation 44 failBin = Parent.failBin; // Assign SpeedCatBased data-member failBin to StdFunctional data-member failBin 45 patburst = Parent.patburst; 46 tim = Parent.tim; 47 dclev = Parent.dclev; 48 dccat = Parent.dccat; 49 // The following actions occur every time StdFunctional is executed 50 PreActions { 51 accat = Parent.acspec.Categories[idx]; // Assign SpeedCatBased data-member acspec Category to StdFunctional data-member accat 52 passAxis = Parent.passAxis.Bins[idx]; // Assign SpeedCatBased data-member passAxis Axis to StdFunctional data-member passAxis 53 } 54 } 55 PassActions { 56 SetBin passAxis.Bins[idx]; // Set soft bin 57 } 58 FailActions { 59 If (idx == acspec.size()) 60 SetBin failBin; // Set soft bin 61 Else { 62 idx = idx + 1; 63 ReExec; // Loop back to TestExec statement 64 } 65 } 66 } 67 // =============================================================================