rggen-duh 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 21a4dfe93b28bd15f58cd41f23054983596906407d7cfc47aad862f9afb0b4d8
4
+ data.tar.gz: 437207982100076e8212b3a1964730e47a8039b3d719e99f9c0def53e73d5f72
5
+ SHA512:
6
+ metadata.gz: 1bbd7db3d1de636f659ef919442aa56ce449538cc6106c8398b363ef00f1547f251ca4a9d98bf49f9631970a88a8e2be3f39691dc890525331a04e62f92626ff
7
+ data.tar.gz: 4aec9aaa0688094934b3ed20bae857540e228916f560f86640d471dcb549b4022d07791262b07b38fc444f647bdacecd14aa05e940a0f552c43dc3c6b8f7132b
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at taichi730@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Taichi Ishitani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,57 @@
1
+ [![Gem Version](https://badge.fury.io/rb/rggen-duh.svg)](https://badge.fury.io/rb/rggen-duh)
2
+ [![CI](https://github.com/rggen/rggen-duh/workflows/CI/badge.svg)](https://github.com/rggen/rggen-duh/actions?query=workflow%3ACI)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/7a4090f4a7c21d29036c/maintainability)](https://codeclimate.com/github/rggen/rggen-duh/maintainability)
4
+ [![codecov](https://codecov.io/gh/rggen/rggen-duh/branch/master/graph/badge.svg)](https://codecov.io/gh/rggen/rggen-duh)
5
+ [![Gitter](https://badges.gitter.im/rggen/rggen.svg)](https://gitter.im/rggen/rggen?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
6
+
7
+
8
+ # RgGen::DUH
9
+
10
+ RgGen::DUH adds ability to load register map documents written in [DUH](https://github.com/sifive/duh) format.
11
+
12
+ ## Installation
13
+
14
+ To install RgGen::DUH and required libraries, use the following command:
15
+
16
+ ```
17
+ $ gem install rggen-duh
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ You need to tell RgGen to load RgGen::DUH. There are two ways to do this:
23
+
24
+ ### `--plugin` runtime option
25
+
26
+ ```
27
+ $ rggen --plugin rggen-duh your_duh.json5
28
+ ```
29
+
30
+ ### `RGGEN_PLUGINS` environment variable
31
+
32
+ ```
33
+ $ export RGGEN_PLUGINS=${RGGEN_PLUGINS}:rggen-duh
34
+ $ rggen your_duh.json5
35
+ ```
36
+
37
+ ## Contact
38
+
39
+ Feedbacks, bug reports, questions and etc. are wellcome! You can post them by using following ways:
40
+
41
+ * [GitHub Issue Tracker](https://github.com/rggen/rggen-duh/issues)
42
+ * [Chat Room](https://gitter.im/rggen/rggen)
43
+ * [Mailing List](https://groups.google.com/d/forum/rggen)
44
+ * [Mail](mailto:rggen@googlegroups.com)
45
+
46
+ ## Copyright & License
47
+
48
+ Copyright © 2020 Taichi Ishitani. RgGen::DUH is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
49
+
50
+ ## Notice
51
+
52
+ RgGen::DUH includes the product generated from [duh-schema](https://github.com/sifive/duh-schema).
53
+ See [lib/rggen/duh/duh-schema/README.md](lib/rggen/duh/duh-schema/README.md) for futher details.
54
+
55
+ ## Code of Conduct
56
+
57
+ Everyone interacting in the Rggen::Duh project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rggen/rggen-duh/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+ require 'rb_json5'
5
+ require 'json_refs'
6
+ require 'json_schemer'
7
+ require_relative 'duh/version'
8
+ require_relative 'duh/validation_failed'
9
+ require_relative 'duh/schema'
10
+ require_relative 'duh/loader'
11
+
12
+ module RgGen
13
+ module DUH
14
+ PLUGIN_NAME = :'rggen-duh'
15
+
16
+ EXTRACTORS = [
17
+ 'duh/extractor/bit_assignment',
18
+ 'duh/extractor/simple_extractors',
19
+ 'duh/extractor/type'
20
+ ].freeze
21
+
22
+ def self.register_loader(builder)
23
+ builder.register_loader(:register_map, :duh, Loader)
24
+ end
25
+
26
+ def self.load_extractors
27
+ EXTRACTORS.each { |file| require_relative(file) }
28
+ end
29
+
30
+ def self.default_setup(builder)
31
+ register_loader(builder)
32
+ load_extractors
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ # duh-schema
2
+
3
+ The `schema.json` is generated from [duh-schema](https://github.com/sifive/duh-schema)
4
+ and is licensed unther the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0.txt).
5
+ See [LICENSE](LICENSE) for futher details.
6
+
7
+ Copyright SiFive. All Rights Reserved.
@@ -0,0 +1,2755 @@
1
+ {
2
+ "version": "0.10.0",
3
+ "any": {
4
+ "oneOf": [
5
+ {
6
+ "type": "object",
7
+ "title": "Catalog document",
8
+ "properties": {
9
+ "catalog": {
10
+ "type": "object",
11
+ "properties": {
12
+ "components": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "defs#/component"
16
+ }
17
+ },
18
+ "designs": {
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "defs#/design"
22
+ }
23
+ },
24
+ "busDefinitions": {
25
+ "type": "array",
26
+ "items": {
27
+ "$ref": "defs#/abstractionDefinition"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ },
33
+ "required": [
34
+ "catalog"
35
+ ]
36
+ },
37
+ {
38
+ "type": "object",
39
+ "title": "Component document",
40
+ "description": "\nComponent document collects information about a single hardware block without\nexpressing internal structure or hierarchy. Component document expressing following aspects:\n* name, version\n* top level ports\n* parameter schema\n* bus interfaces\n* memory regions\n* registers\n* clocks, resets\n* block generation flow\n* references to implementation, documentation, tests\n",
41
+ "required": [
42
+ "component"
43
+ ],
44
+ "properties": {
45
+ "component": {
46
+ "type": "object",
47
+ "required": [
48
+ "vendor",
49
+ "library",
50
+ "name",
51
+ "version"
52
+ ],
53
+ "properties": {
54
+ "vendor": {
55
+ "type": "string",
56
+ "minLength": 3,
57
+ "maxLength": 256,
58
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
59
+ },
60
+ "library": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 256,
64
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
65
+ },
66
+ "name": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 256,
70
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
71
+ },
72
+ "version": {
73
+ "type": "string"
74
+ },
75
+ "busInterfaces": {
76
+ "type": "array",
77
+ "uniqueItemProperties": [
78
+ "name"
79
+ ],
80
+ "items": {
81
+ "$ref": "defs#/busInterface"
82
+ }
83
+ },
84
+ "model": {
85
+ "type": "object",
86
+ "required": [
87
+ "ports"
88
+ ],
89
+ "properties": {
90
+ "ports": {
91
+ "title": "Ports",
92
+ "oneOf": [
93
+ {
94
+ "type": "object",
95
+ "patternProperties": {
96
+ ".+": {
97
+ "oneOf": [
98
+ {
99
+ "type": "integer"
100
+ },
101
+ {
102
+ "type": "string"
103
+ },
104
+ {
105
+ "type": "object",
106
+ "required": [
107
+ "direction",
108
+ "width"
109
+ ],
110
+ "properties": {
111
+ "direction": {
112
+ "enum": [
113
+ "in",
114
+ "out",
115
+ "inout"
116
+ ]
117
+ },
118
+ "width": {
119
+ "oneOf": [
120
+ {
121
+ "type": "integer",
122
+ "minimum": 1
123
+ },
124
+ {
125
+ "type": "string"
126
+ }
127
+ ]
128
+ },
129
+ "analog": {
130
+ "enum": [
131
+ "in",
132
+ "out",
133
+ "inout"
134
+ ]
135
+ },
136
+ "displayName": {
137
+ "type": "string"
138
+ },
139
+ "description": {
140
+ "type": "string"
141
+ }
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "type": "array",
150
+ "uniqueItemProperties": [
151
+ "name"
152
+ ],
153
+ "items": {
154
+ "type": "object",
155
+ "required": [
156
+ "name",
157
+ "wire"
158
+ ],
159
+ "properties": {
160
+ "name": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 256,
164
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
165
+ },
166
+ "wire": {
167
+ "oneOf": [
168
+ {
169
+ "type": "integer"
170
+ },
171
+ {
172
+ "type": "string"
173
+ },
174
+ {
175
+ "type": "object",
176
+ "required": [
177
+ "direction",
178
+ "width"
179
+ ],
180
+ "properties": {
181
+ "direction": {
182
+ "enum": [
183
+ "in",
184
+ "out",
185
+ "inout"
186
+ ]
187
+ },
188
+ "width": {
189
+ "oneOf": [
190
+ {
191
+ "type": "integer",
192
+ "minimum": 1
193
+ },
194
+ {
195
+ "type": "string"
196
+ }
197
+ ]
198
+ },
199
+ "analog": {
200
+ "enum": [
201
+ "in",
202
+ "out",
203
+ "inout"
204
+ ]
205
+ },
206
+ "displayName": {
207
+ "type": "string"
208
+ },
209
+ "description": {
210
+ "type": "string"
211
+ }
212
+ }
213
+ }
214
+ ]
215
+ }
216
+ }
217
+ }
218
+ }
219
+ ]
220
+ }
221
+ }
222
+ },
223
+ "addressSpaces": {
224
+ "type": "array",
225
+ "uniqueItemProperties": [
226
+ "name"
227
+ ],
228
+ "items": {
229
+ "type": "object",
230
+ "title": "Address space",
231
+ "required": [
232
+ "name",
233
+ "range",
234
+ "width"
235
+ ],
236
+ "properties": {
237
+ "name": {
238
+ "type": "string",
239
+ "minLength": 1,
240
+ "maxLength": 256,
241
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
242
+ },
243
+ "range": {
244
+ "type": "integer",
245
+ "minimum": 0
246
+ },
247
+ "width": {
248
+ "type": "integer",
249
+ "minimum": 0
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "memoryMaps": {
255
+ "type": "array",
256
+ "uniqueItemProperties": [
257
+ "name"
258
+ ],
259
+ "items": {
260
+ "$ref": "defs#/memoryMap"
261
+ }
262
+ },
263
+ "componentGenerators": {
264
+ "type": "array"
265
+ },
266
+ "fileSets": {
267
+ "type": "object"
268
+ },
269
+ "parameters": {
270
+ "type": "array"
271
+ }
272
+ }
273
+ }
274
+ }
275
+ },
276
+ {
277
+ "type": "object",
278
+ "title": "Desgin document",
279
+ "properties": {
280
+ "design": {
281
+ "type": "object",
282
+ "properties": {
283
+ "vendor": {
284
+ "type": "string",
285
+ "minLength": 3,
286
+ "maxLength": 256,
287
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
288
+ },
289
+ "library": {
290
+ "type": "string",
291
+ "minLength": 1,
292
+ "maxLength": 256,
293
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
294
+ },
295
+ "name": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "maxLength": 256,
299
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
300
+ },
301
+ "version": {
302
+ "type": "string"
303
+ },
304
+ "instances": {
305
+ "type": "array",
306
+ "uniqueItemProperties": [
307
+ "name"
308
+ ],
309
+ "items": {
310
+ "type": "object",
311
+ "properties": {
312
+ "name": {
313
+ "type": "string",
314
+ "minLength": 1,
315
+ "maxLength": 256,
316
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
317
+ },
318
+ "ref": {
319
+ "type": "object"
320
+ }
321
+ },
322
+ "required": [
323
+ "name",
324
+ "ref"
325
+ ]
326
+ }
327
+ },
328
+ "connections": {
329
+ "type": "array",
330
+ "items": {
331
+ "type": "object",
332
+ "properties": {
333
+ "name": {
334
+ "type": "string",
335
+ "minLength": 1,
336
+ "maxLength": 256,
337
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
338
+ },
339
+ "source": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "string"
343
+ },
344
+ "minItems": 2,
345
+ "maxItems": 2
346
+ },
347
+ "target": {
348
+ "type": "array",
349
+ "items": {
350
+ "type": "string"
351
+ },
352
+ "minItems": 2,
353
+ "maxItems": 2
354
+ },
355
+ "import": {
356
+ "type": "string",
357
+ "minLength": 1,
358
+ "maxLength": 256,
359
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
360
+ },
361
+ "export": {
362
+ "type": "string",
363
+ "minLength": 1,
364
+ "maxLength": 256,
365
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "adHocConnections": {
371
+ "type": "array",
372
+ "items": {
373
+ "type": "object",
374
+ "properties": {
375
+ "name": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "maxLength": 256,
379
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
380
+ },
381
+ "portReferences": {
382
+ "type": "array",
383
+ "items": {
384
+ "type": "object",
385
+ "oneOf": [
386
+ {
387
+ "properties": {
388
+ "kind": {
389
+ "enum": [
390
+ "internal"
391
+ ]
392
+ },
393
+ "componentRef": {
394
+ "type": "object"
395
+ },
396
+ "portRef": {
397
+ "type": "string",
398
+ "minLength": 1,
399
+ "maxLength": 256,
400
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
401
+ }
402
+ },
403
+ "required": [
404
+ "portRef",
405
+ "componentRef"
406
+ ]
407
+ },
408
+ {
409
+ "properties": {
410
+ "kind": {
411
+ "enum": [
412
+ "extrenal"
413
+ ]
414
+ },
415
+ "portRef": {
416
+ "type": "string",
417
+ "minLength": 1,
418
+ "maxLength": 256,
419
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
420
+ }
421
+ },
422
+ "required": [
423
+ "portRef"
424
+ ]
425
+ }
426
+ ]
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ },
433
+ "required": [
434
+ "vendor",
435
+ "library",
436
+ "name",
437
+ "version"
438
+ ]
439
+ }
440
+ },
441
+ "required": [
442
+ "design"
443
+ ]
444
+ },
445
+ {
446
+ "type": "object",
447
+ "title": "Abstraction definition document",
448
+ "required": [
449
+ "abstractionDefinition"
450
+ ],
451
+ "properties": {
452
+ "abstractionDefinition": {
453
+ "type": "object",
454
+ "required": [
455
+ "name",
456
+ "version",
457
+ "vendor",
458
+ "library",
459
+ "busType",
460
+ "ports"
461
+ ],
462
+ "properties": {
463
+ "name": {
464
+ "type": "string",
465
+ "minLength": 1,
466
+ "maxLength": 256,
467
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
468
+ },
469
+ "version": {
470
+ "type": "string"
471
+ },
472
+ "vendor": {
473
+ "type": "string",
474
+ "minLength": 3,
475
+ "maxLength": 256,
476
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
477
+ },
478
+ "library": {
479
+ "type": "string",
480
+ "minLength": 1,
481
+ "maxLength": 256,
482
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
483
+ },
484
+ "busType": {
485
+ "type": "object",
486
+ "required": [
487
+ "name",
488
+ "version",
489
+ "vendor",
490
+ "library"
491
+ ],
492
+ "properties": {
493
+ "name": {
494
+ "type": "string",
495
+ "minLength": 1,
496
+ "maxLength": 256,
497
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
498
+ },
499
+ "version": {
500
+ "type": "string"
501
+ },
502
+ "vendor": {
503
+ "type": "string",
504
+ "minLength": 3,
505
+ "maxLength": 256,
506
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
507
+ },
508
+ "library": {
509
+ "type": "string",
510
+ "minLength": 1,
511
+ "maxLength": 256,
512
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
513
+ }
514
+ }
515
+ },
516
+ "ports": {
517
+ "type": "object",
518
+ "patternProperties": {
519
+ ".+": {
520
+ "type": "object",
521
+ "required": [
522
+ "description",
523
+ "wire"
524
+ ],
525
+ "properties": {
526
+ "description": {
527
+ "type": "string"
528
+ },
529
+ "wire": {
530
+ "type": "object",
531
+ "properties": {
532
+ "onMaster": {
533
+ "type": "object",
534
+ "properties": {
535
+ "direction": {
536
+ "enum": [
537
+ "in",
538
+ "out"
539
+ ]
540
+ },
541
+ "width": {
542
+ "oneOf": [
543
+ {
544
+ "type": "integer"
545
+ },
546
+ {
547
+ "type": "string"
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ "oneOf": [
553
+ {
554
+ "required": [
555
+ "direction"
556
+ ],
557
+ "properties": {
558
+ "presence": {
559
+ "enum": [
560
+ "optional",
561
+ "required"
562
+ ]
563
+ }
564
+ }
565
+ },
566
+ {
567
+ "required": [
568
+ "presence"
569
+ ],
570
+ "properties": {
571
+ "presence": {
572
+ "enum": [
573
+ "illegal"
574
+ ]
575
+ }
576
+ }
577
+ }
578
+ ]
579
+ },
580
+ "onSlave": {
581
+ "type": "object",
582
+ "properties": {
583
+ "direction": {
584
+ "enum": [
585
+ "in",
586
+ "out"
587
+ ]
588
+ },
589
+ "width": {
590
+ "oneOf": [
591
+ {
592
+ "type": "integer"
593
+ },
594
+ {
595
+ "type": "string"
596
+ }
597
+ ]
598
+ }
599
+ },
600
+ "oneOf": [
601
+ {
602
+ "required": [
603
+ "direction"
604
+ ],
605
+ "properties": {
606
+ "presence": {
607
+ "enum": [
608
+ "optional",
609
+ "required"
610
+ ]
611
+ }
612
+ }
613
+ },
614
+ {
615
+ "required": [
616
+ "presence"
617
+ ],
618
+ "properties": {
619
+ "presence": {
620
+ "enum": [
621
+ "illegal"
622
+ ]
623
+ }
624
+ }
625
+ }
626
+ ]
627
+ },
628
+ "onInitiator": {
629
+ "type": "object",
630
+ "properties": {
631
+ "direction": {
632
+ "enum": [
633
+ "in",
634
+ "out"
635
+ ]
636
+ },
637
+ "width": {
638
+ "oneOf": [
639
+ {
640
+ "type": "integer"
641
+ },
642
+ {
643
+ "type": "string"
644
+ }
645
+ ]
646
+ }
647
+ },
648
+ "oneOf": [
649
+ {
650
+ "required": [
651
+ "direction"
652
+ ],
653
+ "properties": {
654
+ "presence": {
655
+ "enum": [
656
+ "optional",
657
+ "required"
658
+ ]
659
+ }
660
+ }
661
+ },
662
+ {
663
+ "required": [
664
+ "presence"
665
+ ],
666
+ "properties": {
667
+ "presence": {
668
+ "enum": [
669
+ "illegal"
670
+ ]
671
+ }
672
+ }
673
+ }
674
+ ]
675
+ },
676
+ "onTarget": {
677
+ "type": "object",
678
+ "properties": {
679
+ "direction": {
680
+ "enum": [
681
+ "in",
682
+ "out"
683
+ ]
684
+ },
685
+ "width": {
686
+ "oneOf": [
687
+ {
688
+ "type": "integer"
689
+ },
690
+ {
691
+ "type": "string"
692
+ }
693
+ ]
694
+ }
695
+ },
696
+ "oneOf": [
697
+ {
698
+ "required": [
699
+ "direction"
700
+ ],
701
+ "properties": {
702
+ "presence": {
703
+ "enum": [
704
+ "optional",
705
+ "required"
706
+ ]
707
+ }
708
+ }
709
+ },
710
+ {
711
+ "required": [
712
+ "presence"
713
+ ],
714
+ "properties": {
715
+ "presence": {
716
+ "enum": [
717
+ "illegal"
718
+ ]
719
+ }
720
+ }
721
+ }
722
+ ]
723
+ },
724
+ "isAddress": {
725
+ "description": "the port contains address information",
726
+ "type": "boolean",
727
+ "default": false
728
+ },
729
+ "isData": {
730
+ "description": "the port contains data information",
731
+ "type": "boolean",
732
+ "default": false
733
+ },
734
+ "isClock": {
735
+ "description": "port is a clock for this bus interface",
736
+ "type": "boolean",
737
+ "default": false
738
+ },
739
+ "isReset": {
740
+ "description": "port is a reset for this bus interface",
741
+ "type": "boolean",
742
+ "default": false
743
+ },
744
+ "requiresDriver": {
745
+ "description": "specifies whether the port requires a driver when used in a completed design",
746
+ "type": "boolean",
747
+ "default": false
748
+ },
749
+ "defaultValue": {
750
+ "description": "default logic value for this wire port",
751
+ "type": "integer",
752
+ "minimum": 0,
753
+ "default": 0
754
+ }
755
+ }
756
+ }
757
+ }
758
+ }
759
+ }
760
+ },
761
+ "props": {
762
+ "type": "object",
763
+ "patternProperties": {
764
+ ".+": {
765
+ "type": "object",
766
+ "properties": {
767
+ "type": {
768
+ "enum": [
769
+ "array",
770
+ "boolean",
771
+ "integer",
772
+ "null",
773
+ "number",
774
+ "object",
775
+ "string"
776
+ ]
777
+ },
778
+ "description": {
779
+ "type": "string"
780
+ },
781
+ "properties": {
782
+ "type": "object"
783
+ },
784
+ "allOf": {
785
+ "type": "array",
786
+ "minItems": 1
787
+ },
788
+ "anyOf": {
789
+ "type": "array",
790
+ "minItems": 1
791
+ },
792
+ "oneOf": {
793
+ "type": "array",
794
+ "minItems": 1
795
+ }
796
+ }
797
+ }
798
+ }
799
+ }
800
+ }
801
+ }
802
+ }
803
+ },
804
+ {
805
+ "type": "object",
806
+ "title": "Bus definition document",
807
+ "required": [
808
+ "busDefinition"
809
+ ],
810
+ "properties": {
811
+ "busDefinition": {
812
+ "type": "object",
813
+ "required": [
814
+ "name",
815
+ "version",
816
+ "vendor",
817
+ "library"
818
+ ],
819
+ "properties": {
820
+ "name": {
821
+ "type": "string",
822
+ "minLength": 1,
823
+ "maxLength": 256,
824
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
825
+ },
826
+ "version": {
827
+ "type": "string"
828
+ },
829
+ "vendor": {
830
+ "type": "string",
831
+ "minLength": 3,
832
+ "maxLength": 256,
833
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
834
+ },
835
+ "library": {
836
+ "type": "string",
837
+ "minLength": 1,
838
+ "maxLength": 256,
839
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
840
+ },
841
+ "description": {
842
+ "type": "string"
843
+ }
844
+ }
845
+ }
846
+ }
847
+ }
848
+ ]
849
+ },
850
+ "component": {
851
+ "type": "object",
852
+ "title": "Component document",
853
+ "description": "\nComponent document collects information about a single hardware block without\nexpressing internal structure or hierarchy. Component document expressing following aspects:\n* name, version\n* top level ports\n* parameter schema\n* bus interfaces\n* memory regions\n* registers\n* clocks, resets\n* block generation flow\n* references to implementation, documentation, tests\n",
854
+ "required": [
855
+ "component"
856
+ ],
857
+ "properties": {
858
+ "component": {
859
+ "type": "object",
860
+ "required": [
861
+ "vendor",
862
+ "library",
863
+ "name",
864
+ "version"
865
+ ],
866
+ "properties": {
867
+ "vendor": {
868
+ "type": "string",
869
+ "minLength": 3,
870
+ "maxLength": 256,
871
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
872
+ },
873
+ "library": {
874
+ "type": "string",
875
+ "minLength": 1,
876
+ "maxLength": 256,
877
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
878
+ },
879
+ "name": {
880
+ "type": "string",
881
+ "minLength": 1,
882
+ "maxLength": 256,
883
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
884
+ },
885
+ "version": {
886
+ "type": "string"
887
+ },
888
+ "busInterfaces": {
889
+ "type": "array",
890
+ "uniqueItemProperties": [
891
+ "name"
892
+ ],
893
+ "items": {
894
+ "$ref": "defs#/busInterface"
895
+ }
896
+ },
897
+ "model": {
898
+ "type": "object",
899
+ "required": [
900
+ "ports"
901
+ ],
902
+ "properties": {
903
+ "ports": {
904
+ "title": "Ports",
905
+ "oneOf": [
906
+ {
907
+ "type": "object",
908
+ "patternProperties": {
909
+ ".+": {
910
+ "oneOf": [
911
+ {
912
+ "type": "integer"
913
+ },
914
+ {
915
+ "type": "string"
916
+ },
917
+ {
918
+ "type": "object",
919
+ "required": [
920
+ "direction",
921
+ "width"
922
+ ],
923
+ "properties": {
924
+ "direction": {
925
+ "enum": [
926
+ "in",
927
+ "out",
928
+ "inout"
929
+ ]
930
+ },
931
+ "width": {
932
+ "oneOf": [
933
+ {
934
+ "type": "integer",
935
+ "minimum": 1
936
+ },
937
+ {
938
+ "type": "string"
939
+ }
940
+ ]
941
+ },
942
+ "analog": {
943
+ "enum": [
944
+ "in",
945
+ "out",
946
+ "inout"
947
+ ]
948
+ },
949
+ "displayName": {
950
+ "type": "string"
951
+ },
952
+ "description": {
953
+ "type": "string"
954
+ }
955
+ }
956
+ }
957
+ ]
958
+ }
959
+ }
960
+ },
961
+ {
962
+ "type": "array",
963
+ "uniqueItemProperties": [
964
+ "name"
965
+ ],
966
+ "items": {
967
+ "type": "object",
968
+ "required": [
969
+ "name",
970
+ "wire"
971
+ ],
972
+ "properties": {
973
+ "name": {
974
+ "type": "string",
975
+ "minLength": 1,
976
+ "maxLength": 256,
977
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
978
+ },
979
+ "wire": {
980
+ "oneOf": [
981
+ {
982
+ "type": "integer"
983
+ },
984
+ {
985
+ "type": "string"
986
+ },
987
+ {
988
+ "type": "object",
989
+ "required": [
990
+ "direction",
991
+ "width"
992
+ ],
993
+ "properties": {
994
+ "direction": {
995
+ "enum": [
996
+ "in",
997
+ "out",
998
+ "inout"
999
+ ]
1000
+ },
1001
+ "width": {
1002
+ "oneOf": [
1003
+ {
1004
+ "type": "integer",
1005
+ "minimum": 1
1006
+ },
1007
+ {
1008
+ "type": "string"
1009
+ }
1010
+ ]
1011
+ },
1012
+ "analog": {
1013
+ "enum": [
1014
+ "in",
1015
+ "out",
1016
+ "inout"
1017
+ ]
1018
+ },
1019
+ "displayName": {
1020
+ "type": "string"
1021
+ },
1022
+ "description": {
1023
+ "type": "string"
1024
+ }
1025
+ }
1026
+ }
1027
+ ]
1028
+ }
1029
+ }
1030
+ }
1031
+ }
1032
+ ]
1033
+ }
1034
+ }
1035
+ },
1036
+ "addressSpaces": {
1037
+ "type": "array",
1038
+ "uniqueItemProperties": [
1039
+ "name"
1040
+ ],
1041
+ "items": {
1042
+ "type": "object",
1043
+ "title": "Address space",
1044
+ "required": [
1045
+ "name",
1046
+ "range",
1047
+ "width"
1048
+ ],
1049
+ "properties": {
1050
+ "name": {
1051
+ "type": "string",
1052
+ "minLength": 1,
1053
+ "maxLength": 256,
1054
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1055
+ },
1056
+ "range": {
1057
+ "type": "integer",
1058
+ "minimum": 0
1059
+ },
1060
+ "width": {
1061
+ "type": "integer",
1062
+ "minimum": 0
1063
+ }
1064
+ }
1065
+ }
1066
+ },
1067
+ "memoryMaps": {
1068
+ "type": "array",
1069
+ "uniqueItemProperties": [
1070
+ "name"
1071
+ ],
1072
+ "items": {
1073
+ "$ref": "defs#/memoryMap"
1074
+ }
1075
+ },
1076
+ "componentGenerators": {
1077
+ "type": "array"
1078
+ },
1079
+ "fileSets": {
1080
+ "type": "object"
1081
+ },
1082
+ "parameters": {
1083
+ "type": "array"
1084
+ }
1085
+ }
1086
+ }
1087
+ }
1088
+ },
1089
+ "abstractionDefinition": {
1090
+ "type": "object",
1091
+ "title": "Abstraction definition document",
1092
+ "required": [
1093
+ "abstractionDefinition"
1094
+ ],
1095
+ "properties": {
1096
+ "abstractionDefinition": {
1097
+ "type": "object",
1098
+ "required": [
1099
+ "name",
1100
+ "version",
1101
+ "vendor",
1102
+ "library",
1103
+ "busType",
1104
+ "ports"
1105
+ ],
1106
+ "properties": {
1107
+ "name": {
1108
+ "type": "string",
1109
+ "minLength": 1,
1110
+ "maxLength": 256,
1111
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1112
+ },
1113
+ "version": {
1114
+ "type": "string"
1115
+ },
1116
+ "vendor": {
1117
+ "type": "string",
1118
+ "minLength": 3,
1119
+ "maxLength": 256,
1120
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1121
+ },
1122
+ "library": {
1123
+ "type": "string",
1124
+ "minLength": 1,
1125
+ "maxLength": 256,
1126
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1127
+ },
1128
+ "busType": {
1129
+ "type": "object",
1130
+ "required": [
1131
+ "name",
1132
+ "version",
1133
+ "vendor",
1134
+ "library"
1135
+ ],
1136
+ "properties": {
1137
+ "name": {
1138
+ "type": "string",
1139
+ "minLength": 1,
1140
+ "maxLength": 256,
1141
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1142
+ },
1143
+ "version": {
1144
+ "type": "string"
1145
+ },
1146
+ "vendor": {
1147
+ "type": "string",
1148
+ "minLength": 3,
1149
+ "maxLength": 256,
1150
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1151
+ },
1152
+ "library": {
1153
+ "type": "string",
1154
+ "minLength": 1,
1155
+ "maxLength": 256,
1156
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1157
+ }
1158
+ }
1159
+ },
1160
+ "ports": {
1161
+ "type": "object",
1162
+ "patternProperties": {
1163
+ ".+": {
1164
+ "type": "object",
1165
+ "required": [
1166
+ "description",
1167
+ "wire"
1168
+ ],
1169
+ "properties": {
1170
+ "description": {
1171
+ "type": "string"
1172
+ },
1173
+ "wire": {
1174
+ "type": "object",
1175
+ "properties": {
1176
+ "onMaster": {
1177
+ "type": "object",
1178
+ "properties": {
1179
+ "direction": {
1180
+ "enum": [
1181
+ "in",
1182
+ "out"
1183
+ ]
1184
+ },
1185
+ "width": {
1186
+ "oneOf": [
1187
+ {
1188
+ "type": "integer"
1189
+ },
1190
+ {
1191
+ "type": "string"
1192
+ }
1193
+ ]
1194
+ }
1195
+ },
1196
+ "oneOf": [
1197
+ {
1198
+ "required": [
1199
+ "direction"
1200
+ ],
1201
+ "properties": {
1202
+ "presence": {
1203
+ "enum": [
1204
+ "optional",
1205
+ "required"
1206
+ ]
1207
+ }
1208
+ }
1209
+ },
1210
+ {
1211
+ "required": [
1212
+ "presence"
1213
+ ],
1214
+ "properties": {
1215
+ "presence": {
1216
+ "enum": [
1217
+ "illegal"
1218
+ ]
1219
+ }
1220
+ }
1221
+ }
1222
+ ]
1223
+ },
1224
+ "onSlave": {
1225
+ "type": "object",
1226
+ "properties": {
1227
+ "direction": {
1228
+ "enum": [
1229
+ "in",
1230
+ "out"
1231
+ ]
1232
+ },
1233
+ "width": {
1234
+ "oneOf": [
1235
+ {
1236
+ "type": "integer"
1237
+ },
1238
+ {
1239
+ "type": "string"
1240
+ }
1241
+ ]
1242
+ }
1243
+ },
1244
+ "oneOf": [
1245
+ {
1246
+ "required": [
1247
+ "direction"
1248
+ ],
1249
+ "properties": {
1250
+ "presence": {
1251
+ "enum": [
1252
+ "optional",
1253
+ "required"
1254
+ ]
1255
+ }
1256
+ }
1257
+ },
1258
+ {
1259
+ "required": [
1260
+ "presence"
1261
+ ],
1262
+ "properties": {
1263
+ "presence": {
1264
+ "enum": [
1265
+ "illegal"
1266
+ ]
1267
+ }
1268
+ }
1269
+ }
1270
+ ]
1271
+ },
1272
+ "onInitiator": {
1273
+ "type": "object",
1274
+ "properties": {
1275
+ "direction": {
1276
+ "enum": [
1277
+ "in",
1278
+ "out"
1279
+ ]
1280
+ },
1281
+ "width": {
1282
+ "oneOf": [
1283
+ {
1284
+ "type": "integer"
1285
+ },
1286
+ {
1287
+ "type": "string"
1288
+ }
1289
+ ]
1290
+ }
1291
+ },
1292
+ "oneOf": [
1293
+ {
1294
+ "required": [
1295
+ "direction"
1296
+ ],
1297
+ "properties": {
1298
+ "presence": {
1299
+ "enum": [
1300
+ "optional",
1301
+ "required"
1302
+ ]
1303
+ }
1304
+ }
1305
+ },
1306
+ {
1307
+ "required": [
1308
+ "presence"
1309
+ ],
1310
+ "properties": {
1311
+ "presence": {
1312
+ "enum": [
1313
+ "illegal"
1314
+ ]
1315
+ }
1316
+ }
1317
+ }
1318
+ ]
1319
+ },
1320
+ "onTarget": {
1321
+ "type": "object",
1322
+ "properties": {
1323
+ "direction": {
1324
+ "enum": [
1325
+ "in",
1326
+ "out"
1327
+ ]
1328
+ },
1329
+ "width": {
1330
+ "oneOf": [
1331
+ {
1332
+ "type": "integer"
1333
+ },
1334
+ {
1335
+ "type": "string"
1336
+ }
1337
+ ]
1338
+ }
1339
+ },
1340
+ "oneOf": [
1341
+ {
1342
+ "required": [
1343
+ "direction"
1344
+ ],
1345
+ "properties": {
1346
+ "presence": {
1347
+ "enum": [
1348
+ "optional",
1349
+ "required"
1350
+ ]
1351
+ }
1352
+ }
1353
+ },
1354
+ {
1355
+ "required": [
1356
+ "presence"
1357
+ ],
1358
+ "properties": {
1359
+ "presence": {
1360
+ "enum": [
1361
+ "illegal"
1362
+ ]
1363
+ }
1364
+ }
1365
+ }
1366
+ ]
1367
+ },
1368
+ "isAddress": {
1369
+ "description": "the port contains address information",
1370
+ "type": "boolean",
1371
+ "default": false
1372
+ },
1373
+ "isData": {
1374
+ "description": "the port contains data information",
1375
+ "type": "boolean",
1376
+ "default": false
1377
+ },
1378
+ "isClock": {
1379
+ "description": "port is a clock for this bus interface",
1380
+ "type": "boolean",
1381
+ "default": false
1382
+ },
1383
+ "isReset": {
1384
+ "description": "port is a reset for this bus interface",
1385
+ "type": "boolean",
1386
+ "default": false
1387
+ },
1388
+ "requiresDriver": {
1389
+ "description": "specifies whether the port requires a driver when used in a completed design",
1390
+ "type": "boolean",
1391
+ "default": false
1392
+ },
1393
+ "defaultValue": {
1394
+ "description": "default logic value for this wire port",
1395
+ "type": "integer",
1396
+ "minimum": 0,
1397
+ "default": 0
1398
+ }
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ }
1404
+ },
1405
+ "props": {
1406
+ "type": "object",
1407
+ "patternProperties": {
1408
+ ".+": {
1409
+ "type": "object",
1410
+ "properties": {
1411
+ "type": {
1412
+ "enum": [
1413
+ "array",
1414
+ "boolean",
1415
+ "integer",
1416
+ "null",
1417
+ "number",
1418
+ "object",
1419
+ "string"
1420
+ ]
1421
+ },
1422
+ "description": {
1423
+ "type": "string"
1424
+ },
1425
+ "properties": {
1426
+ "type": "object"
1427
+ },
1428
+ "allOf": {
1429
+ "type": "array",
1430
+ "minItems": 1
1431
+ },
1432
+ "anyOf": {
1433
+ "type": "array",
1434
+ "minItems": 1
1435
+ },
1436
+ "oneOf": {
1437
+ "type": "array",
1438
+ "minItems": 1
1439
+ }
1440
+ }
1441
+ }
1442
+ }
1443
+ }
1444
+ }
1445
+ }
1446
+ }
1447
+ },
1448
+ "defs": {
1449
+ "$id": "defs",
1450
+ "catalog": {
1451
+ "type": "object",
1452
+ "title": "Catalog document",
1453
+ "properties": {
1454
+ "catalog": {
1455
+ "type": "object",
1456
+ "properties": {
1457
+ "components": {
1458
+ "type": "array",
1459
+ "items": {
1460
+ "$ref": "defs#/component"
1461
+ }
1462
+ },
1463
+ "designs": {
1464
+ "type": "array",
1465
+ "items": {
1466
+ "$ref": "defs#/design"
1467
+ }
1468
+ },
1469
+ "busDefinitions": {
1470
+ "type": "array",
1471
+ "items": {
1472
+ "$ref": "defs#/abstractionDefinition"
1473
+ }
1474
+ }
1475
+ }
1476
+ }
1477
+ },
1478
+ "required": [
1479
+ "catalog"
1480
+ ]
1481
+ },
1482
+ "component": {
1483
+ "type": "object",
1484
+ "title": "Component document",
1485
+ "description": "\nComponent document collects information about a single hardware block without\nexpressing internal structure or hierarchy. Component document expressing following aspects:\n* name, version\n* top level ports\n* parameter schema\n* bus interfaces\n* memory regions\n* registers\n* clocks, resets\n* block generation flow\n* references to implementation, documentation, tests\n",
1486
+ "required": [
1487
+ "component"
1488
+ ],
1489
+ "properties": {
1490
+ "component": {
1491
+ "type": "object",
1492
+ "required": [
1493
+ "vendor",
1494
+ "library",
1495
+ "name",
1496
+ "version"
1497
+ ],
1498
+ "properties": {
1499
+ "vendor": {
1500
+ "type": "string",
1501
+ "minLength": 3,
1502
+ "maxLength": 256,
1503
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1504
+ },
1505
+ "library": {
1506
+ "type": "string",
1507
+ "minLength": 1,
1508
+ "maxLength": 256,
1509
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1510
+ },
1511
+ "name": {
1512
+ "type": "string",
1513
+ "minLength": 1,
1514
+ "maxLength": 256,
1515
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1516
+ },
1517
+ "version": {
1518
+ "type": "string"
1519
+ },
1520
+ "busInterfaces": {
1521
+ "type": "array",
1522
+ "uniqueItemProperties": [
1523
+ "name"
1524
+ ],
1525
+ "items": {
1526
+ "$ref": "defs#/busInterface"
1527
+ }
1528
+ },
1529
+ "model": {
1530
+ "type": "object",
1531
+ "required": [
1532
+ "ports"
1533
+ ],
1534
+ "properties": {
1535
+ "ports": {
1536
+ "title": "Ports",
1537
+ "oneOf": [
1538
+ {
1539
+ "type": "object",
1540
+ "patternProperties": {
1541
+ ".+": {
1542
+ "oneOf": [
1543
+ {
1544
+ "type": "integer"
1545
+ },
1546
+ {
1547
+ "type": "string"
1548
+ },
1549
+ {
1550
+ "type": "object",
1551
+ "required": [
1552
+ "direction",
1553
+ "width"
1554
+ ],
1555
+ "properties": {
1556
+ "direction": {
1557
+ "enum": [
1558
+ "in",
1559
+ "out",
1560
+ "inout"
1561
+ ]
1562
+ },
1563
+ "width": {
1564
+ "oneOf": [
1565
+ {
1566
+ "type": "integer",
1567
+ "minimum": 1
1568
+ },
1569
+ {
1570
+ "type": "string"
1571
+ }
1572
+ ]
1573
+ },
1574
+ "analog": {
1575
+ "enum": [
1576
+ "in",
1577
+ "out",
1578
+ "inout"
1579
+ ]
1580
+ },
1581
+ "displayName": {
1582
+ "type": "string"
1583
+ },
1584
+ "description": {
1585
+ "type": "string"
1586
+ }
1587
+ }
1588
+ }
1589
+ ]
1590
+ }
1591
+ }
1592
+ },
1593
+ {
1594
+ "type": "array",
1595
+ "uniqueItemProperties": [
1596
+ "name"
1597
+ ],
1598
+ "items": {
1599
+ "type": "object",
1600
+ "required": [
1601
+ "name",
1602
+ "wire"
1603
+ ],
1604
+ "properties": {
1605
+ "name": {
1606
+ "type": "string",
1607
+ "minLength": 1,
1608
+ "maxLength": 256,
1609
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1610
+ },
1611
+ "wire": {
1612
+ "oneOf": [
1613
+ {
1614
+ "type": "integer"
1615
+ },
1616
+ {
1617
+ "type": "string"
1618
+ },
1619
+ {
1620
+ "type": "object",
1621
+ "required": [
1622
+ "direction",
1623
+ "width"
1624
+ ],
1625
+ "properties": {
1626
+ "direction": {
1627
+ "enum": [
1628
+ "in",
1629
+ "out",
1630
+ "inout"
1631
+ ]
1632
+ },
1633
+ "width": {
1634
+ "oneOf": [
1635
+ {
1636
+ "type": "integer",
1637
+ "minimum": 1
1638
+ },
1639
+ {
1640
+ "type": "string"
1641
+ }
1642
+ ]
1643
+ },
1644
+ "analog": {
1645
+ "enum": [
1646
+ "in",
1647
+ "out",
1648
+ "inout"
1649
+ ]
1650
+ },
1651
+ "displayName": {
1652
+ "type": "string"
1653
+ },
1654
+ "description": {
1655
+ "type": "string"
1656
+ }
1657
+ }
1658
+ }
1659
+ ]
1660
+ }
1661
+ }
1662
+ }
1663
+ }
1664
+ ]
1665
+ }
1666
+ }
1667
+ },
1668
+ "addressSpaces": {
1669
+ "type": "array",
1670
+ "uniqueItemProperties": [
1671
+ "name"
1672
+ ],
1673
+ "items": {
1674
+ "type": "object",
1675
+ "title": "Address space",
1676
+ "required": [
1677
+ "name",
1678
+ "range",
1679
+ "width"
1680
+ ],
1681
+ "properties": {
1682
+ "name": {
1683
+ "type": "string",
1684
+ "minLength": 1,
1685
+ "maxLength": 256,
1686
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1687
+ },
1688
+ "range": {
1689
+ "type": "integer",
1690
+ "minimum": 0
1691
+ },
1692
+ "width": {
1693
+ "type": "integer",
1694
+ "minimum": 0
1695
+ }
1696
+ }
1697
+ }
1698
+ },
1699
+ "memoryMaps": {
1700
+ "type": "array",
1701
+ "uniqueItemProperties": [
1702
+ "name"
1703
+ ],
1704
+ "items": {
1705
+ "$ref": "defs#/memoryMap"
1706
+ }
1707
+ },
1708
+ "componentGenerators": {
1709
+ "type": "array"
1710
+ },
1711
+ "fileSets": {
1712
+ "type": "object"
1713
+ },
1714
+ "parameters": {
1715
+ "type": "array"
1716
+ }
1717
+ }
1718
+ }
1719
+ }
1720
+ },
1721
+ "design": {
1722
+ "type": "object",
1723
+ "title": "Desgin document",
1724
+ "properties": {
1725
+ "design": {
1726
+ "type": "object",
1727
+ "properties": {
1728
+ "vendor": {
1729
+ "type": "string",
1730
+ "minLength": 3,
1731
+ "maxLength": 256,
1732
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1733
+ },
1734
+ "library": {
1735
+ "type": "string",
1736
+ "minLength": 1,
1737
+ "maxLength": 256,
1738
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1739
+ },
1740
+ "name": {
1741
+ "type": "string",
1742
+ "minLength": 1,
1743
+ "maxLength": 256,
1744
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1745
+ },
1746
+ "version": {
1747
+ "type": "string"
1748
+ },
1749
+ "instances": {
1750
+ "type": "array",
1751
+ "uniqueItemProperties": [
1752
+ "name"
1753
+ ],
1754
+ "items": {
1755
+ "type": "object",
1756
+ "properties": {
1757
+ "name": {
1758
+ "type": "string",
1759
+ "minLength": 1,
1760
+ "maxLength": 256,
1761
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1762
+ },
1763
+ "ref": {
1764
+ "type": "object"
1765
+ }
1766
+ },
1767
+ "required": [
1768
+ "name",
1769
+ "ref"
1770
+ ]
1771
+ }
1772
+ },
1773
+ "connections": {
1774
+ "type": "array",
1775
+ "items": {
1776
+ "type": "object",
1777
+ "properties": {
1778
+ "name": {
1779
+ "type": "string",
1780
+ "minLength": 1,
1781
+ "maxLength": 256,
1782
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1783
+ },
1784
+ "source": {
1785
+ "type": "array",
1786
+ "items": {
1787
+ "type": "string"
1788
+ },
1789
+ "minItems": 2,
1790
+ "maxItems": 2
1791
+ },
1792
+ "target": {
1793
+ "type": "array",
1794
+ "items": {
1795
+ "type": "string"
1796
+ },
1797
+ "minItems": 2,
1798
+ "maxItems": 2
1799
+ },
1800
+ "import": {
1801
+ "type": "string",
1802
+ "minLength": 1,
1803
+ "maxLength": 256,
1804
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1805
+ },
1806
+ "export": {
1807
+ "type": "string",
1808
+ "minLength": 1,
1809
+ "maxLength": 256,
1810
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1811
+ }
1812
+ }
1813
+ }
1814
+ },
1815
+ "adHocConnections": {
1816
+ "type": "array",
1817
+ "items": {
1818
+ "type": "object",
1819
+ "properties": {
1820
+ "name": {
1821
+ "type": "string",
1822
+ "minLength": 1,
1823
+ "maxLength": 256,
1824
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1825
+ },
1826
+ "portReferences": {
1827
+ "type": "array",
1828
+ "items": {
1829
+ "type": "object",
1830
+ "oneOf": [
1831
+ {
1832
+ "properties": {
1833
+ "kind": {
1834
+ "enum": [
1835
+ "internal"
1836
+ ]
1837
+ },
1838
+ "componentRef": {
1839
+ "type": "object"
1840
+ },
1841
+ "portRef": {
1842
+ "type": "string",
1843
+ "minLength": 1,
1844
+ "maxLength": 256,
1845
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1846
+ }
1847
+ },
1848
+ "required": [
1849
+ "portRef",
1850
+ "componentRef"
1851
+ ]
1852
+ },
1853
+ {
1854
+ "properties": {
1855
+ "kind": {
1856
+ "enum": [
1857
+ "extrenal"
1858
+ ]
1859
+ },
1860
+ "portRef": {
1861
+ "type": "string",
1862
+ "minLength": 1,
1863
+ "maxLength": 256,
1864
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1865
+ }
1866
+ },
1867
+ "required": [
1868
+ "portRef"
1869
+ ]
1870
+ }
1871
+ ]
1872
+ }
1873
+ }
1874
+ }
1875
+ }
1876
+ }
1877
+ },
1878
+ "required": [
1879
+ "vendor",
1880
+ "library",
1881
+ "name",
1882
+ "version"
1883
+ ]
1884
+ }
1885
+ },
1886
+ "required": [
1887
+ "design"
1888
+ ]
1889
+ },
1890
+ "abstractionDefinition": {
1891
+ "type": "object",
1892
+ "title": "Abstraction definition document",
1893
+ "required": [
1894
+ "abstractionDefinition"
1895
+ ],
1896
+ "properties": {
1897
+ "abstractionDefinition": {
1898
+ "type": "object",
1899
+ "required": [
1900
+ "name",
1901
+ "version",
1902
+ "vendor",
1903
+ "library",
1904
+ "busType",
1905
+ "ports"
1906
+ ],
1907
+ "properties": {
1908
+ "name": {
1909
+ "type": "string",
1910
+ "minLength": 1,
1911
+ "maxLength": 256,
1912
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1913
+ },
1914
+ "version": {
1915
+ "type": "string"
1916
+ },
1917
+ "vendor": {
1918
+ "type": "string",
1919
+ "minLength": 3,
1920
+ "maxLength": 256,
1921
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1922
+ },
1923
+ "library": {
1924
+ "type": "string",
1925
+ "minLength": 1,
1926
+ "maxLength": 256,
1927
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1928
+ },
1929
+ "busType": {
1930
+ "type": "object",
1931
+ "required": [
1932
+ "name",
1933
+ "version",
1934
+ "vendor",
1935
+ "library"
1936
+ ],
1937
+ "properties": {
1938
+ "name": {
1939
+ "type": "string",
1940
+ "minLength": 1,
1941
+ "maxLength": 256,
1942
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
1943
+ },
1944
+ "version": {
1945
+ "type": "string"
1946
+ },
1947
+ "vendor": {
1948
+ "type": "string",
1949
+ "minLength": 3,
1950
+ "maxLength": 256,
1951
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
1952
+ },
1953
+ "library": {
1954
+ "type": "string",
1955
+ "minLength": 1,
1956
+ "maxLength": 256,
1957
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
1958
+ }
1959
+ }
1960
+ },
1961
+ "ports": {
1962
+ "type": "object",
1963
+ "patternProperties": {
1964
+ ".+": {
1965
+ "type": "object",
1966
+ "required": [
1967
+ "description",
1968
+ "wire"
1969
+ ],
1970
+ "properties": {
1971
+ "description": {
1972
+ "type": "string"
1973
+ },
1974
+ "wire": {
1975
+ "type": "object",
1976
+ "properties": {
1977
+ "onMaster": {
1978
+ "type": "object",
1979
+ "properties": {
1980
+ "direction": {
1981
+ "enum": [
1982
+ "in",
1983
+ "out"
1984
+ ]
1985
+ },
1986
+ "width": {
1987
+ "oneOf": [
1988
+ {
1989
+ "type": "integer"
1990
+ },
1991
+ {
1992
+ "type": "string"
1993
+ }
1994
+ ]
1995
+ }
1996
+ },
1997
+ "oneOf": [
1998
+ {
1999
+ "required": [
2000
+ "direction"
2001
+ ],
2002
+ "properties": {
2003
+ "presence": {
2004
+ "enum": [
2005
+ "optional",
2006
+ "required"
2007
+ ]
2008
+ }
2009
+ }
2010
+ },
2011
+ {
2012
+ "required": [
2013
+ "presence"
2014
+ ],
2015
+ "properties": {
2016
+ "presence": {
2017
+ "enum": [
2018
+ "illegal"
2019
+ ]
2020
+ }
2021
+ }
2022
+ }
2023
+ ]
2024
+ },
2025
+ "onSlave": {
2026
+ "type": "object",
2027
+ "properties": {
2028
+ "direction": {
2029
+ "enum": [
2030
+ "in",
2031
+ "out"
2032
+ ]
2033
+ },
2034
+ "width": {
2035
+ "oneOf": [
2036
+ {
2037
+ "type": "integer"
2038
+ },
2039
+ {
2040
+ "type": "string"
2041
+ }
2042
+ ]
2043
+ }
2044
+ },
2045
+ "oneOf": [
2046
+ {
2047
+ "required": [
2048
+ "direction"
2049
+ ],
2050
+ "properties": {
2051
+ "presence": {
2052
+ "enum": [
2053
+ "optional",
2054
+ "required"
2055
+ ]
2056
+ }
2057
+ }
2058
+ },
2059
+ {
2060
+ "required": [
2061
+ "presence"
2062
+ ],
2063
+ "properties": {
2064
+ "presence": {
2065
+ "enum": [
2066
+ "illegal"
2067
+ ]
2068
+ }
2069
+ }
2070
+ }
2071
+ ]
2072
+ },
2073
+ "onInitiator": {
2074
+ "type": "object",
2075
+ "properties": {
2076
+ "direction": {
2077
+ "enum": [
2078
+ "in",
2079
+ "out"
2080
+ ]
2081
+ },
2082
+ "width": {
2083
+ "oneOf": [
2084
+ {
2085
+ "type": "integer"
2086
+ },
2087
+ {
2088
+ "type": "string"
2089
+ }
2090
+ ]
2091
+ }
2092
+ },
2093
+ "oneOf": [
2094
+ {
2095
+ "required": [
2096
+ "direction"
2097
+ ],
2098
+ "properties": {
2099
+ "presence": {
2100
+ "enum": [
2101
+ "optional",
2102
+ "required"
2103
+ ]
2104
+ }
2105
+ }
2106
+ },
2107
+ {
2108
+ "required": [
2109
+ "presence"
2110
+ ],
2111
+ "properties": {
2112
+ "presence": {
2113
+ "enum": [
2114
+ "illegal"
2115
+ ]
2116
+ }
2117
+ }
2118
+ }
2119
+ ]
2120
+ },
2121
+ "onTarget": {
2122
+ "type": "object",
2123
+ "properties": {
2124
+ "direction": {
2125
+ "enum": [
2126
+ "in",
2127
+ "out"
2128
+ ]
2129
+ },
2130
+ "width": {
2131
+ "oneOf": [
2132
+ {
2133
+ "type": "integer"
2134
+ },
2135
+ {
2136
+ "type": "string"
2137
+ }
2138
+ ]
2139
+ }
2140
+ },
2141
+ "oneOf": [
2142
+ {
2143
+ "required": [
2144
+ "direction"
2145
+ ],
2146
+ "properties": {
2147
+ "presence": {
2148
+ "enum": [
2149
+ "optional",
2150
+ "required"
2151
+ ]
2152
+ }
2153
+ }
2154
+ },
2155
+ {
2156
+ "required": [
2157
+ "presence"
2158
+ ],
2159
+ "properties": {
2160
+ "presence": {
2161
+ "enum": [
2162
+ "illegal"
2163
+ ]
2164
+ }
2165
+ }
2166
+ }
2167
+ ]
2168
+ },
2169
+ "isAddress": {
2170
+ "description": "the port contains address information",
2171
+ "type": "boolean",
2172
+ "default": false
2173
+ },
2174
+ "isData": {
2175
+ "description": "the port contains data information",
2176
+ "type": "boolean",
2177
+ "default": false
2178
+ },
2179
+ "isClock": {
2180
+ "description": "port is a clock for this bus interface",
2181
+ "type": "boolean",
2182
+ "default": false
2183
+ },
2184
+ "isReset": {
2185
+ "description": "port is a reset for this bus interface",
2186
+ "type": "boolean",
2187
+ "default": false
2188
+ },
2189
+ "requiresDriver": {
2190
+ "description": "specifies whether the port requires a driver when used in a completed design",
2191
+ "type": "boolean",
2192
+ "default": false
2193
+ },
2194
+ "defaultValue": {
2195
+ "description": "default logic value for this wire port",
2196
+ "type": "integer",
2197
+ "minimum": 0,
2198
+ "default": 0
2199
+ }
2200
+ }
2201
+ }
2202
+ }
2203
+ }
2204
+ }
2205
+ },
2206
+ "props": {
2207
+ "type": "object",
2208
+ "patternProperties": {
2209
+ ".+": {
2210
+ "type": "object",
2211
+ "properties": {
2212
+ "type": {
2213
+ "enum": [
2214
+ "array",
2215
+ "boolean",
2216
+ "integer",
2217
+ "null",
2218
+ "number",
2219
+ "object",
2220
+ "string"
2221
+ ]
2222
+ },
2223
+ "description": {
2224
+ "type": "string"
2225
+ },
2226
+ "properties": {
2227
+ "type": "object"
2228
+ },
2229
+ "allOf": {
2230
+ "type": "array",
2231
+ "minItems": 1
2232
+ },
2233
+ "anyOf": {
2234
+ "type": "array",
2235
+ "minItems": 1
2236
+ },
2237
+ "oneOf": {
2238
+ "type": "array",
2239
+ "minItems": 1
2240
+ }
2241
+ }
2242
+ }
2243
+ }
2244
+ }
2245
+ }
2246
+ }
2247
+ }
2248
+ },
2249
+ "busDefinition": {
2250
+ "type": "object",
2251
+ "title": "Bus definition document",
2252
+ "required": [
2253
+ "busDefinition"
2254
+ ],
2255
+ "properties": {
2256
+ "busDefinition": {
2257
+ "type": "object",
2258
+ "required": [
2259
+ "name",
2260
+ "version",
2261
+ "vendor",
2262
+ "library"
2263
+ ],
2264
+ "properties": {
2265
+ "name": {
2266
+ "type": "string",
2267
+ "minLength": 1,
2268
+ "maxLength": 256,
2269
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2270
+ },
2271
+ "version": {
2272
+ "type": "string"
2273
+ },
2274
+ "vendor": {
2275
+ "type": "string",
2276
+ "minLength": 3,
2277
+ "maxLength": 256,
2278
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
2279
+ },
2280
+ "library": {
2281
+ "type": "string",
2282
+ "minLength": 1,
2283
+ "maxLength": 256,
2284
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
2285
+ },
2286
+ "description": {
2287
+ "type": "string"
2288
+ }
2289
+ }
2290
+ }
2291
+ }
2292
+ },
2293
+ "busInterface": {
2294
+ "type": "object",
2295
+ "title": "Bus interface",
2296
+ "required": [
2297
+ "name",
2298
+ "busType"
2299
+ ],
2300
+ "properties": {
2301
+ "name": {
2302
+ "type": "string",
2303
+ "minLength": 1,
2304
+ "maxLength": 256,
2305
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2306
+ },
2307
+ "displayName": {
2308
+ "type": "string"
2309
+ },
2310
+ "description": {
2311
+ "type": "string"
2312
+ },
2313
+ "interfaceMode": {
2314
+ "enum": [
2315
+ "master",
2316
+ "slave",
2317
+ "initiator",
2318
+ "target",
2319
+ "monitor",
2320
+ null
2321
+ ]
2322
+ },
2323
+ "memoryMapRef": {
2324
+ "type": "string"
2325
+ },
2326
+ "busType": {
2327
+ "oneOf": [
2328
+ {
2329
+ "type": "object",
2330
+ "required": [
2331
+ "vendor",
2332
+ "library",
2333
+ "name",
2334
+ "version"
2335
+ ],
2336
+ "properties": {
2337
+ "vendor": {
2338
+ "type": "string",
2339
+ "minLength": 3,
2340
+ "maxLength": 256,
2341
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
2342
+ },
2343
+ "library": {
2344
+ "type": "string",
2345
+ "minLength": 1,
2346
+ "maxLength": 256,
2347
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
2348
+ },
2349
+ "name": {
2350
+ "type": "string",
2351
+ "minLength": 1,
2352
+ "maxLength": 256,
2353
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2354
+ },
2355
+ "version": {
2356
+ "type": "string"
2357
+ }
2358
+ }
2359
+ },
2360
+ {
2361
+ "type": "string"
2362
+ }
2363
+ ]
2364
+ },
2365
+ "abstractionTypes": {
2366
+ "type": "array",
2367
+ "items": {
2368
+ "type": "object",
2369
+ "properties": {
2370
+ "viewRef": {
2371
+ "type": "string",
2372
+ "minLength": 1,
2373
+ "maxLength": 256,
2374
+ "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
2375
+ },
2376
+ "portMaps": {
2377
+ "oneOf": [
2378
+ {
2379
+ "type": "object",
2380
+ "patternProperties": {
2381
+ ".+": {
2382
+ "$ref": "defs#/bundle"
2383
+ }
2384
+ }
2385
+ },
2386
+ {
2387
+ "type": "array",
2388
+ "items": {
2389
+ "type": "string"
2390
+ }
2391
+ }
2392
+ ]
2393
+ }
2394
+ }
2395
+ }
2396
+ }
2397
+ }
2398
+ },
2399
+ "memoryMap": {
2400
+ "type": "object",
2401
+ "title": "Memory map",
2402
+ "required": [
2403
+ "name",
2404
+ "addressBlocks"
2405
+ ],
2406
+ "properties": {
2407
+ "name": {
2408
+ "type": "string",
2409
+ "minLength": 1,
2410
+ "maxLength": 256,
2411
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2412
+ },
2413
+ "addressUnitBits": {
2414
+ "enum": [
2415
+ 1,
2416
+ 2,
2417
+ 4,
2418
+ 8,
2419
+ 16,
2420
+ 32,
2421
+ 64,
2422
+ 128,
2423
+ 256,
2424
+ 512,
2425
+ 1024
2426
+ ],
2427
+ "default": 8
2428
+ },
2429
+ "addressBlocks": {
2430
+ "type": "array",
2431
+ "uniqueItemProperties": [
2432
+ "name"
2433
+ ],
2434
+ "items": {
2435
+ "type": "object",
2436
+ "title": "Address block",
2437
+ "required": [
2438
+ "name",
2439
+ "baseAddress",
2440
+ "range",
2441
+ "width"
2442
+ ],
2443
+ "properties": {
2444
+ "name": {
2445
+ "type": "string",
2446
+ "minLength": 1,
2447
+ "maxLength": 256,
2448
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2449
+ },
2450
+ "baseAddress": {
2451
+ "type": "integer",
2452
+ "minimum": 0
2453
+ },
2454
+ "range": {
2455
+ "type": "integer",
2456
+ "minimum": 0
2457
+ },
2458
+ "width": {
2459
+ "type": "integer",
2460
+ "minimum": 0
2461
+ },
2462
+ "usage": {
2463
+ "enum": [
2464
+ "memory",
2465
+ "register"
2466
+ ]
2467
+ },
2468
+ "volatile": {
2469
+ "type": "boolean"
2470
+ },
2471
+ "access": {
2472
+ "description": "specifies the accessibility of the data in the address block",
2473
+ "enum": [
2474
+ "read-write",
2475
+ "read-only",
2476
+ "write-only",
2477
+ "read-writeOnce",
2478
+ "writeOnce"
2479
+ ]
2480
+ },
2481
+ "registers": {
2482
+ "type": "array",
2483
+ "uniqueItemProperties": [
2484
+ "name"
2485
+ ],
2486
+ "items": {
2487
+ "$ref": "defs#/register"
2488
+ }
2489
+ },
2490
+ "registerFiles": {
2491
+ "type": "array",
2492
+ "uniqueItemProperties": [
2493
+ "name"
2494
+ ],
2495
+ "items": {
2496
+ "type": "object",
2497
+ "title": "Register file",
2498
+ "required": [
2499
+ "name",
2500
+ "addressOffset",
2501
+ "range"
2502
+ ],
2503
+ "properties": {
2504
+ "name": {
2505
+ "type": "string",
2506
+ "minLength": 1,
2507
+ "maxLength": 256,
2508
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2509
+ },
2510
+ "addressOffset": {
2511
+ "oneOf": [
2512
+ {
2513
+ "type": "string",
2514
+ "minLength": 1,
2515
+ "maxLength": 256
2516
+ },
2517
+ {
2518
+ "type": "integer",
2519
+ "minimum": 0
2520
+ }
2521
+ ]
2522
+ },
2523
+ "range": {
2524
+ "type": "integer",
2525
+ "minimum": 0
2526
+ },
2527
+ "registers": {
2528
+ "type": "array",
2529
+ "uniqueItemProperties": [
2530
+ "name"
2531
+ ],
2532
+ "items": {
2533
+ "$ref": "defs#/register"
2534
+ }
2535
+ }
2536
+ }
2537
+ }
2538
+ }
2539
+ }
2540
+ }
2541
+ }
2542
+ }
2543
+ },
2544
+ "register": {
2545
+ "type": "object",
2546
+ "title": "Register",
2547
+ "required": [
2548
+ "name",
2549
+ "addressOffset",
2550
+ "size"
2551
+ ],
2552
+ "properties": {
2553
+ "name": {
2554
+ "type": "string",
2555
+ "minLength": 1,
2556
+ "maxLength": 256,
2557
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2558
+ },
2559
+ "addressOffset": {
2560
+ "oneOf": [
2561
+ {
2562
+ "type": "string",
2563
+ "minLength": 1,
2564
+ "maxLength": 256
2565
+ },
2566
+ {
2567
+ "type": "integer",
2568
+ "minimum": 0
2569
+ }
2570
+ ]
2571
+ },
2572
+ "size": {
2573
+ "oneOf": [
2574
+ {
2575
+ "type": "string",
2576
+ "minLength": 1,
2577
+ "maxLength": 256
2578
+ },
2579
+ {
2580
+ "type": "integer",
2581
+ "minimum": 0
2582
+ }
2583
+ ]
2584
+ },
2585
+ "access": {
2586
+ "description": "specifies the accessibility of the data in the address block",
2587
+ "enum": [
2588
+ "read-write",
2589
+ "read-only",
2590
+ "write-only",
2591
+ "read-writeOnce",
2592
+ "writeOnce"
2593
+ ]
2594
+ },
2595
+ "displayName": {
2596
+ "type": "string"
2597
+ },
2598
+ "description": {
2599
+ "type": "string"
2600
+ },
2601
+ "fields": {
2602
+ "type": "array",
2603
+ "uniqueItemProperties": [
2604
+ "name"
2605
+ ],
2606
+ "items": {
2607
+ "type": "object",
2608
+ "title": "Register field",
2609
+ "required": [
2610
+ "name",
2611
+ "bitOffset",
2612
+ "bitWidth"
2613
+ ],
2614
+ "properties": {
2615
+ "name": {
2616
+ "type": "string",
2617
+ "minLength": 1,
2618
+ "maxLength": 256,
2619
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2620
+ },
2621
+ "description": {
2622
+ "type": "string"
2623
+ },
2624
+ "bitOffset": {
2625
+ "oneOf": [
2626
+ {
2627
+ "type": "string",
2628
+ "minLength": 1,
2629
+ "maxLength": 256
2630
+ },
2631
+ {
2632
+ "type": "integer",
2633
+ "minimum": 0
2634
+ }
2635
+ ]
2636
+ },
2637
+ "resetValue": {
2638
+ "type": "integer"
2639
+ },
2640
+ "bitWidth": {
2641
+ "oneOf": [
2642
+ {
2643
+ "type": "string",
2644
+ "minLength": 1,
2645
+ "maxLength": 256
2646
+ },
2647
+ {
2648
+ "type": "integer",
2649
+ "minimum": 0
2650
+ }
2651
+ ]
2652
+ },
2653
+ "volatile": {
2654
+ "type": "boolean"
2655
+ },
2656
+ "access": {
2657
+ "description": "specifies the accessibility of the data in the address block",
2658
+ "enum": [
2659
+ "read-write",
2660
+ "read-only",
2661
+ "write-only",
2662
+ "read-writeOnce",
2663
+ "writeOnce"
2664
+ ]
2665
+ },
2666
+ "enumeratedValues": {
2667
+ "type": "array",
2668
+ "uniqueItemProperties": [
2669
+ "name"
2670
+ ],
2671
+ "items": {
2672
+ "type": "object",
2673
+ "title": "Enumerated values",
2674
+ "required": [
2675
+ "name",
2676
+ "value"
2677
+ ],
2678
+ "properties": {
2679
+ "name": {
2680
+ "type": "string",
2681
+ "minLength": 1,
2682
+ "maxLength": 256,
2683
+ "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
2684
+ },
2685
+ "description": {
2686
+ "type": "string"
2687
+ },
2688
+ "displayName": {
2689
+ "type": "string"
2690
+ },
2691
+ "value": {
2692
+ "type": "integer"
2693
+ }
2694
+ }
2695
+ }
2696
+ },
2697
+ "modifiedWriteValue": {
2698
+ "description": "manipulation of data written to a field",
2699
+ "enum": [
2700
+ "oneToClear",
2701
+ "oneToSet",
2702
+ "oneToToggle",
2703
+ "zeroToClear",
2704
+ "zeroToSet",
2705
+ "zeroToToggle",
2706
+ "clear",
2707
+ "set",
2708
+ "modify"
2709
+ ]
2710
+ },
2711
+ "readAction": {
2712
+ "description": "an action that happens to a field after a read operation happens",
2713
+ "enum": [
2714
+ "clear",
2715
+ "set",
2716
+ "modify"
2717
+ ]
2718
+ },
2719
+ "testable": {
2720
+ "type": "boolean"
2721
+ },
2722
+ "reserved": {
2723
+ "type": "boolean"
2724
+ }
2725
+ }
2726
+ }
2727
+ },
2728
+ "resetValue": {
2729
+ "type": "integer"
2730
+ }
2731
+ }
2732
+ },
2733
+ "bundle": {
2734
+ "oneOf": [
2735
+ {
2736
+ "type": "string"
2737
+ },
2738
+ {
2739
+ "type": "array",
2740
+ "items": {
2741
+ "type": "string"
2742
+ }
2743
+ },
2744
+ {
2745
+ "type": "object",
2746
+ "patternProperties": {
2747
+ ".+": {
2748
+ "$ref": "defs#/bundle"
2749
+ }
2750
+ }
2751
+ }
2752
+ ]
2753
+ }
2754
+ }
2755
+ }