rggen-default-register-map 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
  SHA256:
3
- metadata.gz: 6b815567272f89460c355d19f1b3a21a9a36aab4535b69c10bcdf03e0e9a1010
4
- data.tar.gz: 03f530e5ba5ba59df27091ccc60f556a3af2a35da957b510dc9e5bd26a623652
3
+ metadata.gz: a07cecea3878d609e000fc36d1e8f41e045686d28548774ba19b44d00089986f
4
+ data.tar.gz: 8347d41f0d9ffea4fa01e2d0860f2df4fcc2ab0e8d65ff9f1f7ab6ac84a79590
5
5
  SHA512:
6
- metadata.gz: 7b1d4026a8d5f6238d5f57761f4d60ddb9e4fc18b2335be03bb4576e940ccab52a85a5b187af418bc45d59f5e86d6ff84243d1e3c0e250524ed6928e514b7747
7
- data.tar.gz: d35ed9413a242cd9391b70a0b2f05878cd86ddd85e4e4e6f835bbb6bd052c5c598d0cca71048f50a72a6573d84c831a223f28d0e4c060df3ab9ed3e23f0cd076
6
+ metadata.gz: d6375a8b050dbb6ea1a22f384555272cb6b1afc63860d0307625447501b1121941a1fe350f6952f1057eed370e833173ec0497981f85c69ca6973cf518198ac1
7
+ data.tar.gz: 54fda95836bd1ab2442885e43e3bb405f81e80918c58f05d0213f09de34a58062de302896492bc157a460a3247d8e658cace7434219d03b5942b9c7a9b1cc5a2
@@ -87,6 +87,10 @@ RgGen.define_simple_feature(:bit_field, :reference) do
87
87
  end
88
88
  end
89
89
 
90
+ printable(:reference) do
91
+ reference? && @input_reference || nil
92
+ end
93
+
90
94
  private
91
95
 
92
96
  def settings
@@ -109,8 +109,8 @@ RgGen.define_list_feature(:bit_field, :type) do
109
109
  types.find(&value.to_sym.method(:casecmp?)) || value
110
110
  end
111
111
 
112
- def select_feature(cell)
113
- target_features[cell.value]
112
+ def target_feature_key(cell)
113
+ cell.value
114
114
  end
115
115
  end
116
116
  end
@@ -59,6 +59,8 @@ RgGen.define_list_feature(:register, :type) do
59
59
  message { 'no bit fields are given' }
60
60
  end
61
61
 
62
+ printable :type
63
+
62
64
  private
63
65
 
64
66
  attr_reader :options
@@ -98,12 +100,8 @@ RgGen.define_list_feature(:register, :type) do
98
100
  { type: find_type(type), options: Array(options) }
99
101
  end
100
102
 
101
- def select_feature(cell)
102
- if cell.empty_value?
103
- target_feature
104
- else
105
- target_features[cell.value[:type]]
106
- end
103
+ def target_feature_key(cell)
104
+ (!cell.empty_value? && cell.value[:type]) || nil
107
105
  end
108
106
 
109
107
  private
@@ -56,6 +56,10 @@ RgGen.define_list_item_feature(:register, :type, :indirect) do
56
56
  def find_index_field(bit_fields)
57
57
  bit_fields.find { |bit_field| bit_field.full_name == name }
58
58
  end
59
+
60
+ def to_s
61
+ [name, value].compact.join(': ')
62
+ end
59
63
  end
60
64
 
61
65
  property :index_entries
@@ -176,6 +180,10 @@ RgGen.define_list_item_feature(:register, :type, :indirect) do
176
180
  message { 'cannot be distinguished from other registers' }
177
181
  end
178
182
 
183
+ printable(:index_bit_fields) do
184
+ index_entries.map(&:to_s)
185
+ end
186
+
179
187
  private
180
188
 
181
189
  def parse_index_entries
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module DefaultRegisterMap
5
- VERSION = '0.15.0'
5
+ VERSION = '0.16.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-default-register-map
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
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-18 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,5 +92,5 @@ requirements: []
92
92
  rubygems_version: 3.0.3
93
93
  signing_key:
94
94
  specification_version: 4
95
- summary: rggen-default-register-map-0.15.0
95
+ summary: rggen-default-register-map-0.16.0
96
96
  test_files: []