origen_testers 0.44.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dee8846aa21d987c842939ca190021953c4a869c93475352095da56aea0e0c8e
4
- data.tar.gz: bfeb41a71144f612912a09f8cc2c3d1f4e5a9165aff1a0391bd0b9d12e85633a
3
+ metadata.gz: 5570c122126cc062e8f46ce806820ccb02891fbd16dcdeb3908586f20b3e75a5
4
+ data.tar.gz: '09bed68fe617bbf693e79e269781c4f14a2121d012884d18f63b48a8b1d44dfd'
5
5
  SHA512:
6
- metadata.gz: 83eb0028c6054bfe4897de617da651902e6d2c838edbe55b7bb651e2a9be0c6559f0576b604a173e78137454246633f9428fd138644b119ff68f475ead4e50e0
7
- data.tar.gz: aa6ea68ad27361ce36ae06476c0db801c0d342862e43a6265ae089762e19b19d380311bbac787fffba722928db71861a4e219d129bd6f94b354c7ed95b097abd
6
+ metadata.gz: 14736c1c2e952c605c6734ae79fb9bd2cb1f6f77af3a8c5ad649ee2c7960ca935241daff5a6ae4063513b4ccd568264f45dffada48ddfd1dd824266bb82b52da
7
+ data.tar.gz: 0bc129d5b5c948d6ac716e31c464dd22d95cca3b5d39140ae62af97d7143642c195dce2f15ff9beb2ec5fb118fc1bc6b13d834d18f4b7168a73b290661584643
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 44
4
- BUGFIX = 0
4
+ BUGFIX = 1
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -362,12 +362,12 @@ module OrigenTesters
362
362
  def start_subroutine(name)
363
363
  local_subroutines << name.to_s.chomp unless local_subroutines.include?(name.to_s.chomp) || @inhibit_vectors
364
364
  # name += "_subr" unless name =~ /sub/
365
- Pattern.open name: name, call_startup_callbacks: false, subroutine: true
365
+ ::Pattern.open name: name, call_startup_callbacks: false, subroutine: true
366
366
  end
367
367
 
368
368
  # Ends the current subroutine that was started with a previous call to start_subroutine
369
369
  def end_subroutine(_cond = false)
370
- Pattern.close call_shutdown_callbacks: false, subroutine: true
370
+ ::Pattern.close call_shutdown_callbacks: false, subroutine: true
371
371
  end
372
372
 
373
373
  # Call a subroutine.
@@ -139,5 +139,4 @@ Pattern.create do
139
139
  cc "Inhibit complete!"
140
140
  cc "The invoke pin should be driving low on this cycle"
141
141
  $tester.cycle
142
-
143
142
  end
@@ -1,4 +1,13 @@
1
- unless $tester.v93k?
1
+ if $tester.v93k?
2
+ tester.start_subroutine("my_sub") if tester.respond_to?(:start_subroutine)
3
+ cc "This should be inside a subroutine pattern!"
4
+ tester.set_timeset('tp0', 60)
5
+ 10.times do |i|
6
+ dut.pin(:tdi).drive(i.even? ? 0 : 1)
7
+ tester.cycle
8
+ end
9
+ tester.end_subroutine if tester.respond_to?(:end_subroutine)
10
+ else
2
11
  # Pattern to define subroutines
3
12
  if $tester.respond_to?('start_subroutine')
4
13
  Pattern.create(:subroutine_pat => true) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_testers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-05 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -510,7 +510,6 @@ files:
510
510
  - templates/origen_guides/program/custom.md.erb
511
511
  - templates/origen_guides/program/doc.md.erb
512
512
  - templates/origen_guides/program/flowapi.md.erb
513
- - templates/origen_guides/program/flowapi.md.erb~
514
513
  - templates/origen_guides/program/flows.md.erb
515
514
  - templates/origen_guides/program/generating.md.erb
516
515
  - templates/origen_guides/program/interface.md.erb
@@ -546,7 +545,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
546
545
  - !ruby/object:Gem::Version
547
546
  version: '0'
548
547
  requirements: []
