Draft
Conversation
Instead of having one "god" circuit, we now have specialized circuits for access control, bus ordering logic, address offset calculation, and meta data generation. This frees up the "core" logic of the register to `registerC`, which now only decides when and what to write.
This will later be used to determine whether registers need a lock inserted or not.
This commit extends the current `registerWb` with an (optional) lock register that can be used by the software to either atomically read or write from/to a register. By default, the register decides to include a lock register or not by reasoning about whether the software would (in practice) write to it in multiple bus accesses or not. Users can opt-out of a lock register by passing `lock = NoLock` to `registerConfig`.
In a separate commit, because I'm not convinced we should merge as is. If we do, we should make an issue to clean this up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the current
registerWbwith an (optional) lock register that can be used by the software to either atomically read or write from/to a register. By default, the register decides to include a lock register or not by reasoning about whether the software would (in practice) write to it in multiple bus accesses or not. Users can opt-out of a lock register by passinglock = NoLocktoregisterConfig.TODO
clash-protocols-memmap/tests/Tests/Protocols/MemoryMap/Registers/WishboneStandard.hs. This was mostly vibe-coded, so now it's an endless nesting of if-then-elses.Freezetest.