origen_testers 0.51.4 → 0.51.5

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: '09276262e65db795a4ffe2fe26e6836607fd2c75bf279d652baacc35c3fdcdf4'
4
- data.tar.gz: 3216437c32107ef156b639005c153529ee19d53871a2330f62c0a2816f17caa2
3
+ metadata.gz: a180bdac7bac206de7e54920fe663e70d1a2385d719a4a2ee134168856926142
4
+ data.tar.gz: 1882b6db742cdcb8f4a05a2a5f2d14c8bf0edcbee5e2ad65cff473a4a0ebefb7
5
5
  SHA512:
6
- metadata.gz: 5bdb430e032bdf00efb5f4c67b9b18c5c4f3fae20d5413c48f31052d99560f42a9d18bcabe291bf3223f067abb34eeb857813f73c05fa40a2180e3ef2c728ed6
7
- data.tar.gz: 17d7dbe630c36fba16baa9154d976a628899587632ad8d3b4ecd7edcb4283e127c09e82cd9cb5891ce7b4a2e939a82a1c18bafc82dd98e6a9ebcfca0f3b3e69d
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 = 4
4
+ BUGFIX = 5
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -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
@@ -93,12 +94,29 @@ module OrigenTesters
93
94
  output_group_definition(flattened_ordered_pins, "#{ordered_pins_name || 'ALL'}")
94
95
  microcode '}'
95
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
+
96
109
  microcode ''
97
110
  microcode "Timing t_#{@pattern_name} {"
98
111
  (@wavesets || []).each_with_index do |w, i|
99
112
  microcode '' if i != 0
100
113
  microcode " WaveformTable Waveset#{i + 1} {"
101
- 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
102
120
  microcode ' Waveforms {'
103
121
  w[:lines].each do |line|
104
122
  microcode " #{line}"
@@ -115,6 +133,7 @@ module OrigenTesters
115
133
 
116
134
  microcode ''
117
135
  microcode "PatternExec e_#{@pattern_name} {"
136
+ microcode " Category c_#{@pattern_name};" if @use_timing_equations
118
137
  microcode " Timing t_#{@pattern_name};"
119
138
  microcode " PatternBurst b_#{@pattern_name};"
120
139
  microcode '}'
@@ -131,6 +150,27 @@ module OrigenTesters
131
150
  end
132
151
 
133
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
134
174
  super
135
175
  if pattern_only
136
176
  # Why does D10 not include this?
@@ -140,25 +180,32 @@ module OrigenTesters
140
180
  wave_number = nil
141
181
  @wavesets.each_with_index do |w, i|
142
182
  if w[:name] == timeset.name && w[:period] = timeset.period_in_ns
143
- wave_number = i
183
+ wave_number = i + 1 # bug fix wave numbers are 1 more than their index #
144
184
  end
145
185
  end
146
186
  unless wave_number
147
187
  lines = []
188
+ period_var = "period_#{timeset.name}"
148
189
  flattened_ordered_pins.each do |pin|
149
190
  if pin.direction == :input || pin.direction == :io
150
191
  line = "#{pin.name} { 01 { "
151
192
  wave = pin.drive_wave if tester.timeset.dut_timeset
152
- (wave ? wave.evaluated_events : []).each do |t, v|
153
- line << "'#{t}ns' "
154
- if v == 0
155
- line << 'D'
156
- elsif v == 1
157
- line << 'U'
158
- else
159
- 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 << '; '
160
208
  end
161
- line << '; '
162
209
  end
163
210
  line << '}}'
164
211
  lines << line
@@ -166,20 +213,26 @@ module OrigenTesters
166
213
  if pin.direction == :output || pin.direction == :io
167
214
  line = "#{pin.name} { LHX { "
168
215
  wave = pin.compare_wave if tester.timeset.dut_timeset
169
- (wave ? wave.evaluated_events : []).each_with_index do |tv, i|
170
- t, v = *tv
171
- if i == 0 && t != 0
172
- line << "'0ns' X; "
173
- end
174
- line << "'#{t}ns' "
175
- if v == 0
176
- line << 'L'
177
- elsif v == 0
178
- line << 'H'
179
- else
180
- 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 << '; '
181
235
  end
182
- line << '; '
183
236
  end
184
237
  line << '}}'
185
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.4
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: 2024-02-28 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