origen_jtag 0.18.0 → 0.19.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: f14027c16a759a2b51fa2b30d9f33cd7447f0a8b
4
- data.tar.gz: 8e4c8ebb8dbc3fa97c1955a395ba478b4f2f20a1
3
+ metadata.gz: cb7c96360f9c37b9ee800ddeba73ade40d00ecfe
4
+ data.tar.gz: 40a8cfbd5ff79aa405b8bdb5a9fa619d0e1eae05
5
5
  SHA512:
6
- metadata.gz: 874db41442a09c7c2ef8a9b6be7fcd2bdfe04da00e6a647af268da54bda9d41b5c69d609e639b0928bf4e0acb8b14eb1304ec734fffb2ac05070bfb13e5ed573
7
- data.tar.gz: 2af49cdfdc543a9e1fa0a105dbb7b674aba124034aad6bf1398a89393cd8756f58befc8a247b9bca458a0422e85baaa0c56b942a7870412d16dc64df5967c5b2
6
+ metadata.gz: cd920d9c30fc4041ff89acba0ab793a2ea2a06e5093cae3582ab470817325c861d40d8e0c133da8f89ad4646e27fff7352c99d5d64708bdb2bdb84a52a5ea4b4
7
+ data.tar.gz: 26ff839dd8cb0c2a121b751727031310236502c4f11e2b0497e3399c585d567a684b2701b7c6296312d837ad26fddc3bd21d128bf12c0084c4d10855dc85d426
@@ -27,66 +27,72 @@ when "examples", "test"
27
27
  status = 0
28
28
 
29
29
  # Pattern generator tests
30
- ARGV = %w(jtag_workout -t debug_RH1 -e v93k -r approved)
30
+ ARGV = %w(jtag_workout -t RH1.rb -e v93k -r approved)
31
31
  load "#{Origen.top}/lib/origen/commands/generate.rb"
32
- ARGV = %w(jtag_workout -t debug_RH1 -e j750.rb -r approved)
32
+ ARGV = %w(jtag_workout -t RH1.rb -e j750.rb -r approved)
33
33
  load "#{Origen.top}/lib/origen/commands/generate.rb"
34
- ARGV = %w(jtag_workout -t debug_RL1 -e j750.rb -r approved)
34
+ ARGV = %w(jtag_workout -t RL1.rb -e j750.rb -r approved)
35
35
  load "#{Origen.top}/lib/origen/commands/generate.rb"
36
36
 
37
- ARGV = %w(jtag_workout -t debug_RH2.rb -e j750.rb -r approved)
37
+ ARGV = %w(jtag_workout -t RH2.rb -e j750.rb -r approved)
38
38
  load "#{Origen.top}/lib/origen/commands/generate.rb"
39
- ARGV = %w(jtag_workout -t debug_RH2_1.rb -e j750.rb -r approved)
39
+ ARGV = %w(jtag_workout -t RH2_1.rb -e j750.rb -r approved)
40
40
  load "#{Origen.top}/lib/origen/commands/generate.rb"
41
41
 
42
- ARGV = %w(jtag_workout -t debug_RH4 -e v93k -r approved)
42
+ ARGV = %w(jtag_workout -t RH4.rb -e v93k -r approved)
43
43
  load "#{Origen.top}/lib/origen/commands/generate.rb"
44
- ARGV = %w(jtag_workout -t debug_RH4 -e j750.rb -r approved)
44
+ ARGV = %w(jtag_workout -t RH4.rb -e j750.rb -r approved)
45
45
  load "#{Origen.top}/lib/origen/commands/generate.rb"
46
- ARGV = %w(jtag_workout -t debug_RL4 -e j750.rb -r approved)
46
+ ARGV = %w(jtag_workout -t RL4.rb -e j750.rb -r approved)
47
47
  load "#{Origen.top}/lib/origen/commands/generate.rb"
48
48
 
49
- ARGV = %w(rww_test -t debug_RH4 -e j750.rb -r approved)
49
+ ARGV = %w(rww_test -t RH4.rb -e j750.rb -r approved)
50
50
  load "#{Origen.top}/lib/origen/commands/generate.rb"
51
51
 
52
- ARGV = %w(global_label_test -t debug_RH1 -e j750.rb -r approved)
52
+ ARGV = %w(global_label_test -t RH1.rb -e j750.rb -r approved)
53
53
  load "#{Origen.top}/lib/origen/commands/generate.rb"
54
54
 
55
- ARGV = %w(full_reg_ovly_cap -t debug_RH4 -e uflex.rb -r approved)
55
+ ARGV = %w(full_reg_ovly_cap -t RH4.rb -e uflex.rb -r approved)
56
56
  load "#{Origen.top}/lib/origen/commands/generate.rb"
