Skip to content

Conversation

@dhower-qc
Copy link
Collaborator

@dhower-qc dhower-qc commented Apr 4, 2025

  • Adds IDL support to lookup a CSR by indirect address
  • Removes CSR[expression] syntax for CSR direct address lookup
  • Adds generated functions to lookup by direct address and read/write looked-up CSRs
  • Adds a writeable field to CSR schemas (rather than depending on direct address convention)
  • Adds CFG option for test:idl.

For example:

./do test:idl CFG=qc_iu

closes #589

This lets us test idl for any config from the command line:

./do test:idl qc_iu
This does three things:

* Remove `CSR[expression]` syntax for direct CSR reads
** `CSR[csr_name]` still works
* Adds `direct_csr_lookup`/`csr_{hw,sw}_{read,write}` functions to access a
  CSR with a direct address
* Adds `indirect_csr_lookup` to access an indirect CSR with an indirect address
This adds a boolean writeable field to the CSR schema. We need this for two reasons:

* Indirect CSRs that have no address convention
* CSRs like mscontext that don't follow the direct address convention
@dhower-qc dhower-qc added schema An issue with the existing database schema IDL Issue related to IDL labels Apr 4, 2025
@dhower-qc dhower-qc requested a review from ThinkOpenly April 4, 2025 18:07
@dhower-qc dhower-qc self-assigned this Apr 4, 2025
This lets us test idl for any config from the command line:

./do test:idl qc_iu
This does three things:

* Remove `CSR[expression]` syntax for direct CSR reads
** `CSR[csr_name]` still works
* Adds `direct_csr_lookup`/`csr_{hw,sw}_{read,write}` functions to access a
  CSR with a direct address
* Adds `indirect_csr_lookup` to access an indirect CSR with an indirect address
This adds a boolean writeable field to the CSR schema. We need this for two reasons:

* Indirect CSRs that have no address convention
* CSRs like mscontext that don't follow the direct address convention
Copy link
Collaborator

@ThinkOpenly ThinkOpenly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spell-o in that first comment "enviornment".

Also, if you're going to edit that commit message, please modify the example to:

For example:

./do test:idl qc_ui

@dhower-qc
Copy link
Collaborator Author

Spell-o in that first comment "enviornment".

Also, if you're going to edit that commit message, please modify the example to:

For example:

./do test:idl qc_ui

This PR is a good squash candidate. I've updated the PR description, which I think gets used as the squash commit message.

@dhower-qc dhower-qc changed the title idl: indirect csr support feat(idl): indirect csr support Apr 29, 2025
@dhower-qc
Copy link
Collaborator Author

Spell-o in that first comment "enviornment".

Also, if you're going to edit that commit message, please modify the example to:

For example:

./do test:idl qc_ui

done

@dhower-qc dhower-qc enabled auto-merge April 29, 2025 18:33
@dhower-qc
Copy link
Collaborator Author

@ThinkOpenly, this one should be ready modulo any requests from you.

@dhower-qc dhower-qc added this pull request to the merge queue Apr 30, 2025
Merged via the queue into main with commit ef12b37 Apr 30, 2025
17 checks passed
@dhower-qc dhower-qc deleted the indirect-csr branch April 30, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IDL Issue related to IDL schema An issue with the existing database schema

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add CSR indirect access to IDL

3 participants