origen_arm_debug 0.8.3 → 0.8.4
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 +1 -1
- data/lib/origen_arm_debug/mem_ap.rb +23 -47
- data/lib/origen_arm_debug/swj_dp.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ce85678b97c90ebf41f4dff8b8fad020fe9cfa
|
4
|
+
data.tar.gz: ca74317b6cd30d1145571c337b842351ad401ef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2579e71201e40ffb48f66196c3eac4c7cb0f94828b0a158ffbb8f62f84fb800c3f70590e9f83f4f6e6b138cc849c96a1e0e003ae733d84087e320cde771a15b7
|
7
|
+
data.tar.gz: d93cc73c36b6761ec33fd8da7f79b5ac5964d11a0b3be4f5632520f36a69fbc5edc467a2cea9bf1b3ec06bc9dbd9f9a6b77eb30cce3292bccf71237a62591104
|
data/config/version.rb
CHANGED
@@ -68,9 +68,11 @@ module OrigenARMDebug
|
|
68
68
|
def read_register(reg_or_val, options = {})
|
69
69
|
if reg_or_val.respond_to?(:data)
|
70
70
|
addr = reg_or_val.addr
|
71
|
+
rdata = reg_or_val.data
|
71
72
|
options = { reg: reg_or_val }.merge(options)
|
72
73
|
else
|
73
74
|
addr = reg_or_val # if not a register, use the 'val' as target addr
|
75
|
+
rdata = 0
|
74
76
|
end
|
75
77
|
|
76
78
|
options = { size: 32 }.merge(options)
|
@@ -141,7 +143,7 @@ module OrigenARMDebug
|
|
141
143
|
set_size(size)
|
142
144
|
set_addr(addr)
|
143
145
|
debug_port.read_ap(drw_reg_addr, options)
|
144
|
-
rdata = get_rdata(size, addr,
|
146
|
+
rdata = get_rdata(size, addr, 0)
|
145
147
|
increment_addr
|
146
148
|
|
147
149
|
cc "MEM-AP(#{@name}): R-#{size.to_s(10)}: "\
|
@@ -316,11 +318,11 @@ module OrigenARMDebug
|
|
316
318
|
current_csw_2_0 = @current_csw & 0x00000007
|
317
319
|
if (current_csw_5_4 == 0b01)
|
318
320
|
case current_csw_2_0
|
319
|
-
when
|
320
|
-
when
|
321
|
-
when
|
321
|
+
when 0 then @current_tar += 1 # Increment single
|
322
|
+
when 1 then @current_tar += 2 # Increment single
|
323
|
+
when 2 then @current_tar += 4 # Increment single
|
322
324
|
end
|
323
|
-
elsif (current_csw_5_4 ==
|
325
|
+
elsif (current_csw_5_4 == 2)
|
324
326
|
@current_tar += 4 # Increment packed
|
325
327
|
end
|
326
328
|
|
@@ -330,52 +332,26 @@ module OrigenARMDebug
|
|
330
332
|
end
|
331
333
|
end
|
332
334
|
|
333
|
-
# Create a bit-wise mask based on size, address and mask parameters.
|
334
|
-
#
|
335
|
-
# @param [Integer] size Size of data, supports 8-bit, 16-bit, and 32-bit
|
336
|
-
# @param [Integer] addr Address of data to be read from or written to
|
337
|
-
# @param [Integer] mask Mask for full data, used to create nibble mask
|
338
|
-
def get_mask(size, addr, mask)
|
339
|
-
addr_1_0 &= 0x00000003
|
340
|
-
case size
|
341
|
-
when 8
|
342
|
-
case addr_1_0
|
343
|
-
when 0b00 then mask &= 0x000000ff
|
344
|
-
when 0b01 then mask &= 0x0000ff00
|
345
|
-
when 0b10 then mask &= 0x00ff0000
|
346
|
-
when 0b11 then mask &= 0xff000000
|
347
|
-
end
|
348
|
-
when 16
|
349
|
-
case addr_1_0
|
350
|
-
when 0b00 then mask &= 0x0000ffff
|
351
|
-
when 0b10 then mask &= 0xffff0000
|
352
|
-
end
|
353
|
-
when 32
|
354
|
-
mask &= 0xffffffff
|
355
|
-
end
|
356
|
-
mask
|
357
|
-
end
|
358
|
-
|
359
335
|
# Create a bit-wise read-data based on size, address and rdata parameters.
|
360
336
|
#
|
361
337
|
# @param [Integer] size Size of data, supports 8-bit, 16-bit, and 32-bit
|
362
338
|
# @param [Integer] addr Address of data to be read from or written to
|
363
339
|
# @param [Integer] rdata Full data for read, used to create nibble read data
|
364
340
|
def get_rdata(size, addr, rdata)
|
365
|
-
addr_1_0
|
341
|
+
addr_1_0 = addr & 0x00000003
|
366
342
|
case size
|
367
343
|
when 8
|
368
344
|
case addr_1_0
|
369
|
-
when
|
370
|
-
when
|
371
|
-
when
|
372
|
-
when
|
345
|
+
when 0 then rdata = 0x000000ff & rdata
|
346
|
+
when 1 then rdata = 0x000000ff & (rdata >> 8)
|
347
|
+
when 2 then rdata = 0x000000ff & (rdata >> 16)
|
348
|
+
when 3 then rdata = 0x000000ff & (rdata >> 24)
|
373
349
|
end
|
374
350
|
when 16
|
375
351
|
case addr_1_0
|
376
|
-
|
377
|
-
|
378
|
-
|
352
|
+
when 0 then rdata = 0x0000ffff & rdata
|
353
|
+
when 2 then rdata = 0x0000ffff & (rdata >> 16)
|
354
|
+
end
|
379
355
|
when 32
|
380
356
|
rdata = rdata
|
381
357
|
end
|
@@ -388,19 +364,19 @@ module OrigenARMDebug
|
|
388
364
|
# @param [Integer] addr Address of data to be read from or written to
|
389
365
|
# @param [Integer] wdata Full data for write, used to create nibble write data
|
390
366
|
def get_wdata(size, addr, wdata);
|
391
|
-
addr_1_0
|
367
|
+
addr_1_0 = addr & 0x00000003
|
392
368
|
case size
|
393
369
|
when 8
|
394
370
|
case addr_1_0
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
371
|
+
when 0 then wdata = 0x000000ff & wdata
|
372
|
+
when 1 then wdata = 0x0000ff00 & (wdata << 8)
|
373
|
+
when 2 then wdata = 0x00ff0000 & (wdata << 16)
|
374
|
+
when 3 then wdata = 0xff000000 & (wdata << 24)
|
375
|
+
end
|
400
376
|
when 16
|
401
377
|
case addr_1_0
|
402
|
-
|
403
|
-
|
378
|
+
when 0 then wdata = 0x0000ffff & wdata
|
379
|
+
when 2 then wdata = 0xffff0000 & (wdata << 16)
|
404
380
|
end
|
405
381
|
when 32
|
406
382
|
wdata = wdata
|
@@ -383,7 +383,7 @@ module OrigenARMDebug
|
|
383
383
|
_name = options.delete(:name)
|
384
384
|
if !options[:r_attempts].nil?
|
385
385
|
attempts = options[:r_attempts]
|
386
|
-
elsif !options[:
|
386
|
+
elsif !options[:w_attempts].nil?
|
387
387
|
attempts = options[:w_attempts]
|
388
388
|
else
|
389
389
|
attempts = 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_arm_debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronnie Lajaunie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|