549
- rubygems_version: 3.0.1
548
+ rubyforge_project:
549
+ rubygems_version: 2.7.7
550
550
  signing_key:
551
551
  specification_version: 4
552
552
  summary: This plugin provides Origen tester models to drive ATE type testers like
@@ -1,309 +0,0 @@
1
- % render "layouts/guides.html" do
2
-
3
- The runtime flow control of a test program is an area that can be particularly messy:
4
-
5
- * Need to deal with different and often obscure vendor APIs
6
- * It can be very hard to decipher both the intention and the actual behavior
7
- during code reviews
8
- * It is easy to make mistakes
9
- * Mistakes can be costly - there have been many customer quality
10
- incidents in the past from missed test caused by errors in flow control
11
-
12
- To deal with these problems Origen provides a simple and intuitive API
13
- to describe runtime flow logic:
14
-
15
- * Generates legal and battle-tested code
16
- * Takes care of cross-platform implementation
17
- * Makes flow control easy to review
18
- * Covers over gaps or weaknesses in the vendor APIs
19
-
20
- Conditional tests fall into two categories:
21
-
22
- * Those that will run based on the flow execution environment. For example based on
23
- the job selected at runtime or on some enable flag that can be set by the user at
24
- runtime.
25
- * Those that will only run based on the outcome of another test - i.e. execute a given
26
- test based on whether a previous test passed, failed or ran at all.
27
-
28
- #### Execution Based on the Runtime Environment
29
-
30
- The following methods are available to describe these cases:
31
-
32
- * **if_enable / unless_enable** - Run the test if a flow runtime option is/is not enabled at runtime
33
- * **if_job / unless_job** - Run based on the current job (P1, FR, QC, etc)
34
-
35
- Here are some examples of how to apply these methods to single tests:
36
-
37
- ~~~ruby
38
- # Run this test to characterize the vreg, only if the 'vreg_cz' flag has been enabled
39
- para :vreg_meas, softbin: 107, cz: true, if_enable: "vreg_cz"
40
- # Apply HVST to the vreg module, unless the 'skip_hvst' flag has been enabled
41
- func :vreg_hvst, softbin: 101, hv: 10.V, vdd: :max, unless_enable: "skip_hvst"
42
- # Run this test only at cold
43
- para :vreg_meas, softbin: 105, lo: 1.12, hi: 1.34V, if_job: "FC"
44
- ~~~
45
-
46
- The use of `if/unless_enable` will make use of flow enable words on Teradyne platforms and user
47
- flow variables on Advantest.
48
- The `if/unless_job` control will make use of the job column on Teradyne platforms and a user
49
- flow variable named `@JOB` on Advantest.
50
-
51
- Both of these controls support a block form, which allows it to be applied to a group of test
52
- and, in the case of enable words, it also provides a way to implement AND and OR logic:
53
-
54
- ~~~ruby
55
- # OR - Run these tests if either word is set
56
- if_enable [:word1, :word2] do
57
- func: :test1
58
- func: :test2
59
- end
60
-
61
- # AND - Run these tests if both words are set
62
- if_enable :word1 do
63
- if_enable :word2 do
64
- func: :test1
65
- func: :test2
66
- end
67
- end
68
- ~~~
69
-
70
-
71
- #### Execution Based on Relational Expressions
72
-
73
- The following methods are available to describe these cases:
74
-
75
- * **whenever** - Run the test(s) if the relational expression evaluates to TRUE
76
- * **whenever_all** - Run the test(s) if ALL of the relational expressions evaluate to TRUE
77
- * **whenever_any** - Run the test(s) if ANY of the relational expressions evaluate to TRUE
78
-
79
- The following relational operators are available for use with the above methods:
80
-
81
- * **eq** - equal to
82
- * **ne** - not equal to
83
- * **gt** - greater than
84
- * **ge** - greater than or equal to
85
- * **lt** - less than
86
- * **le** - less than or equal to
87
-
88
- Here are some examples of how to apply these methods:
89
-
90
- ~~~ruby
91
- # Run these tests if VAR1 is greater than 2
92
- whenever gt(:var1, 2) do
93
- func: :test1
94
- func: :test2
95
- end
96
-
97
- # Run these tests if VAR1 is greater than 2 AND VAR2 is less than VAR3
98
- whenever_all gt(:var1, 2), lt(:var2, :var3) do
99
- func: :test1
100
- func: :test2
101
- end
102
-
103
- # Run these tests if VAR1 is greater than 2 OR VAR2 is less than VAR3
104
- whenever_any gt(:var1, 2), lt(:var2, :var3) do
105
- func: :test1
106
- func: :test2
107
- end
108
- ~~~
109
-
110
- Additionally, these variables can be set in the flow using the **set** method as shown in here:
111
-
112
- ~~~ruby
113
- # Set the VAR1 = 1
114
- set :var1, 1
115
- set :var2, 'OFF'
116
- set :var3, 3.14
117
-
118
- # Update VAR1 value based on some runtime condition
119
- if_enable :some_other_variable do
120
- set :var1, 3
121
- end
122
-
123
- # Run these tests if VAR1 is greater than 2
124
- whenever gt(:var1, 2) do
125
- func: :test1
126
- func: :test2
127
- end
128
- ~~~
129
-
130
- #### Execution Based on a Previous Test
131
-
132
- The following methods are available to describe these cases:
133
-
134
- * **if_ran / unless_ran** - Run only if a previous test did or did not run
135
- * **if_failed (unless_passed)** - Run only if a previous test failed
136
- * **if_passed (unless_failed)** - Run only if a previous test passed
137
-
138
- All of these methods require you to provide the ID of the previous test on which
139
- the conditional execution will depend.
140
- This ID must be assigned by you in the flow line of the previous test by adding
141
- an `:id` key, like this:
142
-
143
- ~~~ruby
144
- para :vreg_meas, softbin: 105, lo: 1.12, hi: 1.34, id: :vreg_meas_1
145
- ~~~
146
-
147
- The ID can be any value you like as long as it is unique, Origen will raise an error
148
- if any duplicate IDs are encountered.
149
-
150
- On the dependent tests the API is similar to the previous examples except the ID
151
- of the previous test is given in place of the enable flag or job name.
152
- Here are some examples:
153
-
154
- ~~~ruby
155
- para :vreg_meas, softbin: 105, lo: 1.12, hi: 1.34, id: :vreg_meas_1
156
- # Automatically characterize the vreg if the measurement fails
157
- para :vreg_meas, softbin: 107, cz: true, if_failed: :vreg_meas_1
158
- # Then bin out
159
- bin 3, softbin: 105, if_failed: :vreg_meas_1
160
- # Check if the HVST has already been run on this device
161
- func :rd_vreg_hvst_passcode, softbin: 50, vdd: :nom, id: :vreg_hvst_done
162
- # If not run it
163
- func :vreg_hvst, softbin: 101, hv: 10.V, vdd: :max, unless_passed: :vreg_hvst_done
164
- # And program the flag for next time
165
- func :pgm_vreg_hvst_passcode, softbin: 51, vdd: :nom, unless_passed: :vreg_hvst_done
166
- ~~~
167
-
168
- Origen automatically takes care of setting up all of the tests in the relationship:
169
-
170
- * The parent tests in the relationship are automatically set to continue on fail
171
- * Flag(s) will be set to indicate whether the parent test passed or failed
172
- * Conditional execution flags are set on all dependent tests
173
-
174
- AND and OR conditions can be created by using `if_any/all_failed/passed`
175
- variations as follows:
176
-
177
- ~~~ruby
178
- func :test1, id: :t1
179
- func :test2, id: :t2
180
-
181
- # OR logic - This test will run if either of the referenced tests fail
182
- func :test3, if_any_failed: [:t1, :t2]
183
-
184
- # AND logic - This test will only run if both of the referenced tests fail
185
- func :test4, if_all_passed: [:t1, :t2]
186
-
187
- # Block forms are available as with all condition APIs
188
- if_any_passed [:t1, :t2] do
189
- #...
190
- end
191
- ~~~
192
-
193
- #### References to External Tests
194
-
195
- It is possible to generate conditional relationships between tests that span across
196
- different flow modules, in that case the test ID must be appended with `:extern_`.
197
- This will indicate to Origen that the reference is external and
198
- will prevent an error being raised for the ID not being found within the current flow.
199
-
200
- Here is an example:
201
-
202
- ~~~ruby
203
- # program/flow_1.rb
204
- Flow.create do
205
- # This ID can only be referenced within this flow
206
- func :test1, id: :t1
207
- # This ID can be referenced outside of this flow
208
- func :test2 id: :extern_t2
209
- end
210
-
211
- # program/flow_2.rb
212
- Flow.create do
213
- # This will generate an undefined ID error
214
- func :test3, if_failed: :t1
215
- # But this will work, since the ID's name indicates that it is an intentional external reference
216
- func :test4, if_failed: :extern_t2
217
- end
218
- ~~~
219
-
220
- #### Applying Conditions to Sub-Flows
221
-
222
- All of the flow control methods have a block form which will apply the
223
- condition to all tests within the block.
224
-
225
- A very useful pattern is to split your code into small re-usable snippets
226
- and then wrap the import with these flow control methods to apply conditional
227
- execution.
228
- For example, here the 'FH' job requirement will be applied to all tests
229
- imported from the vreg component:
230
-
231
- ~~~ruby
232
- # Only run the vreg tests at hot
233
- if_job "FH" do
234
- import "components/vreg"
235
- end
236
- ~~~
237
-
238
- #### Conditions Applied to Groups
239
-
240
- Groups can also be used to implement AND/OR logic, here is an example of how you
241
- might implement a speed binning flow:
242
-
243
- ~~~ruby
244
- group "200Mhz", id: :spec200 do
245
- func :test1_200
246
- func :test2_200
247
- end
248
-
249
- # Bin out to bin 1 if passed at 200 Mhz, here if_passed will apply to all tests in the group
250
- pass 1, if_passed: :spec200
251
-
252
- group "100Mhz", id: :spec100 do
253
- func :test1_100
254
- func :test2_100
255
- end
256
-
257
- # Bin out to bin 2 if passed at 100 Mhz, here if_passed will apply to all tests in the group
258
- pass 2, if_passed: :spec100
259
-
260
- # Otherwise we have failed
261
- bin 3
262
- ~~~
263
-
264
- #### Manually Setting and Referencing Flags
265
-
266
- It may be sometimes be necessary to react on a flag that is controlled by a 3rd party and
267
- which will be passed into an Origen-based test block, or to set a flag which a 3rd
268
- party test block will later reference.
269
-
270
- An API exists to manually set and react to flags in these situations:
271
-
272
- ~~~ruby
273
- log "Example of manual flag setting upon pass or fail"
274
- test :test1, on_pass: { set_flag: :my_pass_flag }, on_fail: { set_flag: :my_fail_flag }, continue: true
275
-
276
- # Execute only if the above pass flag was set
277
- test :test2, if_flag: :my_pass_flag
278
-
279
- # Execute only if the above pass flag was not set
280
- unless_flag :my_pass_flag do
281
- test :test3
282
- end
283
- ~~~
284
-
285
- Note that flag names will usually be forced to uppercase, this is to institute a convention that
286
- flags/flow variables are always uppercased in order to avoid any test program bugs from
287
- incorrectly referencing a given flag due to case sensitivity.
288
-
289
- However, if you need to reference a flag from a 3rd party test module that does not follow this
290
- convention, then a literal flag can be supplied by prefixing it with `$` as shown below:
291
-
292
- ~~~ruby
293
- test :test1, on_fail: { set_flag: :$My_Mixed_Flag }, continue: true
294
- test :test2, if_flag: "$My_Mixed_Flag"
295
- unless_flag "$My_Mixed_Flag" do
296
- test :test3
297
- end
298
-
299
- test :extra_test, if_enable: :$MCEn_extras
300
- unless_enable "$MCEn_test" do
301
- test :test1
302
- test :test2
303
- end
304
- ~~~
305
-
306
- In all cases the `$` will be removed from the final flag name that appears in the test program.
307
-
308
-
309
- % end