{I,D}BusSimplePlugin: don't rely on memoryTranslatorPortConfig != null
#307
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.
null
can be a validMemoryTranslator
configuration parameter, for example in the case of thePmpPlugin
. Furthermore, theIBusCachedPlugin
andDBusCachedPlugin
do not generally rely on itsmemoryTranslatorPortConfig
to be non-null to instantiate its translator port, but instead checks whether aMemoryTranslator
service exists in the pipeline. Thus it seems best to changeIBusSimplePlugin
andDBusSimplePlugin
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.As an unintended side-effect, when pairing this change with use of the
PmpPlugin
orPmpPluginOld
, this will now result in a combinational loop over theskipCmd
,arbitration.isValid
, andMMU_FAULT
signals. For now, I have simply avoided this by not settingskipCmd
when 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.