origen_jtag 0.13.0.pre1 → 0.13.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
  SHA1:
3
- metadata.gz: 53702f898553ded82b98b0c859287922d06255a0
4
- data.tar.gz: 1db16dbeeb9e48507a40fe2e795eccaed1653313
3
+ metadata.gz: 9920632e33d08faa8fb93b0ecdd6af4e593e888a
4
+ data.tar.gz: bc0fc81b5fcbcb71ccd669ea535f4ea80a6dc1c3
5
5
  SHA512:
6
- metadata.gz: dc81e4ee1498e63c0e265b38429501d04246fd0b92fd2b65115c4252deec23430b44386f1b001835162bd8613fe038976963492dd9934faebe119898959af994
7
- data.tar.gz: e52336d974f4da1829b1d817e73c8a9a89ad1e139574552028a4390bc2eb716a61c34acb9644c9536d9b50eaa2ebf862e01bf8cf5f4a99c7e09a75605a5cb100
6
+ metadata.gz: 5ecb02a03b825efa5787a0a3208603c0e92ba90192551420ff9466aa2dead851b4daf4d04e81fd70fda5021dee58a4b5e1f71c6eaceabcbc4106a321517d7d66
7
+ data.tar.gz: 11e95ae8171b60984b8627ac51f9773d8604105bc28cb44f2d515b6b7a3ee8c78e8c2f4573871e7aa13cef78440bf62ca56df7a9d15f8b00fa0e6ff55b726566
data/config/version.rb CHANGED
@@ -2,7 +2,7 @@ module OrigenJTAG
2
2
  MAJOR = 0
3
3
  MINOR = 13
4
4
  BUGFIX = 0
5
- DEV = 1
5
+ DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
8
8
  end
@@ -27,6 +27,9 @@ module OrigenJTAG
27
27
  attr_accessor :verbose
28
28
  alias_method :verbose?, :verbose
29
29
 
30
+ # Log all state changes in pattern comments, false by default
31
+ attr_accessor :log_state_changes
32
+
30
33
  def initialize(owner, options = {})
31
34
  @owner = owner
32
35
  validate_pins
@@ -61,6 +64,7 @@ module OrigenJTAG
61
64
  @tdo_strobe = options[:tdo_strobe]
62
65
  @tdo_store_cycle = options[:tdo_store_cycle]
63
66
  @state = options[:init_state]
67
+ @log_state_changes = options[:log_state_changes] || false
64
68
  end
65
69
 
66
70
  # Shift data into the TDI pin or out of the TDO pin.
@@ -54,7 +54,9 @@ module OrigenJTAG
54
54
  log 'Transition to Shift-DR...'
55
55
  if state == :idle
56
56
  tms!(1) # => Select-DR-Scan
57
+ update_state :select_dr_scan
57
58
  tms!(0) # => Capture-DR
59
+ update_state :capture_dr
58
60
  tms!(0) # => Shift-DR
59
61
  update_state :shift_dr
60
62
  if options[:write]
@@ -71,18 +73,22 @@ module OrigenJTAG
71
73
  @last_data_vector_shifted = false
72
74
  else
73
75
  tms!(1) # => Exit1-DR
76
+ update_state :exit1_dr
74
77
  end
75
78
  end
76
79
  tms!(1) # => Update-DR
80
+ update_state :update_dr
77
81
  tms!(0) # => Run-Test/Idle
78
82
  update_state :idle
79
83
  else # :pause_dr
80
84
  tms!(1) # => Exit2-DR
85
+ update_state :exit2_dr
81
86
  tms!(0) # => Shift-DR
82
87
  update_state :shift_dr
83
88
  yield
84
89
  log 'Transition to Pause-DR...'
85
90
  tms!(1) # => Exit1-DR
91
+ update_state :exit1_dr
86
92
  tms!(0) # => Pause-DR
87
93
  update_state :pause_dr
88
94
  end
@@ -116,23 +122,30 @@ module OrigenJTAG
116
122
  log 'Transition to Pause-DR...'
117
123
  if state == :idle
118
124
  tms!(1) # => Select-DR-Scan
125
+ update_state :select_dr_scan
119
126
  tms!(0) # => Capture-DR
127
+ update_state :capture_dr
120
128
  tms!(1) # => Exit1-DR
129
+ update_state :exit1_dr
121
130
  tms!(0) # => Pause-DR
122
131
  update_state :pause_dr
123
132
  yield
124
133
  log 'Transition to Run-Test/Idle...'
125
134
  tms!(1) # => Exit2-DR
135
+ update_state :exit2_dr
126
136
  tms!(1) # => Update-DR
137
+ update_state :update_dr
127
138
  tms!(0) # => Run-Test/Idle
128
139
  update_state :idle
129
140
  else # shift_dr
