aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_vmem_common.sail
AgeCommit message (Collapse)AuthorFilesLines
2021-08-22Fix incorrect SV48_Vaddr bitfielddylux1-1/+1
2021-07-29Use headache to apply copyright header at request of Peter Sewell.Robert Norton1-0/+68
2019-08-09Allow accumulation of information during page-table-walk for extensions.Prashanth Mundkur1-5/+10
2019-07-16Use reserved bits in PTEs for vmem extensions on RV64, as allowed by the ↵Prashanth Mundkur1-0/+2
spec. This is not possible for RV32, so pass zeros there.
2019-07-15Allow extensions to types of memory access, and factor out PTE and PTW ↵Prashanth Mundkur1-89/+0
definitions.
2019-06-28Avoid implicit casts to stringAlasdair1-1/+3
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-02-22Fix address translation bug in ordering of width-extension and shift in pte. ↵Prashanth Mundkur1-1/+1
This showed up in RV32, but not in RV64, presumably because the highest address bits are not typically exercised typical physical memory maps.
2019-02-13Pull out the Sv39 and its TLB into separate files.Prashanth Mundkur1-75/+0
2019-02-13Make more address translation types reusable.Prashanth Mundkur1-15/+9
2019-02-13Attempt to reuse types for Sv39 and Sv48 to the extent possible for ↵Prashanth Mundkur1-55/+81
simplicity. This might need revisiting for Sv59 and Sv64.
2019-02-12Start extracting bits of vmem that should be common to RV32, and add some ↵Prashanth Mundkur1-0/+294
definitions for Sv32 and Sv48.