origen_testers 0.42.0 → 0.43.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b61e30758057f753a3f11c3f9e804ec902c04b11ab5d044eead50e933396dcc4
4
- data.tar.gz: 56e4f2859a2dd2d3440f41b8f0025764a1fdbe49dd54266ec46f3f18f6ed4315
3
+ metadata.gz: bcd28a31ae733240fb79442791a52b0289cb60767ab4ca3420958a5c5451cb29
4
+ data.tar.gz: 208ed25a437e3df788b0305f88fbcd967ffa563fd68a7508d5b055f7c3380395
5
5
  SHA512:
6
- metadata.gz: 218203f35e42e7d2de5fa2668dca505dff43339e598ce231d9a5d57f6f8dd02d90f5fb3b53e6d4aef3bc6036eeebe4bc09663190fb192fa72e1aed3ed3e7eb2c
7
- data.tar.gz: 83d9e9baee738fac32b9123d8991f18b5b4b3c00cbfda40b74fde58c75c7d052f3da23533e090c8cef611207ae037a151da9d78bad8446a0b696240cf10788c2
6
+ metadata.gz: c36b5d4a30d947489f3ed2d165c867249df0235b3d5d797bd3eaf5b2f232cbf0c6d4d33b1425ab6fd061d65eac4fd8803355af6e0b317a96b5f98335438845f2
7
+ data.tar.gz: 4af3ae57d4c893138271ac876bc7968def1bc4df416764481a264594af38213264f8f818fbdf40204f3b4b54441158ce05d1233245b1872124b2801495af0587
data/config/commands.rb CHANGED
@@ -200,7 +200,15 @@ when "examples", "test"
200
200
  puts
201
201
  puts "To approve any diffs in the reference.list files run the following command:"
202
202
  puts
203
- puts "cp list/j750/referenced.list approved/j750/referenced.list && cp list/j750_hpt/referenced.list approved/j750_hpt/referenced.list && cp list/ultraflex/referenced.list approved/ultraflex/referenced.list && cp list/v93k/referenced.list approved/v93k/referenced.list"
203
+ platforms = %w(j750 j750_hpt ultraflex v93k v93k_multiport v93k_enable_flow v93k_disable_flow v93k_limits_file v93k_global v93k_smt8) # put here the various platforms used in examples/program_generator.rb
204
+ reflist_command = ''
205
+ platforms.each do |platform|
206
+ unless reflist_command == ''
207
+ reflist_command = "#{reflist_command} && "
208
+ end
209
+ reflist_command = "#{reflist_command}cp list/#{platform}/referenced.list approved/#{platform}/referenced.list"
210
+ end
211
+ puts "#{reflist_command}"
204
212
  puts
205
213
  Origen.app.stats.report_fail
206
214
  status = 1
data/config/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
- MINOR = 42
3
+ MINOR = 43
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -253,9 +253,24 @@ module OrigenTesters
253
253
  end
254
254
  end
255
255
 
256
+ # Import sub-program
256
257
  def import(file, options = {})
257
258
  file = Pathname.new(file).absolute? ? file : "#{current_dir}/#{file}"
258
- file = Origen.file_handler.clean_path_to_sub_program(file)
259
+ file = Origen.file_handler.add_rb_to(file) # add .rb to filename if missing
260
+ orig_file = "#{file}" # capture original filename possibly without pre-pended underscore
261
+ file_w_underscore = Origen.file_handler.add_underscore_to(file) # determine filename definitely with pre-pended underscore
262
+
263
+ # first check filename definitely with underscore
264
+ file = Origen.file_handler.clean_path_to(file_w_underscore, allow_missing: true) # allow for file missing
265
+ if file.nil? # check if file missing
266
+ # if so, check original filename that possibly is without underscore
267
+ file = Origen.file_handler.clean_path_to(orig_file, allow_missing: true) # allow for file missing
268
+ if file.nil?
269
+ # give error if could not find either file
270
+ fail "Could not find file to import: #{orig_file}" if file.nil? # give error if neither option above is found
271
+ end
272
+ end
273
+
259
274
  base_collection = collection
260
275
  @collection = []
261
276
  Origen.generator.option_pipeline << options
data/program/prb1.rb CHANGED
@@ -10,6 +10,8 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_description: 'Prob
10
10
 
11
11
  import 'components/prb1_main'
12
12
 
13
+ import 'test' # import top-level test.rb directly, note that Flow.create options of sub-flow will be ignored!
14
+
13
15
  # Test that a reference to a deeply nested test works (mainly for SMT8)
14
16
  test :on_deep_1, if_failed: :deep_test
15
17
 
@@ -265,8 +265,8 @@ In our case let's say that we have a new DUT on the horizon which has two vreg i
265
265
  let's extract this suite of vreg tests to a module so that we can instantiate two of them in
266
266
  our flow.
267
267
 
268
- All sub flow file names must begin with "_", this is what tells Origen that it is a sub-flow and
269
- not a top-level flow.
268
+ By convention, sub flow file names that are meant only to be used from inside another top-level flow should begin with a "_".
269
+ (We'll discuss importing top-level flows below).
270
270
  The sub-flow syntax is virtually identical to the regular flow syntax except that a hash of
271
271
  options are passed in which will contain any arguments passed in by the caller when they
272
272
  instantiate the sub-flow.
@@ -374,6 +374,32 @@ Flow.create(environment: :probe) do
374
374
  end
375
375
  ~~~
376
376
 
377
+ #### Importing Top-Level Flows
378
+
379
+ Occasionally you may have the need to import a top-level flow for debug or simulation purposes.
380
+ This is generally not recommended since any `Flow.create` options in the top-level flow being imported
381
+ will be lost, but if you are careful that the `Flow.create` options are aligned between the real top-level flow
382
+ and any imported top-level flows, then you should be fine.
383
+
384
+ The same import command is used as before, as it will also look also for a file name not starting with \"\_\"
385
+ if one with \"\_\" is not found.
386
+
387
+ So for example we have 3 top-level flows that we know work ok stand-alone, but we want to check that they work ok when
388
+ running back to back:
389
+
390
+ ~~~ruby
391
+ # program/probe.rb
392
+ Flow.create(environment: :probe) do # options here match those in the probe_* flows imported below
393
+
394
+ import "probe_start" # will import file called 'probe_start.rb'
395
+
396
+ import "probe_middle" # will import file called 'probe_middle.rb'
397
+
398
+ import "probe_end" # will import file called 'probe_end.rb'
399
+
400
+ end
401
+ ~~~
402
+
377
403
  #### Documenting Tests
378
404
 
379
405
  All of the test attributes will be available later when it comes to generating documentation
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.42.0
4
+ version: 0.43.0
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-09-08 00:00:00.000000000 Z
11
+ date: 2019-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen