origen_testers 0.9.1 → 0.9.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb7e94e2ce35ea525eeb90410b24ebe55c8576b7
|
4
|
+
data.tar.gz: 68d99c86782203d2ba107e3bf9233915c67d5f56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cbd6405ece9a4cc5f0b71facce92e3588b81dbf7d38f1815d6780e45cf0b71400ac8d8d82258892071c750ad3a1eea04a74d453f387f31e88137088ce33ab69
|
7
|
+
data.tar.gz: ad6cfc2654f121f21c14be9cf82e60075eeb0c3b7932a19ab8473a5bd169e87ecf425149eac9c2866da89d4012e1ebf2f29641abe0244963a1872d9c7d7ce98e
|
data/config/application.rb
CHANGED
@@ -30,11 +30,13 @@ class OrigenTestersApplication < Origen::Application
|
|
30
30
|
|
31
31
|
config.semantically_version = true
|
32
32
|
|
33
|
+
# to handle for web compile where environment/tester not yet defined
|
34
|
+
|
33
35
|
# By default all generated output will end up in ./output.
|
34
36
|
# Here you can specify an alternative directory entirely, or make it dynamic such that
|
35
37
|
# the output ends up in a setup specific directory.
|
36
38
|
config.output_directory do
|
37
|
-
dir = "#{Origen.root}/output/#{$tester.name}"
|
39
|
+
dir = "#{Origen.root}/output/#{$tester.nil? ? '': $tester.name}"
|
38
40
|
# Check if running on windows, if so, substitute :: with _
|
39
41
|
dir.gsub!("::","_") if Origen.os.windows?
|
40
42
|
dir
|
@@ -43,7 +45,7 @@ class OrigenTestersApplication < Origen::Application
|
|
43
45
|
# Similary for the reference files, generally you want to setup the reference directory
|
44
46
|
# structure to mirror that of your output directory structure.
|
45
47
|
config.reference_directory do
|
46
|
-
dir = "#{Origen.root}/.ref/#{$tester.name}"
|
48
|
+
dir = "#{Origen.root}/.ref/#{$tester.nil? ? '': $tester.name}"
|
47
49
|
# Check if running on windows, if so, substitute :: with _
|
48
50
|
dir.gsub!("::","_") if Origen.os.windows?
|
49
51
|
dir
|
data/config/version.rb
CHANGED
@@ -329,7 +329,7 @@ module OrigenTesters
|
|
329
329
|
# $tester.start_subroutine("wait_for_done")
|
330
330
|
# < generate your subroutine vectors here >
|
331
331
|
# $tester.end_subroutine
|
332
|
-
def start_subroutine(name)
|
332
|
+
def start_subroutine(name, options = {})
|
333
333
|
local_subroutines << name.to_s.chomp unless local_subroutines.include?(name.to_s.chomp) || @inhibit_vectors
|
334
334
|
microcode "global subr #{name}:"
|
335
335
|
end
|
@@ -343,7 +343,8 @@ module OrigenTesters
|
|
343
343
|
# < generate your subroutine vectors here >
|
344
344
|
# $tester.end_subroutine
|
345
345
|
# cond: whether return is conditional on a flag (to permit to mix subrs together)
|
346
|
-
def end_subroutine(cond = false)
|
346
|
+
def end_subroutine(cond = false, options = {})
|
347
|
+
(cond, options) = false, cond if cond.is_a?(Hash)
|
347
348
|
if cond
|
348
349
|
update_vector microcode: 'if (flag) return'
|
349
350
|
else
|
@@ -42,6 +42,9 @@ module OrigenTesters
|
|
42
42
|
|
43
43
|
@set_msb_issued = false # Internal flag to keep track of set_msb usage, allowing for set_lsb to be used as a readcode
|
44
44
|
@microcode[:keepalive] = 'keepalive'
|
45
|
+
|
46
|
+
@onemodsubs_found = false # flag to indicate whether a single-module subroutine has been implemented in this pattern
|
47
|
+
@nonmodsubs_found = false # flag to indicate whether a normal non-single-module subroutine has been implemented in this pattern
|
45
48
|
end
|
46
49
|
|
47
50
|
# Do a frequency measure.
|
@@ -302,9 +305,13 @@ module OrigenTesters
|
|
302
305
|
high_voltage: false,
|
303
306
|
svm_only: false
|
304
307
|
)) do |pin_list|
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
+
# if subroutine pattern has only single-module subroutines then skip module start
|
309
|
+
# (will be taken care of elsewhere)
|
310
|
+
unless options[:subroutine_pat] && @onemodsubs_found && !@nonmodsubs_found
|
311
|
+
microcode "#{options[:subroutine_pat] ? 'srm_vector' : 'vm_vector'}"
|
312
|
+
microcode "#{options[:pattern]} ($tset, #{pin_list})"
|
313
|
+
microcode '{'
|
314
|
+
end
|
308
315
|
# override min vector limit if subroutine pattern
|
309
316
|
@min_pattern_vectors = 0 if options[:subroutine_pat]
|
310
317
|
unless options[:subroutine_pat]
|
@@ -314,7 +321,46 @@ module OrigenTesters
|
|
314
321
|
end
|
315
322
|
|
316
323
|
def pattern_footer(options = {})
|
317
|
-
|
324
|
+
# if subroutine pattern has any single-module subroutines then skip module end
|
325
|
+
# (will be taken care of elsewhere)
|
326
|
+
unless options[:subroutine_pat] && @onemodsubs_found
|
327
|
+
super(options.merge(end_module: false))
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
# allow for option of separate modules for each subroutine
|
332
|
+
# requirement is that any subroutines in their own module (options[:onemodsub] = true)
|
333
|
+
# MUST be implemented AFTER any subroutines in the common pattern module!
|
334
|
+
def start_subroutine(name, options = {})
|
335
|
+
if options[:onemodsub]
|
336
|
+
if @nonmodsubs_found && !@onemodsubs_found
|
337
|
+
# this means we need to do end module for non-single-module subroutines
|
338
|
+
# do only once!
|
339
|
+
pattern_footer(options.merge(subroutine_pat: true, end_module: false))
|
340
|
+
end
|
341
|
+
@onemodsubs_found = true # importnat put this after the call to pattern_footer above
|
342
|
+
pin_list = ordered_pins.map(&:name).join(', ')
|
343
|
+
microcode 'srm_vector'
|
344
|
+
microcode "#{name}_module ($tset, #{pin_list})"
|
345
|
+
microcode '{'
|
346
|
+
else
|
347
|
+
# normal subroutine to use common
|
348
|
+
if @onemodsubs_found
|
349
|
+
# give error -- requirement is that any normal subroutines using common pattern module
|
350
|
+
# must be done BEFORE any subroutines that need their own module definition!
|
351
|
+
fail "ERROR: Cannot implement any common module subroutines (#{name}) after implementing any single-module subroutines in the same pattern!"
|
352
|
+
end
|
353
|
+
@nonmodsubs_found = true
|
354
|
+
end
|
355
|
+
super(name, options)
|
356
|
+
end
|
357
|
+
|
358
|
+
def end_subroutine(cond = false, options = {})
|
359
|
+
(cond, options) = false, cond if cond.is_a?(Hash)
|
360
|
+
super(cond, options)
|
361
|
+
if options[:onemodsub]
|
362
|
+
microcode '}'
|
363
|
+
end
|
318
364
|
end
|
319
365
|
|
320
366
|
# Generates a match loop based on vector condition passed in via block
|
@@ -65,16 +65,17 @@ module OrigenTesters
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def execute(options = {})
|
68
|
-
options = { define:
|
69
|
-
name:
|
68
|
+
options = { define: false, # whether to define subr or call it
|
69
|
+
name: 'executefunc1',
|
70
|
+
onemodsub: false # whether to expects subr to be in single module
|
70
71
|
}.merge(options)
|
71
72
|
|
72
73
|
if options[:define]
|
73
74
|
# define subroutine
|
74
|
-
$tester.start_subroutine(options[:name])
|
75
|
-
$tester.cycle
|
76
|
-
$tester.end_subroutine
|
75
|
+
$tester.start_subroutine(options[:name], onemodsub: options[:onemodsub])
|
77
76
|
$tester.cycle
|
77
|
+
$tester.end_subroutine(onemodsub: options[:onemodsub])
|
78
|
+
$tester.cycle unless options[:onemodsub]
|
78
79
|
else
|
79
80
|
# call subroutine
|
80
81
|
$tester.cycle
|
data/pattern/subroutines.rb
CHANGED
@@ -39,7 +39,26 @@ unless $tester.v93k?
|
|
39
39
|
|
40
40
|
# Define digsrc_overlay subr
|
41
41
|
$dut.digsrc_overlay(:subr_name => 'digsrc_overlay', :define => true, overlay_cycle_num: 64)
|
42
|
+
|
43
|
+
# test out single module subroutine capability, integrated with other normal subroutines
|
44
|
+
# only for UltraFLEX
|
45
|
+
$dut.execute(define: true, name: 'overlaysub1', onemodsub: true )
|
46
|
+
$dut.execute(define: true, name: 'overlaysub2', onemodsub: true )
|
47
|
+
$dut.execute(define: true, name: 'overlaysub3', onemodsub: true )
|
48
|
+
$dut.execute(define: true, name: 'overlaysub4', onemodsub: true )
|
49
|
+
|
42
50
|
end
|
43
51
|
end
|
52
|
+
|
53
|
+
if $tester.ultraflex?
|
54
|
+
# test out single module subroutine capability in standalone pattern
|
55
|
+
# only for UltraFLEX
|
56
|
+
Pattern.create(name: 'subroutines2', subroutine_pat: true) do
|
57
|
+
$dut.execute(define: true, name: 'overlaysub5', onemodsub: true )
|
58
|
+
$dut.execute(define: true, name: 'overlaysub6', onemodsub: true )
|
59
|
+
$dut.execute(define: true, name: 'overlaysub7', onemodsub: true )
|
60
|
+
$dut.execute(define: true, name: 'overlaysub4', onemodsub: true )
|
61
|
+
end
|
62
|
+
end
|
44
63
|
end
|
45
64
|
end
|
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.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|