origen_std_lib 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/config/application.rb +13 -0
  3. data/config/version.rb +1 -1
  4. data/stdlib/v93k/origen/Debug/liborigen.so +0 -0
  5. data/stdlib/v93k/origen/Debug/makefile +63 -0
  6. data/stdlib/v93k/origen/Debug/objects.mk +8 -0
  7. data/stdlib/v93k/origen/Debug/origen.d +1477 -0
  8. data/stdlib/v93k/origen/Debug/origen.o +0 -0
  9. data/stdlib/v93k/origen/Debug/origen/helpers/console.d +1483 -0
  10. data/stdlib/v93k/origen/Debug/origen/helpers/console.o +0 -0
  11. data/stdlib/v93k/origen/Debug/origen/helpers/misc.d +1483 -0
  12. data/stdlib/v93k/origen/Debug/origen/helpers/misc.o +0 -0
  13. data/stdlib/v93k/origen/Debug/origen/helpers/subdir.mk +27 -0
  14. data/stdlib/v93k/origen/Debug/origen/site.d +1469 -0
  15. data/stdlib/v93k/origen/Debug/origen/site.o +0 -0
  16. data/stdlib/v93k/origen/Debug/origen/subdir.mk +24 -0
  17. data/stdlib/v93k/origen/Debug/origen/test_method/dc_measurement.d +1501 -0
  18. data/stdlib/v93k/origen/Debug/origen/test_method/dc_measurement.o +0 -0
  19. data/stdlib/v93k/origen/Debug/origen/test_method/frequency_measurement.d +1502 -0
  20. data/stdlib/v93k/origen/Debug/origen/test_method/frequency_measurement.o +0 -0
  21. data/stdlib/v93k/origen/Debug/origen/test_method/functional_test.d +1501 -0
  22. data/stdlib/v93k/origen/Debug/origen/test_method/functional_test.o +0 -0
  23. data/stdlib/v93k/origen/Debug/origen/test_method/subdir.mk +30 -0
  24. data/stdlib/v93k/origen/Debug/origen/utils/subdir.mk +24 -0
  25. data/stdlib/v93k/origen/Debug/origen/utils/version.d +4 -0
  26. data/stdlib/v93k/origen/Debug/origen/utils/version.o +0 -0
  27. data/stdlib/v93k/origen/Debug/sources.mk +32 -0
  28. data/stdlib/v93k/origen/Debug/subdir.mk +24 -0
  29. data/stdlib/v93k/origen/Debug/test_methods/ApplyBin.d +1487 -0
  30. data/stdlib/v93k/origen/Debug/test_methods/ApplyBin.o +0 -0
  31. data/stdlib/v93k/origen/Debug/test_methods/DCMeasurement.d +1508 -0
  32. data/stdlib/v93k/origen/Debug/test_methods/DCMeasurement.o +0 -0
  33. data/stdlib/v93k/origen/Debug/test_methods/FrequencyMeasurement.d +1508 -0
  34. data/stdlib/v93k/origen/Debug/test_methods/FrequencyMeasurement.o +0 -0
  35. data/stdlib/v93k/origen/Debug/test_methods/FunctionalTest.d +1511 -0
  36. data/stdlib/v93k/origen/Debug/test_methods/FunctionalTest.o +0 -0
  37. data/stdlib/v93k/origen/Debug/test_methods/RecordBin.d +1487 -0
  38. data/stdlib/v93k/origen/Debug/test_methods/RecordBin.o +0 -0
  39. data/stdlib/v93k/origen/Debug/test_methods/subdir.mk +36 -0
  40. data/stdlib/v93k/origen/origen.cpp +22 -0
  41. data/stdlib/v93k/origen/origen.hpp +22 -0
  42. data/stdlib/v93k/origen/origen/helpers.hpp +44 -0
  43. data/stdlib/v93k/origen/origen/helpers/console.cpp +105 -0
  44. data/stdlib/v93k/origen/origen/helpers/misc.cpp +305 -0
  45. data/stdlib/v93k/origen/origen/site.cpp +220 -0
  46. data/stdlib/v93k/origen/origen/site.hpp +51 -0
  47. data/stdlib/v93k/origen/origen/test_method.hpp +17 -0
  48. data/stdlib/v93k/origen/origen/test_method/base.hpp +151 -0
  49. data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +182 -0
  50. data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +59 -0
  51. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +109 -0
  52. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +48 -0
  53. data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +119 -0
  54. data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +51 -0
  55. data/stdlib/v93k/origen/origen/utils.hpp +12 -0
  56. data/stdlib/v93k/origen/origen/utils/version.cpp +79 -0
  57. data/stdlib/v93k/origen/origen/utils/version.hpp +64 -0
  58. data/stdlib/v93k/origen/test_methods/ApplyBin.cpp +41 -0
  59. data/stdlib/v93k/origen/test_methods/DCMeasurement.cpp +127 -0
  60. data/stdlib/v93k/origen/test_methods/FrequencyMeasurement.cpp +91 -0
  61. data/stdlib/v93k/origen/test_methods/FunctionalTest.cpp +92 -0
  62. data/stdlib/v93k/origen/test_methods/RecordBin.cpp +48 -0
  63. metadata +60 -1
