Skip to content

Print addresses for submaps in struct constant files#67

Merged
tgingold-cern merged 1 commit intotgingold-cern:masterfrom
lorenzschmid:struct-submap-addr
Aug 25, 2025
Merged

Print addresses for submaps in struct constant files#67
tgingold-cern merged 1 commit intotgingold-cern:masterfrom
lorenzschmid:struct-submap-addr

Conversation

@lorenzschmid
Copy link
Contributor

Currently, there are two types of constant files that can be generated in proto/cheby/print_consts.py:

  • ConstsVisitor
  • StructVisitor

For the later, each bit field is generated as a structure linked to its parent elements, e.g. in Matlab we get for a single field:

REG_TOP.status.idle.WIDTH = 1;
REG_TOP.status.idle.OFFSET = 0;
REG_TOP.status.idle.WIDTH = 1;

For any entry that is not a bit field such as submaps, no structure or constant is generated. This is particularly a problem when using nested register maps. This PR proposes now to include as the very least the address for submaps, e.g.

REG_TOP.submap.ADDR = 256;

@tgingold-cern tgingold-cern merged commit 665bc1d into tgingold-cern:master Aug 25, 2025
2 checks passed
@lorenzschmid lorenzschmid deleted the struct-submap-addr branch August 25, 2025 08:58
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.

2 participants