Skip to content

Conversation

@rivos-eblot
Copy link

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 implementations ot_entropy_src_eg.c and ot_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.c

It also addresses an issue with compact registers and a couple of other fixes.

@rivos-eblot rivos-eblot changed the title Add a register split feature to autoreg.py tools: autoreg.py: Add a register split feature Oct 24, 2025
@rivos-eblot rivos-eblot force-pushed the dev/eb/autoreg_improve branch from aa3a036 to 70db506 Compare October 24, 2025 08:20
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
@rivos-eblot rivos-eblot force-pushed the dev/eb/autoreg_improve branch from 70db506 to 7b2d02f Compare October 24, 2025 13:56
Copy link

@AlexJones0 AlexJones0 left a 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.

rivos-eblot and others added 7 commits October 24, 2025 17:17
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>
@rivos-eblot rivos-eblot force-pushed the dev/eb/autoreg_improve branch from 7b2d02f to 2069755 Compare October 24, 2025 15:17
@rivos-eblot rivos-eblot merged commit 763c277 into lowRISC:ot-9.2.0 Oct 28, 2025
10 checks passed
@rivos-eblot rivos-eblot deleted the dev/eb/autoreg_improve branch October 28, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants