-
Notifications
You must be signed in to change notification settings - Fork 34
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
hw-model: Set fuses via soc_ifc, change HwModel::new() semantics #142
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
korran
force-pushed
the
soc-ifc-ext
branch
6 times, most recently
from
April 5, 2023 06:33
0d37b98
to
8d00d49
Compare
Tweak the emulator and HwModel to expose a separate external SoC->Caliptra bus. Unlike the internal bus used by the Caliptra microcontroller, this bus can be used to set fuses during early boot, just like the SoC->Caliptra APB bus in the RTL.
This allows these functions to be used for any size array between 0 and 16 words.
This eliminates some boilerplate code.
This is necessary to make the emulator behave more like the RTL for HwModel tests.
This will be used to represent the complete set of fuses in the run parameters.
korran
force-pushed
the
soc-ifc-ext
branch
4 times, most recently
from
April 5, 2023 07:45
318404a
to
48eee27
Compare
korran
changed the title
hw-model: Set fuses via soc_ifc, add HwModel::new_for_run
hw-model: Set fuses via soc_ifc, change HwModel::new() semantics
Apr 5, 2023
caliptra_hw_model::create() is replaced with a new utility function, caliptra_hw_model::new(), which has slightly different semantics. This function is intended to be used by most test cases to set the fuses, start the boot FSM, and (optionally) upload the firmware to the mailbox. A bare-bones caliptra_hw_model::new_unbooted() function is provided for test cases that need to manipulate the external SoC->Caliptra APB bus directly during early boot in a non-standard way.
rusty1968
reviewed
Apr 6, 2023
rusty1968
reviewed
Apr 6, 2023
rusty1968
reviewed
Apr 6, 2023
rusty1968
reviewed
Apr 6, 2023
rusty1968
reviewed
Apr 6, 2023
rusty1968
approved these changes
Apr 6, 2023
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 attempts to unify fuses between HwModelEmulated and HwModelVerilated, by removing all the fuse-related configuration from CaliptraRootBusArgs, and instead using the external soc_ifc bus to set them during early boot.
Also, caliptra_hw_model::create() is replaced by caliptra_hw_model::new(), which has slightly different semantics. This function is intended to be used by most test cases to set the fuses, start the boot FSM, and (optionally) upload the firmware to the mailbox. A bare-bones caliptra_hw_model::new_unbooted() function is provided for test cases that need to manipulate the external SoC->Caliptra APB bus directly during early boot in a non-standard way.