@@ -0,0 +1,64 @@
1
+ #ifndef ORIGEN_UTILS_VERSION_INCLUDED
2
+ #define ORIGEN_UTILS_VERSION_INCLUDED
3
+
4
+ // GCC adds these macros by default, which clobbers our functions
5
+ // of the same name
6
+ #if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__) || defined(__INTEL_COMPILER))
7
+ // Not exactly sure the version that this becomes a problem, but for
8
+ // now this fixes the build on the V93K production system
9
+ #if (__GNUC_MINOR__ > 1)
10
+ #ifdef major
11
+ #undef major
12
+ #endif
13
+ #ifdef minor
14
+ #undef minor
15
+ #endif
16
+ #endif
17
+ #endif
18
+
19
+ #include <string>
20
+ #include <vector>
21
+ using namespace std;
22
+
23
+ namespace Origen {
24
+ namespace Utils {
25
+
26
+ // The version class provides an easy way to create conditions based
27
+ // on the version of a library.
28
+ //
29
+ // An instance of the class is returned by Origen.version and which
30
+ // reflects the current version of the Origen library.
31
+ //
32
+ // if (Origen.version < "1.1.0") {
33
+ // // Do something
34
+ // }
35
+ //
36
+ // if (Origen.version.major() == 2) {
37
+ // // Do something
38
+ // }
39
+ 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();
59
+ };
60
+
61
+ }
62
+ }
63
+
64
+ #endif
@@ -0,0 +1,41 @@
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);
@@ -0,0 +1,127 @@
1
+ #include "testmethod.hpp"
2
+
3
+ //for test method API interfaces
4
+ #include "mapi.hpp"
5
+ using namespace std;
6
+ #include "origen/test_method/dc_measurement.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 DCMeasurement: public testmethod::TestMethod, public Origen::TestMethod::DCMeasurement {
15
+ protected:
16
+ int mApplyShutdown;
17
+ string mShutdownPattern;
18
+ string mMeasure;
19
+ double mSettlingTime;
20
+ string mPin;
21
+ double mForceValue;
22
+ double mIRange;
23
+ int mCheckShutdown;
24
+ int mBadc;
25
+
26
+ protected:
27
+ /**
28
+ *Initialize the parameter interface to the testflow.
29
+ *This method is called just once after a testsuite is created.
30
+ */
31
+ virtual void initialize()
32
+ {
33
+ //Add your initialization code here
34
+ //Note: Test Method API should not be used in this method!
35
+ addParameter("applyShutdown",
36
+ "int",
37
+ &mApplyShutdown,
38
+ testmethod::TM_PARAMETER_INPUT)
39
+ .setDefault("1")
40
+ .setComment("Apply a shutdown pattern after taking the measurement");
41
+ addParameter("shutdownPattern",
42
+ "string",
43
+ &mShutdownPattern,
44
+ testmethod::TM_PARAMETER_INPUT)
45
+ .setComment("The name of the shutdown pattern, by default it will be the main pattern name appended with '_part1'");
46
+ addParameter("checkShutdown",
47
+ "int",
48
+ &mCheckShutdown,
49
+ testmethod::TM_PARAMETER_INPUT)
50
+ .setDefault("1")
51
+ .setComment("Check that the shutdown pattern passed (and fail if not)");
52
+ addParameter("measure",
53
+ "string",
54
+ &mMeasure,
55
+ testmethod::TM_PARAMETER_INPUT)
56
+ .setDefault("VOLT")
57
+ .setComment("Measure 'CURR' or 'VOLT' (the default)");
58
+ addParameter("settlingTime",
59
+ "double",
60
+ &mSettlingTime,
61
+ testmethod::TM_PARAMETER_INPUT)
62
+ .setDefault("0")
63
+ .setComment("Time to wait between running the pattern and taking the measurement, expressed in ms");
64
+ addParameter("pin",
65
+ "PinString",
66
+ &mPin,
67
+ testmethod::TM_PARAMETER_INPUT)
68
+ .setComment("Pin to be measured");
69
+ addParameter("forceValue",
70
+ "double",
71
+ &mForceValue,
72
+ testmethod::TM_PARAMETER_INPUT)
73
+ .setDefault("0")
74
+ .setComment("Value to be forced on the pin during the measurement");
75
+ addParameter("iRange",
76
+ "double",
77
+ &mIRange,
78
+ testmethod::TM_PARAMETER_INPUT)
79
+ .setDefault("0")
80
+ .setComment("The current range to apply to the measurement (in A), will be calculated if not supplied (set to 0)");
81
+ addParameter("badc",
82
+ "int",
83
+ &mBadc,
84
+ testmethod::TM_PARAMETER_INPUT)
85
+ .setDefault("0")
86
+ .setComment("Perform the measurement using the Board ADC (rather than the PPMU)");
87
+ addLimit("Functional");
88
+ }
89
+
90
+ /**
91
+ *This test is invoked per site.
92
+ */
93
+ virtual void run()
94
+ {
95
+ origen.applyShutdown(mApplyShutdown)
96
+ .forceValue(mForceValue)
97
+ .shutdownPattern(mShutdownPattern)
98
+ .checkShutdown(mCheckShutdown)
99
+ .measure(mMeasure)
100
+ .settlingTime(mSettlingTime)
101
+ .pin(mPin)
102
+ .iRange(mIRange)
103
+ .badc(mBadc)
104
+ .execute();
105
+ }
106
+
107
+ /**
108
+ *This function will be invoked once the specified parameter's value is changed.
109
+ *@param parameterIdentifier
110
+ */
111
+ virtual void postParameterChange(const string& parameterIdentifier)
112
+ {
113
+ //Add your code
114
+ //Note: Test Method API should not be used in this method!
115
+ return;
116
+ }
117
+
118
+ /**
119
+ *This function will be invoked once the Select Test Method Dialog is opened.
120
+ */
121
+ virtual const string getComment() const
122
+ {
123
+ string comment = " please add your comment for this method.";
124
+ return comment;
125
+ }
126
+ };
127
+ REGISTER_TESTMETHOD("DCMeasurement", DCMeasurement);
@@ -0,0 +1,91 @@
1
+ #include "testmethod.hpp"
2
+
3
+ //for test method API interfaces
4
+ #include "mapi.hpp"
5
+ using namespace std;
6
+ #include "../origen/test_method/frequency_measurement.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 FrequencyMeasurement: public testmethod::TestMethod,
15
+ public Origen::TestMethod::FrequencyMeasurement {
16
+
17
+ protected:
18
+ int mPeriodBased;
19
+ string mPin;
20
+ int mSamples;
21
+ int mPeriodInNs;
22
+
23
+ protected:
24
+ /**
25
+ *Initialize the parameter interface to the testflow.
26
+ *This method is called just once after a testsuite is created.
27
+ */
28
+ virtual void initialize()
29
+ {
30
+ addParameter("periodBased",
31
+ "int",
32
+ &mPeriodBased,
33
+ testmethod::TM_PARAMETER_INPUT)
34
+ .setDefault("0")
35
+ .setComment("Set to 1 if the limits are expressed as a period instead of a frequency (the default)");
36
+ addParameter("pin",
37
+ "PinString",
38
+ &mPin,
39
+ testmethod::TM_PARAMETER_INPUT)
40
+ .setComment("Pin to be measured");
41
+ addParameter("samples",
42
+ "int",
43
+ &mSamples,
44
+ testmethod::TM_PARAMETER_INPUT)
45
+ .setDefault("2000")
46
+ .setComment("The number of captures made by the pattern, defaults to 2000");
47
+ addParameter("periodInNs",
48
+ "int",
49
+ &mPeriodInNs,
50
+ testmethod::TM_PARAMETER_INPUT)
51
+ .setComment("The period of the capture vectors");
52
+
53
+
54
+ //Add your initialization code here
55
+ //Note: Test Method API should not be used in this method!
56
+ addLimit("Functional");
57
+ }
58
+
59
+ /**
60
+ *This test is invoked per site.
61
+ */
62
+ virtual void run()
63
+ {
64
+ origen.periodBased(mPeriodBased)
65
+ .pin(mPin)
66
+ .samples(mSamples)
67
+ .periodInNs(mPeriodInNs)
68
+ .execute();
69
+ }
70
+
71
+ /**
72
+ *This function will be invoked once the specified parameter's value is changed.
73
+ *@param parameterIdentifier
74
+ */
75
+ virtual void postParameterChange(const string& parameterIdentifier)
76
+ {
77
+ //Add your code
78
+ //Note: Test Method API should not be used in this method!
79
+ return;
80
+ }
81
+
82
+ /**
83
+ *This function will be invoked once the Select Test Method Dialog is opened.
84
+ */
85
+ virtual const string getComment() const
86
+ {
87
+ string comment = " please add your comment for this method.";
88
+ return comment;
89
+ }
90
+ };
91
+ REGISTER_TESTMETHOD("FrequencyMeasurement", FrequencyMeasurement);
@@ -0,0 +1,92 @@
1
+ #include "testmethod.hpp"
2
+
3
+ //for test method API interfaces
4
+ #include "mapi.hpp"
5
+ #include "rdi.hpp"
6
+ using namespace std;
7
+ #include "origen/test_method/functional_test.hpp"
8
+
9
+ /**
10
+ * Test method class.
11
+ *
12
+ * For each testsuite using this test method, one object of this
13
+ * class is created.
14
+ */
15
+ class FunctionalTest: public testmethod::TestMethod,
16
+ public Origen::TestMethod::FunctionalTest {
17
+
18
+ protected:
19
+ /**
20
+ *Initialize the parameter interface to the testflow.
21
+ *This method is called just once after a testsuite is created.
22
+ */
23
+ virtual void initialize() {
24
+ //Add your initialization code here
25
+ //Note: Test Method API should not be used in this method!
26
+ // addLimit("testlimit");
27
+ }
28
+
29
+ /**
30
+ *This test is invoked per site.
31
+ */
32
+ virtual void run() {
33
+ origen.execute();
34
+
35
+ // string label = Primary.getLabel();
36
+ // string testSuiteName;
37
+ // GET_TESTSUITE_NAME(testSuiteName);
38
+ //
39
+ // RDI_INIT();
40
+ // ON_FIRST_INVOCATION_BEGIN();
41
+ // RDI_BEGIN();
42
+ // rdi.func(testSuiteName).label(label).execute();
43
+ //
44
+ //// cout << testSuiteName << endl;
45
+ //// cout << label << endl;
46
+ // RDI_END();
47
+ // cout << "-----------------" << endl;
48
+ // ON_FIRST_INVOCATION_END();
49
+ //
50
+ // int site = CURRENT_SITE_NUMBER();
51
+ // int res = rdi.id(testSuiteName).getPassFail();
52
+ // cout << CURRENT_SITE_NUMBER() << ":" << res << endl;
53
+ // Origen::logFunctionalTest(testSuiteName, site, res == 1, label);
54
+ // // TESTSET().judgeAndLog_FunctionalTest(CURRENT_SITE_NUMBER() != 2);
55
+
56
+ /*
57
+ string name;
58
+ GET_TESTSUITE_NAME(name);
59
+ RDI_INIT();
60
+ ON_FIRST_INVOCATION_BEGIN();
61
+ FUNCTIONAL_TEST();
62
+ // RDI_BEGIN();
63
+ // rdi.func(name).label(Primary.getLabel()).execute();
64
+ // RDI_END();
65
+ ON_FIRST_INVOCATION_END();
66
+
67
+ cout << "Result is " << GET_FUNCTIONAL_RESULT("@") << endl;
68
+ // cout << "Result is " << rdi.id(name).getPassFail() << endl;
69
+ // TESTSET().cont(true).judgeAndLog_FunctionalTest();
70
+ // TESTSET().cont(true).judgeAndLog_ParametricTest("@","testlimit",GET_FUNCTIONAL_RESULT("@"));
71
+ */
72
+ }
73
+
74
+ /**
75
+ *This function will be invoked once the specified parameter's value is changed.
76
+ *@param parameterIdentifier
77
+ */
78
+ virtual void postParameterChange(const string& parameterIdentifier) {
79
+ //Add your code
80
+ //Note: Test Method API should not be used in this method!
81
+ return;
82
+ }
83
+
84
+ /**
85
+ *This function will be invoked once the Select Test Method Dialog is opened.
86
+ */
87
+ virtual const string getComment() const {
88
+ string comment = " please add your comment for this method.";
89
+ return comment;
90
+ }
91
+ };
92
+ REGISTER_TESTMETHOD("FunctionalTest", FunctionalTest);
@@ -0,0 +1,48 @@
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 RecordBin: 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
+ {
26
+ //Add your initialization code here
27
+ //Note: Test Method API should not be used in this method!
28
+ addParameter("bin",
29
+ "int",
30
+ &mBin,
31
+ testmethod::TM_PARAMETER_INPUT);
32
+ addParameter("softbin",
33
+ "int",
34
+ &mSoftbin,
35
+ testmethod::TM_PARAMETER_INPUT);
36
+ }
37
+
38
+ /**
39
+ *This test is invoked per site.
40
+ */
41
+ virtual void run()
42
+ {
43
+ Origen::site().bin(mBin);
44
+ Origen::site().softbin(mSoftbin);
45
+ }
46
+
47
+ };
48
+ REGISTER_TESTMETHOD("RecordBin", RecordBin);