-
Notifications
You must be signed in to change notification settings - Fork 18
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
CRDs list things like instructions, CSRs, and traps that aren't in the configuration #291
Comments
There is only one I extension, not an RV32I and a RV64I. Therefore, when I ask the I extension for all its instructions, I get 32 and 64 versions. I see there is an optional base field in the instruction schema. I assume I should filter out instructions based on the portfolio's base value. Is this correct? |
Correct. You can do something like |
Seems like I should be asking the Extension object for a list of instructions and pass it enough information for it to figure out what is present or not. I don't know if an Extension has things like base or maybe even parameters that control what instructions are actually present. BTW, are there any cases yet like that where a parameter controls what instructions are present? If not, is that something we should plan for? Same goes for CSRs. Since everything in UDB is built around extensions, seems like I should be asking the extension for its instructions and CSRs. BTW, I see this function below in the Extension class that calls arch_def.implemented_instructions. Seems like we should relax this to accept a partially defined arch_def too. Why don't we?
|
Waiting for Derek to refactor arch_def to have one Ruby object for everything possible in the RISC-V architecture standards and another Ruby object to have just what is in a particular configuration (whether configured, partially configured, or fully configured). |
…ns, CSRs, and traps that aren't in the configuration). Still need to fix traps and interrupts.
After refactoring (see PR #386) was able to fix this for instructions and CSRs on my own. I created in_scope_instructions and in_scope_csrs in ExtensionVersion. I use the minimum extension version that meets the extension requirements and then call this code (similar for CSRs). The main addition is the extra conditions around the base.
|
I did some work on exception codes and interrupt codes and then paused it until I get Derek's help. I created in_scope_exception_codes and tried copying from implemented_exception_codes in Design as follows But the problem is that I don't have good understanding/examples of how an extension should make it codes conditional. I see there's some provision for this with "when" statements in the ext schema and some use of it in the copied code. However, what I don't see is something in extension arch files making certain exception codes conditional. For example, the instruction address misaligned exception can't occur if the C extension is present. This "when" condition doesn't seem to be present in the database. |
The text was updated successfully, but these errors were encountered: