origen_jtag 0.15.0 → 0.16.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: 9dbecdacc92743469c85938ba80bdb6314e4f366
4
- data.tar.gz: d36ea9459ef965f61e5d1ca063067a3c44cb9110
3
+ metadata.gz: 300c822af7cb117a48ceea25d068f327d7a19186
4
+ data.tar.gz: 8e5eb5874aa781c3e55518c340d2433c0a5cca67
5
5
  SHA512:
6
- metadata.gz: ba9368d6fcf22c79128e56ff390825e0d73b89d716c81e2c3a66a1be1e4073dc085b37cfad492d49d82b9f4e51c493a970b16b6568044f4fe101b6ae07d8d60c
7
- data.tar.gz: ef625c031b70f9651b2e514d431162251879afa6fab7273d6f5ee654c220dce403d47a6c0e925a5c21bfa69741445da4cafd4ebcb838355eadb8ba01230a0456
6
+ metadata.gz: b3e929d62e4ef0cf0b30f8c45071c9f9182514ce6f37eae8bf0274fe1a37c9717ab9a9666593a3a90781cf49562763e9fdaf32b263256fe810b17401769e9a31
7
+ data.tar.gz: cb077d873f3aae8a2cd941f9308eb7d0e61cb454e656c71c3ab19de13eb5edee7abb01b07dfaef2e996fbac285cc7fd35a3995ec2f2b15db39dcfdb6c26d41a6
data/config/commands.rb CHANGED
@@ -46,6 +46,9 @@ when "examples", "test"
46
46
  ARGV = %w(jtag_workout -t debug_RL4 -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)
50
+ load "#{Origen.top}/lib/origen/commands/generate.rb"
51
+
49
52
  if Origen.app.stats.changed_files == 0 &&
50
53
  Origen.app.stats.new_files == 0 &&
51
54
  Origen.app.stats.changed_patterns == 0 &&
data/config/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module OrigenJTAG
2
2
  MAJOR = 0
3
- MINOR = 15
3
+ MINOR = 16
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
 
@@ -118,21 +118,24 @@ module OrigenJTAG
118
118
  tdo_reg = extract_shift_out_data(reg_or_val, size, options)
119
119
  global_ovl, ovl_reg = extract_overlay_data(reg_or_val, size, options)
120
120
 
121
- # tester does not support direct labels, so can't do
122
- if options[:no_subr] && !$tester.respond_to?('label')
123
- cc 'This tester does not support use of labels, cannot do no_subr option as requested'
124
- cc ' going with subroutine overlay instead'
125
- options[:no_subr] = false
126
- end
121
+ # let the tester handle overlay if possible
122
+ unless tester.respond_to?(:source_memory)
123
+ # tester does not support direct labels, so can't do
124
+ if options[:no_subr] && !$tester.respond_to?('label')
125
+ cc 'This tester does not support use of labels, cannot do no_subr option as requested'
126
+ cc ' going with subroutine overlay instead'
127
+ options[:no_subr] = false
128
+ end
127
129
 
128
- # insert global label if specified
129
- if global_ovl
130
- if $tester.respond_to?('label')
131
- $tester.label(global_ovl, true)
132
- else
133
- cc "Unsupported global label: #{global_ovl}"
130
+ # insert global label if specified
131
+ if global_ovl
132
+ if $tester.respond_to?('label')
133
+ $tester.label(global_ovl, true)
134
+ else
135
+ cc "Unsupported global label: #{global_ovl}"
136
+ end
134
137
  end
135
- end
138
+ end # of let tester handle overlay if possible
136
139
 
137
140
  # loop through each data bit
138
141
  last_overlay_label = ''
@@ -158,26 +161,36 @@ module OrigenJTAG
158
161
  # TMS
159
162
  owner.pin(:tms).drive(0)
160
163
 
