-
Notifications
You must be signed in to change notification settings - Fork 228
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
[rtl] add hardware reset to IO/peripheral devices #334
Merged
Conversation
This file contains 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
This was
linked to
issues
Jun 2, 2022
stnolting
changed the title
[rtl] add dedicated reset to IO/peripheral devices
[rtl] add hardware reset to IO/peripheral devices
Jun 2, 2022
+ minor typo fixes
if E extension is not enabled
* bootloader * application example "blink_led"
andkae
reviewed
Jun 3, 2022
This was referenced Jun 3, 2022
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 (finally?) adds a dedicated hardware reset to all IO/peripheral devices.
After having too much trouble with hardware-vs-simulation mismatches (recently: #330, #332) it is about time to add a real reset to the IO devices. Lessons learned. 🙈 😅
Current State (pre-PR)
The current setup relies on a pure software reset scheme, where
crt0
is responsible for clearing/resetting all IO devices by writing zero to all memory-mapped registers. Clearing the control register of a device (or to be more specific: the control register's enable bit) will disable and reset the device putting it in a defined state.Proposed State (this PR)
This PR adds a hardware reset to each IO module's interface registers. Module-internal register still do not provide a dedicated hardware reset!
All interface register are set to zero by the hardware reset - including the control register's enable bit, which will cause the rest of the logic (the internal registers that do not have a dedicated reset) to be reset to a defined state.
The
crt0
"hardware reset" code is no longer required and is removed. This makes booting slightly faster.ℹ️ On Quartus Prime 21.1 (targeting a Cyclone IV FPGA) the modifications from this PR have absolutely no impact on device utilization.
TODO
crt0
IO initialization routine