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

DM: explicitely state register fields types in code, and generate HDL based on that, offline. #23

Open
bieganski opened this issue Jul 7, 2023 · 0 comments

Comments

@bieganski
Copy link
Owner

currently for Debug Module registers fields, like cmderr field of abstractcs, that due to Debug Specs is W1C (write 1 clears the corresponding bit) we need to explicitely write corresponding logic in HandlerDMI subclass:

comb += self.controller.command_finished.eq(1)
sync += self.reg_abstractcs.cmderr.eq(
        self.reg_abstractcs.cmderr & (~write_value.cmderr)
 )

Such logic could however be generated automatically for each field of W1C type, bassed on data.Struct fields annotated with field-type metadata.

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

No branches or pull requests

1 participant