-
Notifications
You must be signed in to change notification settings - Fork 45
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
defining mtval informative and unconditional writes #16
Comments
Is this still up-to-date? 🤔 I am trying to constrain the behavior of mtval_condition_writes:
implemented: true
behaviour:
- [0, [0x00000000:0xFFFFFFFF], "Instruction fetch - address that was misaligned"]
- [1, [0x00000000:0xFFFFFFFF], "Instruction fetch - address that triggered a bus exception"]
- [4, [0x00000000:0xFFFFFFFF], "Load access - address that was misaligned"]
- [5, [0x00000000:0xFFFFFFFF], "Load access - address that triggered a bus exception"]
- [6, [0x00000000:0xFFFFFFFF], "Store access - address that was misaligned"]
- [7, [0x00000000:0xFFFFFFFF], "Store access - address that triggered a bus exception"] But I'm getting an error here:
What exactly is a "dict type"? The only thing I could find is https://riscv-config.readthedocs.io/en/stable/yaml-specs.html?highlight=dictionary#mtval-condition-writes but I don't really understand the documentation there 😅 |
I believe this has not been implemented yet. A temporary way of using this for now would be do something like the following
|
I already thought so. Anyway, thanks for the fast response! I have tested your code. Unfortunately, my framework version does not seem to recognize the exception code fields:
My framework versions:
Might this be caused by a version issue? |
Looks like the exception numbers should be double digit(link). Replacing |
Thanks for the hint! The syntax errors are resolved now. 👍 However, I cannot modify the model's I have experimented with Some questions:
Anyway, I made a simple patch for my |
While we do have support to specify the behaviors in the yaml, no model exists yet which can be configured directly from these specifications. Work is underway for SAIL to support all possible options as allowed by the spec. You might have more success by looking at the spike CLI options to see if any switches exist there which allow you to modify the mtval update behavior and then add those switches to the command in the riscof-plugin based on the input yaml. |
According to the Spec mtval is a WARL field. However, a platform has a luxury to completely specify which exceptions must set mtval informatively and which may unconditionally set it to zero. To capture this the following is proposed:
Extend CSR template with a
platform
field:We add a boolean field
platform
to each csr which indicates if the platform-yamlhas more information on the same node. The platform yaml should also contain a node with the same csr-name. The node in the isa-yaml will define the set of all legal/illegal values that mtval can take
Adding mtval node in platform-yaml:
the mtval field in the platform yaml could be :
Each entry under behaviour is a 3 element tuple. The first element is cause value, the second defines the set of legal values and the last element is the description.
Cause values missing in the behavior list are assumed to write "0" to mtval by default.
The text was updated successfully, but these errors were encountered: