origen_jtag 0.21.1 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +2 -3
- data/lib/origen_jtag/driver.rb +47 -34
- data/lib/origen_jtag_dev/new_style.rb +2 -1
- data/templates/web/index.md.erb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17c3bc0c7a9b380a76c4f69ee0ebf6434d43a5c42456c0fca4c242ad192bb4ce
|
4
|
+
data.tar.gz: f828a940f8d87d5fd048aeac363238323df7cadc4b7b9405d6bbcf3601164bc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df5618e789ac6b000b6fa71cf52611df7bb56e5fc4965afeb57fcfc242a456d402c214c48823eccea4f97ccf7cdf036f47e145b871da18cd1fad7e2030cffb76
|
7
|
+
data.tar.gz: 6c751a233f7d80c8e2b607b2024fdfb556661d3e34a85dfa92a5728fac1bbfc9581f07dfc3aac856e2015cdf87e458785d4aa4fd934400cc4cb3f05699a60f8b
|
data/config/version.rb
CHANGED
data/lib/origen_jtag/driver.rb
CHANGED
@@ -35,7 +35,8 @@ module OrigenJTAG
|
|
35
35
|
alias_method :tclk_format, :tck_format
|
36
36
|
alias_method :tclk_format=, :tck_format=
|
37
37
|
|
38
|
-
|
38
|
+
attr_accessor :tdo_strobe
|
39
|
+
attr_accessor :tdo_store_cycle
|
39
40
|
|
40
41
|
# Set true to print out debug comments about all state transitions
|
41
42
|
attr_accessor :verbose
|
@@ -57,7 +58,7 @@ module OrigenJTAG
|
|
57
58
|
end
|
58
59
|
|
59
60
|
@cycle_callback = options[:cycle_callback]
|
60
|
-
|
61
|
+
@given_options = options.dup # Save these for later use in the pins method
|
61
62
|
|
62
63
|
# Fallback defaults
|
63
64
|
options = {
|
@@ -211,7 +212,7 @@ module OrigenJTAG
|
|
211
212
|
overlay_options = {}
|
212
213
|
if tester.respond_to?(:source_memory) && !cycle_callback?
|
213
214
|
if ovl_reg[i] && ovl_reg[i].has_overlay? && !Origen.mode.simulation?
|
214
|
-
overlay_options[:pins] =
|
215
|
+
overlay_options[:pins] = pins[:tdi]
|
215
216
|
if global_ovl
|
216
217
|
overlay_options[:overlay_str] = global_ovl
|
217
218
|
else
|
@@ -280,7 +281,7 @@ module OrigenJTAG
|
|
280
281
|
overlay_options[:change_data] = false # data change only on first cycle if overlay
|
281
282
|
end
|
282
283
|
end
|
283
|
-
|
284
|
+
pins[:tdo].dont_care unless cycle_callback?
|
284
285
|
else
|
285
286
|
@deferred_compare = true
|
286
287
|
@deferred_store = true if store_tdo_this_tck
|
@@ -323,7 +324,7 @@ module OrigenJTAG
|
|
323
324
|
|
324
325
|
# If TDO is already suspended (by an application) then don't do the
|
325
326
|
# suspends below since the resume will clear the application's suspend
|
326
|
-
tdo_already_suspended = !cycle_callback? &&
|
327
|
+
tdo_already_suspended = !cycle_callback? && pins[:tdo].suspended? && !@tdo_suspended_by_driver
|
327
328
|
|
328
329
|
@tck_multiple.times do |i|
|
329
330
|
# 50% duty cycle if @tck_multiple is even, otherwise slightly off
|
@@ -332,26 +333,26 @@ module OrigenJTAG
|
|
332
333
|
|
333
334
|
if i < (@tck_multiple + 1) / 2
|
334
335
|
# first half of cycle
|
335
|
-
|
336
|
+
pins[:tck].drive(@tck_vals ? @tck_vals[:on] : tck_val)
|
336
337
|
unless tdo_already_suspended
|
337
338
|
if mask_tdo_half0
|
338
339
|
@tdo_suspended_by_driver = true
|
339
|
-
|
340
|
+
pins[:tdo].suspend
|
340
341
|
else
|
341
342
|
@tdo_suspended_by_driver = false
|
342
|
-
|
343
|
+
pins[:tdo].resume
|
343
344
|
end
|
344
345
|
end
|
345
346
|
else
|
346
347
|
# second half of cycle
|
347
|
-
|
348
|
+
pins[:tck].drive(@tck_vals ? @tck_vals[:off] : (1 - tck_val))
|
348
349
|
unless tdo_already_suspended
|
349
350
|
if mask_tdo_half1
|
350
351
|
@tdo_suspended_by_driver = true
|
351
|
-
|
352
|
+
pins[:tdo].suspend
|
352
353
|
else
|
353
354
|
@tdo_suspended_by_driver = false
|
354
|
-
|
355
|
+
pins[:tdo].resume
|
355
356
|
end
|
356
357
|
end
|
357
358
|
end
|
@@ -359,7 +360,7 @@ module OrigenJTAG
|
|
359
360
|
end
|
360
361
|
if @tdo_suspended_by_driver
|
361
362
|
@tdo_suspended_by_driver = false
|
362
|
-
|
363
|
+
pins[:tdo].resume
|
363
364
|
end
|
364
365
|
end
|
365
366
|
end
|
@@ -548,10 +549,10 @@ module OrigenJTAG
|
|
548
549
|
if cycle_callback?
|
549
550
|
@owner.send(@cycle_callback, @actions, options)
|
550
551
|
else
|
551
|
-
apply_action(
|
552
|
-
apply_action(
|
553
|
-
apply_action(
|
554
|
-
tester.store_next_cycle(
|
552
|
+
apply_action(pins[:tms], @actions[:tms])
|
553
|
+
apply_action(pins[:tdi], @actions[:tdi])
|
554
|
+
apply_action(pins[:tdo], @actions[:tdo])
|
555
|
+
tester.store_next_cycle(pins[:tdo]) if @actions[:store]
|
555
556
|
tester.cycle(options)
|
556
557
|
end
|
557
558
|
clear_actions
|
@@ -665,30 +666,42 @@ module OrigenJTAG
|
|
665
666
|
tdo
|
666
667
|
end
|
667
668
|
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
@pins
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
669
|
+
def to_pin(pin_or_id)
|
670
|
+
if pin_or_id
|
671
|
+
if pin_or_id.is_a?(Symbol) || pin_or_id.is_a?(String)
|
672
|
+
@owner.pin(pin_or_id)
|
673
|
+
else
|
674
|
+
pin_or_id
|
675
|
+
end
|
676
|
+
end
|
677
|
+
end
|
678
|
+
|
679
|
+
def pins
|
680
|
+
@pins ||= begin
|
681
|
+
pins = {}
|
682
|
+
pins[:tck] = to_pin(@given_options[:tck_pin])
|
683
|
+
pins[:tdi] = to_pin(@given_options[:tdi_pin])
|
684
|
+
pins[:tdo] = to_pin(@given_options[:tdo_pin])
|
685
|
+
pins[:tms] = to_pin(@given_options[:tms_pin])
|
686
|
+
|
687
|
+
# Support legacy implementation where tck was incorrectly called tclk, in case of both being
|
688
|
+
# defined then :tck has priority
|
689
|
+
pins[:tck] ||= @owner.pin(:tck) if @owner.has_pin?(:tck)
|
690
|
+
pins[:tck] ||= @owner.pin(:tclk)
|
691
|
+
pins[:tdi] ||= @owner.pin(:tdi)
|
692
|
+
pins[:tdo] ||= @owner.pin(:tdo)
|
693
|
+
pins[:tms] ||= @owner.pin(:tms)
|
694
|
+
|
695
|
+
pins
|
696
|
+
end
|
684
697
|
rescue
|
685
698
|
puts 'Missing JTAG pins!'
|
686
699
|
puts "In order to use the JTAG driver your #{owner.class} class must either define"
|
687
700
|
puts 'the following pins (an alias is fine):'
|
688
701
|
puts REQUIRED_PINS
|
689
702
|
puts '-- or --'
|
690
|
-
puts 'Pass the
|
691
|
-
puts "sub_block :jtag, class_name: 'OrigenJTAG::Driver', tck_pin:
|
703
|
+
puts 'Pass the pin IDs to be used instead in the initialization options:'
|
704
|
+
puts "sub_block :jtag, class_name: 'OrigenJTAG::Driver', tck_pin: :clk, tdi_pin: :gpio1, tdo_pin: :gpio2, tms_pin: :gpio3"
|
692
705
|
raise 'JTAG driver error!'
|
693
706
|
end
|
694
707
|
end
|
@@ -30,7 +30,8 @@ module OrigenJTAGDev
|
|
30
30
|
instantiate_pins(options)
|
31
31
|
sub_block :jtag, { class_name: 'OrigenJTAG::Driver' }.merge(@jtag_config)
|
32
32
|
if options[:extra_port]
|
33
|
-
|
33
|
+
# Test supplying both pin IDs (recommended) and pin objects (legacy)
|
34
|
+
sub_block :jtag2, { class_name: 'OrigenJTAG::Driver', tck_pin: :tck_2, tdi_pin: :tdi_2, tdo_pin: pin(:tdo_2), tms_pin: pin(:tms_2) }.merge(@jtag_config)
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
data/templates/web/index.md.erb
CHANGED
@@ -89,10 +89,10 @@ class MyApp::MyDUT
|
|
89
89
|
tck_multiple: 2,
|
90
90
|
tdo_strobe: :tck_high,
|
91
91
|
tdo_store_cycle: 1,
|
92
|
-
tck_pin:
|
93
|
-
tdi_pin:
|
94
|
-
tdo_pin:
|
95
|
-
tms_pin:
|
92
|
+
tck_pin: :tck2,
|
93
|
+
tdi_pin: :tdi2,
|
94
|
+
tdo_pin: :tdo2,
|
95
|
+
tms_pin: :tms2
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
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.
|
4
|
+
version: 0.22.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: 2019-
|
11
|
+
date: 2019-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|