origen_testers 0.51.3 → 0.51.5

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: 3762e544f419c1c77e9f1d670c7203cd44e9ad6fef0246463f62c77e8592be92
4
- data.tar.gz: 3c2e4679fae95dbb6f9976be317bbcf6c9fe3f8eff113d40fbdafe68cea06973
3
+ metadata.gz: a180bdac7bac206de7e54920fe663e70d1a2385d719a4a2ee134168856926142
4
+ data.tar.gz: 1882b6db742cdcb8f4a05a2a5f2d14c8bf0edcbee5e2ad65cff473a4a0ebefb7
5
5
  SHA512:
6
- metadata.gz: 563af43372ac16a7159e4f1ca6d8aa8aed2fc630dc9224f477cb427332f76ec9ada304428caa15695cf48e7923fa3243154de71bc12b737e170d5370946a44f3
7
- data.tar.gz: 2674ab9dda1e9b8e6a7816d5cab6add7eb9dc44b037ac2b12ef46a5d2473324632034faf88cf34998d501140eda7545a7ac19a8e0710ffb062c5523f93bdff49
6
+ metadata.gz: 1dc6ab272a3770ee8351f0b1fad2d17cc41fa1a0abf5fe3df4f0d7caba4aea82551fe2719dae4bb676c2080af4c0327e12d2682afd288db50f5f9bbad44a392e
7
+ data.tar.gz: 1be16fa7b79f24afeb21d59713c66134917922d19a4534e611bc9a153cdf10911e3a96c9a066928a30db3850ee26084dd9655065d388f5bcdf9102f00cef778c
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 51
4
- BUGFIX = 3
4
+ BUGFIX = 5
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -103,7 +103,7 @@ module OrigenTesters
103
103
  alias_method :pinlist, :pins
104
104
 
105
105
  def initialize(pins:, context:)
106
- @pins = pins.map(&:to_sym)
106
+ @pins = pins.map(&:strip).map(&:to_sym)
107
107
  super(context: context, type: :pinlist)
108
108
  end
109
109
  end
@@ -33,6 +33,8 @@ module OrigenTesters
33
33
  imports[val.gsub(';', '')] = type
34
34
  elsif l.strip.empty?
35
35
  # Just whitespace. Ignore this, but don't throw an error
36
+ elsif !(l =~ Regexp.new(/vector/)).nil?
37
+ # line break between vector keyword and pinlist, ignore
36
38
  else
37
39
  Origen.app!.fail!("Unable to parse pattern frontmatter, at line: #{i}")
38
40
  end
@@ -19,7 +19,7 @@ module OrigenTesters
19
19
 
20
20
  @platform = 'j750'
