origen_jtag 0.12.0 → 0.12.1

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: e06b3dca12b20579f6fbfbc389dac204e960a93b
4
- data.tar.gz: dc97efa495078334d68ce6ac8bd43fcea8b2467d
3
+ metadata.gz: ae69f91bc9e2535f91cecbcd30bef84b57c8a017
4
+ data.tar.gz: 25accfa2f3054119f0e3fec8efbbdb59f74f9f55
5
5
  SHA512:
6
- metadata.gz: 43f03422ef2359a8e10a527300824d84e29f92cd97934b535d69f12e73aa480163790a06041b991bb25d5c05a76c491dcef9428db0cdaed7b5f3b7c33359e134
7
- data.tar.gz: b84f766c5f4dd19cc111fad60e4f55c2162f2b09c4abff4c2d4016b5a97b0ff036e75393517e8488b87af9da552d26b0fc28a0e8fe48d1f9765f449bf15e0433
6
+ metadata.gz: 064956cbd19af58b772357f8b5a5c2ec8aede02531098192b239efbbaa466ded0febe18295b62d0f779d33652a59911857fea2778bdb01a88636cd6e717c054c
7
+ data.tar.gz: 468f70f9ee9a58ade048f191ad9468400f377c49ae3d77f95f69e7b3e63bcf95b3eb646ac32b1b8aad34c73684b7b3b88ddddf7c1cd34f597bdcdb436381590f
@@ -1,11 +1,8 @@
1
1
  # This file should be used to extend the origen command line tool with tasks
2
2
  # specific to your application.
3
- # The comments below should help to get started and you can also refer to
4
- # lib/origen/commands.rb in your Origen core workspace for more examples and
5
- # inspiration.
6
3
  #
7
4
  # Also see the official docs on adding commands:
8
- # http://origen.freescale.net/origen/latest/guides/custom/commands/
5
+ # http://origen-sdk.org/origen/guides/custom/commands/
9
6
 
10
7
  # Map any command aliases here, for example to allow origen -x to refer to a
11
8
  # command called execute you would add a reference as shown below:
