origen_memory_image 0.8.0 → 0.8.1
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 -2
- data/lib/origen_memory_image/base.rb +1 -0
- data/lib/origen_memory_image/hex.rb +5 -1
- data/lib/origen_memory_image/s_record.rb +5 -1
- data/templates/web/index.md.erb +19 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90f929c547d4a00df7450faf892f6f4ebed1c56d18b64e9315d810dd7774f55c
|
4
|
+
data.tar.gz: e209715c41348a5975f549f27babdc1d4e2c0473f6e935fff12148d2f2e7a5f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2319ac1964ce679181d45b9b79343604a90aad3149d3015ab1e8daf3e1edaf2045bf41aaba40680f371131f6278a363187caf2407b60fd7508cb4ecdc3792cdc
|
7
|
+
data.tar.gz: c8dae0921e4490b7a108cfbbb0a1ef0d93585fe8191c8e61dd2ef3debf624bd6333771d2f7ee24de638cb265f33653729e8def0e7bcc6812eeac689470f89a90
|
data/config/version.rb
CHANGED
@@ -46,7 +46,11 @@ module OrigenMemoryImage
|
|
46
46
|
end
|
47
47
|
# If a partial word is left over
|
48
48
|
if (remainder = data.length % (2 * options[:data_width_in_bytes])) > 0
|
49
|
-
|
49
|
+
if @ljust_partial_data
|
50
|
+
result << [@address, data[data.length - remainder..data.length].ljust(options[:data_width_in_bytes] * 2, '0').to_i(16)]
|
51
|
+
else
|
52
|
+
result << [@address, data[data.length - remainder..data.length].to_i(16)]
|
53
|
+
end
|
50
54
|
end
|
51
55
|
end
|
52
56
|
end
|
@@ -202,7 +202,11 @@ module OrigenMemoryImage
|
|
202
202
|
end
|
203
203
|
# If a partial word is left over
|
204
204
|
if (remainder = data.length % (2 * options[:data_width_in_bytes])) > 0
|
205
|
-
|
205
|
+
if @ljust_partial_data
|
206
|
+
result << [addr, data[data.length - remainder..data.length].ljust(options[:data_width_in_bytes] * 2, '0').to_i(16)]
|
207
|
+
else
|
208
|
+
result << [addr, data[data.length - remainder..data.length].to_i(16)]
|
209
|
+
end
|
206
210
|
end
|
207
211
|
end
|
208
212
|
end
|
data/templates/web/index.md.erb
CHANGED
@@ -58,6 +58,25 @@ my_srec = OrigenMemoryImage.new("source_files/test_atd.abs.S19")
|
|
58
58
|
my_hex = OrigenMemoryImage.new("source_files/math.hex")
|
59
59
|
~~~
|
60
60
|
|
61
|
+
By default any partial data words are right justified. Change this behavior to left justified like this:
|
62
|
+
|
63
|
+
~~~ruby
|
64
|
+
my_srec = OrigenMemoryImage.new("source_files/test_atd.abs.S19", ljust_partial_data: true)
|
65
|
+
my_hex = OrigenMemoryImage.new("source_files/math.hex", ljust_partial_data: true)
|
66
|
+
~~~
|
67
|
+
|
68
|
+
Partial data example:
|
69
|
+
|
70
|
+
~~~
|
71
|
+
0304FE
|
72
|
+
|
73
|
+
# Default interpretation into 32-bit word:
|
74
|
+
0x0003_04FE
|
75
|
+
|
76
|
+
# Left justified interpretation into 32-bit word:
|
77
|
+
0x0304_FE00
|
78
|
+
~~~
|
79
|
+
|
61
80
|
Memory images can also be created directly from a string:
|
62
81
|
|
63
82
|
~~~ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_memory_image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.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:
|
11
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -77,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 1.8.11
|
79
79
|
requirements: []
|
80
|
-
|
81
|
-
rubygems_version: 2.7.7
|
80
|
+
rubygems_version: 3.1.4
|
82
81
|
signing_key:
|
83
82
|
specification_version: 4
|
84
83
|
summary: Provides a standard API for consuming memory image files in any format e.g.
|