origen_std_lib 0.10.1 → 0.11.0

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 +2 -3
  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.cpp +18 -0
  9. data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
  10. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
  11. data/src/advantest/smt7/origen/origen/helpers/console.cpp +94 -0
  12. data/src/advantest/smt7/origen/origen/helpers/misc.cpp +456 -0
  13. data/src/advantest/smt7/origen/origen/helpers/time.cpp +64 -0
  14. data/src/advantest/smt7/origen/origen/site.cpp +237 -0
  15. data/src/advantest/smt7/origen/origen/site.hpp +49 -0
  16. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/test_method.hpp +1 -3
  17. data/src/advantest/smt7/origen/origen/test_method/base.cpp +231 -0
  18. data/src/advantest/smt7/origen/origen/test_method/base.hpp +155 -0
  19. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.cpp +266 -0
  20. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.hpp +58 -0
  21. data/src/advantest/smt7/origen/origen/test_method/empty.cpp +13 -0
  22. data/src/advantest/smt7/origen/origen/test_method/empty.hpp +24 -0
  23. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.cpp +133 -0
  24. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.hpp +46 -0
  25. data/src/advantest/smt7/origen/origen/test_method/functional_test.cpp +168 -0
  26. data/src/advantest/smt7/origen/origen/test_method/functional_test.hpp +53 -0
  27. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils.hpp +1 -3
  28. data/src/advantest/smt7/origen/origen/utils/version.cpp +72 -0
  29. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils/version.hpp +20 -21
  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 +462 -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 -32
  58. data/stdlib/v93k/origen/origen.cpp +0 -22
  59. data/stdlib/v93k/origen/origen/helpers/console.cpp +0 -105
  60. data/stdlib/v93k/origen/origen/helpers/misc.cpp +0 -311
  61. data/stdlib/v93k/origen/origen/site.cpp +0 -220
  62. data/stdlib/v93k/origen/origen/site.hpp +0 -51
  63. data/stdlib/v93k/origen/origen/test_method/base.hpp +0 -156
  64. data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +0 -182
  65. data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +0 -59
  66. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +0 -107
  67. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +0 -48
  68. data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +0 -125
  69. data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +0 -52
  70. data/stdlib/v93k/origen/origen/utils/version.cpp +0 -79
  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,13 @@
