origen_jtag 0.19.1 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/config/application.rb +64 -64
- data/config/boot.rb +24 -24
- data/config/commands.rb +127 -127
- data/config/version.rb +8 -8
- data/lib/origen_jtag.rb +13 -13
- data/lib/origen_jtag/driver.rb +624 -624
- data/lib/origen_jtag/tap_controller.rb +347 -347
- data/lib/origen_jtag_dev/new_style.rb +113 -113
- data/lib/origen_jtag_dev/top_level.rb +94 -94
- data/pattern/full_reg_ovly_cap.rb +11 -11
- data/pattern/global_label_test.rb +12 -12
- data/pattern/jtag_workout.rb +221 -221
- data/pattern/rww_test.rb +25 -25
- data/pattern/two_port.rb +49 -49
- data/templates/web/index.md.erb +234 -234
- data/templates/web/layouts/_basic.html.erb +16 -16
- data/templates/web/partials/_navbar.html.erb +22 -22
- data/templates/web/release_notes.md.erb +5 -5
- metadata +3 -4
- data/config/development.rb +0 -15
@@ -1,113 +1,113 @@
|
|
1
|
-
module OrigenJTAGDev
|
2
|
-
# This is a dummy DUT model which is used
|
3
|
-
# to instantiate and test the JTAG locally
|
4
|
-
# during development.
|
5
|
-
#
|
6
|
-
# It is not included when this library is imported.
|
7
|
-
class NewStyle
|
8
|
-
include Origen::TopLevel
|
9
|
-
|
10
|
-
attr_reader :jtag_config
|
11
|
-
|
12
|
-
def initialize(options = {})
|
13
|
-
@jtag_config = {
|
14
|
-
verbose: true,
|
15
|
-
tclk_format: :rh,
|
16
|
-
tclk_multiple: 1,
|
17
|
-
tdo_strobe: :tclk_high,
|
18
|
-
tdo_store_cycle: 0,
|
19
|
-
init_state: :unknown
|
20
|
-
}
|
21
|
-
@jtag_config[:tclk_format] = options[:tclk_format] if options[:tclk_format]
|
22
|
-
@jtag_config[:tclk_multiple] = options[:tclk_multiple] if options[:tclk_multiple]
|
23
|
-
@jtag_config[:tdo_strobe] = options[:tdo_strobe] if options[:tdo_strobe]
|
24
|
-
@jtag_config[:tdo_store_cycle] = options[:tdo_store_cycle] if options[:tdo_store_cycle]
|
25
|
-
@jtag_config[:init_state] = options[:init_state] if options[:init_state]
|
26
|
-
@jtag_config[:tclk_vals] = options[:tclk_vals] if options[:tclk_vals]
|
27
|
-
|
28
|
-
instantiate_registers(options)
|
29
|
-
instantiate_pins(options)
|
30
|
-
sub_block :jtag, { class_name: 'OrigenJTAG::Driver' }.merge(@jtag_config)
|
31
|
-
if options[:extra_port]
|
32
|
-
sub_block :jtag2, { class_name: 'OrigenJTAG::Driver', tck_pin: pin(:tck_2), tdi_pin: pin(:tdi_2), tdo_pin: pin(:tdo_2), tms_pin: pin(:tms_2) }.merge(@jtag_config)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def instantiate_registers(options = {})
|
37
|
-
reg :test16, 0x0012, size: 16 do |reg|
|
38
|
-
reg.bit 15..8, :bus
|
39
|
-
reg.bit 0, :bit
|
40
|
-
end
|
41
|
-
|
42
|
-
reg :test32, 0x0014, size: 32 do |reg|
|
43
|
-
reg.bit 31..16, :bus
|
44
|
-
reg.bit 0, :bit
|
45
|
-
end
|
46
|
-
|
47
|
-
reg :full16, 0x0012, size: 16 do |reg|
|
48
|
-
reg.bit 15..0, :data
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def instantiate_pins(options = {})
|
53
|
-
if options[:invalid_pins]
|
54
|
-
add_pin :tck
|
55
|
-
else
|
56
|
-
add_pin :tclk
|
57
|
-
end
|
58
|
-
add_pin :tdi
|
59
|
-
add_pin :tdo
|
60
|
-
add_pin :tms
|
61
|
-
|
62
|
-
if options[:extra_port]
|
63
|
-
add_pin :tck_2
|
64
|
-
add_pin :tdi_2
|
65
|
-
add_pin :tdo_2
|
66
|
-
add_pin :tms_2
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def startup(options = {})
|
71
|
-
tester.set_timeset('nvmbist', 40)
|
72
|
-
end
|
73
|
-
|
74
|
-
# Getter for top-level tclk_format setting
|
75
|
-
def tclk_format
|
76
|
-
@jtag_config[:tclk_format]
|
77
|
-
end
|
78
|
-
|
79
|
-
# Getter for top-level tclk_multiple setting
|
80
|
-
def tclk_multiple
|
81
|
-
@jtag_config[:tclk_multiple]
|
82
|
-
end
|
83
|
-
|
84
|
-
# Getter for top-level tclk_vals setting
|
85
|
-
def tclk_vals
|
86
|
-
@jtag_config[:tclk_vals]
|
87
|
-
end
|
88
|
-
|
89
|
-
# Getter for top-level tdo_strobe setting
|
90
|
-
def tdo_strobe
|
91
|
-
@jtag_config[:tdo_strobe]
|
92
|
-
end
|
93
|
-
|
94
|
-
# Getter for top-level tdo_store_cycle setting
|
95
|
-
def tdo_store_cycle
|
96
|
-
@jtag_config[:tdo_store_cycle]
|
97
|
-
end
|
98
|
-
|
99
|
-
# Getter for top-level init_state setting
|
100
|
-
def init_state
|
101
|
-
@jtag_config[:init_state]
|
102
|
-
end
|
103
|
-
|
104
|
-
# Wouldn't want to do this in reality, but allows some flexibility duing gem testing
|
105
|
-
def update_jtag_config(cfg, val)
|
106
|
-
if @jtag_config.key?(cfg)
|
107
|
-
@jtag_config[cfg] = val
|
108
|
-
else
|
109
|
-
fail "#{cfg} not a part of @jtag_config"
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
1
|
+
module OrigenJTAGDev
|
2
|
+
# This is a dummy DUT model which is used
|
3
|
+
# to instantiate and test the JTAG locally
|
4
|
+
# during development.
|
5
|
+
#
|
6
|
+
# It is not included when this library is imported.
|
7
|
+
class NewStyle
|
8
|
+
include Origen::TopLevel
|
9
|
+
|
10
|
+
attr_reader :jtag_config
|
11
|
+
|
12
|
+
def initialize(options = {})
|
13
|
+
@jtag_config = {
|
14
|
+
verbose: true,
|
15
|
+
tclk_format: :rh,
|
16
|
+
tclk_multiple: 1,
|
17
|
+
tdo_strobe: :tclk_high,
|
18
|
+
tdo_store_cycle: 0,
|
19
|
+
init_state: :unknown
|
20
|
+
}
|
21
|
+
@jtag_config[:tclk_format] = options[:tclk_format] if options[:tclk_format]
|
22
|
+
@jtag_config[:tclk_multiple] = options[:tclk_multiple] if options[:tclk_multiple]
|
23
|
+
@jtag_config[:tdo_strobe] = options[:tdo_strobe] if options[:tdo_strobe]
|
24
|
+
@jtag_config[:tdo_store_cycle] = options[:tdo_store_cycle] if options[:tdo_store_cycle]
|
25
|
+
@jtag_config[:init_state] = options[:init_state] if options[:init_state]
|
26
|
+
@jtag_config[:tclk_vals] = options[:tclk_vals] if options[:tclk_vals]
|
27
|
+
|
28
|
+
instantiate_registers(options)
|
29
|
+
instantiate_pins(options)
|
30
|
+
sub_block :jtag, { class_name: 'OrigenJTAG::Driver' }.merge(@jtag_config)
|
31
|
+
if options[:extra_port]
|
32
|
+
sub_block :jtag2, { class_name: 'OrigenJTAG::Driver', tck_pin: pin(:tck_2), tdi_pin: pin(:tdi_2), tdo_pin: pin(:tdo_2), tms_pin: pin(:tms_2) }.merge(@jtag_config)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def instantiate_registers(options = {})
|
37
|
+
reg :test16, 0x0012, size: 16 do |reg|
|
38
|
+
reg.bit 15..8, :bus
|
39
|
+
reg.bit 0, :bit
|
40
|
+
end
|
41
|
+
|
42
|
+
reg :test32, 0x0014, size: 32 do |reg|
|
43
|
+
reg.bit 31..16, :bus
|
44
|
+
reg.bit 0, :bit
|
45
|
+
end
|
46
|
+
|
47
|
+
reg :full16, 0x0012, size: 16 do |reg|
|
48
|
+
reg.bit 15..0, :data
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def instantiate_pins(options = {})
|
53
|
+
if options[:invalid_pins]
|
54
|
+
add_pin :tck
|
55
|
+
else
|
56
|
+
add_pin :tclk
|
57
|
+
end
|
58
|
+
add_pin :tdi
|
59
|
+
add_pin :tdo
|
60
|
+
add_pin :tms
|
61
|
+
|
62
|
+
if options[:extra_port]
|
63
|
+
add_pin :tck_2
|
64
|
+
add_pin :tdi_2
|
65
|
+
add_pin :tdo_2
|
66
|
+
add_pin :tms_2
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def startup(options = {})
|
71
|
+
tester.set_timeset('nvmbist', 40)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Getter for top-level tclk_format setting
|
75
|
+
def tclk_format
|
76
|
+
@jtag_config[:tclk_format]
|
77
|
+
end
|
78
|
+
|
79
|
+
# Getter for top-level tclk_multiple setting
|
80
|
+
def tclk_multiple
|
81
|
+
@jtag_config[:tclk_multiple]
|
82
|
+
end
|
83
|
+
|
84
|
+
# Getter for top-level tclk_vals setting
|
85
|
+
def tclk_vals
|
86
|
+
@jtag_config[:tclk_vals]
|
87
|
+
end
|
88
|
+
|
89
|
+
# Getter for top-level tdo_strobe setting
|
90
|
+
def tdo_strobe
|
91
|
+
@jtag_config[:tdo_strobe]
|
92
|
+
end
|
93
|
+
|
94
|
+
# Getter for top-level tdo_store_cycle setting
|
95
|
+
def tdo_store_cycle
|
96
|
+
@jtag_config[:tdo_store_cycle]
|
97
|
+
end
|
98
|
+
|
99
|
+
# Getter for top-level init_state setting
|
100
|
+
def init_state
|
101
|
+
@jtag_config[:init_state]
|
102
|
+
end
|
103
|
+
|
104
|
+
# Wouldn't want to do this in reality, but allows some flexibility duing gem testing
|
105
|
+
def update_jtag_config(cfg, val)
|
106
|
+
if @jtag_config.key?(cfg)
|
107
|
+
@jtag_config[cfg] = val
|
108
|
+
else
|
109
|
+
fail "#{cfg} not a part of @jtag_config"
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -1,94 +1,94 @@
|
|
1
|
-
module OrigenJTAGDev
|
2
|
-
# This is a dummy DUT model which is used
|
3
|
-
# to instantiate and test the JTAG locally
|
4
|
-
# during development.
|
5
|
-
#
|
6
|
-
# It is not included when this library is imported.
|
7
|
-
class DUT
|
8
|
-
include Origen::TopLevel
|
9
|
-
include OrigenJTAG
|
10
|
-
|
11
|
-
attr_reader :jtag_config
|
12
|
-
|
13
|
-
JTAG_CONFIG = {
|
14
|
-
verbose: true,
|
15
|
-
tclk_format: :rh,
|
16
|
-
tclk_multiple: 1,
|
17
|
-
tdo_strobe: :tclk_high,
|
18
|
-
tdo_store_cycle: 0,
|
19
|
-
init_state: :unknown
|
20
|
-
}
|
21
|
-
|
22
|
-
def initialize(options = {})
|
23
|
-
JTAG_CONFIG[:tclk_format] = options[:tclk_format] if options[:tclk_format]
|
24
|
-
JTAG_CONFIG[:tclk_multiple] = options[:tclk_multiple] if options[:tclk_multiple]
|
25
|
-
JTAG_CONFIG[:tdo_strobe] = options[:tdo_strobe] if options[:tdo_strobe]
|
26
|
-
JTAG_CONFIG[:tdo_store_cycle] = options[:tdo_store_cycle] if options[:tdo_store_cycle]
|
27
|
-
JTAG_CONFIG[:init_state] = options[:init_state] if options[:init_state]
|
28
|
-
|
29
|
-
instantiate_registers(options)
|
30
|
-
instantiate_pins(options)
|
31
|
-
end
|
32
|
-
|
33
|
-
def instantiate_registers(options = {})
|
34
|
-
reg :test16, 0x0012, size: 16 do |reg|
|
35
|
-
reg.bit 15..8, :bus
|
36
|
-
reg.bit 0, :bit
|
37
|
-
end
|
38
|
-
|
39
|
-
reg :test32, 0x0014, size: 32 do |reg|
|
40
|
-
reg.bit 31..16, :bus
|
41
|
-
reg.bit 0, :bit
|
42
|
-
end
|
43
|
-
|
44
|
-
reg :full16, 0x0012, size: 16 do |reg|
|
45
|
-
reg.bit 15..0, :data
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def instantiate_pins(options = {})
|
50
|
-
add_pin :tclk
|
51
|
-
add_pin :tdi
|
52
|
-
add_pin :tdo
|
53
|
-
add_pin :tms
|
54
|
-
end
|
55
|
-
|
56
|
-
def startup(options = {})
|
57
|
-
tester.set_timeset('nvmbist', 40)
|
58
|
-
end
|
59
|
-
|
60
|
-
# Getter for top-level tclk_format setting
|
61
|
-
def tclk_format
|
62
|
-
JTAG_CONFIG[:tclk_format]
|
63
|
-
end
|
64
|
-
|
65
|
-
# Getter for top-level tclk_multiple setting
|
66
|
-
def tclk_multiple
|
67
|
-
JTAG_CONFIG[:tclk_multiple]
|
68
|
-
end
|
69
|
-
|
70
|
-
# Getter for top-level tdo_strobe setting
|
71
|
-
def tdo_strobe
|
72
|
-
JTAG_CONFIG[:tdo_strobe]
|
73
|
-
end
|
74
|
-
|
75
|
-
# Getter for top-level tdo_store_cycle setting
|
76
|
-
def tdo_store_cycle
|
77
|
-
JTAG_CONFIG[:tdo_store_cycle]
|
78
|
-
end
|
79
|
-
|
80
|
-
# Getter for top-level init_state setting
|
81
|
-
def init_state
|
82
|
-
JTAG_CONFIG[:init_state]
|
83
|
-
end
|
84
|
-
|
85
|
-
# Wouldn't want to do this in reality, but allows some flexibility duing gem testing
|
86
|
-
def update_jtag_config(cfg, val)
|
87
|
-
if JTAG_CONFIG.key?(cfg)
|
88
|
-
JTAG_CONFIG[cfg] = val
|
89
|
-
else
|
90
|
-
fail "#{cfg} not a part of JTAG_CONFIG"
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
1
|
+
module OrigenJTAGDev
|
2
|
+
# This is a dummy DUT model which is used
|
3
|
+
# to instantiate and test the JTAG locally
|
4
|
+
# during development.
|
5
|
+
#
|
6
|
+
# It is not included when this library is imported.
|
7
|
+
class DUT
|
8
|
+
include Origen::TopLevel
|
9
|
+
include OrigenJTAG
|
10
|
+
|
11
|
+
attr_reader :jtag_config
|
12
|
+
|
13
|
+
JTAG_CONFIG = {
|
14
|
+
verbose: true,
|
15
|
+
tclk_format: :rh,
|
16
|
+
tclk_multiple: 1,
|
17
|
+
tdo_strobe: :tclk_high,
|
18
|
+
tdo_store_cycle: 0,
|
19
|
+
init_state: :unknown
|
20
|
+
}
|
21
|
+
|
22
|
+
def initialize(options = {})
|
23
|
+
JTAG_CONFIG[:tclk_format] = options[:tclk_format] if options[:tclk_format]
|
24
|
+
JTAG_CONFIG[:tclk_multiple] = options[:tclk_multiple] if options[:tclk_multiple]
|
25
|
+
JTAG_CONFIG[:tdo_strobe] = options[:tdo_strobe] if options[:tdo_strobe]
|
26
|
+
JTAG_CONFIG[:tdo_store_cycle] = options[:tdo_store_cycle] if options[:tdo_store_cycle]
|
27
|
+
JTAG_CONFIG[:init_state] = options[:init_state] if options[:init_state]
|
28
|
+
|
29
|
+
instantiate_registers(options)
|
30
|
+
instantiate_pins(options)
|
31
|
+
end
|
32
|
+
|
33
|
+
def instantiate_registers(options = {})
|
34
|
+
reg :test16, 0x0012, size: 16 do |reg|
|
35
|
+
reg.bit 15..8, :bus
|
36
|
+
reg.bit 0, :bit
|
37
|
+
end
|
38
|
+
|
39
|
+
reg :test32, 0x0014, size: 32 do |reg|
|
40
|
+
reg.bit 31..16, :bus
|
41
|
+
reg.bit 0, :bit
|
42
|
+
end
|
43
|
+
|
44
|
+
reg :full16, 0x0012, size: 16 do |reg|
|
45
|
+
reg.bit 15..0, :data
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def instantiate_pins(options = {})
|
50
|
+
add_pin :tclk
|
51
|
+
add_pin :tdi
|
52
|
+
add_pin :tdo
|
53
|
+
add_pin :tms
|
54
|
+
end
|
55
|
+
|
56
|
+
def startup(options = {})
|
57
|
+
tester.set_timeset('nvmbist', 40)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Getter for top-level tclk_format setting
|
61
|
+
def tclk_format
|
62
|
+
JTAG_CONFIG[:tclk_format]
|
63
|
+
end
|
64
|
+
|
65
|
+
# Getter for top-level tclk_multiple setting
|
66
|
+
def tclk_multiple
|
67
|
+
JTAG_CONFIG[:tclk_multiple]
|
68
|
+
end
|
69
|
+
|
70
|
+
# Getter for top-level tdo_strobe setting
|
71
|
+
def tdo_strobe
|
72
|
+
JTAG_CONFIG[:tdo_strobe]
|
73
|
+
end
|
74
|
+
|
75
|
+
# Getter for top-level tdo_store_cycle setting
|
76
|
+
def tdo_store_cycle
|
77
|
+
JTAG_CONFIG[:tdo_store_cycle]
|
78
|
+
end
|
79
|
+
|
80
|
+
# Getter for top-level init_state setting
|
81
|
+
def init_state
|
82
|
+
JTAG_CONFIG[:init_state]
|
83
|
+
end
|
84
|
+
|
85
|
+
# Wouldn't want to do this in reality, but allows some flexibility duing gem testing
|
86
|
+
def update_jtag_config(cfg, val)
|
87
|
+
if JTAG_CONFIG.key?(cfg)
|
88
|
+
JTAG_CONFIG[cfg] = val
|
89
|
+
else
|
90
|
+
fail "#{cfg} not a part of JTAG_CONFIG"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
if tester.uflex?
|
2
|
-
Pattern.create do
|
3
|
-
tester.overlay_style = :digsrc
|
4
|
-
dut.full16.overlay 'dummy_str'
|
5
|
-
dut.jtag.write_dr dut.full16
|
6
|
-
|
7
|
-
tester.capture_style = :digcap
|
8
|
-
dut.full16.overlay nil
|
9
|
-
dut.full16.store
|
10
|
-
dut.jtag.read_dr dut.full16
|
11
|
-
end
|
1
|
+
if tester.uflex?
|
2
|
+
Pattern.create do
|
3
|
+
tester.overlay_style = :digsrc
|
4
|
+
dut.full16.overlay 'dummy_str'
|
5
|
+
dut.jtag.write_dr dut.full16
|
6
|
+
|
7
|
+
tester.capture_style = :digcap
|
8
|
+
dut.full16.overlay nil
|
9
|
+
dut.full16.store
|
10
|
+
dut.jtag.read_dr dut.full16
|
11
|
+
end
|
12
12
|
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
if tester.j750? || tester.uflex?
|
2
|
-
Pattern.create(options = { name: 'global_label_test' }) do
|
3
|
-
|
4
|
-
jtag = $dut.jtag
|
5
|
-
reg = $dut.reg(:full16)
|
6
|
-
|
7
|
-
cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
|
8
|
-
reg.write(0xFFFF)
|
9
|
-
reg.overlay('globaltest')
|
10
|
-
jtag.write_dr reg, overlay: true, overlay_label: 'thisisthegloballabel'
|
11
|
-
|
12
|
-
end
|
1
|
+
if tester.j750? || tester.uflex?
|
2
|
+
Pattern.create(options = { name: 'global_label_test' }) do
|
3
|
+
|
4
|
+
jtag = $dut.jtag
|
5
|
+
reg = $dut.reg(:full16)
|
6
|
+
|
7
|
+
cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
|
8
|
+
reg.write(0xFFFF)
|
9
|
+
reg.overlay('globaltest')
|
10
|
+
jtag.write_dr reg, overlay: true, overlay_label: 'thisisthegloballabel'
|
11
|
+
|
12
|
+
end
|
13
13
|
end
|