21
21
  @splitter_config = {
22
- pinlist_start: /^vector/,
22
+ pinlist_start: /\$tset/,
23
23
  vectors_start: /^{/,
24
24
  vectors_end: /^}/,
25
25
  vectors_include_start_line: false,
@@ -15,6 +15,7 @@ module OrigenTesters
15
15
  @min_repeat_loop = 2
16
16
  @pat_extension = 'stil'
17
17
  @compress = true
18
+ @use_timing_equations = options[:use_timing_equations]
18
19
 
19
20
  # @support_repeat_previous = true
20
21
  @match_entries = 10
@@ -30,6 +31,32 @@ module OrigenTesters
30
31
  true
31
32
  end
32
33
 
34
+ # returns the orderd pins with groups decomposed into individual pins
35
+ def flattened_ordered_pins
36
+ if @flattened_ordered_pins.nil?
37
+ @flattened_ordered_pins = []
38
+ ordered_pins.each do |p|
39
+ if p.is_a?(Origen::Pins::PinCollection)
40
+ p.each { |ip| @flattened_ordered_pins << ip }
41
+ else
42
+ @flattened_ordered_pins << p
43
+ end
44
+ end
45
+ end
46
+ @flattened_ordered_pins
47
+ end
48
+
49
+ def output_group_definition(grp, grp_name)
50
+ line = "\"#{grp_name}\" = '"
51
+ grp.each_with_index do |pin, i|
52
+ unless i == 0
53
+ line << '+'
54
+ end
55
+ line << pin.name.to_s
56
+ end
57
+ microcode " #{line}';"
58
+ end
59
+
33
60
  # An internal method called by Origen to create the pattern header
34
61
  def pattern_header(options = {})
35
62
  options = {
@@ -42,7 +69,7 @@ module OrigenTesters
42
69
 
43
70
  microcode ''
44
71
  microcode 'Signals {'
45
- ordered_pins.each do |pin|
72
+ flattened_ordered_pins.each do |pin|
46
73
  line = ''
47
74
  line << "#{pin.name} "
48
75
  if pin.direction == :input
@@ -58,22 +85,38 @@ module OrigenTesters
58
85
 
59
86
  microcode ''
60
87
  microcode 'SignalGroups {'
61
- line = "\"#{ordered_pins_name || 'ALL'}\" = '"
62
- ordered_pins.each_with_index do |pin, i|
63
- unless i == 0
64
- line << '+'
65
- end
66
- line << pin.name.to_s
88
+ # output pin group definitions used in this pattern
89
+ ordered_pins.each do |p|
90
+ output_group_definition(p, p.name.to_s) if p.is_a?(Origen::Pins::PinCollection)
67
91
  end
68
- microcode " #{line}';"
92
+
93
+ # output the all pin group
94
+ output_group_definition(flattened_ordered_pins, "#{ordered_pins_name || 'ALL'}")
69
95
  microcode '}'
70
96
 
97
+ # output the period category specs
98
+ if @use_timing_equations
99
+ microcode ''
100
+ microcode 'Spec {'
101
+ microcode " Category c_#{@pattern_name} {"
102
+ (@wavesets || []).each_with_index do |w, i|
103
+ microcode " period_#{w[:name]} = '#{w[:period]}ns';"
104
+ end
105
+ microcode ' }'
106
+ microcode '}'
107
+ end
108
+
71
109
  microcode ''
72
110
  microcode "Timing t_#{@pattern_name} {"
73
111
  (@wavesets || []).each_with_index do |w, i|
74
112
  microcode '' if i != 0
75
113
  microcode " WaveformTable Waveset#{i + 1} {"
76
- microcode " Period '#{w[:period]}ns';"
114
+ period_var = "period_#{w[:name]}"
115
+ if @use_timing_equations
116
+ microcode " Period '#{period_var}';"
117
+ else
118
+ microcode " Period '#{w[:period]}ns';"
119
+ end
77
120
  microcode ' Waveforms {'
78
121
  w[:lines].each do |line|
79
122
  microcode " #{line}"
@@ -90,6 +133,7 @@ module OrigenTesters
90
133
 
91
134
  microcode ''
92
135
  microcode "PatternExec e_#{@pattern_name} {"
136
+ microcode " Category c_#{@pattern_name};" if @use_timing_equations
93
137
  microcode " Timing t_#{@pattern_name};"
94
138
  microcode " PatternBurst b_#{@pattern_name};"
95
139
  microcode '}'
@@ -106,6 +150,27 @@ module OrigenTesters
106
150
  end
107
151
 
108
152
  def set_timeset(t, period_in_ns = nil)
153
+ # check for period size override from the app if performing convert command
154
+ if Origen.current_command == 'convert'
155
+ listeners = Origen.listeners_for(:convert_command_set_period_in_ns)
156
+ if listeners.empty?
157
+ unless @call_back_message_displayed
158
+ Origen.log.warn 'STIL output is generated using "origen convert" with no timeset period callback method defined. Default period size will be used.'
159
+ Origen.log.info 'stil tester implements a callback for setting the timeset period size when converting a pattern to stil format'
160
+ Origen.log.info 'to use the callback feature add the following define to your app in config/application.rb'
161
+ Origen.log.info ' def convert_command_set_period_in_ns(timeset_name)'
162
+ Origen.log.info ' return 25 if timeset_name == "timeset0"'
163
+ Origen.log.info ' return 30 if timeset_name == "timeset1"'
164
+ Origen.log.info ' 40'
165
+ Origen.log.info ' end'
166
+ @call_back_message_displayed = true
167
+ end
168
+ else
169
+ listeners.each do |listener|
170
+ period_in_ns = listener.convert_command_set_period_in_ns(t)
171
+ end
172
+ end
173
+ end
109
174
  super
110
175
  if pattern_only
111
176
  # Why does D10 not include this?
@@ -115,25 +180,32 @@ module OrigenTesters
115
180
  wave_number = nil
116
181
  @wavesets.each_with_index do |w, i|
117
182
  if w[:name] == timeset.name && w[:period] = timeset.period_in_ns
118
- wave_number = i
183
+ wave_number = i + 1 # bug fix wave numbers are 1 more than their index #
119
184
  end
120
185
  end
121
186
  unless wave_number
122
187
  lines = []
123
- ordered_pins.each do |pin|
188
+ period_var = "period_#{timeset.name}"
189
+ flattened_ordered_pins.each do |pin|
124
190
  if pin.direction == :input || pin.direction == :io
125
191
  line = "#{pin.name} { 01 { "
126
192
  wave = pin.drive_wave if tester.timeset.dut_timeset
127
- (wave ? wave.evaluated_events : []).each do |t, v|
128
- line << "'#{t}ns' "
129
- if v == 0
130
- line << 'D'
131
- elsif v == 0
132
- line << 'U'
133
- else
134
- line << 'D/U'
193
+ if wave
194
+ (@use_timing_equations ? wave.events : wave.evaluated_events).each do |t, v|
195
+ if @use_timing_equations
196
+ line << "'#{t.to_s.gsub('period', period_var)}' "
197
+ else
198
+ line << "'#{t}ns' "
199
+ end
200
+ if v == 0
201
+ line << 'D'
202
+ elsif v == 1
203
+ line << 'U'
204
+ else
205
+ line << 'D/U'
206
+ end
207
+ line << '; '
135
208
  end
136
- line << '; '
137
209
  end
138
210
  line << '}}'
139
211
  lines << line
@@ -141,20 +213,26 @@ module OrigenTesters
141
213
  if pin.direction == :output || pin.direction == :io
142
214
  line = "#{pin.name} { LHX { "
143
215
  wave = pin.compare_wave if tester.timeset.dut_timeset
144
- (wave ? wave.evaluated_events : []).each_with_index do |tv, i|
145
- t, v = *tv
146
- if i == 0 && t != 0
147
- line << "'0ns' X; "
148
- end
149
- line << "'#{t}ns' "
150
- if v == 0
151
- line << 'L'
152
- elsif v == 0
153
- line << 'H'
154
- else
155
- line << 'L/H/X'
216
+ if wave
217
+ (@use_timing_equations ? wave.events : wave.evaluated_events).each_with_index do |tv, i|
218
+ t, v = *tv
219
+ if i == 0 && t != 0
220
+ line << "'0ns' X; "
221
+ end
222
+ if @use_timing_equations
223
+ line << "'#{t.to_s.gsub('period', period_var)}' "
224
+ else
225
+ line << "'#{t}ns' "
226
+ end
227
+ if v == 0
228
+ line << 'L'
229
+ elsif v == 0
230
+ line << 'H'
231
+ else
232
+ line << 'L/H/X'
233
+ end
234
+ line << '; '
156
235
  end
157
- line << '; '
158
236
  end
159
237
  line << '}}'
160
238
  lines << line
@@ -17,6 +17,23 @@ If the timeset waveforms used by the pattern are
17
17
  [fully defined within your Origen application](<%= path "guides/pattern/timing/#Defining_Timesets" %>)
18
18
  then that information will also be represented within the generated STIL pattern.
19
19
 
20
+ Optionally the defined timing can be represented in equation form by setting up your environment as follows:
21
+
22
+ ~~~ruby
23
+ OrigenTesters::STIL.new use_timing_equations: true
24
+ ~~~
25
+
26
+ If your application is used to convert patterns from another format into STIL format you can add
27
+ a callback function to config/application.rb to set appropriate period sizes as follows:
28
+
29
+ ~~~ruby
30
+ def convert_command_set_period_in_ns(timeset_name)
31
+ return 25 if timeset_name == "timeset0"
32
+ return 30 if timeset_name == "timeset1"
33
+ 40
34
+ end
35
+ ~~~
36
+
20
37
  A pattern containing a `Pattern { }` block only - i.e. only vectors and without the `Signals { }`,
21
38
  `Timing { }` and other frontmatter blocks - can be generated by setting up your environment as follows:
22
39
 
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.51.3
4
+ version: 0.51.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-14 00:00:00.000000000 Z
11
+ date: 2024-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -601,7 +601,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
601
601
  - !ruby/object:Gem::Version
602
602
  version: '0'
603
603
  requirements: []
604
- rubygems_version: 3.2.3
604
+ rubygems_version: 3.1.6
605
605
  signing_key:
606
606
  specification_version: 4
607
607
  summary: This plugin provides Origen tester models to drive ATE type testers like