57
57
 
58
58
  # Pattern generator tests -- confirm sub_block instanced jtag gives same results
59
- ARGV = %w(jtag_workout -t new_style_RH1 -e v93k -r approved)
59
+ ARGV = %w(jtag_workout -t new_RH1 -e v93k -r approved)
60
60
  load "#{Origen.top}/lib/origen/commands/generate.rb"
61
- ARGV = %w(jtag_workout -t new_style_RH1 -e j750.rb -r approved)
61
+ ARGV = %w(jtag_workout -t new_RH1 -e j750.rb -r approved)
62
62
  load "#{Origen.top}/lib/origen/commands/generate.rb"
63
- ARGV = %w(jtag_workout -t new_style_RL1 -e j750.rb -r approved)
63
+ ARGV = %w(jtag_workout -t new_RL1 -e j750.rb -r approved)
64
64
  load "#{Origen.top}/lib/origen/commands/generate.rb"
65
65
 
66
- ARGV = %w(jtag_workout -t new_style_RH2.rb -e j750.rb -r approved)
66
+ ARGV = %w(jtag_workout -t new_RH2.rb -e j750.rb -r approved)
67
67
  load "#{Origen.top}/lib/origen/commands/generate.rb"
68
- ARGV = %w(jtag_workout -t new_style_RH2_1.rb -e j750.rb -r approved)
68
+ ARGV = %w(jtag_workout -t new_RH2_1.rb -e j750.rb -r approved)
69
69
  load "#{Origen.top}/lib/origen/commands/generate.rb"
70
70
 
71
- ARGV = %w(jtag_workout -t new_style_RH4 -e v93k -r approved)
71
+ ARGV = %w(jtag_workout -t new_RH4 -e v93k -r approved)
72
72
  load "#{Origen.top}/lib/origen/commands/generate.rb"
73
- ARGV = %w(jtag_workout -t new_style_RH4 -e j750.rb -r approved)
73
+ ARGV = %w(jtag_workout -t new_RH4 -e j750.rb -r approved)
74
74
  load "#{Origen.top}/lib/origen/commands/generate.rb"
75
- ARGV = %w(jtag_workout -t new_style_RL4 -e j750.rb -r approved)
75
+ ARGV = %w(jtag_workout -t new_RL4 -e j750.rb -r approved)
76
76
  load "#{Origen.top}/lib/origen/commands/generate.rb"
77
77
 
78
- ARGV = %w(rww_test -t new_style_RH4 -e j750.rb -r approved)
78
+ ARGV = %w(rww_test -t new_RH4 -e j750.rb -r approved)
79
79
  load "#{Origen.top}/lib/origen/commands/generate.rb"
80
80
 
81
- ARGV = %w(global_label_test -t new_style_RH1 -e j750.rb -r approved)
81
+ ARGV = %w(global_label_test -t new_RH1 -e j750.rb -r approved)
82
82
  load "#{Origen.top}/lib/origen/commands/generate.rb"
83
83
 
84
- ARGV = %w(full_reg_ovly_cap -t new_style_RH4 -e uflex.rb -r approved)
84
+ ARGV = %w(full_reg_ovly_cap -t new_RH4 -e uflex.rb -r approved)
85
85
  load "#{Origen.top}/lib/origen/commands/generate.rb"
86
86
 
87
87
  ARGV = %w(two_port -t new_2port_RH4 -e j750.rb -r approved)
88
88
  load "#{Origen.top}/lib/origen/commands/generate.rb"
89
89
 
90
+ ARGV = %w(jtag_workout -t new_P1 -e v93k -r approved)
91
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
92
+
93
+ ARGV = %w(jtag_workout -t new_P4 -e v93k -r approved)
94
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
95
+
90
96
  if Origen.app.stats.changed_files == 0 &&
91
97
  Origen.app.stats.new_files == 0 &&
92
98
  Origen.app.stats.changed_patterns == 0 &&
@@ -1,6 +1,6 @@
1
1
  module OrigenJTAG
2
2
  MAJOR = 0
3
- MINOR = 18
3
+ MINOR = 19
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
 
@@ -71,6 +71,12 @@ module OrigenJTAG
71
71
  @tdo_store_cycle = options[:tdo_store_cycle]
72
72
  @state = options[:init_state]
73
73
  @log_state_changes = options[:log_state_changes] || false
