{I,D}BusSimplePlugin: don't rely on memoryTranslatorPortConfig != null#307
Draft
lschuermann wants to merge 2 commits into
Draft
{I,D}BusSimplePlugin: don't rely on memoryTranslatorPortConfig != null#307lschuermann wants to merge 2 commits into
memoryTranslatorPortConfig != null#307lschuermann wants to merge 2 commits into
Conversation
`null` can be a valid `MemoryTranslator` configuration parameter, for example in the case of the `PmpPlugin`. Furthermore, the `IBusCachedPlugin` and `DBusCachedPlugin` do not generally rely on its `memoryTranslatorPortConfig` to be non-null to instantiate its translator port, but instead checks whether a `MemoryTranslator` service exists in the pipeline. Thus it seems best to change `IBusSimplePlugin` and `DBusSimplePlugin` to behave identically to the their respective cached versions. This also prevents accidental CPU misconfigurations where an MMU or PMP plugin is instantiated and generally usable, but does not actually take effect in the memory buses.
This is to avoid a combinational loop.
Member
|
Hi, sorry i missed that PR. |
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.
nullcan be a validMemoryTranslatorconfiguration parameter, for example in the case of thePmpPlugin. Furthermore, theIBusCachedPluginandDBusCachedPlugindo not generally rely on itsmemoryTranslatorPortConfigto be non-null to instantiate its translator port, but instead checks whether aMemoryTranslatorservice exists in the pipeline. Thus it seems best to changeIBusSimplePluginandDBusSimplePluginto behave identically to the their respective cached versions. This also prevents accidental CPU misconfigurations where an MMU or PMP plugin is instantiated and generally usable, but does not actually take effect in the memory buses.As an unintended side-effect, when pairing this change with use of the
PmpPluginorPmpPluginOld, this will now result in a combinational loop over theskipCmd,arbitration.isValid, andMMU_FAULTsignals. For now, I have simply avoided this by not settingskipCmdwhen there is anMMU_FAULT, given that this fault should still be caught despite a load being performed. While this seems to work for my initial tests,Hence this is a draft PR and I am looking for feedback on how to resolve the combinational loop issues.