Skip to content
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

RDL addr map name enforcement when doing buck builds #301

Open
nathanaelhuffman opened this issue Mar 5, 2025 · 0 comments
Open

RDL addr map name enforcement when doing buck builds #301

nathanaelhuffman opened this issue Mar 5, 2025 · 0 comments
Labels
build system Stuff related to buck2 and build-system infra rdl tooling issues/enhancements to rdl generated things

Comments

@nathanaelhuffman
Copy link
Collaborator

nathanaelhuffman commented Mar 5, 2025

We'd like to have even more consistency on how things are named, and enforce it pragmatically but we have to figure out how to do that without breaking our older designs.
Ideally we'd enforce that <some_name>.rdl will translate to
addrmap <some_name> but there are a bunch of strange cases around nesting plus making this change needs to be done inside our RDL tooling which is common for both buck2 and cobble based builds and so we probably need an escape hatch of some type.

@nathanaelhuffman nathanaelhuffman added build system Stuff related to buck2 and build-system infra rdl tooling issues/enhancements to rdl generated things labels Mar 5, 2025
nathanaelhuffman added a commit that referenced this issue Mar 6, 2025
Working with @mkeeter we're adding some improvements to the RDL
generation and I've made some naming convention enforcement to help
facilitate programatic consumption of the generated artifacts.

New Features:
- added "orig_type_name" to top level addrmap json so that the instance
name can be linked with the actual hardware generated .json. Remember,
we may have multiple copies of the same "hw" with different instance
names.
- added "addr_span_bytes" to the top level addrmap json to give a hint
to sw tool generation how many registers we have specified. Note that
there's a missing feature from SystemRDL spec that would allow reserving
undefined register space, so we're stuck telling sizes that are based
only on what we've defined. From a hw implementation perspective, it's
certainly safe to assume the peripheral owns up to the next power of 2
here, and possibly with a floor of 256byte addresses.

New Enforcement:
- To provide some naming consistency, we're now enforcing that buck2 rdl
targets end with "_rdl" so that it's easier to reason about, and then
enforce that output file names (which are user-specified) conform to the
expected patterns for software consumption. There are more improvements
to be made here #301 but
this is a functional start.

The new enforcement regime required doing some updates to various things
as seen in this PR as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Stuff related to buck2 and build-system infra rdl tooling issues/enhancements to rdl generated things
Projects
None yet
Development

No branches or pull requests

1 participant