rggen-duh 0.4.0 → 0.5.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: e8753598715323fe1661953c0ac8dfcc383af8e706f477cce7939057d02f9d80
4
- data.tar.gz: afd26bf399f874c8da572dc2f31546a2e90ffd7796680976597813665fd25203
3
+ metadata.gz: 6b5ce08e269e78df704f19710e47175c0767d0c09f0f9d97b8fef2365dd3d7b9
4
+ data.tar.gz: 80800a7f97dc36786d61ed1773e71fc1ce7f618506584bf8194f40c4b779820a
5
5
  SHA512:
6
- metadata.gz: 70c580a15060fdd7c4a35cdb2a1bac1e6e5d817b13626f800f0c668d37550ab8de29749380098b35a1a012fc66da56a2ed4ca16e2b279e49d58a0e4cf7bb73cd
7
- data.tar.gz: c6b5dc5000fa248aee619bc100a9887fdd6e5a2f9b7138f82461094699abdaac3b4c6ecf3217d6212d420e13f2018eb93c2ce821a1819c0cfa9dad3818da4b06
6
+ metadata.gz: 91021bac959ff0d798cb32e08b9bc43d366b0e6b7b1e0348087eee61db022c49b74e2550ad731861cd33e894786e0f528ca95dadecd766418448aaa98c0d998e
7
+ data.tar.gz: 3bbde57d20911503ad739f5bd2d8ffba5c61f1e599383725cb6f1ae7e102358401f17bc917f79e09eaa2eb18f2122457f4d0a08fe9480db73e324110762802c3
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020-2021 Taichi Ishitani
3
+ Copyright (c) 2020-2022 Taichi Ishitani
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -40,9 +40,14 @@ Following table describes which RgGen bit field types are supported by DUH forma
40
40
  | RgGen bit field type | Support? | access | modifiedWriteValue | readAction | reserved |
41
41
  |:---------------------|:---------|:---------------|:-------------------|:--------------|:---------|
42
42
  | rw | yes | read-write | not specified | not specified | no |
43
+ | rwtrg | no | | | | |
43
44
  | ro | yes | read-only | don't care | not specified | no |
44
- | rof | no | | | | no |
45
+ | rotrg | no | | | | |
46
+ | rowo | no | | | | |
47
+ | rowotrg | no | | | | |
48
+ | rof | no | | | | |
45
49
  | wo | yes | write-only | not specified | don't care | no |
50
+ | wotrg | no | | | | |
46
51
  | wrc | yes | read-write | not specified | clear | no |
47
52
  | wrs | yes | read-write | not specified | set | no |
48
53
  | rc | yes | read-only | don't care | clear | no |
@@ -82,7 +87,7 @@ Feedbacks, bug reports, questions and etc. are wellcome! You can post them by us
82
87
 
83
88
  ## Copyright & License
84
89
 
85
- Copyright © 2020-2021 Taichi Ishitani. RgGen::DUH is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
90
+ Copyright © 2020-2022 Taichi Ishitani. RgGen::DUH is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
86
91
 
87
92
  ## Notice
88
93
 
@@ -42,9 +42,14 @@ module RgGen
42
42
  }.freeze
43
43
 
44
44
  def format_sub_layer_data(read_data, layer, _file)
45
- SUB_LAYERS[layer]&.each_with_object({}) do |sub_layer, sub_layer_data|
46
- data = __send__("collect_#{sub_layer}_data", read_data)
47
- data && (sub_layer_data[sub_layer] = data)
45
+ SUB_LAYERS[layer]&.each_with_object([]) do |sub_layer, sub_layer_data|
46
+ data =
47
+ if layer == :root
48
+ collect_register_block_data(read_data)
49
+ else
50
+ collect_sub_layer_data(read_data, sub_layer)
51
+ end
52
+ data && sub_layer_data.concat([sub_layer].product(data))
48
53
  end
49
54
  end
50
55
 
@@ -61,21 +66,15 @@ module RgGen
61
66
  &.compact
62
67
  end
63
68
 
64
- def collect_register_file_data(read_data)
65
- read_data['registerFiles']&.map do |data|
66
- add_parent_and_layer_properties(data, read_data, :register_file)
67
- end
68
- end
69
-
70
- def collect_register_data(read_data)
71
- read_data['registers']&.map do |data|
72
- add_parent_and_layer_properties(data, read_data, :register)
73
- end
74
- end
69
+ KEY_MAP = {
70
+ register_file: 'registerFiles',
71
+ register: 'registers',
72
+ bit_field: 'fields'
73
+ }.freeze
75
74
 
76
- def collect_bit_field_data(read_data)
77
- read_data['fields']&.map do |data|
78
- add_parent_and_layer_properties(data, read_data, :bit_field)
75
+ def collect_sub_layer_data(read_data, sub_layer)
76
+ read_data[KEY_MAP[sub_layer]]&.map do |data|
77
+ add_parent_and_layer_properties(data, read_data, sub_layer)
79
78
  end
80
79
  end
81
80
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module DUH
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-duh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.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: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_refs
@@ -94,6 +94,7 @@ licenses:
94
94
  metadata:
95
95
  bug_tracker_uri: https://github.com/rggen/rggen-duh/issues
96
96
  mailing_list_uri: https://groups.google.com/d/forum/rggen
97
+ rubygems_mfa_required: 'true'
97
98
  source_code_uri: https://github.com/rggen/rggen-duh
98
99
  wiki_uri: https://github.com/rggen/rggen/wiki
99
100
  post_install_message:
@@ -104,15 +105,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
105
  requirements:
105
106
  - - ">="
106
107
  - !ruby/object:Gem::Version
107
- version: '2.5'
108
+ version: '2.6'
108
109
  required_rubygems_version: !ruby/object:Gem::Requirement
109
110
  requirements:
110
111
  - - ">="
111
112
  - !ruby/object:Gem::Version
112
113
  version: '0'
113
114
  requirements: []
114
- rubygems_version: 3.2.3
115
+ rubygems_version: 3.3.3
115
116
  signing_key:
116
117
  specification_version: 4
117
- summary: rggen-dut-0.4.0
118
+ summary: rggen-dut-0.5.0
118
119
  test_files: []