-
Notifications
You must be signed in to change notification settings - Fork 173
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
RISC-V config integration #43
Conversation
…v_config.sail committed for convenience at the moment.
Also tweak configs so that riscv-tests pass.
It is only really useful here and it is better not to have to deal with submodules or additional opam packages.
Conflicts: Makefile model/riscv_sys_control.sail
Looks generally fine to me. I guess some of the csr configs still remain to be integrated, e.g. mstatus_config. Perhaps we should move the legalize_* functions from riscv_sys_regs.sail to riscv_config_types.sail, since that is a more logical place for them. That should also hide the cruft involved in legalizing mstatus. |
I forgot about mstatus, did I miss some others? Difficulty with mstatus is that we can't really support anything other than hardwired MXL == SXL == UXL == xlen at present but I think we could handle the other fields. I tried moving the legalize_* functions but ran into difficulty getting things defined in the right order. Will need some further shuffling and Makefile tweaking. |
I just tried resolving the conflicts. They are not too bad but it looks like the master branch did something slightly different when legalising misa: if the new misa has D set but not F then master will drop the whole misa update but this branch will just clear D and proceed with the update. The way I read the spec. the latter is correct:
|
6 of the 13 commits here are merges from master. May I request using |
This PR is outdated because riscv-config has moved on. Work on riscv-config integration is taking place elsewhere (e.g. https://github.com/plctlab/sail-riscv/tree/plct-rvconfig-dev ) but I don't know of the current status. |
So should we close this pull request? @ronorton |
This makes it easier to support tests with large memory footprints, as the default 63 pages may be insufficient
These changes integrate riscv-config into the sail-riscv model. It works by taking the RISC-V config yaml, processing it with the riscv-config tool then using a small ocaml program to convert the checked yaml into some sail code that instantiates values of types riscv_isa_config and riscv_platform_config. The model then uses these to implement the expected behaviour.
I've provided configs that match the existing default behaviour of the model. I checked in the checked yaml (generated by riscv-config) so that there is no additional dependency on riscv-config if you are happy with these default configurations.