130
141
  tms!(1) # => Exit1-DR
142
+ update_state :exit1_dr
131
143
  tms!(0) # => Pause-DR
132
144
  update_state :pause_dr
133
145
  yield
134
146
  log 'Transition to Shift-DR...'
135
147
  tms!(1) # => Exit2-DR
148
+ update_state :exit2_dr
136
149
  tms!(0) # => Shift-DR
137
150
  update_state :shift_dr
138
151
  end
@@ -166,8 +179,11 @@ module OrigenJTAG
166
179
  log 'Transition to Shift-IR...'
167
180
  if state == :idle
168
181
  tms!(1) # => Select-DR-Scan
182
+ update_state :select_dr_scan
169
183
  tms!(1) # => Select-IR-Scan
184
+ update_state :select_ir_scan
170
185
  tms!(0) # => Capture-IR
186
+ update_state :capture_ir
171
187
  tms!(0) # => Shift-IR
172
188
  update_state :shift_ir
173
189
  if options[:write]
@@ -183,19 +199,23 @@ module OrigenJTAG
183
199
  if @last_data_vector_shifted
184
200
  @last_data_vector_shifted = false
185
201
  else
186
- tms!(1) # => Exit1-DR
202
+ tms!(1) # => Exit1-IR
203
+ update_state :exit1_ir
187
204
  end
188
205
  end
189
206
  tms!(1) # => Update-IR
207
+ update_state :update_ir
190
208
  tms!(0) # => Run-Test/Idle
191
209
  update_state :idle
192
210
  else # :pause_ir
193
211
  tms!(1) # => Exit2-IR
212
+ update_state :exit2_ir
194
213
  tms!(0) # => Shift-IR
195
214
  update_state :shift_ir
196
215
  yield
197
216
  log 'Transition to Pause-IR...'
198
217
  tms!(1) # => Exit1-IR
218
+ update_state :exit1_ir
199
219
  tms!(0) # => Pause-IR
200
220
  update_state :pause_ir
201
221
  end
@@ -229,24 +249,32 @@ module OrigenJTAG
229
249
  log 'Transition to Pause-IR...'
230
250
  if state == :idle
231
251
  tms!(1) # => Select-DR-Scan
252
+ update_state :select_dr_scan
232
253
  tms!(1) # => Select-IR-Scan
254
+ update_state :select_ir_scan
233
255
  tms!(0) # => Capture-IR
256
+ update_state :capture_ir
234
257
  tms!(1) # => Exit1-IR
258
+ update_state :exit1_ir
235
259
  tms!(0) # => Pause-IR
236
260
  update_state :pause_ir
237
261
  yield
238
262
  log 'Transition to Run-Test/Idle...'
239
263
  tms!(1) # => Exit2-IR
264
+ update_state :exit2_ir
240
265
  tms!(1) # => Update-IR
266
+ update_state :update_ir
241
267
  tms!(0) # => Run-Test/Idle
242
268
  update_state :idle
243
269
  else # :shift_ir
244
270
  tms!(1) # => Exit1-IR
271
+ update_state :exit1_ir
245
272
  tms!(0) # => Pause-IR
246
273
  update_state :pause_ir
247
274
  yield
248
275
  log 'Transition to Shift-IR...'
249
276
  tms!(1) # => Exit2-IR
277
+ update_state :exit2_ir
250
278
  tms!(0) # => Shift-IR
251
279
  update_state :shift_ir
252
280
  end
@@ -281,7 +309,9 @@ module OrigenJTAG
281
309
 
282
310
  def update_state(state)
283
311
  @state = state
284
- log "Current state: #{state_str}"
312
+ log "Current state: #{state_str}" if log_state_changes
313
+ @listeners ||= Origen.listeners_for(:on_jtag_state_change)
314
+ @listeners.each { |l| l.on_jtag_state_change(@state) }
285
315
  end
286
316
 
287
317
  private
@@ -110,6 +110,18 @@ See the [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html"
110
110
  [<code>OrigenJTAG::TAPController</code>](<%= path "api/OrigenJTAG/TAPController.html" %>)
111
111
  APIs for more details about the available driver methods.
112
112
 
113
+ Any model/controller within a target runtime environment can listen out for JTAG state
114
+ changes by implementing the following callback handler:
115
+
116
+ ~~~ruby
117
+ def on_jtag_state_change(new_state)
118
+ if new_state == :update_dr
119
+ # Do something every time we enter this state
120
+ end
121
+ end
122
+ ~~~
123
+
124
+
113
125
  ### How To Setup a Development Environment
114
126
 
115
127
  [Clone the repository from Github](https://github.com/Origen-SDK/origen_jtag).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_jtag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0.pre1
4
+ version: 0.13.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: 2016-10-20 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen