-
Notifications
You must be signed in to change notification settings - Fork 167
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
Role of the Sail OCaml simulator in the golden model #138
Comments
I have checked rems-project/sail#122. I have meet the same problem. So could I just use -no_effects when building the ocaml simulator so that my code can pass the CI? I can make cim successfully. |
No you should fix your code to have the right effects annotations. |
I have fixed the bugs about effects, but I met another problem when making osim:
|
@b224hisl I think you are hitting hard-coded limitation in the OCaml compiler I mention above. Have you branched your code off from the proposed P-extension code [1]. Or are you adding a large number of OCaml ADT-constructors? (Sorry I'm in a rush, so no time to look into your code) [1] Sail Model for RISC-V P Extension #132 |
I've gone and filed rems-project/sail#165 against Sail to try and get this fixed |
Thanks. I didn't realise this was a regression. Reminds me that I should write more regression tests ... |
Well, Sail 1 and Sail 2 are similar but different languages, so more like saying it's a regression from Python 2 to Python 3. I'm pretty sure the RISC-V Sail model has always been for Sail 2, but wasn't involved that far back to know. |
I think I didn't invole any P-extension code. I do add a large number of items like |
@b224hisl This should be fixed now, see rems-project/sail#165 Maybe pull the latest version and try locally. I think https://github.com/riscv/sail-riscv/blob/master/.github/workflows/compile.yml will automatically use the latest version of Sail if Cambridge have already published this fix to opam. |
Can be closed now that #544 is merged |
Currently Sail can generate a C simulator (using the
-c
option) and an OCaml one (using-ocaml
). The latter is much slower. Keeping them in sync occasionally causes problems, in particular in the recent P-extension PR, where a hard-coded limitation in the OCaml compiler lead to trouble with the OCaml emulator, see [1]. There is currently also a small discrepancy in typing depending on whether C or OCaml are targeted [2]. While those problems can be fixed, I wonder about the use-cases for the OCaml simulator in the RISCV model here. The RISCV OCaml tests also skip floating point arithmetic [3].I do understand the benefits of n-version programming, but both, the C and the OCaml simulator come from the same source Sail, so the OCaml simulator is most useful in debugging the C simulator, but not the RISCV spec. So: how important is the OCaml simulator for RISCV?
Sail Model for RISC-V P Extension #132 (comment)
Inconsistent effects behavior between the Ocaml and C models rems-project/sail#122
https://github.com/riscv/sail-riscv/blob/master/test/run_tests.sh#L62-L63
The text was updated successfully, but these errors were encountered: