[rtl/core] add 4 additional CPU CP slots; fix bugs in CP arbitration logic #262
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 adds four additional co-processor slots (4..7) to the CPU's ALU. The new co-processor slots are not used yet and are reserved for future (ISA) extensions. Slot 4 is going to be used to implement a Custom Functions Unit (CFU) that allows to implement custom RISC-V instructions.
With this PR the ALU contains up to eight co-processors:
I
/E
base ISA, mandatoryM
ISA extension, optionalB
ISA extension, optionalZfinx
ISA extensions, optional🐛 This PR also fixes a bug in the co-processor arbitration logic: if a co-processor operation is triggered by an illegal instruction (the instruction itself is fine - it just triggers an illegal/unsupported co-processor function) the according co-processor has to terminate any internal operation that has been incorrectly triggered. Otherwise, an instruction right at the beginning of the illegal instruction trap handler that uses that specific co-processor might get an incorrect co-processor result.
🐛 Another small bug is fixed by this PR: there was an instruction decoding collision in the bit-manipulation co-processor between the
cpop
androl
instructions.