-
Notifications
You must be signed in to change notification settings - Fork 13
tools: autoreg.py: Add a register split feature
#256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rivos-eblot
merged 8 commits into
lowRISC:ot-9.2.0
from
rivos-eblot:dev/eb/autoreg_improve
Oct 28, 2025
Merged
tools: autoreg.py: Add a register split feature
#256
rivos-eblot
merged 8 commits into
lowRISC:ot-9.2.0
from
rivos-eblot:dev/eb/autoreg_improve
Oct 28, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tools: autoreg.py: Add a register split feature
aa3a036 to
70db506
Compare
AlexJones0
reviewed
Oct 24, 2025
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
70db506 to
7b2d02f
Compare
AlexJones0
approved these changes
Oct 24, 2025
AlexJones0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't thoroughly checked some of the moved code and the new reg groups but this generally looks good to me, especially if it is producing correct outputs for ot_entropy_src.
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
… fails It does not help to report `No names found: cannot describe anything` to the parent stderr. Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
…r log-time as pyot.py Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
…reg registers Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
In opentitan repo the "bits" field for register in hjson for specific
IP should be text value, like:
...
{ bits: "0"
name: "increment"
resval: 0x0
...
If there is a mistake and "bits" field is integer:
...
{ bits: 0
name: "increment"
resval: 0x0
...
the scripts/autoreg.py script fails. The typo should be fixed in
OpenTitan repo but add small prevention to handle such cases.
Signed-off-by: Mateusz Półchłopek <mateusz.polchlopek@plasteli.net>
7b2d02f to
2069755
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This updated version is used for the upcoming reconciliation of
ot_entropy_src, which will support version v2 and v3 as a single implementation, rather than the current dual implementationsot_entropy_src_eg.candot_entropy_src_dj.c.This feature is used to split a register range into a subregion, so they can be mapped to specific locations within a device, examples:
scripts/opentitan/autoreg.py -c ot-eg-1.0.0/hw/ip/entropy_src/data/entropy_src.hjson -g all -r enter \ -S intr_state:lo -S rev:rev -S module_enable:hi -o ot_entropy_src_eg.c scripts/opentitan/autoreg.py -c ot-master/hw/ip/entropy_src/data/entropy_src.hjson -g all -r enter \ -S intr_state:lo -S module_enable:hi -d ot_entropy_src_dj.cIt also addresses an issue with compact registers and a couple of other fixes.