Add core register schema with protocol version #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following discussions in #22, this PR introduces a core register schema with a
protocolVersion
field specifying the minimum semantic version mandating a given set of common registers.The new JSON schema is named
core.json
and is to be used by both the common register metadata file and each of thedevice.yml
files.The common register metadata file is also renamed to
core.yml
to avoid the unusual terminology of "common". In Harp parlance, the "core" is always what we talk about when discussing requirements for hardware devices. There is no direct reference to this metadata file other than from the generator and analysis packages, which will be themselves updated in the near future to embed the newcore.yml
. Since these packages distribute their own snapshots, changing and renaming this file is not expected to be breaking.Also added regex validation patterns for all version strings, adapted from semantic versioning with only a major and minor version component:
^(0|[1-9]\\d*)\.(0|[1-9]\d*)$
Fixes #22
Fixes #65