origen_std_lib 0.10.1 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/config/application.rb +7 -19
  3. data/config/commands.rb +9 -0
  4. data/config/version.rb +1 -2
  5. data/lib/origen_std_lib/v93k.rb +17 -1
  6. data/{stdlib/v93k → src/advantest/smt7}/origen/.cproject +0 -0
  7. data/{stdlib/v93k → src/advantest/smt7}/origen/.project +0 -0
  8. data/src/advantest/smt7/origen/origen/helpers/console.cpp +94 -0
  9. data/src/advantest/smt7/origen/origen/helpers/misc.cpp +456 -0
  10. data/src/advantest/smt7/origen/origen/helpers/time.cpp +64 -0
  11. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
  12. data/src/advantest/smt7/origen/origen/site.cpp +237 -0
  13. data/src/advantest/smt7/origen/origen/site.hpp +50 -0
  14. data/src/advantest/smt7/origen/origen/test_method/base.cpp +231 -0
  15. data/src/advantest/smt7/origen/origen/test_method/base.hpp +155 -0
  16. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.cpp +266 -0
  17. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.hpp +58 -0
  18. data/src/advantest/smt7/origen/origen/test_method/empty.cpp +13 -0
  19. data/src/advantest/smt7/origen/origen/test_method/empty.hpp +24 -0
  20. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.cpp +133 -0
  21. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.hpp +46 -0
  22. data/src/advantest/smt7/origen/origen/test_method/functional_test.cpp +168 -0
  23. data/src/advantest/smt7/origen/origen/test_method/functional_test.hpp +53 -0
  24. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/test_method.hpp +1 -3
  25. data/src/advantest/smt7/origen/origen/utils/version.cpp +72 -0
  26. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils/version.hpp +20 -21
  27. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils.hpp +1 -3
  28. data/src/advantest/smt7/origen/origen.cpp +18 -0
  29. data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
  30. data/src/advantest/smt7/origen/test_methods/ApplyBin.cpp +37 -0
  31. data/src/advantest/smt7/origen/test_methods/DCMeasurement.cpp +90 -0
  32. data/src/advantest/smt7/origen/test_methods/FrequencyMeasurement.cpp +50 -0
  33. data/src/advantest/smt7/origen/test_methods/FunctionalTest.cpp +24 -0
  34. data/src/advantest/smt7/origen/test_methods/RecordBin.cpp +39 -0
  35. data/src/advantest/smt8/origen/common/Origen.java +334 -0
  36. data/src/advantest/smt8/origen/common/OrigenData.java +391 -0
  37. data/src/advantest/smt8/origen/common/OrigenHelpers.java +170 -0
  38. data/src/advantest/smt8/origen/test_methods/Base.java +265 -0
  39. data/src/advantest/smt8/origen/test_methods/DC_Measurement.java +302 -0
  40. data/src/advantest/smt8/origen/test_methods/Empty.java +12 -0
  41. data/src/advantest/smt8/origen/test_methods/Functional_test.java +474 -0
  42. data/templates/web/faq.md.erb +1 -52
  43. data/templates/web/guides/intro.md.erb +8 -0
  44. data/templates/web/guides/{v93k/intro.md.erb → v93ksmt7/capture.md.erb} +0 -2
  45. data/templates/web/guides/v93ksmt7/complete.md.erb +68 -0
  46. data/templates/web/guides/v93ksmt7/customizable.md.erb +139 -0
  47. data/templates/web/guides/v93ksmt7/helpers.md.erb +3 -0
  48. data/templates/web/guides/{v93k → v93ksmt7}/install.md.erb +1 -1
  49. data/templates/web/guides/v93ksmt7/integration.md.erb +3 -0
  50. data/templates/web/guides/v93ksmt7/intro.md.erb +8 -0
  51. data/templates/web/guides/v93ksmt7/patching.md.erb +3 -0
  52. data/templates/web/guides/v93ksmt8/intro.md.erb +9 -0
  53. data/templates/web/index.md.erb +23 -6
  54. data/templates/web/layouts/_guides.html.erb +15 -3
  55. data/templates/web/partials/_common_args.md.erb +13 -0
  56. data/templates/web/partials/_navbar.html.erb +2 -2
  57. metadata +52 -33
  58. data/stdlib/v93k/origen/origen/helpers/console.cpp +0 -105
  59. data/stdlib/v93k/origen/origen/helpers/misc.cpp +0 -311
  60. data/stdlib/v93k/origen/origen/site.cpp +0 -220
  61. data/stdlib/v93k/origen/origen/site.hpp +0 -51
  62. data/stdlib/v93k/origen/origen/test_method/base.hpp +0 -156
  63. data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +0 -182
  64. data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +0 -59
  65. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +0 -107
  66. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +0 -48
  67. data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +0 -125
  68. data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +0 -52
  69. data/stdlib/v93k/origen/origen/utils/version.cpp +0 -79
  70. data/stdlib/v93k/origen/origen.cpp +0 -22
  71. data/stdlib/v93k/origen/test_methods/ApplyBin.cpp +0 -41
  72. data/stdlib/v93k/origen/test_methods/DCMeasurement.cpp +0 -129
  73. data/stdlib/v93k/origen/test_methods/FrequencyMeasurement.cpp +0 -93
  74. data/stdlib/v93k/origen/test_methods/FunctionalTest.cpp +0 -94
  75. data/stdlib/v93k/origen/test_methods/RecordBin.cpp +0 -48
@@ -0,0 +1,168 @@
1
+ #include "functional_test.hpp"
2
+
3
+ namespace Origen {
4
+ namespace TestMethod {
5
+
6
+ // Defaults
7
+ FunctionalTest::FunctionalTest() {
8
+ pin("");
9
+ port("");
10
+ capture(0);
11
+ processResults(1);
12
+ bitPerWord(1);
13
+ pattern("");
14
+ testName("");
15
+ }
16
+
17
+ FunctionalTest::~FunctionalTest() {}
18
+
19
+ /// The functional test method can optionally capture data by supplying the
20
+ /// number of vectors to capture
21
+ FunctionalTest& FunctionalTest::capture(int v) {
22
+ _capture = v;
23
+ return *this;
24
+ }
25
+ /// If data capture is requested, supply the pin to capture data from
26
+ FunctionalTest& FunctionalTest::pin(string v) {
27
+ _pin = v;
28
+ return *this;
29
+ }
30
+ /// Optionally supply the name of the test port that should be used to execute
31
+ /// the pattern
32
+ FunctionalTest& FunctionalTest::port(string v) {
33
+ _port = v;
34
+ return *this;
35
+ }
36
+ /// Serial capture data will be grouped into words, specify how many bits per
37
+ /// word in the serial stream (default 1)
38
+ FunctionalTest& FunctionalTest::bitPerWord(int v) {
39
+ _bitPerWord = v;
40
+ return *this;
41
+ }
42
+ /// When set to 0 the results of the test will not be judged or logged
43
+ FunctionalTest& FunctionalTest::processResults(int v) {
44
+ _processResults = v;
45
+ return *this;
46
+ }
47
+ /// Override the pattern argument from the test suite
48
+ FunctionalTest& FunctionalTest::pattern(string v) {
49
+ _pattern = v;
50
+ return *this;
51
+ }
52
+ /// Override the test name argument from the test suite, this can be useful if
53
+ /// the main test item to be logged is
54
+ /// a captured value and the pattern execution is to be logged separately. The
55
+ /// override is only valid for one call to execute()
56
+ /// and then it will be removed.
57
+ FunctionalTest& FunctionalTest::testName(string v) {
58
+ _testNameOverride = v;
59
+ return *this;
60
+ }
61
+
62
+ // All test methods must implement this function
63
+ FunctionalTest& FunctionalTest::getThis() { return *this; }
64
+
65
+ void FunctionalTest::_setup() { results.resize(numberOfPhysicalSites + 1); }
66
+
67
+ void FunctionalTest::_execute() {
68
+ int site;
69
+
70
+ ON_FIRST_INVOCATION_BEGIN();
71
+
72
+ if (_pattern.empty()) {
73
+ label = Primary.getLabel();
74
+ } else {
75
+ label = _pattern;
76
+ }
77
+
78
+ if (_capture) {
79
+ pinName = extractPinsFromGroup(_pin);
80
+ }
81
+
82
+ RDI_BEGIN();
83
+
84
+ if (_capture) {
85
+ if (_port.empty()) {
86
+ SMART_RDI::DIG_CAP& prdi = rdi.digCap(suiteName)
87
+ .label(label)
88
+ .pin(pinName)
89
+ .bitPerWord(_bitPerWord)
90
+ .samples(_capture);
91
+ filterRDI(prdi);
92
+ prdi.execute();
93
+
94
+ } else {
95
+ SMART_RDI::DIG_CAP& prdi = rdi.port(_port)
96
+ .digCap(suiteName)
97
+ .vecVarOnly()
98
+ .pin(pinName)
99
+ .bitPerWord(_bitPerWord)
100
+ .samples(_capture);
101
+ filterRDI(prdi);
102
+ prdi.execute();
103
+ rdi.port(_port).func().burst(label).execute();
104
+ }
105
+
106
+ } else {
107
+ if (_port.empty()) {
108
+ SMART_RDI::FUNC& prdi = rdi.func(suiteName).label(label);
109
+ filterRDI(prdi);
110
+ prdi.execute();
111
+ } else {
112
+ SMART_RDI::FUNC& prdi = rdi.port(_port).func(suiteName).burst(label);
113
+ filterRDI(prdi);
114
+ prdi.execute();
115
+ }
116
+ }
117
+
118
+ RDI_END();
119
+
120
+ FOR_EACH_SITE_BEGIN();
121
+ site = CURRENT_SITE_NUMBER();
122
+ if (_capture) {
123
+ results[site] = rdi.site(site).getBurstPassFail();
124
+ // cout << "PRE " << site << ": " << results[site] << endl;
125
+
126
+ } else {
127
+ results[site] = rdi.site(site).id(suiteName).getPassFail();
128
+ // cout << "PRE " << site << ": " << results[site] << endl;
129
+ }
130
+ FOR_EACH_SITE_END();
131
+
132
+ ON_FIRST_INVOCATION_END();
133
+ }
134
+
135
+ /// Returns the captured data for the site currently in focus
136
+ ARRAY_I FunctionalTest::capturedData() {
137
+ return rdi.id(suiteName).getVector(pinName);
138
+ }
139
+
140
+ /// Returns the captured data for the given site number
141
+ ARRAY_I FunctionalTest::capturedData(int site) {
142
+ return rdi.site(site).id(suiteName).getVector(pinName);
143
+ }
144
+
145
+ void FunctionalTest::serialProcessing(int site) {
146
+ if (_processResults) {
147
+ if (_testNameOverride != "") {
148
+ judgeAndDatalog(_testNameOverride,
149
+ invertFunctionalResultIfRequired(results[site]));
150
+ } else {
151
+ judgeAndDatalog(invertFunctionalResultIfRequired(results[site]));
152
+ }
153
+ }
154
+ _testNameOverride = "";
155
+ }
156
+
157
+ void FunctionalTest::SMC_backgroundProcessing() {
158
+ for (int i = 0; i < activeSites.size(); i++) {
159
+ int site = activeSites[i];
160
+ process(site);
161
+ if (_processResults) {
162
+ SMC_TEST(site, "", suiteName, LIMIT(TM::GE, 1, TM::LE, 1),
163
+ results[activeSites[i]]);
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
@@ -0,0 +1,53 @@
1
+ #ifndef ORIGEN_TEST_METHOD_FUNCTIONAL_TEST_INCLUDED
2
+ #define ORIGEN_TEST_METHOD_FUNCTIONAL_TEST_INCLUDED
3
+
4
+ #include "base.hpp"
5
+ #include "mapi.hpp"
6
+ #include "rdi.hpp"
7
+
8
+ using namespace std;
9
+
10
+ namespace Origen {
11
+ namespace TestMethod {
12
+
13
+ class FunctionalTest : public Base {
14
+ void serialProcessing(int site);
15
+
16
+ string _pin;
17
+ string _port;
18
+ int _capture;
19
+ int _bitPerWord;
20
+ int _processResults;
21
+ string _pattern;
22
+ string _testNameOverride;
23
+
24
+ public:
25
+ FunctionalTest();
26
+ virtual ~FunctionalTest();
27
+ void SMC_backgroundProcessing();
28
+
29
+ FunctionalTest& capture(int v);
30
+ FunctionalTest& pin(string v);
31
+ FunctionalTest& port(string v);
32
+ FunctionalTest& bitPerWord(int v);
33
+ FunctionalTest& processResults(int v);
34
+ FunctionalTest& pattern(string v);
35
+ FunctionalTest& testName(string v);
36
+
37
+ string testName() { return Base::testName(); }
38
+
39
+ protected:
40
+ typedef FunctionalTest super;
41
+ FunctionalTest& getThis();
42
+ ARRAY_I capturedData();
43
+ ARRAY_I capturedData(int);
44
+ void _setup();
45
+ void _execute();
46
+
47
+ string label;
48
+ vector<int> results;
49
+ string pinName;
50
+ };
51
+ }
52
+ }
53
+ #endif
@@ -9,9 +9,7 @@
9
9
  using namespace std;
10
10
 
11
11
  namespace Origen {
12
- namespace TestMethod {
13
-
14
- }
12
+ namespace TestMethod {}
15
13
  }
16
14
 
17
15
  #endif
@@ -0,0 +1,72 @@
1
+ #include "version.hpp"
2
+ using namespace std;
3
+
4
+ #include <sstream>
5
+
6
+ namespace Origen {
7
+ namespace Utils {
8
+
9
+ Version::Version(string ver) {
10
+ vector<int> v = parse(ver);
11
+ _major = v[0];
12
+ _minor = v[1];
13
+ _tiny = v[2];
14
+ }
15
+
16
+ int Version::major() { return _major; }
17
+ int Version::minor() { return _minor; }
18
+ int Version::tiny() { return _tiny; }
19
+
20
+ string Version::str() {
21
+ ostringstream str;
22
+ str << _major;
23
+ str << ".";
24
+ str << _minor;
25
+ str << ".";
26
+ str << _tiny;
27
+ return str.str();
28
+ }
29
+
30
+ bool Version::operator==(string rhs) {
31
+ vector<int> v = parse(rhs);
32
+ return _major == v[0] && _minor == v[1] && _tiny == v[2];
33
+ }
34
+
35
+ bool Version::operator!=(string rhs) {
36
+ vector<int> v = parse(rhs);
37
+ return _major != v[0] || _minor != v[1] || _tiny != v[2];
38
+ }
39
+
40
+ bool Version::operator<(string rhs) {
41
+ vector<int> v = parse(rhs);
42
+ return _major < v[0] || (_major == v[0] && _minor < v[1]) ||
43
+ (_major == v[0] && _minor == v[1] && _tiny < v[2]);
44
+ }
45
+
46
+ bool Version::operator<=(string rhs) {
47
+ return operator==(rhs) || operator<(rhs);
48
+ }
49
+
50
+ bool Version::operator>(string rhs) {
51
+ vector<int> v = parse(rhs);
52
+ return _major > v[0] || (_major == v[0] && _minor > v[1]) ||
53
+ (_major == v[0] && _minor == v[1] && _tiny > v[2]);
54
+ }
55
+
56
+ bool Version::operator>=(string rhs) {
57
+ return operator==(rhs) || operator>(rhs);
58
+ }
59
+
60
+ vector<int> Version::parse(string ver) {
61
+ vector<int> v(3);
62
+
63
+ istringstream parser(ver);
64
+ parser >> v[0];
65
+ for (int i = 1; i < 3; i++) {
66
+ parser.get(); // Skip dot
67
+ parser >> v[i];
68
+ }
69
+ return v;
70
+ }
71
+ }
72
+ }
@@ -3,7 +3,8 @@
3
3
 
4
4
  // GCC adds these macros by default, which clobbers our functions
5
5
  // of the same name
6
- #if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__) || defined(__INTEL_COMPILER))
6
+ #if (defined(__GNUC__) || defined(__GNUG__)) && \
7
+ !(defined(__clang__) || defined(__INTEL_COMPILER))
7
8
  // Not exactly sure the version that this becomes a problem, but for
8
9
  // now this fixes the build on the V93K production system
9
10
  #if (__GNUC_MINOR__ > 1)
@@ -37,27 +38,25 @@ namespace Utils {
37
38
  // // Do something
38
39
  // }
39
40
  class Version {
40
-
41
- private:
42
- vector<int> parse(string ver);
43
- int _major;
44
- int _minor;
45
- int _tiny;
46
-
47
- public:
48
- int major();
49
- int minor();
50
- int tiny();
51
- Version(string ver);
52
- bool operator==(string rhs);
53
- bool operator!=(string rhs);
54
- bool operator<(string rhs);
55
- bool operator<=(string rhs);
56
- bool operator>(string rhs);
57
- bool operator>=(string rhs);
58
- string str();
41
+ private:
42
+ vector<int> parse(string ver);
43
+ int _major;
44
+ int _minor;
45
+ int _tiny;
46
+
47
+ public:
48
+ int major();
49
+ int minor();
50
+ int tiny();
51
+ Version(string ver);
52
+ bool operator==(string rhs);
53
+ bool operator!=(string rhs);
54
+ bool operator<(string rhs);
55
+ bool operator<=(string rhs);
56
+ bool operator>(string rhs);
57
+ bool operator>=(string rhs);
58
+ string str();
59
59
  };
60
-
61
60
  }
62
61
  }
63
62
 
@@ -4,9 +4,7 @@
4
4
  #include "utils/version.hpp"
5
5
 
6
6
  namespace Origen {
7
- namespace Utils {
8
-
9
- }
7
+ namespace Utils {}
10
8
  }
11
9
 
12
10
  #endif
@@ -0,0 +1,18 @@
1
+ /** @file */
2
+ #include "origen.hpp"
3
+
4
+ namespace Origen {
5
+
6
+ Utils::Version version() {
7
+ Utils::Version v(ORIGEN_VERSION);
8
+ return v;
9
+ }
10
+
11
+ vector<Site> Sites;
12
+
13
+ Site& site() { return Sites[CURRENT_SITE_NUMBER()]; }
14
+
15
+ Site& site(int site) { return Sites[site]; }
16
+
17
+ bool invertFunctionalResults = false;
18
+ }
@@ -1,15 +1,15 @@
1
1
  #ifndef ORIGEN_HPP_INCLUDED
2
2
  #define ORIGEN_HPP_INCLUDED
3
3
 
4
- #define ORIGEN_VERSION "0.10.1"
4
+ #define ORIGEN_VERSION "0.13.1"
5
5
 
6
6
  #ifndef debugger
7
7
  #define debugger __asm__("int $3");
8
8
  #endif
9
9
 
10
- #include "origen/utils.hpp"
11
10
  #include "origen/helpers.hpp"
12
11
  #include "origen/site.hpp"
12
+ #include "origen/utils.hpp"
13
13
 
14
14
  namespace Origen {
15
15
 
@@ -17,6 +17,6 @@ extern vector<Site> Sites;
17
17
  Utils::Version version();
18
18
  Site& site();
19
19
  Site& site(int site);
20
-
20
+ extern bool invertFunctionalResults;
21
21
  }
22
22
  #endif
@@ -0,0 +1,37 @@
1
+ #include "testmethod.hpp"
2
+
3
+ // for test method API interfaces
4
+ #include "mapi.hpp"
5
+ using namespace std;
6
+ #include "origen.hpp"
7
+
8
+ /**
9
+ * Test method class.
10
+ *
11
+ * For each testsuite using this test method, one object of this
12
+ * class is created.
13
+ */
14
+ class OrigenApplyBin : public testmethod::TestMethod {
15
+ protected:
16
+ /**
17
+ *Initialize the parameter interface to the testflow.
18
+ *This method is called just once after a testsuite is created.
19
+ */
20
+ virtual void initialize() {
21
+ // Add your initialization code here
22
+ // Note: Test Method API should not be used in this method!
23
+ }
24
+
25
+ /**
26
+ *This test is invoked per site.
27
+ */
28
+ virtual void run() {
29
+ if (Origen::site().bin() || Origen::site().softbin()) {
30
+ stringstream softbin;
31
+ softbin << Origen::site().softbin();
32
+ SET_MULTIBIN(softbin.str(), Origen::site().bin());
33
+ TESTSET().judgeAndLog_FunctionalTest(false);
34
+ }
35
+ }
36
+ };
37
+ REGISTER_TESTMETHOD("ApplyBin", OrigenApplyBin);
@@ -0,0 +1,90 @@
1
+ #include "origen/test_method/dc_measurement.hpp"
2
+
3
+ /**
4
+ * Test method class.
5
+ *
6
+ * For each testsuite using this test method, one object of this
7
+ * class is created.
8
+ */
9
+ class OrigenDCMeasurement : public Origen::TestMethod::DCMeasurement {
10
+ protected:
11
+ int mApplyShutdown;
12
+ string mShutdownPattern;
13
+ string mMeasure;
14
+ double mSettlingTime;
15
+ string mPin;
16
+ string mPort;
17
+ double mForceValue;
18
+ double mIRange;
19
+ int mCheckShutdown;
20
+ int mBadc;
21
+
22
+ protected:
23
+ /**
24
+ *Initialize the parameter interface to the testflow.
25
+ *This method is called just once after a testsuite is created.
26
+ */
27
+ virtual void init() {
28
+ // Add your initialization code here
29
+ // Note: Test Method API should not be used in this method!
30
+ addParameter("applyShutdown", "int", &mApplyShutdown,
31
+ testmethod::TM_PARAMETER_INPUT)
32
+ .setDefault("1")
33
+ .setComment("Apply a shutdown pattern after taking the measurement");
34
+ addParameter("shutdownPattern", "string", &mShutdownPattern,
35
+ testmethod::TM_PARAMETER_INPUT)
36
+ .setComment(
37
+ "The name of the shutdown pattern, by default it will be the main "
38
+ "pattern name appended with '_part1'");
39
+ addParameter("checkShutdown", "int", &mCheckShutdown,
40
+ testmethod::TM_PARAMETER_INPUT)
41
+ .setDefault("1")
42
+ .setComment("Check that the shutdown pattern passed (and fail if not)");
43
+ addParameter("measure", "string", &mMeasure, testmethod::TM_PARAMETER_INPUT)
44
+ .setDefault("VOLT")
45
+ .setComment("Measure 'CURR' or 'VOLT' (the default)");
46
+ addParameter("settlingTime", "double", &mSettlingTime,
47
+ testmethod::TM_PARAMETER_INPUT)
48
+ .setDefault("0")
49
+ .setComment(
50
+ "Time to wait between running the pattern and taking the "
51
+ "measurement, expressed in ms");
52
+ addParameter("pin", "PinString", &mPin, testmethod::TM_PARAMETER_INPUT)
53
+ .setComment("Pin to be measured");
54
+ addParameter("port", "string", &mPort, testmethod::TM_PARAMETER_INPUT)
55
+ .setDefault("")
56
+ .setComment("Port the pattern is to be executed on");
57
+ addParameter("forceValue", "double", &mForceValue,
58
+ testmethod::TM_PARAMETER_INPUT)
59
+ .setDefault("0")
60
+ .setComment("Value to be forced on the pin during the measurement");
61
+ addParameter("iRange", "double", &mIRange, testmethod::TM_PARAMETER_INPUT)
62
+ .setDefault("0")
63
+ .setComment(
64
+ "The current range to apply to the measurement (in A), will be "
65
+ "calculated if not supplied (set to 0)");
66
+ addParameter("badc", "int", &mBadc, testmethod::TM_PARAMETER_INPUT)
67
+ .setDefault("0")
68
+ .setComment(
69
+ "Perform the measurement using the Board ADC (rather than the "
70
+ "PPMU)");
71
+ }
72
+
73
+ /**
74
+ *This test is invoked per site.
75
+ */
76
+ virtual void body() {
77
+ origen.applyShutdown(mApplyShutdown)
78
+ .forceValue(mForceValue)
79
+ .shutdownPattern(mShutdownPattern)
80
+ .checkShutdown(mCheckShutdown)
81
+ .measure(mMeasure)
82
+ .settlingTime(mSettlingTime)
83
+ .pin(mPin)
84
+ .port(mPort)
85
+ .iRange(mIRange)
86
+ .badc(mBadc)
87
+ .execute();
88
+ }
89
+ };
90
+ REGISTER_TESTMETHOD("DCMeasurement", OrigenDCMeasurement);
@@ -0,0 +1,50 @@
1
+ #include "origen/test_method/frequency_measurement.hpp"
2
+
3
+ class OrigenFrequencyMeasurement
4
+ : public Origen::TestMethod::FrequencyMeasurement {
5
+ protected:
6
+ int mPeriodBased;
7
+ string mPin;
8
+ string mPort;
9
+ int mSamples;
10
+ int mPeriodInNs;
11
+
12
+ protected:
13
+ /**
14
+ *Initialize the parameter interface to the testflow.
15
+ *This method is called just once after a testsuite is created.
16
+ */
17
+ virtual void init() {
18
+ addParameter("periodBased", "int", &mPeriodBased,
19
+ testmethod::TM_PARAMETER_INPUT)
20
+ .setDefault("0")
21
+ .setComment(
22
+ "Set to 1 if the limits are expressed as a period instead of a "
23
+ "frequency (the default)");
24
+ addParameter("pin", "PinString", &mPin, testmethod::TM_PARAMETER_INPUT)
25
+ .setComment("Pin to be measured");
26
+ addParameter("port", "string", &mPort, testmethod::TM_PARAMETER_INPUT)
27
+ .setDefault("")
28
+ .setComment("Port the pattern is to be executed on");
29
+ addParameter("samples", "int", &mSamples, testmethod::TM_PARAMETER_INPUT)
30
+ .setDefault("2000")
31
+ .setComment(
32
+ "The number of captures made by the pattern, defaults to 2000");
33
+ addParameter("periodInNs", "int", &mPeriodInNs,
34
+ testmethod::TM_PARAMETER_INPUT)
35
+ .setComment("The period of the capture vectors");
36
+ }
37
+
38
+ /**
39
+ *This test is invoked per site.
40
+ */
41
+ virtual void body() {
42
+ origen.periodBased(mPeriodBased)
43
+ .pin(mPin)
44
+ .port(mPort)
45
+ .samples(mSamples)
46
+ .periodInNs(mPeriodInNs)
47
+ .execute();
48
+ }
49
+ };
50
+ REGISTER_TESTMETHOD("FrequencyMeasurement", OrigenFrequencyMeasurement);
@@ -0,0 +1,24 @@
1
+ #include "origen/test_method/functional_test.hpp"
2
+
3
+ class OrigenFunctionalTest : public Origen::TestMethod::FunctionalTest {
4
+ protected:
5
+ string mPort;
6
+
7
+ protected:
8
+ /**
9
+ *Initialize the parameter interface to the testflow.
10
+ *This method is called just once after a testsuite is created.
11
+ */
12
+ virtual void init() {
13
+ // NOTE: The capture arguments are not listed here since it makes no sense
14
+ // to use them without
15
+ // corresponding functions to handle the captured data
16
+
17
+ addParameter("port", "string", &mPort, testmethod::TM_PARAMETER_INPUT)
18
+ .setDefault("")
19
+ .setComment("Port the pattern is to be executed on");
20
+ }
21
+
22
+ virtual void body() { origen.port(mPort).execute(); }
23
+ };
24
+ REGISTER_TESTMETHOD("FunctionalTest", OrigenFunctionalTest);
@@ -0,0 +1,39 @@
1
+ #include "testmethod.hpp"
2
+
3
+ // for test method API interfaces
4
+ #include "mapi.hpp"
5
+ using namespace std;
6
+ #include "origen.hpp"
7
+
8
+ /**
9
+ * Test method class.
10
+ *
11
+ * For each testsuite using this test method, one object of this
12
+ * class is created.
13
+ */
14
+ class OrigenRecordBin : public testmethod::TestMethod {
15
+ protected:
16
+ int mBin;
17
+ int mSoftbin;
18
+
19
+ protected:
20
+ /**
21
+ *Initialize the parameter interface to the testflow.
22
+ *This method is called just once after a testsuite is created.
23
+ */
24
+ virtual void initialize() {
25
+ // Add your initialization code here
26
+ // Note: Test Method API should not be used in this method!
27
+ addParameter("bin", "int", &mBin, testmethod::TM_PARAMETER_INPUT);
28
+ addParameter("softbin", "int", &mSoftbin, testmethod::TM_PARAMETER_INPUT);
29
+ }
30
+
31
+ /**
32
+ *This test is invoked per site.
33
+ */
34
+ virtual void run() {
35
+ Origen::site().bin(mBin);
36
+ Origen::site().softbin(mSoftbin);
37
+ }
38
+ };
39
+ REGISTER_TESTMETHOD("RecordBin", OrigenRecordBin);