regtool: Add subregister writes, packed register type and OBI #52
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 fork is currently being used in the implementation of the SD Host Controller.
Subregister Writes
The first commit adds the possibility to for example only write a single byte when reg_width is set to 32.
It returns an error if
reg_betries to write only part of a field.This change is required to make most implementations of a SDHCI driver work.
Packed Register Type
Since the SDHC contains registers that are 1byte wide as long as ones that are 4 byte wide, we would have to do something like this:
Which leads to having to write RTL code like this:
The second commit of this PR adds packed registers, which makes it work nicely like so:
This is not strictly necessary for SDHCI to work, but its easier to work with :)
Note that neither of the two commits were tested on anything but
gen_rtl.pywith normal registers,hwqeandhwre.OBI Adapter
The 3rd commit adds a simple adapter from OBI Crossbar used by croc to the Register Interface used by reggen.