1. Jun 12, 2024
    • Tim Hutt's avatar
      Check misalignment of AMOs before address translation (#471) · ba35af52
      Tim Hutt authored
      This is optional according to the spec - you can check afterwards. However
      
      1. it seems extremely unlikely that any real designs will do that for atomics, which (ignoring Zam which the model doesn't support yet), always have to be aligned, and
      2. the LR and SC instructions already check before address translation, so this wasn't even consistent.
      
      Ideally in future this would be configurable.
      ba35af52
  2. Jun 05, 2024
  3. Jun 04, 2024
  4. Jun 03, 2024
  5. May 23, 2024
  6. May 22, 2024
  7. May 21, 2024
  8. May 20, 2024
  9. May 19, 2024
  10. May 18, 2024
  11. May 16, 2024
  12. May 15, 2024
    • Tim Hutt's avatar
      Don't read or write 8 bytes for 4-byte PTEs · 4d607432
      Tim Hutt authored
      For Sv32 Page Table Entries are only 4 bytes, but the old code was unconditionally reading and writing 8 bytes.
      
      Fixes #459
      4d607432
    • Tim Hutt's avatar
      Minor style fixes · 6c758e9b
      Tim Hutt authored
      * Remove unnecessary `f` variable
      * Remove redundant type delcaration for `fetch`.
      * Indentation
      6c758e9b
  13. May 14, 2024
  14. May 13, 2024
    • Alasdair's avatar
      Refactor MUL instruction · e1242d85
      Alasdair authored
      This instruction had a bit of a case of 'boolean blindness' code smell,
      where the mul operation was represented as a triple of booleans. This
      commit refactors the implemention to use a struct with named fields for
      high, signed_rs1, and signed_rs2.
      
      The C_MUL instruction in Zcb also needs to be changed appropriately
      
      The mul_op struct was added in riscv_types
      
      While there do some housekeeping w.r.t the comment about a workaround for
      Sail < 0.15.1, as this is no longer needed.
      e1242d85
  15. May 11, 2024
  16. May 10, 2024
  17. May 08, 2024
    • Tim Hutt's avatar
      Add missing decoder guards for crypto extensions · f65c4b2c
      Tim Hutt authored
      These guards were missing from one side of each clause.
      f65c4b2c
    • Martin Berger's avatar
      Add Svinval extension. · 5c55b5bb
      Martin Berger authored
      
      
      These changes add the "Svinval" Standard Extension for Fine-Grained
      Address-Translation Cache Invalidation, Version 1.0 to the sail-riscv
      model.
      
      This extension defines five new instructions: SINVAL.VMA,
      SFENCE.W.INVAL, SFENCE.INVAL.IR, HINVAL.VVMA, HINVAL.GVMA.
      
      HINVAL.VVMA & HINVAL.GVMA are omitted since they build on the
      Hypervisor Extension which is yet to be included in the model.
      
      SFENCE.W.INVAL & SFENCE.INVAL.IR are treated as nops pending
      integration of the coherency model (rmem) with sail.
      
      The specification says that SINVAL.VMA behaves just as SFENCE.VMA,
      except there are additional ordering constraints with respect to the
      new SFENCE.W.INVAL & SFENCE.INVAL.IR instructions. Since these are
      nops, we can treat SINVAL.VMA as if it were SFENCE.VMA.
      
      Co-authored-by: default avatarKristin Barber <kristinbarber@google.com>
      5c55b5bb
    • Martin Berger's avatar
      418cf128