74
+ if options[:tclk_vals]
75
+ @tclk_vals = options[:tclk_vals]
76
+ unless @tclk_vals.is_a?(Hash) && @tclk_vals.key?(:on) && @tclk_vals.key?(:off)
77
+ fail "When specifying TCLK values, you must supply a hash with both :on and :off keys, e.g. tclk_vals: { on: 'P', off: 0 }"
78
+ end
79
+ end
74
80
  end
75
81
 
76
82
  # Shift data into the TDI pin or out of the TDO pin.
@@ -291,7 +297,7 @@ module OrigenJTAG
291
297
 
292
298
  if i < (@tclk_multiple + 1) / 2
293
299
  # first half of cycle
294
- @tck_pin.drive(tclk_val)
300
+ @tck_pin.drive(@tclk_vals ? @tclk_vals[:on] : tclk_val)
295
301
  unless tdo_already_suspended
296
302
  unless tdo_to_be_captured
297
303
  if mask_tdo_half0
@@ -305,7 +311,7 @@ module OrigenJTAG
305
311
  end
306
312
  else
307
313
  # second half of cycle
308
- @tck_pin.drive(1 - tclk_val)
314
+ @tck_pin.drive(@tclk_vals ? @tclk_vals[:off] : (1 - tclk_val))
309
315
  unless tdo_already_suspended
310
316
  unless tdo_to_be_captured
311
317
  if mask_tdo_half1
@@ -23,6 +23,7 @@ module OrigenJTAGDev
23
23
  @jtag_config[:tdo_strobe] = options[:tdo_strobe] if options[:tdo_strobe]
24
24
  @jtag_config[:tdo_store_cycle] = options[:tdo_store_cycle] if options[:tdo_store_cycle]
25
25
  @jtag_config[:init_state] = options[:init_state] if options[:init_state]
26
+ @jtag_config[:tclk_vals] = options[:tclk_vals] if options[:tclk_vals]
26
27
 
27
28
  instantiate_registers(options)
28
29
  instantiate_pins(options)
@@ -80,6 +81,11 @@ module OrigenJTAGDev
80
81
  @jtag_config[:tclk_multiple]
81
82
  end
82
83
 
84
+ # Getter for top-level tclk_vals setting
85
+ def tclk_vals
86
+ @jtag_config[:tclk_vals]
87
+ end
88
+
83
89
  # Getter for top-level tdo_strobe setting
84
90
  def tdo_strobe
85
91
  @jtag_config[:tdo_strobe]
@@ -1,5 +1,6 @@
1
1
  pat_name = "jtag_workout_#{$dut.tclk_format.upcase}#{$dut.tclk_multiple}"
2
2
  pat_name = pat_name + "_#{dut.tdo_store_cycle}" if dut.tdo_store_cycle != 0
3
+ pat_name += "_tclk_vals" if dut.try(:tclk_vals)
3
4
 
4
5
  Pattern.create(options = { name: pat_name }) do
5
6
  def test(msg)
@@ -88,6 +88,16 @@ dut.jtag # => jtag driver for the first port (tclk, tdi, tdo, tms
88
88
  dut.jtag_port2 # => jtag driver for the second port (tck2, tdi2, tdo2, tms2)
89
89
  ~~~
90
90
 
91
+ By default, the driver will apply the conventional '1' and '0' drive values on the TCK pin to turn
92
+ the clock on and off, however
93
+ this can be overridden by supplying the `:tclk_vals` option as shown in the example below:
94
+
95
+ ~~~ruby
96
+ # My V93K timing setup uses 'P' to enable a clock pulse instead of '1'
97
+ tclk_vals: { on: 'P', off: 0 }
98
+ ~~~
99
+
100
+
91
101
  #### Legacy Example
92
102
 
93
103
  Include the <code>OrigenJTAG</code> module to add a JTAG driver to your class and
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.18.0
4
+ version: 0.19.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: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -67,7 +67,6 @@ files:
67
67
  - pattern/rww_test.rb
68
68
  - pattern/two_port.rb
69
69
  - templates/web/index.md.erb
70
- - templates/web/index.md.erb~
71
70
  - templates/web/layouts/_basic.html.erb
72
71
  - templates/web/partials/_navbar.html.erb
73
72
  - templates/web/release_notes.md.erb
@@ -90,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
89
  version: 1.8.11
91
90
  requirements: []
92
91
  rubyforge_project:
93
- rubygems_version: 2.6.7
92
+ rubygems_version: 2.6.14.1
94
93
  signing_key:
95
94
  specification_version: 4
96
95
  summary: JTAG driver for the Origen SDK
@@ -1,233 +0,0 @@
1
- % render "layouts/basic.html" do
2
-
3
- %# HTML tags can be embedded in mark down files if you want to do specific custom
4
- %# formatting like this, but in most cases that is not required.
5
- <h1><%= Origen.app.namespace %> <span style="font-size: 14px">(<%= Origen.app.version %>)</span></h1>
6
-
7
- ### Purpose
8
-
9
- This plugin provides an ATE driver for an IEEE 1149.1 compliant JTAG interface.
10
-
11
- It makes no assumptions about the instruction or data register attributes or higher
12
- level protocol concerns. For use at DUT model level this plugin would be normally be wrapped in
13
- a higher level protocol such as [Nexus](http://origen-sdk.org/nexus/).
14
-
15
- ### How To Import
16
-
17
- In your Gemfile add:
18
-
19
- ~~~ruby
20
- gem "origen_jtag", ">= <%= Origen.app.version %>"
21
- ~~~
22
-
23
- or if your application is a plugin add this to your <code>.gemspec</code>
24
-
25
- ~~~ruby
26
- spec.add_development_dependency "origen_jtag", ">= <%= Origen.app.version %>"
27
- ~~~
28
-
29
- __NOTE:__ You will also need to include <code>require 'origen_jtag'</code> somewhere in your environment. This can be done in <code>config/environment.rb</code> for example.
30
-
31
- ### How To Use
32
-
33
- #### New Style Example
34
-
35
- The driver no longer requires specific pin names (or aliases), supports sub_block instantiation and DUTs with multiple JTAG ports.
36
- You are no longer required to include "OrigenJTAG" in your DUT class.
37
-
38
- Here is an example integration:
39
-
40
- ~~~ruby
41
- class Pioneer
42
-
43
- include Origen::TopLevel
44
-
45
- # TCK covers 4 tester cycles, 2 high then 2 low for each effective TCK pulse
46
- # Strobe TDO only when TCK high. Only store TDO on last cycle (3)
47
- JTAG_CONFIG = {
48
- :tclk_format => :rl,
49
- :tclk_multiple => 4,
50
- :tdo_strobe => :tclk_high,
51
- :tdo_store_cycle => 3,
52
- }
53
-
54
- def initialize
55
- add_pin :tclk
56
- add_pin :tdi
57
- add_pin :tdo
58
- add_pin :tms
59
-
60
- add_pin :tck2
61
- add_pin :tdi2
62
- add_pin :tdo2
63
- add_pin :tms2
64
-
65
-
66
- # In this first instance TCK covers 4 tester cycles,
67
- # 2 high then 2 low for each effective TCK pulse.
68
- # Strobe TDO only when TCK high. Only store TDO on last cycle (3)
69
-
70
- # several pluggins use dut.jtag, your default port driver should be named jtag for compatibility
71
- sub_block :jtag, class_name: 'OrigenJTAG::Driver',
72
- tclk_format: :rl,
73
- tclk_multiple: 4,
74
- tdo_strobe: :tclk_high,
75
- tdo_store_cycle: 3,
76
- tck_pin: pin(:tclk),
77
- tdi_pin: pin(:tdi),
78
- tdo_pin: pin(:tdo),
79
- tms_pin: pin(:tms)
80
-
81
- # create a driver for a 2nd port like this
82
- # note different configuration settings can be used
83
- sub_block :jtag_port2, class_name: 'OrigenJTAG::Driver',
84
- tclk_format: :rh,
85
- tclk_multiple: 2,
86
- tdo_strobe: :tclk_high,
87
- tdo_store_cycle: 1,
88
- tck_pin: pin(:tck2),
89
- tdi_pin: pin(:tdi2),
90
- tdo_pin: pin(:tdo2),
91
- tms_pin: pin(:tms2)
92
- end
93
-
94
- end
95
-
96
- dut.jtag # => jtag driver for the first port (tclk, tdi, tdo, tms)
97
- dut.jtag_port2 # => jtag driver for the second port (tck2, tdi2, tdo2, tms2)
98
- ~~~
99
-
100
- #### Legacy Example
101
-
102
- Include the <code>OrigenJTAG</code> module to add a JTAG driver to your class and
103
- define the required pins.
104
- Normally the pins would be an alias to existing DUT pins and therefore the
105
- JTAG driver module cannot assume them.
106
-
107
- Including the module adds a <code>jtag</code> method which will return an instance of
108
- [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>).
109
-
110
- The following attributes can be customized by defining a <code>JTAG_CONFIG</code>
111
- hash:
112
-
113
- * **tclk_format** - TCLK timing format, Return High (:rh) or Return Low (:rl). Default is :rh.
114
- * **tclk_multiple** - Number of cycles for a single TCLK pulse to cover, to support cases where TCLK needs to be a fraction of another clock period. Assumes 50% duty cycle, specify only even numbers if > 1. Default is :r1.
115
- * **tdo_strobe** - When using multiple cycles for TCK, which state of TCK to strobe for TDO, :tclk_high or :tclk_low or :tclk_all. Default :tclk_high.
116
- * **tdo_store_cycle** - When using multiple cycles for TCK, which cycle of TCK to store for TDO if store requested (0 to number of tclk_multiple-1). Default 0
117
-
118
- Here is an example integration:
119
-
120
- ~~~ruby
121
- class Pioneer
122
-
123
- include OrigenJTAG
124
- include Origen::Pins
125
-
126
- # TCK covers 4 tester cycles, 2 high then 2 low for each effective TCK pulse
127
- # Strobe TDO only when TCK high. Only store TDO on last cycle (3)
128
- JTAG_CONFIG = {
129
- :tclk_format => :rl,
130
- :tclk_multiple => 4,
131
- :tdo_strobe => :tclk_high,
132
- :tdo_store_cycle => 3,
133
- }
134
-
135
- def initialize
136
- add_pin :tclk
137
- add_pin :tdi
138
- add_pin :tdo
139
- add_pin :tms
140
- end
141
-
142
- end
143
-
144
- Pioneer.new.jtag # => An instance of OrigenJTAG::Driver
145
- ~~~
146
-
147
- #### APIs
148
-
149
- Two APIs are provided, the primary one provides canned methods to read and
150
- write to the IR and DR registers.
151
-
152
- These accept either an absolute data value or an Origen register/bit collection.
153
-
154
- ~~~ruby
155
- jtag.write_dr 0x1234, :size => 16
156
-
157
- # The size option is not required when a register is supplied
158
- jtag.write_dr $dut.reg(:clkdiv)
159
-
160
- # Although it can still be added if the register is not the full data width
161
- jtag.write_dr $dut.reg(:clkdiv), :size => 32
162
-
163
- # A rich read method is available which supports bit-level read, store and overlay operations
164
- $dut.reg(:clkdiv).bits(:div).read(0x55)
165
- jtag.read $dut.reg(:clkdiv)
166
-
167
- # In cases where both shift in (TDI) and shift out data (TDO) are critical, (e.g. compare shift
168
- # out data on a write, or shfit in specific data on a read) the shift_in_data and
169
- # shift_out_data options can be specified. By default, TDO will be dont care on writes
170
- # and TDI will be 0 on reads.
171
- jtag.write_dr $dut.reg(:clkdiv), :shift_out_data => 0x4321
172
- jtag.read_dr $udt.reg(:clkdiv), :shift_in_data => 0x5678
173
-
174
- # Similar methods exist for the instruction register
175
- jtag.write_ir 0x1F, :size => 5
176
- jtag.read_ir 0x1F, :size => 5
177
- ~~~
178
-
179
- A secondary API provides low level control of the TAP Controller state machine.
180
-
181
- ~~~ruby
182
- jtag.pause_dr do
183
- jtag.shift_dr do
184
- # The shift method accepts the same arguments as the canned read/write methods
185
- jtag.shift 0x55, :size => 32
186
- end
187
- end
188
- ~~~
189
-
190
- See the [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>) and
191
- [<code>OrigenJTAG::TAPController</code>](<%= path "api/OrigenJTAG/TAPController.html" %>)
192
- APIs for more details about the available driver methods.
193
-
194
- Any model/controller within a target runtime environment can listen out for JTAG state
195
- changes by implementing the following callback handler:
196
-
197
- ~~~ruby
198
- def on_jtag_state_change(new_state)
199
- if new_state == :update_dr
200
- # Do something every time we enter this state
201
- end
202
- end
203
- ~~~
204
-
205
-
206
- ### How To Setup a Development Environment
207
-
208
- [Clone the repository from Github](https://github.com/Origen-SDK/origen_jtag).
209
-
210
- An instance of the OrigenJTAG driver is hooked up to a dummy DUT
211
- object for use in the console:
212
-
213
- ~~~
214
- origen i
215
-
216
- > $dut.jtag
217
- => #<OrigenJTAG::Driver:0x0000001ee48e78>
218
- ~~~
219
-
220
- Follow the instructions here if you want to make a 3rd party app
221
- workspace use your development copy of the OrigenJTAG plugin:
222
- [Setting up a Plugin Development Environment](http://origen-sdk.org/origen/latest/guides/plugins)
223
-
224
- This plugin also contains a test suite, makes sure this passes before committing
225
- any changes!
226
-
227
- ~~~
228
- origen examples
229
- ~~~
230
-
231
- <%= disqus_comments %>
232
-
233
- % end