@@ -17,65 +14,45 @@ aliases ={
17
14
  # the above alias table and should not be removed.
18
15
  @command = aliases[@command] || @command
19
16
 
20
- def path_to_coverage_report
21
- require 'pathname'
22
- Pathname.new("#{Origen.root}/coverage/index.html").relative_path_from(Pathname.pwd)
23
- end
24
-
25
- def enable_coverage(name, merge=true)
26
- if ARGV.delete("-c") || ARGV.delete("--coverage")
27
- require 'simplecov'
28
- SimpleCov.start do
29
- command_name name
30
-
31
- at_exit do
32
- SimpleCov.result.format!
33
- puts ""
34
- puts "To view coverage report:"
35
- puts " firefox #{path_to_coverage_report} &"
36
- puts ""
37
- end
38
- end
39
- yield
40
- else
41
- yield
42
- end
43
- end
44
-
45
17
  # Now branch to the specific task code
46
18
  case @command
47
19
 
20
+ ## Run the unit tests
21
+ #when "specs"
22
+ # require "rspec"
23
+ # exit RSpec::Core::Runner.run(['spec'])
24
+
48
25
  when "examples"
49
26
  Origen.load_application
50
- enable_coverage("examples") do
27
+ status = 0
51
28
 
52
- # Pattern generator tests
53
- ARGV = %w(jtag_workout -t v93k.rb -r approved)
54
- load "#{Origen.top}/lib/origen/commands/generate.rb"
55
- ARGV = %w(jtag_workout -t debug_RH1 -r approved)
56
- load "#{Origen.top}/lib/origen/commands/generate.rb"
57
- ARGV = %w(jtag_workout -t debug_RL1 -r approved)
58
- load "#{Origen.top}/lib/origen/commands/generate.rb"
29
+ # Pattern generator tests
30
+ ARGV = %w(jtag_workout -t v93k.rb -r approved)
31
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
32
+ ARGV = %w(jtag_workout -t debug_RH1 -r approved)
33
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
34
+ ARGV = %w(jtag_workout -t debug_RL1 -r approved)
35
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
59
36
 
60
- ARGV = %w(jtag_workout -t v93k_RH4.rb -r approved)
61
- load "#{Origen.top}/lib/origen/commands/generate.rb"
62
- ARGV = %w(jtag_workout -t debug_RH4 -r approved)
63
- load "#{Origen.top}/lib/origen/commands/generate.rb"
64
- ARGV = %w(jtag_workout -t debug_RL4 -r approved)
65
- load "#{Origen.top}/lib/origen/commands/generate.rb"
66
-
67
- if Origen.app.stats.changed_files == 0 &&
68
- Origen.app.stats.new_files == 0 &&
69
- Origen.app.stats.changed_patterns == 0 &&
70
- Origen.app.stats.new_patterns == 0
37
+ ARGV = %w(jtag_workout -t v93k_RH4.rb -r approved)
38
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
39
+ ARGV = %w(jtag_workout -t debug_RH4 -r approved)
40
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
41
+ ARGV = %w(jtag_workout -t debug_RL4 -r approved)
42
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
43
+
44
+ if Origen.app.stats.changed_files == 0 &&
45
+ Origen.app.stats.new_files == 0 &&
46
+ Origen.app.stats.changed_patterns == 0 &&
47
+ Origen.app.stats.new_patterns == 0
71
48
 
72
- Origen.app.stats.report_pass
73
- else
74
- Origen.app.stats.report_fail
75
- end
76
- puts ""
49
+ Origen.app.stats.report_pass
50
+ else
51
+ Origen.app.stats.report_fail
52
+ status = 1
77
53
  end
78
- exit 0
54
+ puts
55
+ exit status
79
56
 
80
57
  # Always leave an else clause to allow control to fall back through to the
81
58
  # Origen command handler.
@@ -1,7 +1,7 @@
1
1
  module OrigenJTAG
2
2
  MAJOR = 0
3
3
  MINOR = 12
4
- BUGFIX = 0
4
+ BUGFIX = 1
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -303,7 +303,8 @@ module OrigenJTAG
303
303
  if options[:msg]
304
304
  cc "#{options[:msg]}\n"
305
305
  end
306
- shift_dr do
306
+ val = reg_or_val.respond_to?(:data) ? reg_or_val.data : reg_or_val
307
+ shift_dr(write: val.to_hex) do
307
308
  if options[:overlay] == true
308
309
  $tester.label(options[:overlay_label], true) # apply global label
309
310
  end
@@ -339,7 +340,7 @@ module OrigenJTAG
339
340
  if options[:msg]
340
341
  cc "#{options[:msg]}\n"
341
342
  end
342
- shift_dr do
343
+ shift_dr(read: Origen::Utility.read_hex(reg_or_val)) do
343
344
  if options[:overlay] == true
344
345
  $tester.label(options[:overlay_label], true) # apply global label
345
346
  end
@@ -377,7 +378,7 @@ module OrigenJTAG
377
378
  if options[:msg]
378
379
  cc "#{options[:msg]}\n"
379
380
  end
380
- shift_ir do
381
+ shift_ir(write: val.to_hex) do
381
382
  shift(reg_or_val, options)
382
383
  end
383
384
  @ir_value = val
@@ -412,7 +413,7 @@ module OrigenJTAG
412
413
  if options[:msg]
413
414
  cc "#{options[:msg]}\n"
414
415
  end
415
- shift_ir do
416
+ shift_ir(read: Origen::Utility.read_hex(reg_or_val)) do
416
417
  shift(reg_or_val, options)
417
418
  end
418
419
  end
@@ -49,7 +49,7 @@ module OrigenJTAG
49
49
  # # State is Pause-DR
50
50
  # end
51
51
  # # State is Run-Test/Idle
52
- def shift_dr
52
+ def shift_dr(options = {})
53
53
  validate_state(:idle, :pause_dr)
54
54
  log 'Transition to Shift-DR...'
55
55
  if state == :idle
@@ -57,15 +57,22 @@ module OrigenJTAG
57
57
  tms!(0) # => Capture-DR
58
58
  tms!(0) # => Shift-DR
59
59
  update_state :shift_dr
60
- log '**** Data start ****', always: true
61
- yield
62
- log 'Transition to Run-Test/Idle...'
63
- if @last_data_vector_shifted
64
- @last_data_vector_shifted = false
60
+ if options[:write]
61
+ msg = "Write DR: #{options[:write]}"
62
+ elsif options[:read]
63
+ msg = "Read DR: #{options[:read]}"
65
64
  else
66
- tms!(1) # => Exit1-DR
65
+ msg = 'DR Data'
66
+ end
67
+ log msg, always: true do
68
+ yield
69
+ log 'Transition to Run-Test/Idle...'
70
+ if @last_data_vector_shifted
71
+ @last_data_vector_shifted = false
72
+ else
73
+ tms!(1) # => Exit1-DR
74
+ end
67
75
  end
68
- log '**** Data stop ****', always: true
69
76
  tms!(1) # => Update-DR
70
77
  tms!(0) # => Run-Test/Idle
71
78
  update_state :idle
@@ -154,7 +161,7 @@ module OrigenJTAG
154
161
  # # State is Pause-IR
155
162
  # end
156
163
  # # State is Run-Test/Idle
157
- def shift_ir
164
+ def shift_ir(options = {})
158
165
  validate_state(:idle, :pause_ir)
159
166
  log 'Transition to Shift-IR...'
160
167
  if state == :idle
@@ -163,15 +170,22 @@ module OrigenJTAG
163
170
  tms!(0) # => Capture-IR
164
171
  tms!(0) # => Shift-IR
165
172
  update_state :shift_ir
166
- log '**** Data start ****', always: true
167
- yield
168
- log 'Transition to Run-Test/Idle...'
169
- if @last_data_vector_shifted
170
- @last_data_vector_shifted = false
173
+ if options[:write]
174
+ msg = "Write IR: #{options[:write]}"
175
+ elsif options[:read]
176
+ msg = "Read IR: #{options[:read]}"
171
177
  else
172
- tms!(1) # => Exit1-DR
178
+ msg = 'IR Data'
179
+ end
180
+ log msg, always: true do
181
+ yield
182
+ log 'Transition to Run-Test/Idle...'
183
+ if @last_data_vector_shifted
184
+ @last_data_vector_shifted = false
185
+ else
186
+ tms!(1) # => Exit1-DR
187
+ end
173
188
  end
174
- log '**** Data stop ****', always: true
175
189
  tms!(1) # => Update-IR
176
190
  tms!(0) # => Run-Test/Idle
177
191
  update_state :idle
@@ -265,6 +279,11 @@ module OrigenJTAG
265
279
  6.times { tms!(1) }
266
280
  end
267
281
 
282
+ def update_state(state)
283
+ @state = state
284
+ log "Current state: #{state_str}"
285
+ end
286
+
268
287
  private
269
288
 
270
289
  def init_tap_controller(options = {})
@@ -272,11 +291,6 @@ module OrigenJTAG
272
291
  }.merge(options)
