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
@@ -1,107 +0,0 @@
1
- #include "frequency_measurement.hpp"
2
-
3
- using namespace std;
4
-
5
- namespace Origen {
6
- namespace TestMethod {
7
-
8
-
9
- FrequencyMeasurement::FrequencyMeasurement() {
10
- samples(2000);
11
- processResults(1);
12
- }
13
- FrequencyMeasurement::~FrequencyMeasurement() { }
14
-
15
- /// By default the limits are assumed to be expressed as a frequency, set this to 1 if they refer to a target period
16
- FrequencyMeasurement & FrequencyMeasurement::periodBased(int v) { _periodBased = v; return *this; }
17
- /// REQUIRED: The name of the pin being measured
18
- FrequencyMeasurement & FrequencyMeasurement::pin(string v) { _pin = v; return *this; }
19
- /// The number of samples captured by the pattern, the default is 2000
20
- FrequencyMeasurement & FrequencyMeasurement::samples(int v) { _samples = v; return *this; }
21
- /// REQUIRED: Supply the period of the captured vectors in nanoseconds
22
- FrequencyMeasurement & FrequencyMeasurement::periodInNs(int v) { _periodInNs = v; return *this; }
23
- /// When set to 0 the results of the test will not be judged or logged
24
- FrequencyMeasurement & FrequencyMeasurement::processResults(int v) { _processResults = v; return *this; }
25
-
26
- // All test methods must implement these functions
27
- FrequencyMeasurement & FrequencyMeasurement::getThis() { return *this; }
28
-
29
- void FrequencyMeasurement::execute() {
30
-
31
- int site, physicalSites;
32
- ARRAY_I sites;
33
-
34
- ON_FIRST_INVOCATION_BEGIN();
35
-
36
- enableHiddenUpload();
37
- GET_ACTIVE_SITES(activeSites);
38
- physicalSites = GET_CONFIGURED_SITES(sites);
39
- funcResults.resize(physicalSites + 1);
40
- GET_TESTSUITE_NAME(testSuiteName);
41
- label = Primary.getLabel();
42
- pin(extractPinsFromGroup(_pin));
43
-
44
- callPreTestFunc();
45
-
46
- RDI_BEGIN();
47
-
48
- SMART_RDI::DIG_CAP & prdi = rdi.digCap(testSuiteName)
49
- .label(label)
50
- .pin(_pin)
51
- .bitPerWord(1)
52
- .samples(_samples);
53
-
54
- filterRDI(prdi);
55
- prdi.execute();
56
-
57
- RDI_END();
58
-
59
- FOR_EACH_SITE_BEGIN();
60
- site = CURRENT_SITE_NUMBER();
61
- funcResults[site] = rdi.getBurstPassFail();
62
- FOR_EACH_SITE_END();
63
-
64
- ON_FIRST_INVOCATION_END();
65
-
66
- callPostTestFunc(this);
67
- }
68
-
69
- void FrequencyMeasurement::serialProcessing(int site) {
70
- if (_processResults) {
71
- double result;
72
- ARRAY_I captureData = rdi.site(site).id(testSuiteName).getVector();
73
-
74
- if (_periodBased) {
75
- result = calculatePeriod(captureData, _periodInNs);
76
- } else {
77
- result = calculateFrequency(captureData, _periodInNs);
78
- }
79
- logFunctionalTest(testSuiteName, site, funcResults[site] == 1, label);
80
- TESTSET().testnumber(testnumber()).cont(true).testname(testSuiteName).judgeAndLog_FunctionalTest(funcResults[site] == 1);
81
-
82
- logParametricTest(testSuiteName, site, filterResult(result), limits(), _pin);
83
- TESTSET().testnumber(testnumber() + 1).judgeAndLog_ParametricTest(_pin, testSuiteName, limits(), filterResult(result));
84
- }
85
- }
86
-
87
- void FrequencyMeasurement::SMC_backgroundProcessing() {
88
- double result;
89
-
90
- for (int i = 0; i < activeSites.size(); i++) {
91
- int site = activeSites[i];
92
- processFunc(site);
93
- if (_processResults) {
94
- ARRAY_I captureData = rdi.site(site).id(testSuiteName).getVector();
95
- if (_periodBased) {
96
- result = calculatePeriod(captureData, _periodInNs);
97
- } else {
98
- result = calculateFrequency(captureData, _periodInNs);
99
- }
100
- SMC_TEST(site, "", testSuiteName, LIMIT(TM::GE, 1, TM::LE, 1), funcResults[site]);
101
- SMC_TEST(site, _pin, testSuiteName, limits(), filterResult(result));
102
- }
103
- }
104
- }
105
-
106
- }
107
- }
@@ -1,48 +0,0 @@
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
- int _samples;
19
- int _periodInNs;
20
- int _processResults;
21
-
22
- public:
23
- FrequencyMeasurement();
24
- virtual ~FrequencyMeasurement();
25
- void SMC_backgroundProcessing();
26
- void execute();
27
-
28
- FrequencyMeasurement & periodBased(int v);
29
- FrequencyMeasurement & pin(string v);
30
- FrequencyMeasurement & samples(int v);
31
- FrequencyMeasurement & periodInNs(int v);
32
- FrequencyMeasurement & processResults(int v);
33
-
34
- protected:
35
- FrequencyMeasurement & getThis();
36
-
37
- // Internal variables, declared outside the the execute function body since
38
- // they may be useful in callback functions
39
- ARRAY_I activeSites;
40
- string testSuiteName;
41
- string label;
42
- vector<int> funcResults;
43
-
44
- };
45
-
46
- }
47
- }
48
- #endif
@@ -1,125 +0,0 @@
1
- #include "functional_test.hpp"
2
-
3
- using namespace std;
4
-
5
- namespace Origen {
6
- namespace TestMethod {
7
-
8
-
9
- FunctionalTest::FunctionalTest() {
10
- pin("");
11
- capture(0);
12
- processResults(1);
13
- bitPerWord(1);
14
- pattern("");
15
- }
16
-
17
- FunctionalTest::~FunctionalTest() { }
18
-
19
- /// The functional test method can optionally capture data by supplying the number of vectors to capture
20
- FunctionalTest & FunctionalTest::capture(int v) { _capture = v; return *this; }
21
- /// If data capture is requested, supply the pin to capture data from
22
- FunctionalTest & FunctionalTest::pin(string v) { _pin = v; return *this; }
23
- /// Serial capture data will be grouped into words, specify how many bits per word in the serial stream (default 1)
24
- FunctionalTest & FunctionalTest::bitPerWord(int v) { _bitPerWord = v; return *this; }
25
- /// When set to 0 the results of the test will not be judged or logged
26
- FunctionalTest & FunctionalTest::processResults(int v) { _processResults = v; return *this; }
27
- /// Override the pattern argument from the test suite
28
- FunctionalTest & FunctionalTest::pattern(string v) { _pattern = v; return *this; }
29
-
30
- // All test methods must implement this function
31
- FunctionalTest & FunctionalTest::getThis() { return *this; }
32
-
33
- void FunctionalTest::execute() {
34
-
35
- int site, physicalSites;
36
- ARRAY_I sites;
37
-
38
- ON_FIRST_INVOCATION_BEGIN();
39
-
40
- enableHiddenUpload();
41
- GET_ACTIVE_SITES(activeSites);
42
- physicalSites = GET_CONFIGURED_SITES(sites);
43
- results.resize(physicalSites + 1);
44
- GET_TESTSUITE_NAME(testSuiteName);
45
- // testSuiteName = testSuiteName + toStr(CURRENT_SITE_NUMBER());
46
- // cout << testSuiteName << endl;
47
- if (_pattern == "") {
48
- label = Primary.getLabel();
49
- } else {
50
- label = _pattern;
51
- }
52
-
53
- if (_capture) {
54
- pinName = extractPinsFromGroup(_pin);
55
- }
56
-
57
- callPreTestFunc();
58
-
59
- RDI_BEGIN();
60
-
61
- if (_capture) {
62
- SMART_RDI::DIG_CAP & prdi = rdi.digCap(testSuiteName)
63
- .label(label)
64
- .pin(pinName)
65
- .bitPerWord(_bitPerWord)
66
- .samples(_capture);
67
- filterRDI(prdi);
68
- prdi.execute();
69
-
70
- } else {
71
- SMART_RDI::FUNC & prdi = rdi.func(testSuiteName).label(label);
72
- // SMART_RDI::FUNC & prdi = rdi.func(testSuiteName).burst(label);
73
- filterRDI(prdi);
74
- prdi.execute();
75
- }
76
-
77
- RDI_END();
78
-
79
- FOR_EACH_SITE_BEGIN();
80
- site = CURRENT_SITE_NUMBER();
81
- if (_capture) {
82
- results[site] = rdi.site(site).getBurstPassFail();
83
- // cout << "PRE " << site << ": " << results[site] << endl;
84
-
85
- } else {
86
- results[site] = rdi.site(site).id(testSuiteName).getPassFail();
87
- // cout << "PRE " << site << ": " << results[site] << endl;
88
- }
89
- FOR_EACH_SITE_END();
90
-
91
- ON_FIRST_INVOCATION_END();
92
-
93
- callPostTestFunc(this);
94
- }
95
-
96
- /// Returns the captured data for the site currently in focus
97
- ARRAY_I FunctionalTest::capturedData() {
98
- return rdi.id(testSuiteName).getVector(pinName);
99
- }
100
-
101
- /// Returns the captured data for the given site number
102
- ARRAY_I FunctionalTest::capturedData(int site) {
103
- return rdi.site(site).id(testSuiteName).getVector(pinName);
104
- }
105
-
106
- void FunctionalTest::serialProcessing(int site) {
107
- if (_processResults) {
108
- // cout << "POST " << site << ": " << results[site] << endl;
109
- logFunctionalTest(testSuiteName, site, results[site] == 1, label);
110
- TESTSET().testnumber(testnumber()).testname(testSuiteName).judgeAndLog_FunctionalTest(results[site] == 1);
111
- }
112
- }
113
-
114
- void FunctionalTest::SMC_backgroundProcessing() {
115
- for (int i = 0; i < activeSites.size(); i++) {
116
- int site = activeSites[i];
117
- processFunc(site);
118
- if (_processResults) {
119
- SMC_TEST(site, "", testSuiteName, LIMIT(TM::GE, 1, TM::LE, 1), results[activeSites[i]]);
120
- }
121
- }
122
- }
123
-
124
- }
125
- }
@@ -1,52 +0,0 @@
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
- int _capture;
18
- int _bitPerWord;
19
- int _processResults;
20
- string _pattern;
21
-
22
- public:
23
- FunctionalTest();
24
-
25
- virtual ~FunctionalTest();
26
- void SMC_backgroundProcessing();
27
- void execute();
28
-
29
- FunctionalTest & capture(int v);
30
- FunctionalTest & pin(string v);
31
- FunctionalTest & bitPerWord(int v);
32
- FunctionalTest & processResults(int v);
33
- FunctionalTest & pattern(string v);
34
-
35
- protected:
36
- FunctionalTest & getThis();
37
- ARRAY_I capturedData();
38
- ARRAY_I capturedData(int);
39
-
40
- // Internal variables, declared outside the the execute function body since
41
- // they may be useful in callback functions
42
- ARRAY_I activeSites;
43
- string testSuiteName;
44
- string label;
45
- vector<int> results;
46
- string pinName;
47
- };
48
-
49
-
50
- }
51
- }
52
- #endif
@@ -1,79 +0,0 @@
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() {
17
- return _major;
18
- }
19
- int Version::minor() {
20
- return _minor;
21
- }
22
- int Version::tiny() {
23
- return _tiny;
24
- }
25
-
26
- string Version::str() {
27
- ostringstream str;
28
- str << _major;
29
- str << ".";
30
- str << _minor;
31
- str << ".";
32
- str << _tiny;
33
- return str.str();
34
- }
35
-
36
- bool Version::operator==(string rhs) {
37
- vector<int> v = parse(rhs);
38
- return _major == v[0] && _minor == v[1] && _tiny == v[2];
39
- }
40
-
41
- bool Version::operator!=(string rhs) {
42
- vector<int> v = parse(rhs);
43
- return _major != v[0] || _minor != v[1] || _tiny != v[2];
44
- }
45
-
46
- bool Version::operator<(string rhs) {
47
- vector<int> v = parse(rhs);
48
- return _major < v[0] || (_major == v[0] && _minor < v[1])
49
- || (_major == v[0] && _minor == v[1] && _tiny < v[2]);
50
- }
51
-
52
- bool Version::operator<=(string rhs) {
53
- return operator==(rhs) || operator<(rhs);
54
- }
55
-
56
- bool Version::operator>(string rhs) {
57
- vector<int> v = parse(rhs);
58
- return _major > v[0] || (_major == v[0] && _minor > v[1])
59
- || (_major == v[0] && _minor == v[1] && _tiny > v[2]);
60
- }
61
-
62
- bool Version::operator>=(string rhs) {
63
- return operator==(rhs) || operator>(rhs);
64
- }
65
-
66
- vector<int> Version::parse(string ver) {
67
- vector<int> v(3);
68
-
69
- istringstream parser(ver);
70
- parser >> v[0];
71
- for (int i = 1; i < 3; i++) {
72
- parser.get(); //Skip dot
73
- parser >> v[i];
74
- }
75
- return v;
76
- }
77
-
78
- }
79
- }
@@ -1,41 +0,0 @@
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 ApplyBin: public testmethod::TestMethod {
15
-
16
- protected:
17
- /**
18
- *Initialize the parameter interface to the testflow.
19
- *This method is called just once after a testsuite is created.
20
- */
21
- virtual void initialize()
22
- {
23
- //Add your initialization code here
24
- //Note: Test Method API should not be used in this method!
25
- }
26
-
27
- /**
28
- *This test is invoked per site.
29
- */
30
- virtual void run()
31
- {
32
- if (Origen::site().bin() || Origen::site().softbin()) {
33
- stringstream softbin;
34
- softbin << Origen::site().softbin();
35
- SET_MULTIBIN(softbin.str(), Origen::site().bin());
36
- TESTSET().judgeAndLog_FunctionalTest(false);
37
- }
38
- }
39
-
40
- };
41
- REGISTER_TESTMETHOD("ApplyBin", ApplyBin);