aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-02-16Run ISA tests in CI (#134)Jessica Clarke5-28/+130
* test: Ignore generated XML output * run_tests: Build RVFI emulators too Can't run tests with them though as they're built for direct instruction injection (RVFI-DII) via an instruction stream over a network socket, not fetching instructions from memory, so this remains just a build test. * run_tests/run_fp_tests: Print summary and give meaningful exit code * run_tests/run_fp_tests: Include tests and failures in top-level XML entity * run_tests/run_fp_tests: Use failure not error for XML output The former is the standard tag for normal test failures, the latter is for catastrophic things like test harness errors. * Run ISA tests in CI
2022-02-03Added notes about copyright headers in code, and a reminder that (#146)Martin Berger2-0/+9
pull-requests ideally come with an explanation how the correctness of the PR was established.
2022-01-31Add initial contributing and code style guides (#131)Jessica Clarke2-0/+110
These are intended to deal with much of the low-hanging fruit; plenty of room for improvement exists.
2022-01-21Add support for Scalar Cryptography Zbkb, Zbkc and Zbkx Extensions (#135)Bilal Sakhawat8-27/+196
2022-01-19Configurable word size for test signature file output (#136)Bilal Sakhawat2-10/+24
2022-01-19Add support for Zfh extension (#129)Bilal Sakhawat21-13/+3067
2022-01-19Add support for Zmmul (#122)Bilal Sakhawat2-2/+4
2022-01-19sail-riscv.install: RegenerateJessica Clarke1-1/+1
2022-01-19Makefile: Sort files when generating sail-riscv.installJessica Clarke1-1/+1
The order used for wildcard is not deterministic and varies between systems. Sorting ensures the diffs are easy to inspect going forwards.
2022-01-19sail-riscv.install: Remove no longer present riscv_iris.sailJessica Clarke1-1/+1
Closes: #142
2021-12-05Support BitManip Zba, Zbb, Zbc and Zbs extensions (#116)Bilal Sakhawat7-0/+574
2021-11-22Implement support for Zfinx (#130)Jessica Clarke17-334/+452
NB: Smstateen support is missing in the model so enabling the Zfinx extension provides an architectural covert channel via FCSR if privileged software is not aware of Zfinx's existence. Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com> Co-authored-by: Ibrahim Abu Kharmeh <abukharmeh@gmail.com>
2021-11-21run_tests: Remove stray */ causing "Is a directory" spewJessica Clarke1-1/+1
2021-11-17Revert "Initial introduction of zfinx (#75)"Jessica Clarke17-397/+287
This reverts commit c5e62ea4b3d481fcd491b22b317cc319b089f05d.
2021-11-17Initial introduction of zfinx (#75)Ibrahim Abu Kharmeh17-287/+397
* Adds Zfinx enable flag * Hardwire misa.{f,d} and mstats.FS to 0 * Moving nan boxing functions to fdext_reg * Swaps register names for floating point instructions Adds new mapping to swap register names, and use it in all assembly clauses * Disable Floating point loads, stores and moves * Add X_or_F_s and X_or_F_d functions, and use them to access all registers for floating points Changes register accessed for floating point instructions and modify nan boxing functions for zfinx * Formatting Remove couple of misplaced whitespace, unnecessary parens * Fix inconsistent indentation in insts_dext file * Fix spacing in fdext_regs * Remove redundant comparasion with true/ false * Constistant tuples spacing and removes couple of unnecessary parens. * Consistent functions declaration & calls spacing and removes couple of unnecessary parens. * Consistent spacing and removes couple of unnecessary comparasion with true/false * Make spacing consistent * Remove checks from execution stage * Add checks to encdec stage
2021-11-10scalar-crypto: aesks1i clarificationsBen Marshall2-16/+20
Trying to make the behavior of aesks1i easier to understand, and more obviously correspond to the specification. - Ensure that the aes_decode_rcon function only accepts valid values, plus add comments. - Re-name operands to aesks1i rcon -> rnum to be in line with the specification - Re-structure the Sail code for clarity based on jrtc27's suggestion.
2021-11-10scalar-crypto: whitespace consistency for SHA* instructionsBen Marshall1-6/+6
Remove weird whitespace " );" -> ");" at end of expressions to be consistent with the rest of the code base. On branch scalar-crypto-tidy Changes to be committed: modified: model/riscv_insts_zkn.sail
2021-11-10scalar-crypto: Consistent whitespace for ==Ben Marshall1-10/+10
Add spaces pre/post used of "==" operator to be consistent with the rest of the code.
2021-11-05Delete riscv_iris.sailMartin Berger1-1244/+0
File is no longer needed, as per this discussion: https://github.com/riscv/sail-riscv/issues/119
2021-10-26Makefile: Remove stale commentJessica Clarke1-1/+0
2021-10-22Recent rustc requires -lm for linking against the Sail coverage library (#118)Brian Campbell1-1/+1
Fixes rems-project/sail#152
2021-10-22Support D extension on RV32 (#108)Jessica Clarke7-118/+94
* Use bool for floating point comparison result Using bits_WU (bits(32)) or bits_LU (bits(64)) makes no sense, these are just boolean values, and having fixed-width types is a pain for suporting RV32D (since RV32D would need to truncate, but RV128D would need to extend). Instead represent these as an actual bool to match what the values really are. This could be done with bits(1) but the value is logically a boolean (like the built-in integer comparison operators) not a bit vector of length one so we convert to bool and back for a cleaner interface. * Support compiling RV32F with flen == 64 The code conflated flen and xlen; deconflating them and adding suitable assertions (rather than silently retiring as a no-op that doesn't bump instret) ensures that it can be compiled for RV32 with flen set to 64. Whilst here, add the extensions and truncations that would be needed for RV128F. Note that there are already suitable guards on the decode clauses to ensure these instructions are illegal on RV32. * Support compiling RV32D This copies various bits of XLEN generality from the F code. * Support RV32D loads/stores * Correctly initialise misa.D based on flen not xlen * Makefile: Enable D extension for RV32 This now works so can be enabled. * test: Enable RV32D tests
2021-10-18scalar-crypto: Initial commit of 1.0.0-rc2 spec work. (#99)Ben Marshall16-2/+997
Merged scalar-crypto pull request #99 of 1.0.0-rc2 spec work from Ben Marshall. See https://github.com/riscv/sail-riscv/pull/99.
2021-09-09Merge pull request #103 from PeterRugg/fix-rounding-modesJessica Clarke2-177/+284
Fix crash when fcsr.frm is invalid
2021-09-09Merge pull request #105 from dylux/masterJessica Clarke1-1/+1
Fix incorrect SV48_Vaddr bitfield
2021-08-25Update README.mdPeter Sewell1-21/+21
tweak README for move to riscv organisation
2021-08-22Fix incorrect SV48_Vaddr bitfielddylux1-1/+1
2021-08-09Fix crash when fcsr.frm is invalidPeter Rugg2-177/+284
2021-08-03Clarify the build instructions.Robert Norton1-3/+4
Encourage use of `opam` and streamline by moving discussion of setting `SAIL_DIR` into a separate section about building using a custom Sail version.
2021-07-29Use headache to apply copyright header at request of Peter Sewell.Robert Norton84-0/+5585
2021-07-29update LICENCE and README with other UCam and MS authors (headers need ↵pes202-3/+13
update to match)
2021-07-29update LICENCE and README with Nikhil and Scott (headers need update to match)pes202-3/+4
2021-07-27Add licenses to Lem and Sail library snapshotsThomas Bauereiss7-5/+285
2021-07-26Update HOL4 snapshotBrian Campbell26-28649/+70764
2021-07-26Update versions in Coq snapshot readmeBrian Campbell1-3/+3
2021-07-26Update Coq snapshotBrian Campbell18-33664/+37188
Also tweak Makefile to remove new Coq generated files
2021-07-26Update Isabelle snapshotsThomas Bauereiss51-49997/+90692
2021-07-16Add an extension point to allow validation of physical memory accesses.Robert Norton3-3/+36
This is required for implementing memory version support for CHERI.
2021-06-29Guard arguments to getopt_long with appropriate ifdefsPeter Rugg1-0/+4
2021-06-29Add option to specify SAILCOV output filePeter Rugg1-0/+18
2021-06-29vmem_rvNN: allow shimming underneath effectivePrivilegeNathaniel Wesley Filardo2-6/+12
It's possible that we might want to do page table walks at Privilege levels other than the default value (e.g., under the explicit direction of the instruction stream). Split translateAddr into a thin wrapper of the same name and a new translateAddr_priv that takes the Privilege as an argument.
2021-06-29vmem_svNN: Perform PTW accesses always as SupervisorNathaniel Wesley Filardo3-8/+8
Using the new riscv_mem functions to elide the Privilege level computation
2021-06-29riscv_mem: push effectivePermission to peripheryNathaniel Wesley Filardo1-27/+67
- Expose "just below the periphery" functions that allow bypassing effectivePermission and instead take a Permission explicitly (as well as an AccessType, in the case of reads, to distinguish Read from Execute; for writes, just an ext_access_type that will be wrapped in Write).
2021-06-29vmem_svNN: mem_read(Read(Data), ...) the PTEsNathaniel Wesley Filardo3-3/+3
Previously we were erroneously passing the instruction's memory access to lower layers of the memory machinery. For example, a store instruction still should be attempting reads of PTEs, not stores.
2021-06-29effectivePrivilege: don't consult globalsNathaniel Wesley Filardo1-2/+2
This function was inconsistent in its use of arguments vs. globals. However, in all existing cases, the arguments are fed as the values of these globals, so this has no observable impacts in the current model, but hopefully prevents confusion later.
2021-06-25Add a Dockerfile with sail and dependencies.Robert Norton1-0/+5
I have used this locally to build using a command like: docker run -v $PWD:/sail-riscv -w /sail-riscv <docker-image> make csim Thanks to @jameyhicks in #28 for showing how. Next step is to integrate this into github workflow somehow.
2021-06-25Ignore build library files (#86)PeterRugg1-0/+1
2021-06-25Fix RVFI build by adding two more functions to c_preserve (#95)Alexander Richardson1-0/+2
2021-06-25Merge pull request #93 from arichardson/fix-non-rvfi-buildRobert Norton1-4/+4
Fix the non-RVFI_DII build
2021-06-25Merge pull request #94 from arichardson/patch-1Robert Norton1-1/+1
Also run GitHub actions for PRs