161
- # Overlay - reconfigure pin action for overlay if necessary
162
- if ovl_reg[i] && ovl_reg[i].has_overlay? && !Origen.mode.simulation?
163
- if options[:no_subr]
164
- Origen.tester.dont_compress = true
165
- if ovl_reg[i].overlay_str != last_overlay_label
166
- $tester.label(ovl_reg[i].overlay_str)
167
- last_overlay_label = ovl_reg[i].overlay_str
164
+ # let tester handle overlay if implemented
165
+ overlay_options = {}
166
+ if tester.respond_to?(:source_memory)
167
+ if ovl_reg[i] && ovl_reg[i].has_overlay? && !Origen.mode.simulation?
168
+ overlay_options[:pins] = owner.pin(:tdi)
169
+ overlay_options[:overlay_str] = ovl_reg[i].overlay_str
170
+ overlay_options[:overlay_style] = :label if options[:no_subr]
171
+ end
172
+ else
173
+ # Overlay - reconfigure pin action for overlay if necessary
174
+ if ovl_reg[i] && ovl_reg[i].has_overlay? && !Origen.mode.simulation?
175
+ if options[:no_subr]
176
+ Origen.tester.dont_compress = true
177
+ if ovl_reg[i].overlay_str != last_overlay_label
178
+ $tester.label(ovl_reg[i].overlay_str)
179
+ last_overlay_label = ovl_reg[i].overlay_str
180
+ end
181
+ owner.pin(:tdo).assert(tdo_reg[i]) if options[:read]
182
+ else
183
+ owner.pin(:tdi).drive(0)
184
+ call_subroutine = ovl_reg[i].overlay_str
168
185
  end
169
- owner.pin(:tdo).assert(tdo_reg[i]) if options[:read]
170
- else
171
- owner.pin(:tdi).drive(0)
172
- call_subroutine = ovl_reg[i].overlay_str
173
186
  end
174
- end
187
+ end # of let tester handle overlay
175
188
 
176
189
  # With JTAG pin actions queued up, use block call to tclk_cycle to
177
190
  # execute a single TCLK period. Special handling of subroutines,
178
191
  # case of last bit in shift, and store vector (within a multi-cycle
179
192
  # tclk config).
180
- if call_subroutine
193
+ if call_subroutine && !tester.respond_to?(:source_memory)
181
194
  Origen.tester.call_subroutine(call_subroutine)
182
195
  @last_data_vector_shifted = true
183
196
  else
@@ -193,7 +206,12 @@ module OrigenJTAG
193
206
  if store_tdo_this_tclk && @next_data_vector_to_be_stored
194
207
  Origen.tester.store_next_cycle(owner.pin(:tdo))
195
208
  end
196
- Origen.tester.cycle
209
+ if overlay_options[:pins].nil?
210
+ Origen.tester.cycle
211
+ else
212
+ Origen.tester.cycle overlay: overlay_options
213
+ overlay_options[:change_data] = false # data change only on first cycle if overlay
214
+ end
197
215
  end
198
216
  owner.pin(:tdo).dont_care
199
217
  else
@@ -508,10 +526,16 @@ module OrigenJTAG
508
526
  if options[:read]
509
527
  tdo = reg_or_val.dup
510
528
  else
511
- tdo = Reg.dummy(size)
529
+ tdo = Reg.dummy(size) unless options[:shift_out_data].is_a?(Origen::Registers::Reg)
530
+ end
531
+ unless options[:read] # if this is a write operation
512
532
  if options[:shift_out_data]
513
- tdo.write(options[:shift_out_data])
514
- tdo.read
533
+ if options[:shift_out_data].is_a?(Origen::Registers::Reg)
534
+ tdo = options[:shift_out_data]
535
+ else
536
+ tdo.write(options[:shift_out_data])
537
+ tdo.read
538
+ end
515
539
  else
516
540
  tdo.write(0)
517
541
  end
@@ -523,8 +547,12 @@ module OrigenJTAG
523
547
  tdo.read
524
548
  else
525
549
  if options[:shift_out_data]
526
- tdo.write(options[:shift_out_data])
527
- tdo.read
550
+ if options[:shift_out_data].is_a?(Origen::Registers::Reg)
551
+ tdo = options[:shift_out_data]
552
+ else
553
+ tdo.write(options[:shift_out_data])
554
+ tdo.read
555
+ end
528
556
  else
529
557
  tdo.write(0)
530
558
  end
@@ -40,6 +40,10 @@ module OrigenJTAGDev
40
40
  reg.bit 31..16, :bus
41
41
  reg.bit 0, :bit
42
42
  end
43
+
44
+ reg :full16, 0x0012, size: 16 do |reg|
45
+ reg.bit 15..0, :data
46
+ end
43
47
  end
44
48
 
45
49
  def instantiate_pins(options = {})
@@ -0,0 +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
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.15.0
4
+ version: 0.16.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: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -47,6 +47,7 @@ files:
47
47
  - lib/origen_jtag/tap_controller.rb
48
48
  - lib/origen_jtag_dev/top_level.rb
49
49
  - pattern/jtag_workout.rb
50
+ - pattern/rww_test.rb
50
51
  - templates/web/index.md.erb
51
52
  - templates/web/layouts/_basic.html.erb
52
53
  - templates/web/partials/_navbar.html.erb