-
Notifications
You must be signed in to change notification settings - Fork 219
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
[CPU] area and timing optimization; closing further illegal instruction holes #293
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
moved memory data registers and optimized data alignment logic: ~20% less hardware required due to better logic->LUT combining
added malformed "mret" (incorrect opcode) that will crash the system if any part of it gets executed
use malformed "mret" for testing and also check for unintended side effects
stnolting
changed the title
[CPU] area and timing optimization
[CPU] area and timing optimization; closing further illegal instruction holes
Apr 4, 2022
* reduced hardware costs (smaller logic) * shortened critical path (branch logic); ~10% higher f_max * closed further illegal instruction holes
fixed rare bug: malformed instruction word (with opcode from the compressed instructions space) caused computation of wrong return address if C extension is disabled
* further optimizations * added logic to avoid side-effects of illegal xret instructions
achieving 130MHz on Intel Cyclone IV!
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 improves the overall efficiency of the CPU: the logic optimizations from this PR reduce the area costs of the CPU (~8% less) while also shortening the CPU's critical path (~12% higher f_max).
🔒 Furthermore, this PR closes further illegal instruction holes (illegal instruction words that where not correctly detected or that caused side effects even if identified as "illegal").
🐛 This PR also fixes a rare bug in the core of the NEORV32 runtime-environment (RTE): if the C-extensions is disabled, a malformed instruction word that uses an opcode from the RVC (compressed) instruction space would cause the computation of an incorrect return address.