-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
As discussed in #217, it would be nice to have a macro to define CSR register types.
I worked on a couple solutions:
- macros using the
pastecrate: master...rmsyn:riscv:riscv/csr-macro-paste- less verbose
- more consistent docs across definitions
- requires adding the
pastecrate as a dependency, and exposing thepaste!macro as a public re-export
- macros without using the
pastecrate: master...rmsyn:riscv:riscv/csr-macro-no-paste- more verbose
- requires caller-supplied docstrings and
set_<field>values - can potentially omit the docstrings at the expense of having generic documentation, e.g.
/// Gets the field value.
- requires caller-supplied docstrings and
- potentially less consistent docs across definitions
- requires no additional dependencies
- more verbose
What are some thoughts and/or preferences about the two implementations?
Metadata
Metadata
Assignees
Labels
No labels