273
292
  end
274
293
 
275
- def update_state(state)
276
- @state = state
277
- log "Current state: #{state_str}"
278
- end
279
-
280
294
  # Ensures that the current state matches one of the given acceptable
281
295
  # states.
282
296
  #
@@ -293,7 +307,11 @@ module OrigenJTAG
293
307
  end
294
308
 
295
309
  def log(msg, options = {})
296
- cc "JTAG::TAPController - #{msg}" if verbose? || options[:always]
310
+ cc "[JTAG] #{msg}" if verbose? || options[:always]
311
+ if block_given?
312
+ yield
313
+ cc "[JTAG] /#{msg}" if verbose? || options[:always]
314
+ end
297
315
  end
298
316
  end
299
317
  end
@@ -135,5 +135,6 @@ any changes!
135
135
  origen examples
136
136
  ~~~
137
137
 
138
+ <%= disqus_comments %>
138
139
 
139
140
  % end
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: <%= options[:title] || Origen.config.name %>
3
+ analytics: UA-64455560-1
3
4
  ---
4
5
  <%= render "templates/web/partials/navbar.html", :tab => options[:tab] %>
5
6
 
@@ -9,5 +10,7 @@ title: <%= options[:title] || Origen.config.name %>
9
10
  <div class="span12" markdown="1">
10
11
  <%= yield %>
11
12
 
13
+ <%= disqus_comments %>
14
+
12
15
  </div>
13
16
  </div>
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_jtag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.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: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: 0.7.35
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: 0.7.35
27
27
  description:
28
28
  email:
29
29
  - stephen.f.mcginty@gmail.com
@@ -70,4 +70,3 @@ signing_key:
70
70
  specification_version: 4
71
71
  summary: JTAG driver for the Origen SDK
72
72
  test_files: []
73
- has_rdoc: