origen_jtag 0.17.0 → 0.17.1

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.
data/pattern/rww_test.rb CHANGED
@@ -1,25 +1,25 @@
1
-
2
- Pattern.create(options = { name: 'rww_test' }) do
3
-
4
- jtag = $dut.jtag
5
- reg = $dut.reg(:full16)
6
-
7
- cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
8
- jtag.write_dr 0xFFFF, size: 16, shift_out_data: 0xA5A5
9
-
10
- cc 'TDO should be XXXX_XXXX_HHHH_HHHH'
11
- reg.write(0xFFFF)
12
- reg.bits[0..7].read
13
- jtag.write_dr 0xFFFF, size: 16, shift_out_data: reg
14
-
15
-
16
- cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
17
- reg.write(0xFFFF)
18
- jtag.write_dr reg, shift_out_data: 0xA5A5
19
-
20
- cc 'TDO should be XXXX_XXXX_HHHH_HHHH'
21
- reg.write(0xFFFF)
22
- reg2 = reg.dup
23
- reg2.bits[0..7].read
24
- jtag.write_dr reg, size: 16, shift_out_data: reg2
25
- end
1
+
2
+ Pattern.create(options = { name: 'rww_test' }) do
3
+
4
+ jtag = $dut.jtag
5
+ reg = $dut.reg(:full16)
6
+
7
+ cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
8
+ jtag.write_dr 0xFFFF, size: 16, shift_out_data: 0xA5A5
9
+
10
+ cc 'TDO should be XXXX_XXXX_HHHH_HHHH'
11
+ reg.write(0xFFFF)
12
+ reg.bits[0..7].read
13
+ jtag.write_dr 0xFFFF, size: 16, shift_out_data: reg
14
+
15
+
16
+ cc 'TDO should be HLHL_LHLH_HLHL_LHLH'
17
+ reg.write(0xFFFF)
18
+ jtag.write_dr reg, shift_out_data: 0xA5A5
19
+
20
+ cc 'TDO should be XXXX_XXXX_HHHH_HHHH'
21
+ reg.write(0xFFFF)
22
+ reg2 = reg.dup
23
+ reg2.bits[0..7].read
24
+ jtag.write_dr reg, size: 16, shift_out_data: reg2
25
+ end
@@ -1,162 +1,162 @@
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
- Include the <code>OrigenJTAG</code> module to add a JTAG driver to your class and
34
- define the required pins.
35
- Normally the pins would be an alias to existing DUT pins and therefore the
36
- JTAG driver module cannot assume them.
37
-
38
- Including the module adds a <code>jtag</code> method which will return an instance of
39
- [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>).
40
-
41
- The following attributes can be customized by defining a <code>JTAG_CONFIG</code>
42
- hash:
43
-
44
- * **tclk_format** - TCLK timing format, Return High (:rh) or Return Low (:rl). Default is :rh.
45
- * **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.
46
- * **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.
47
- * **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
48
-
49
- Here is an example integration:
50
-
51
- ~~~ruby
52
- class Pioneer
53
-
54
- include OrigenJTAG
55
- include Origen::Pins
56
-
57
- # TCK covers 4 tester cycles, 2 high then 2 low for each effective TCK pulse
58
- # Strobe TDO only when TCK high. Only store TDO on last cycle (3)
59
- JTAG_CONFIG = {
60
- :tclk_format => :rl,
61
- :tclk_multiple => 4,
62
- :tdo_strobe => :tclk_high,
63
- :tdo_store_cycle => 3,
64
- }
65
-
66
- def initialize
67
- add_pin :tclk
68
- add_pin :tdi
69
- add_pin :tdo
70
- add_pin :tms
71
- end
72
-
73
- end
74
-
75
- Pioneer.new.jtag # => An instance of OrigenJTAG::Driver
76
- ~~~
77
-
78
- Two APIs are provided, the primary one provides canned methods to read and
79
- write to the IR and DR registers.
80
-
81
- These accept either an absolute data value or an Origen register/bit collection.
82
-
83
- ~~~ruby
84
- jtag.write_dr 0x1234, :size => 16
85
-
86
- # The size option is not required when a register is supplied
87
- jtag.write_dr $dut.reg(:clkdiv)
88
-
89
- # Although it can still be added if the register is not the full data width
90
- jtag.write_dr $dut.reg(:clkdiv), :size => 32
91
-
92
- # A rich read method is available which supports bit-level read, store and overlay operations
93
- $dut.reg(:clkdiv).bits(:div).read(0x55)
94
- jtag.read $dut.reg(:clkdiv)
95
-
96
- # In cases where both shift in (TDI) and shift out data (TDO) are critical, (e.g. compare shift
97
- # out data on a write, or shfit in specific data on a read) the shift_in_data and
98
- # shift_out_data options can be specified. By default, TDO will be dont care on writes
99
- # and TDI will be 0 on reads.
100
- jtag.write_dr $dut.reg(:clkdiv), :shift_out_data => 0x4321
101
- jtag.read_dr $udt.reg(:clkdiv), :shift_in_data => 0x5678
102
-
103
- # Similar methods exist for the instruction register
104
- jtag.write_ir 0x1F, :size => 5
105
- jtag.read_ir 0x1F, :size => 5
106
- ~~~
107
-
108
- A secondary API provides low level control of the TAP Controller state machine.
109
-
110
- ~~~ruby
111
- jtag.pause_dr do
112
- jtag.shift_dr do
113
- # The shift method accepts the same arguments as the canned read/write methods
114
- jtag.shift 0x55, :size => 32
115
- end
116
- end
117
- ~~~
118
-
119
- See the [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>) and
120
- [<code>OrigenJTAG::TAPController</code>](<%= path "api/OrigenJTAG/TAPController.html" %>)
121
- APIs for more details about the available driver methods.
122
-
123
- Any model/controller within a target runtime environment can listen out for JTAG state
124
- changes by implementing the following callback handler:
125
-
126
- ~~~ruby
127
- def on_jtag_state_change(new_state)
128
- if new_state == :update_dr
129
- # Do something every time we enter this state
130
- end
131
- end
132
- ~~~
133
-
134
-
135
- ### How To Setup a Development Environment
136
-
137
- [Clone the repository from Github](https://github.com/Origen-SDK/origen_jtag).
138
-
139
- An instance of the OrigenJTAG driver is hooked up to a dummy DUT
140
- object for use in the console:
141
-
142
- ~~~
143
- origen i
144
-
145
- > $dut.jtag
146
- => #<OrigenJTAG::Driver:0x0000001ee48e78>
147
- ~~~
148
-
149
- Follow the instructions here if you want to make a 3rd party app
150
- workspace use your development copy of the OrigenJTAG plugin:
151
- [Setting up a Plugin Development Environment](http://origen-sdk.org/origen/latest/guides/plugins)
152
-
153
- This plugin also contains a test suite, makes sure this passes before committing
154
- any changes!
155
-
156
- ~~~
157
- origen examples
158
- ~~~
159
-
160
- <%= disqus_comments %>
161
-
162
- % end
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
+ Include the <code>OrigenJTAG</code> module to add a JTAG driver to your class and
34
+ define the required pins.
35
+ Normally the pins would be an alias to existing DUT pins and therefore the
36
+ JTAG driver module cannot assume them.
37
+
38
+ Including the module adds a <code>jtag</code> method which will return an instance of
39
+ [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>).
40
+
41
+ The following attributes can be customized by defining a <code>JTAG_CONFIG</code>
42
+ hash:
43
+
44
+ * **tclk_format** - TCLK timing format, Return High (:rh) or Return Low (:rl). Default is :rh.
45
+ * **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.
46
+ * **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.
47
+ * **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
48
+
49
+ Here is an example integration:
50
+
51
+ ~~~ruby
52
+ class Pioneer
53
+
54
+ include OrigenJTAG
55
+ include Origen::Pins
56
+
57
+ # TCK covers 4 tester cycles, 2 high then 2 low for each effective TCK pulse
58
+ # Strobe TDO only when TCK high. Only store TDO on last cycle (3)
59
+ JTAG_CONFIG = {
60
+ :tclk_format => :rl,
61
+ :tclk_multiple => 4,
62
+ :tdo_strobe => :tclk_high,
63
+ :tdo_store_cycle => 3,
64
+ }
65
+
66
+ def initialize
67
+ add_pin :tclk
68
+ add_pin :tdi
69
+ add_pin :tdo
70
+ add_pin :tms
71
+ end
72
+
73
+ end
74
+
75
+ Pioneer.new.jtag # => An instance of OrigenJTAG::Driver
76
+ ~~~
77
+
78
+ Two APIs are provided, the primary one provides canned methods to read and
79
+ write to the IR and DR registers.
80
+
81
+ These accept either an absolute data value or an Origen register/bit collection.
82
+
83
+ ~~~ruby
84
+ jtag.write_dr 0x1234, :size => 16
85
+
86
+ # The size option is not required when a register is supplied
87
+ jtag.write_dr $dut.reg(:clkdiv)
88
+
89
+ # Although it can still be added if the register is not the full data width
90
+ jtag.write_dr $dut.reg(:clkdiv), :size => 32
91
+
92
+ # A rich read method is available which supports bit-level read, store and overlay operations
93
+ $dut.reg(:clkdiv).bits(:div).read(0x55)
94
+ jtag.read $dut.reg(:clkdiv)
95
+
96
+ # In cases where both shift in (TDI) and shift out data (TDO) are critical, (e.g. compare shift
97
+ # out data on a write, or shfit in specific data on a read) the shift_in_data and
98
+ # shift_out_data options can be specified. By default, TDO will be dont care on writes
99
+ # and TDI will be 0 on reads.
100
+ jtag.write_dr $dut.reg(:clkdiv), :shift_out_data => 0x4321
101
+ jtag.read_dr $udt.reg(:clkdiv), :shift_in_data => 0x5678
102
+
103
+ # Similar methods exist for the instruction register
104
+ jtag.write_ir 0x1F, :size => 5
105
+ jtag.read_ir 0x1F, :size => 5
106
+ ~~~
107
+
108
+ A secondary API provides low level control of the TAP Controller state machine.
109
+
110
+ ~~~ruby
111
+ jtag.pause_dr do
112
+ jtag.shift_dr do
113
+ # The shift method accepts the same arguments as the canned read/write methods
114
+ jtag.shift 0x55, :size => 32
115
+ end
116
+ end
117
+ ~~~
118
+
119
+ See the [<code>OrigenJTAG::Driver</code>](<%= path "api/OrigenJTAG/Driver.html" %>) and
120
+ [<code>OrigenJTAG::TAPController</code>](<%= path "api/OrigenJTAG/TAPController.html" %>)
121
+ APIs for more details about the available driver methods.
122
+
123
+ Any model/controller within a target runtime environment can listen out for JTAG state
124
+ changes by implementing the following callback handler:
125
+
126
+ ~~~ruby
127
+ def on_jtag_state_change(new_state)
128
+ if new_state == :update_dr
129
+ # Do something every time we enter this state
130
+ end
131
+ end
132
+ ~~~
133
+
134
+
135
+ ### How To Setup a Development Environment
136
+
137
+ [Clone the repository from Github](https://github.com/Origen-SDK/origen_jtag).
138
+
139
+ An instance of the OrigenJTAG driver is hooked up to a dummy DUT
140
+ object for use in the console:
141
+
142
+ ~~~
143
+ origen i
144
+
145
+ > $dut.jtag
146
+ => #<OrigenJTAG::Driver:0x0000001ee48e78>
147
+ ~~~
148
+
149
+ Follow the instructions here if you want to make a 3rd party app
150
+ workspace use your development copy of the OrigenJTAG plugin:
151
+ [Setting up a Plugin Development Environment](http://origen-sdk.org/origen/latest/guides/plugins)
152
+
153
+ This plugin also contains a test suite, makes sure this passes before committing
154
+ any changes!
155
+
156
+ ~~~
157
+ origen examples
158
+ ~~~
159
+
160
+ <%= disqus_comments %>
161
+
162
+ % end
@@ -1,16 +1,16 @@
1
- ---
2
- title: <%= options[:title] || Origen.config.name %>
3
- analytics: UA-64455560-1
4
- ---
5
- <%= render "templates/web/partials/navbar.html", :tab => options[:tab] %>
6
-
7
- <div class="row">
8
- %# The markdown attribute is important if you are going to include content written
9
- %# in markdown, without this is will be included verbatim
10
- <div class="span12" markdown="1">
11
- <%= yield %>
12
-
13
- <%= disqus_comments %>
14
-
15
- </div>
16
- </div>
1
+ ---
2
+ title: <%= options[:title] || Origen.config.name %>
3
+ analytics: UA-64455560-1
4
+ ---
5
+ <%= render "templates/web/partials/navbar.html", :tab => options[:tab] %>
6
+
7
+ <div class="row">
8
+ %# The markdown attribute is important if you are going to include content written
9
+ %# in markdown, without this is will be included verbatim
10
+ <div class="span12" markdown="1">
11
+ <%= yield %>
12
+
13
+ <%= disqus_comments %>
14
+
15
+ </div>
16
+ </div>
@@ -1,22 +1,22 @@
1
- <nav class="navbar navbar-inverse navbar-fixed-top">
2
- <div class="container">
3
- <div class="navbar-header">
4
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
5
- <span class="sr-only">Toggle navigation</span>
6
- <span class="icon-bar"></span>
7
- <span class="icon-bar"></span>
8
- <span class="icon-bar"></span>
9
- </button>
10
- <a class="navbar-brand" href="<%= path "/" %>">Home</a>
11
- </div>
12
- <div id="navbar" class="collapse navbar-collapse">
13
- <ul class="nav navbar-nav">
14
- <li class="<%= options[:tab] == :api ? 'active' : '' %>"><a href="<%= path "/api/" %>">API</a></li>
15
- <li class="<%= options[:tab] == :coverage ? 'active' : '' %>"><a href="<%= path "/coverage" %>">Coverage</a></li>
16
- <li class="<%= options[:tab] == :release ? 'active' : '' %>"><a href="<%= path "/release_notes" %>">Release Notes</a></li>
17
- <li><a href="https://github.com/Origen-SDK/origen_jtag">Github</a></li>
18
- </ul>
19
- <%= import "origen/web/logo.html" %>
20
- </div><!--/.nav-collapse -->
21
- </div>
22
- </nav>
1
+ <nav class="navbar navbar-inverse navbar-fixed-top">
2
+ <div class="container">
3
+ <div class="navbar-header">
4
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
5
+ <span class="sr-only">Toggle navigation</span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ </button>
10
+ <a class="navbar-brand" href="<%= path "/" %>">Home</a>
11
+ </div>
12
+ <div id="navbar" class="collapse navbar-collapse">
13
+ <ul class="nav navbar-nav">
14
+ <li class="<%= options[:tab] == :api ? 'active' : '' %>"><a href="<%= path "/api/" %>">API</a></li>
15
+ <li class="<%= options[:tab] == :coverage ? 'active' : '' %>"><a href="<%= path "/coverage" %>">Coverage</a></li>
16
+ <li class="<%= options[:tab] == :release ? 'active' : '' %>"><a href="<%= path "/release_notes" %>">Release Notes</a></li>
17
+ <li><a href="https://github.com/Origen-SDK/origen_jtag">Github</a></li>
18
+ </ul>
19
+ <%= import "origen/web/logo.html" %>
20
+ </div><!--/.nav-collapse -->
21
+ </div>
22
+ </nav>
@@ -1,5 +1,5 @@
1
- % render "layouts/basic.html", :tab => :release do
2
-
3
- <%= render "#{Origen.root}/doc/history" %>
4
-
5
- % end
1
+ % render "layouts/basic.html", :tab => :release do
2
+
3
+ <%= render "#{Origen.root}/doc/history" %>
4
+
5
+ % end
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.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-26 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -30,6 +30,20 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.7.35
33
+ - !ruby/object:Gem::Dependency
34
+ name: origen_testers
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.13.2
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.13.2
33
47
  description:
34
48
  email:
35
49
  - stephen.f.mcginty@gmail.com
@@ -46,6 +60,7 @@ files:
46
60
  - lib/origen_jtag/driver.rb
47
61
  - lib/origen_jtag/tap_controller.rb
48
62
  - lib/origen_jtag_dev/top_level.rb
63
+ - pattern/global_label_test.rb
49
64
  - pattern/jtag_workout.rb
50
65
  - pattern/rww_test.rb
51
66
  - templates/web/index.md.erb