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

Implement RFC 16 (CSR register API) #40

Merged
merged 19 commits into from
Feb 9, 2024
Merged

Commits on Feb 9, 2024

  1. csr.bus: instantiate a Multiplexer from a MemoryMap.

    Before this commit, CSR elements were added with `Multiplexer.add()`.
    
    Now, a memory map of elements is populated beforehand, then given as
    argument to `Multiplexer.__init__()`.
    
    This decouples the definition of a group of neighboring registers from
    their implementation by a CSR Multiplexer.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    1abb576 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    55d1756 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e56829 View commit details
    Browse the repository at this point in the history
  4. csr.reg: migrate to lib.wiring components.

    Also, fix FieldPort signature direction.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    d3fa16a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    24953e1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cd73315 View commit details
    Browse the repository at this point in the history
  7. csr.reg: defer Field creation until Register.__init__().

    Before this commit, a Register whose fields were variable annotations
    couldn't be instantiated more than once, as the latter belonged to the
    global scope.
    
    The Field class is now a factory for user-defined field components,
    instead of a base class. Every FieldMap or FieldArray sharing a
    Field will use a different instance of its component, obtained from
    Field.create().
    
    Also:
    * update to follow RFCs 37 and 38
    * docstring and diagnostics improvements.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    c734b74 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    03728ff View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e39e2c7 View commit details
    Browse the repository at this point in the history
  10. csr.reg: move access= parameter to Register.__init_subclass__().

    This allows csr.Register subclasses that use variable annotations to
    define their access mode without overriding __init__().
    
    In addition, the default value of access= (which was "rw") is removed.
    The access mode of a register has an influence on the rest of the SoC
    and should therefore be explicitly set.
    
    As a consequence of access= being a required __init_subclass__() kwarg,
    the csr.Register class can no longer be directly instantiated and must
    be subclassed first.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    a1b772d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    921f36e View commit details
    Browse the repository at this point in the history
  12. csr.reg: allow direct instantiation of Register class.

    The access= parameter can now be set in either __init_subclass__() or
    __init__(). It has a default value of None, and __init__() will error
    out if set in both sites or none of them.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    4a74fad View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    03e70a1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a5aad24 View commit details
    Browse the repository at this point in the history
  15. memory: restrict resources to wiring.Component objects.

    Also, csr.Multiplexer now requires the signature of its memory map
    resources to contain a csr.Element.Signature member, named "element"
    and oriented as output.
    jfng committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    588a403 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d29f21b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    40cf37b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4a714e7 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    516d787 View commit details
    Browse the repository at this point in the history