origen_jtag 0.22.1 → 0.22.3
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 +4 -4
- data/config/version.rb +1 -1
- data/lib/origen_jtag/driver.rb +4 -4
- data/lib/origen_jtag/tap_controller.rb +70 -31
- data/pattern/jtag_workout.rb +7 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e408b1d8688221c536224742008b1e8816f175f7204a042f6227cfc92a3c938
|
4
|
+
data.tar.gz: 8038f326e6d212978e7f21404319b1178c89d3ee12a01fca74f5abbaa0b9536e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db3581cd8d7d7cababf02df48b7f8e3ad7478f657c9c88e8db68e7de88fa95693c107a06e0bc1bf6b7ad7bb0d4d47009283de60744d921db03a36f20347e4b3e
|
7
|
+
data.tar.gz: fa0a8fa73da0f59d2ea3f4fd23a352022b8498c925c901709b7fcc41ac18bc77ce8992aacb4a842eebfaf5803f11e729052d073775abad31eaf3bc3649dbbcfd
|
data/config/version.rb
CHANGED
data/lib/origen_jtag/driver.rb
CHANGED
@@ -416,7 +416,7 @@ module OrigenJTAG
|
|
416
416
|
cc "#{options[:msg]}\n"
|
417
417
|
end
|
418
418
|
val = reg_or_val.respond_to?(:data) ? reg_or_val.data : reg_or_val
|
419
|
-
shift_dr(write: val.to_hex) do
|
419
|
+
shift_dr(options.merge(write: val.to_hex)) do
|
420
420
|
shift(reg_or_val, options)
|
421
421
|
end
|
422
422
|
end
|
@@ -449,7 +449,7 @@ module OrigenJTAG
|
|
449
449
|
if options[:msg]
|
450
450
|
cc "#{options[:msg]}\n"
|
451
451
|
end
|
452
|
-
shift_dr(read: Origen::Utility.read_hex(reg_or_val)) do
|
452
|
+
shift_dr(options.merge(read: Origen::Utility.read_hex(reg_or_val))) do
|
453
453
|
shift(reg_or_val, options)
|
454
454
|
end
|
455
455
|
end
|
@@ -484,7 +484,7 @@ module OrigenJTAG
|
|
484
484
|
if Origen.tester.respond_to?(:write_ir)
|
485
485
|
Origen.tester.write_ir(reg_or_val, options)
|
486
486
|
else
|
487
|
-
shift_ir(write: val.to_hex) do
|
487
|
+
shift_ir(options.merge(write: val.to_hex)) do
|
488
488
|
shift(reg_or_val, options)
|
489
489
|
end
|
490
490
|
end
|
@@ -568,7 +568,7 @@ module OrigenJTAG
|
|
568
568
|
def extract_size(reg_or_val, options = {})
|
569
569
|
size = options[:size]
|
570
570
|
unless size
|
571
|
-
if reg_or_val.is_a?(
|
571
|
+
if reg_or_val.is_a?(Integer) || !reg_or_val.respond_to?(:size)
|
572
572
|
fail 'When suppling a value to JTAG::Driver#shift you must supply a :size in the options!'
|
573
573
|
else
|
574
574
|
size = reg_or_val.size
|
@@ -4,22 +4,22 @@ module OrigenJTAG
|
|
4
4
|
module TAPController
|
5
5
|
# Map of internal state symbols to human readable names
|
6
6
|
STATES = {
|
7
|
-
reset:
|
8
|
-
idle:
|
9
|
-
|
10
|
-
capture_dr:
|
11
|
-
shift_dr:
|
12
|
-
exit1_dr:
|
13
|
-
pause_dr:
|
14
|
-
exit2_dr:
|
15
|
-
update_dr:
|
16
|
-
|
17
|
-
capture_ir:
|
18
|
-
shift_ir:
|
19
|
-
exit1_ir:
|
20
|
-
pause_ir:
|
21
|
-
exit2_ir:
|
22
|
-
update_ir:
|
7
|
+
reset: 'Test-Logic-Reset',
|
8
|
+
idle: 'Run-Test/Idle',
|
9
|
+
select_dr_scan: 'Select-DR-Scan',
|
10
|
+
capture_dr: 'Capture-DR',
|
11
|
+
shift_dr: 'Shift-DR',
|
12
|
+
exit1_dr: 'Exit1-DR',
|
13
|
+
pause_dr: 'Pause-DR',
|
14
|
+
exit2_dr: 'Exit2-DR',
|
15
|
+
update_dr: 'Update-DR',
|
16
|
+
select_ir_scan: 'Select-IR-Scan',
|
17
|
+
capture_ir: 'Capture-IR',
|
18
|
+
shift_ir: 'Shift-IR',
|
19
|
+
exit1_ir: 'Exit1-IR',
|
20
|
+
pause_ir: 'Pause-IR',
|
21
|
+
exit2_ir: 'Exit2-IR',
|
22
|
+
update_ir: 'Update-IR'
|
23
23
|
}
|
24
24
|
|
25
25
|
# Returns the current state of the JTAG TAP Controller
|
@@ -50,11 +50,27 @@ module OrigenJTAG
|
|
50
50
|
# end
|
51
51
|
# # State is Run-Test/Idle
|
52
52
|
def shift_dr(options = {})
|
53
|
-
|
53
|
+
options = {
|
54
|
+
start_state: :idle, # Allowed start states: :idle, :select_dr_scan, :update_ir, :update_dr
|
55
|
+
end_state: :idle # Allowed end states: :idle, :update_dr
|
56
|
+
}.merge(options)
|
57
|
+
|
58
|
+
if options[:start_state] == :idle # allow for pause_dr state also if called from pause_dr block
|
59
|
+
validate_state(:idle, :pause_dr)
|
60
|
+
elsif options[:state_state] == :select_dr_scan
|
61
|
+
validate_state(:select_dr_scan, :pause_dr)
|
62
|
+
elsif options[:state_state] == :update_dr
|
63
|
+
validate_state(:update_dr, :pause_dr)
|
64
|
+
elsif options[:state_state] == :update_ir
|
65
|
+
validate_state(:update_ir, :pause_dr)
|
66
|
+
end
|
54
67
|
log 'Transition to Shift-DR...'
|
55
|
-
if state == :idle
|
56
|
-
|
57
|
-
|
68
|
+
if state == :idle || state == :select_dr_scan || state == :update_ir || state == :update_dr
|
69
|
+
# Non-pause states
|
70
|
+
unless state == :select_dr_scan
|
71
|
+
tms!(1) # => Select-DR-Scan
|
72
|
+
update_state :select_dr_scan
|
73
|
+
end
|
58
74
|
tms!(0) # => Capture-DR
|
59
75
|
update_state :capture_dr
|
60
76
|
tms!(0) # => Shift-DR
|
@@ -78,8 +94,10 @@ module OrigenJTAG
|
|
78
94
|
end
|
79
95
|
tms!(1) # => Update-DR
|
80
96
|
update_state :update_dr
|
81
|
-
|
82
|
-
|
97
|
+
if options[:end_state] == :idle
|
98
|
+
tms!(0) # => Run-Test/Idle
|
99
|
+
update_state :idle
|
100
|
+
end
|
83
101
|
else # :pause_dr
|
84
102
|
tms!(1) # => Exit2-DR
|
85
103
|
update_state :exit2_dr
|
@@ -175,13 +193,23 @@ module OrigenJTAG
|
|
175
193
|
# end
|
176
194
|
# # State is Run-Test/Idle
|
177
195
|
def shift_ir(options = {})
|
178
|
-
|
196
|
+
options = {
|
197
|
+
start_state: :idle, # Allowed start states: :idle, :select_ir_scan
|
198
|
+
end_state: :idle # Allowed end states: :idle, :update_ir, :select_dr_scan
|
199
|
+
}.merge(options)
|
200
|
+
if options[:start_state] == :idle
|
201
|
+
validate_state(:idle, :pause_ir)
|
202
|
+
else
|
203
|
+
validate_state(:select_ir_scan, :pause_ir)
|
204
|
+
end
|
179
205
|
log 'Transition to Shift-IR...'
|
180
|
-
if state == :idle
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
206
|
+
if state == :idle || state == :select_ir_scan
|
207
|
+
unless state == :select_ir_scan
|
208
|
+
tms!(1) # => Select-DR-Scan
|
209
|
+
update_state :select_dr_scan
|
210
|
+
tms!(1) # => Select-IR-Scan
|
211
|
+
update_state :select_ir_scan
|
212
|
+
end
|
185
213
|
tms!(0) # => Capture-IR
|
186
214
|
update_state :capture_ir
|
187
215
|
tms!(0) # => Shift-IR
|
@@ -195,7 +223,13 @@ module OrigenJTAG
|
|
195
223
|
end
|
196
224
|
log msg, always: true do
|
197
225
|
yield
|
198
|
-
|
226
|
+
if options[:end_state] == :idle
|
227
|
+
log 'Transition to Run-Test/Idle...'
|
228
|
+
elsif options[:end_state] == :update_ir
|
229
|
+
log 'Transition to Update-IR...'
|
230
|
+
elsif options[:end_state] == :select_dr_scan
|
231
|
+
log 'Transition to Select-DR-Scan...'
|
232
|
+
end
|
199
233
|
if @last_data_vector_shifted
|
200
234
|
@last_data_vector_shifted = false
|
201
235
|
else
|
@@ -205,8 +239,13 @@ module OrigenJTAG
|
|
205
239
|
end
|
206
240
|
tms!(1) # => Update-IR
|
207
241
|
update_state :update_ir
|
208
|
-
|
209
|
-
|
242
|
+
if options[:end_state] == :idle
|
243
|
+
tms!(0) # => Run-Test/Idle
|
244
|
+
update_state :idle
|
245
|
+
elsif options[:end_state] == :select_dr_scan
|
246
|
+
tms!(1) # => Select-DR-Scan
|
247
|
+
update_state :select_dr_scan
|
248
|
+
end
|
210
249
|
else # :pause_ir
|
211
250
|
tms!(1) # => Exit2-IR
|
212
251
|
update_state :exit2_ir
|
data/pattern/jtag_workout.rb
CHANGED
@@ -193,7 +193,13 @@ Pattern.create(options = { name: pat_name }) do
|
|
193
193
|
|
194
194
|
test 'Unless forced'
|
195
195
|
jtag.write_ir 0xF, size: 4, force: true
|
196
|
-
|
196
|
+
|
197
|
+
test 'Write IR, starting with Idle, leave in Select-DR-Scan state'
|
198
|
+
jtag.write_ir(0x7, size: 8, end_state: :select_dr_scan, force: true)
|
199
|
+
|
200
|
+
test 'Write DR starting with Select-DR-Scan state, end with Idle'
|
201
|
+
jtag.write_dr(0x12345678, size: 32, start_state: :select_dr_scan)
|
202
|
+
|
197
203
|
test 'Reset'
|
198
204
|
jtag.reset
|
199
205
|
|
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.22.
|
4
|
+
version: 0.22.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -89,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 1.8.11
|
91
91
|
requirements: []
|
92
|
-
|
93
|
-
rubygems_version: 2.7.7
|
92
|
+
rubygems_version: 3.1.4
|
94
93
|
signing_key:
|
95
94
|
specification_version: 4
|
96
95
|
summary: JTAG driver for the Origen SDK
|