1
+ #include "empty.hpp"
2
+
3
+ namespace Origen {
4
+ namespace TestMethod {
5
+
6
+ Empty::Empty() {}
7
+
8
+ Empty::~Empty() {}
9
+
10
+ // All test methods must implement this function
11
+ Empty& Empty::getThis() { return *this; }
12
+ }
13
+ }
@@ -0,0 +1,24 @@
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 Empty : public Base {
14
+ public:
15
+ Empty();
16
+ virtual ~Empty();
17
+
18
+ protected:
19
+ typedef Empty super;
20
+ Empty& getThis();
21
+ };
22
+ }
23
+ }
24
+ #endif
@@ -0,0 +1,133 @@
1
+ #include "frequency_measurement.hpp"
2
+
3
+ namespace Origen {
4
+ namespace TestMethod {
5
+
6
+ // Defaults
7
+ FrequencyMeasurement::FrequencyMeasurement() {
8
+ samples(2000);
9
+ processResults(1);
10
+ port("");
11
+ }
12
+ FrequencyMeasurement::~FrequencyMeasurement() {}
13
+
14
+ /// By default the limits are assumed to be expressed as a frequency, set this
15
+ /// to 1 if they refer to a target period
16
+ FrequencyMeasurement& FrequencyMeasurement::periodBased(int v) {
17
+ _periodBased = v;
18
+ return *this;
19
+ }
20
+ /// REQUIRED: The name of the pin being measured
21
+ FrequencyMeasurement& FrequencyMeasurement::pin(string v) {
22
+ _pin = v;
23
+ return *this;
24
+ }
25
+ /// Optionally supply the name of the test port that should be used to execute
26
+ /// the pattern
27
+ FrequencyMeasurement& FrequencyMeasurement::port(string v) {
28
+ _port = v;
29
+ return *this;
30
+ }
31
+ /// The number of samples captured by the pattern, the default is 2000
32
+ FrequencyMeasurement& FrequencyMeasurement::samples(int v) {
33
+ _samples = v;
34
+ return *this;
35
+ }
36
+ /// REQUIRED: Supply the period of the captured vectors in nanoseconds
37
+ FrequencyMeasurement& FrequencyMeasurement::periodInNs(int v) {
38
+ _periodInNs = v;
39
+ return *this;
40
+ }
41
+ /// When set to 0 the results of the test will not be judged or logged
42
+ FrequencyMeasurement& FrequencyMeasurement::processResults(int v) {
43
+ _processResults = v;
44
+ return *this;
45
+ }
46
+
47
+ // All test methods must implement these functions
48
+ FrequencyMeasurement& FrequencyMeasurement::getThis() { return *this; }
49
+
50
+ void FrequencyMeasurement::_setup() {
51
+ funcResults.resize(numberOfPhysicalSites + 1);
52
+ label = Primary.getLabel();
53
+ pin(extractPinsFromGroup(_pin));
54
+ }
55
+
56
+ void FrequencyMeasurement::_execute() {
57
+ int site;
58
+
59
+ ON_FIRST_INVOCATION_BEGIN();
60
+
61
+ RDI_BEGIN();
62
+
63
+ if (_port.empty()) {
64
+ SMART_RDI::DIG_CAP& prdi =
65
+ rdi.digCap(suiteName).label(label).pin(_pin).bitPerWord(1).samples(
66
+ _samples);
67
+
68
+ filterRDI(prdi);
69
+ prdi.execute();
70
+
71
+ } else {
72
+ SMART_RDI::DIG_CAP& prdi = rdi.port(_port)
73
+ .digCap(suiteName)
74
+ .vecVarOnly()
75
+ .pin(_pin)
76
+ .bitPerWord(1)
77
+ .samples(_samples);
78
+
79
+ filterRDI(prdi);
80
+ prdi.execute();
81
+ rdi.port(_port).func().burst(label).execute();
82
+ }
83
+
84
+ RDI_END();
85
+
86
+ FOR_EACH_SITE_BEGIN();
87
+ site = CURRENT_SITE_NUMBER();
88
+ funcResults[site] = rdi.getBurstPassFail();
89
+ FOR_EACH_SITE_END();
90
+
91
+ ON_FIRST_INVOCATION_END();
92
+ }
93
+
94
+ void FrequencyMeasurement::serialProcessing(int site) {
95
+ if (_processResults) {
96
+ double result;
97
+ ARRAY_I captureData = rdi.site(site).id(suiteName).getVector();
98
+
99
+ if (_periodBased) {
100
+ result = calculatePeriod(captureData, _periodInNs);
101
+ } else {
102
+ result = calculateFrequency(captureData, _periodInNs);
103
+ }
104
+
105
+ judgeAndDatalog(testName() + "_FUNC",
106
+ invertFunctionalResultIfRequired(funcResults[site]));
107
+
108
+ judgeAndDatalog(filterResult(result));
109
+ }
110
+ }
111
+
112
+ void FrequencyMeasurement::SMC_backgroundProcessing() {
113
+ double result;
114
+
115
+ for (int i = 0; i < activeSites.size(); i++) {
116
+ int site = activeSites[i];
117
+ process(site);
118
+ if (_processResults) {
119
+ ARRAY_I captureData = rdi.site(site).id(suiteName).getVector();
120
+ if (_periodBased) {
121
+ result = calculatePeriod(captureData, _periodInNs);
122
+ } else {
123
+ result = calculateFrequency(captureData, _periodInNs);
124
+ }
125
+ SMC_TEST(site, "", suiteName, LIMIT(TM::GE, 1, TM::LE, 1),
126
+ funcResults[site]);
127
+ SMC_TEST(site, _pin, suiteName, testLimits().TEST_API_LIMIT,
128
+ filterResult(result));
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,46 @@
1
+ #ifndef ORIGEN_TEST_METHOD_FREQUENCY_MEASUREMENT_INCLUDED
2
+ #define ORIGEN_TEST_METHOD_FREQUENCY_MEASUREMENT_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 FrequencyMeasurement : public Base {
14
+ void serialProcessing(int site);
15
+
16
+ int _periodBased;
17
+ string _pin;
18
+ string _port;
19
+ int _samples;
20
+ int _periodInNs;
21
+ int _processResults;
22
+
23
+ public:
24
+ FrequencyMeasurement();
25
+ virtual ~FrequencyMeasurement();
26
+ void SMC_backgroundProcessing();
27
+
28
+ FrequencyMeasurement& periodBased(int v);
29
+ FrequencyMeasurement& pin(string v);
30
+ FrequencyMeasurement& port(string v);
31
+ FrequencyMeasurement& samples(int v);
32
+ FrequencyMeasurement& periodInNs(int v);
33
+ FrequencyMeasurement& processResults(int v);
34
+
35
+ protected:
36
+ typedef FrequencyMeasurement super;
37
+ FrequencyMeasurement& getThis();
38
+ void _setup();
39
+ void _execute();
40
+
41
+ string label;
42
+ vector<int> funcResults;
43
+ };
44
+ }
45
+ }
46
+ #endif
@@ -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
@@ -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