aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_mem.sail
AgeCommit message (Collapse)AuthorFilesLines
2019-12-23Generate correct cause for AMO faultsJames Clarke1-2/+6
2019-10-09Read/write memory values and metadata together atomicallyThomas Bauereiss1-22/+43
For Lem, bypass the Sail implementation of {read,write}_ram and map to atomic primitives directly. We might want to make these functions primitive for other backends as well.
2019-09-18Squashed commit of various patches from @scottj97:Prashanth Mundkur1-45/+45
Rename var to make it clear it is physical and not virtual. There are a lot of variables in riscv_mem.sail and riscv_platform.sail named addr and it's not always clear if that is physical or virtual address. These changes rename those variables to paddr to reduce ambiguity.
2019-07-22Make a custom exception code available for extensions, and remove the ↵Prashanth Mundkur1-8/+8
E_CHERI code. Enable extensions for PTE checks and PTW errors, and propagate those into exception codes.
2019-07-15Allow extensions to types of memory access, and factor out PTE and PTW ↵Prashanth Mundkur1-22/+22
definitions.
2019-07-03Add a maximum memory access size to slightly improve C code geneation.Robert Norton1-12/+12
2019-07-01Merge remote-tracking branch 'origin/master' into master-cleanupRobert Norton1-1/+1
2019-06-28Avoid implicit casts to stringAlasdair1-1/+1
Can have unintended consequences, due to how overloading interacts with casts. For example, x : X == y : X can be interpreted as eq_string(cast(x), cast(y)) if x and y are both castable to string, even when there is an equality function (X, X) -> bool. Sail->SMT can't handle strings very well so it's best to just ensure that this can never occur. Rather than implicitly casting in logging statements like: print("xyz" ^ x ^ " foo " ^ y) it's now print("xyz" ^ to_str(x) ^ " foo " ^ to_str(y)) which ensures that the conversion to strings only happens where intended. I also added a warning to Sail itself to try to catch these cases in future.
2019-06-27Merge pull request #14 from gameboo/aj443-fixesPrashanth Mundkur1-2/+2
Zero extend rather than sign extend rvfi-dii reports (usefull for 32 …
2019-06-27Merge branch 'master-cleanup' into pmpPrashanth Mundkur1-2/+4
2019-06-27Zero extend rather than sign extend rvfi-dii reports (usefull for 32 ↵Alexandre Joannou1-2/+2
rvfi-dii comparisons where upper bits are not expected to have information in them)
2019-06-27Predicate more tracing with get_config_print_xxx.Robert Norton1-3/+6
2019-06-25Some more pruning and commenting of riscv_mem.Prashanth Mundkur1-33/+37
2019-06-24Add PMP checks to physical memory accesses.Prashanth Mundkur1-12/+30
- unify AccessType and ReadType since they were essentially redundant, making it easier to implement PMP checks for ReadWrite/atomic accesses. - add command line options to enable PMP in the platform - also fix the matching for the case when all entries are off
2019-06-24Narrow the external interface to riscv_mem to mem_{read,write,write_ea}.Prashanth Mundkur1-5/+8
2019-06-24Starting cleaning up physical memory bits for pmp integration.Prashanth Mundkur1-12/+12
. convert duopod to directly use Sail lib/regfp functions . put lib/regfp wrappers in prelude, and avoid calling them directly in riscv_mem . remove mmio assumption in page-table walks, making read/write calls symmetric . prune obsolete functions from prelude_mem
2019-05-02rvfi: fixes for RV32Prashanth Mundkur1-2/+2
2019-05-02rvfi: fix mask encodingPrashanth Mundkur1-2/+2
2019-05-02rvfi: avoid setting write fields if the write traps.Prashanth Mundkur1-15/+15
2019-05-02rvfi: fix mem data and mask fields for reads.Prashanth Mundkur1-7/+5
2019-04-24Add extended model from cheri-merge.Prashanth Mundkur1-12/+26
2019-04-18Parameterise memory read/write primitives by address lengthJon French1-18/+18
2019-03-14Merge branch 'master' into rmem_interpreterJon French1-4/+12
2019-03-12refactor memory access to use new sail intrinsicsJon French1-89/+36
2019-03-07Get rvfi building again.Prashanth Mundkur1-2/+2
2019-02-08Adapt to changes in Sail's Lem shallow embeddingThomas Bauereiss1-45/+6
In the monads branch of Sail, writing a memory value now requires address and write_kind (instead of relying on parameters announced earlier).
2019-01-14Reorganize directory structure.Prashanth Mundkur1-0/+193