package memory
- Alphabetic
- Public
- All
Type Members
-
case class
AddressTranslationInvalidation() extends Bundle with Product with Serializable
Used by the TrapPlugin to ask the MmuPlugin to invalidate its TLB (on sfence.vma / satp updates)
- case class AddressTranslationInvalidationCmd() extends Bundle with Product with Serializable
- trait AddressTranslationPortUsage extends AnyRef
-
case class
AddressTranslationRefill(storageWidth: Int) extends Bundle with Product with Serializable
Interface used by the TrapPlugin to ask the MMU's page walker to do work
- case class AddressTranslationRefillCmd(storageWidth: Int) extends Bundle with Product with Serializable
- case class AddressTranslationRefillRsp() extends Bundle with Product with Serializable
- class AddressTranslationRsp extends Area
-
trait
AddressTranslationService extends Area
Implemented by the MmuPlugin, allows other plugins to create new address translation interfaces
- case class DBusAccess(refillCount: Int) extends Bundle with Product with Serializable
- case class DBusAccessCmd() extends Bundle with Product with Serializable
- case class DBusAccessRsp(refillCount: Int) extends Bundle with Product with Serializable
- trait DBusAccessService extends AnyRef
- case class MmuEntryFlags() extends Bundle with Product with Serializable
- case class MmuLevel(virtualWidth: Int, physicalWidth: Int, virtualOffset: Int, physicalOffset: Int, entryOffset: Int) extends Product with Serializable
-
class
MmuPlugin extends FiberPlugin with AddressTranslationService
Implement the RISC-V MMU using a N-way set associative TLB storage.
Implement the RISC-V MMU using a N-way set associative TLB storage. This fit very well with FPGA which have distributed memories. For FPGA that do not have that, the MmuPortParameter can be configured to have a low number of sets or use 1 cycle delay to be inferable as block ram.
Plugins which uses the MmuPlugin can request TLB storage, then they can require the MmuPlugin to bind a new port on a existing pipeline using that TLB storage. A given TLB storage can be used by multiple MMU ports.
MMU miss will not by itself trigger a TLB refill. This is instead triggered by the TrapPlugin.
- case class MmuPortParameter(readAt: Int, hitsAt: Int, ctrlAt: Int, rspAt: Int) extends Product with Serializable
- case class MmuSpec(levels: Seq[MmuLevel], entryBytes: Int, virtualWidth: Int, physicalWidth: Int, satpMode: Int, pteReserved: BigInt) extends Product with Serializable
- case class MmuStorageLevel(id: Int, ways: Int, sets: Int) extends Product with Serializable
- case class MmuStorageParameter(levels: Seq[MmuStorageLevel], priority: Int) extends Product with Serializable
- class PmaCmd extends Bundle
-
class
PmaLogic extends Area
Implement the hardware to translate an address into its Physical Memory Access permitions.
Implement the hardware to translate an address into its Physical Memory Access permitions. For VexiiRiscv the permitions are : - fault => is there something at that address ? - io => is it an IO memory region (strongly ordered / with side effects) ?
- trait PmaOp extends AnyRef
- case class PmaPort(addressWidth: Int, sizes: Seq[Int], ops: Seq[PmaOp]) extends Bundle with Product with Serializable
- class PmaRsp extends Bundle
- case class PmpParam(pmpSize: Int, granularity: Int, withTor: Boolean = true, withNapot: Boolean = true) extends Product with Serializable
-
class
PmpPlugin extends FiberPlugin with PmpService
This PMP implementation is quite regular, but allows the user to get ports which are pipelined (to improve FMax / timings)
- case class PmpPortParameter(napotMatchAt: Int, napotHitsAt: Int, torCmpAt: Int, torHitsAt: Int, hitsAt: Int, rspAt: Int) extends Product with Serializable
- class PmpRsp extends Area
- trait PmpService extends Area
-
case class
PmpStorageParameter(slots: Int) extends Product with Serializable
Reading the RISC-V spec to figure out all the flags/details of the PMP is just too tricky.
Reading the RISC-V spec to figure out all the flags/details of the PMP is just too tricky. A good way to figure things out is to loook at spike (software implementation) : - https://github.com/riscv-software-src/riscv-isa-sim/blob/2c67071743d4b55719cee22fdb319df2a0756db7/riscv/mmu.cc#L348 - https://github.com/riscv-software-src/riscv-isa-sim/blob/2c67071743d4b55719cee22fdb319df2a0756db7/riscv/csrs.cc#L183 - https://github.com/riscv-software-src/riscv-isa-sim/blob/2c67071743d4b55719cee22fdb319df2a0756db7/riscv/mmu.cc#L348
In particular, one tricky thing with the PMP is how the PMPADDRx LSB bits are handled in regard of the granularity. Their value change depending the PMPCFGx XD
-
class
StaticTranslationPlugin extends FiberPlugin with AddressTranslationService
This plugin implement a dummy memory translation (for CPU without MMU).
This plugin implement a dummy memory translation (for CPU without MMU). That way, the plugins like the LSU/Fetch always have a MMU-like interface, which symplify their code.