Skip to content
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

[rtl/core] add 4 additional CPU CP slots; fix bugs in CP arbitration logic #262

Merged
merged 5 commits into from
Jan 28, 2022

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Jan 28, 2022

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:

  • CP0: shift operation, I/E base ISA, mandatory
  • CP1: multiply/divide, M ISA extension, optional
  • CP2: bit-manipulation, B ISA extension, optional
  • CP3: floating-point unit, Zfinx ISA extensions, optional
  • CP4: empty slot, reserved
  • CP5: empty slot, reserved
  • CP6: empty slot, reserved
  • CP7: empty slot, reserved

🐛 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 and rol instructions.

these additional slots are unused right now and are reserved for future (ISA) extensions
@stnolting stnolting added bug Something isn't working HW hardware-related labels Jan 28, 2022
@stnolting stnolting self-assigned this Jan 28, 2022
@stnolting stnolting marked this pull request as ready for review January 28, 2022 06:20
@stnolting stnolting merged commit 86e3709 into master Jan 28, 2022
@stnolting stnolting deleted the rework_cp_system branch January 28, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant