c

vexiiriscv.execute

CsrAccessPlugin

class CsrAccessPlugin extends FiberPlugin with CsrService

Implements the RISC-V CSR read/write instructions, aswell as provide an API for other plugin to populate the CSR space. In other words, this plugin do not define any CSR, but provide an API to define them (that API is defined in CsrService).

To help with the FMax, CSR accesses are implemented by using a state-machine. Accesses are done over 4 cycles : idle -> read -> write -> completion

This maybe a bit overkilled, but as the CSR access isn't critical for the IPC, better to much cycles than not enough.

Linear Supertypes
CsrService, FiberPlugin, Hostable, Area, OverridedEqualsHashCode, ValCallbackRec, ValCallback, NameableByComponent, Nameable, ContextUser, ScalaLocated, GlobalDataUser, OwnableRef, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CsrAccessPlugin
  2. CsrService
  3. FiberPlugin
  4. Hostable
  5. Area
  6. OverridedEqualsHashCode
  7. ValCallbackRec
  8. ValCallback
  9. NameableByComponent
  10. Nameable
  11. ContextUser
  12. ScalaLocated
  13. GlobalDataUser
  14. OwnableRef
  15. AnyRef
  16. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CsrAccessPlugin(layer: LaneLayer, writeBackKey: Any, injectAt: Int = 0, wbAt: Int = 1)

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef

Value Members

  1. val CSR_ADDRESS: NamedType[UInt]
  2. val CSR_CLEAR: NamedType[Bool]
  3. val CSR_IMM: NamedType[Bool]
  4. val CSR_MASK: NamedType[Bool]
  5. val CSR_READ: NamedType[Bool]
  6. val CSR_WRITE: NamedType[Bool]
  7. val SEL: NamedType[Bool]
  8. val TO_RF: NamedType[Bits]
  9. val _context: Capture
    Definition Classes
    Area
  10. def addService[T](that: T): T
    Definition Classes
    FiberPlugin
  11. def allowCsr(csrFilter: Any): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  12. def awaitBuild(): Unit
    Definition Classes
    FiberPlugin
  13. def buildBefore(l: ⇒ Lock): Unit
    Definition Classes
    FiberPlugin
  14. var buildCount: Int
    Definition Classes
    FiberPlugin
  15. val bus: Handle[CsrBus]
    Definition Classes
    CsrAccessPluginCsrService
  16. def childNamePriority: Byte
    Definition Classes
    Area
  17. def component: Component
    Definition Classes
    ContextUser
  18. val csrLock: Retainer
    Definition Classes
    CsrService
  19. def during: AnyRef { ... /* 2 definitions in type refinement */ }
    Definition Classes
    FiberPlugin
  20. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  21. def flushOnWrite(csrFilter: Any): Unit
    Definition Classes
    CsrService
  22. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  23. def getDisplayName(): String
    Definition Classes
    Nameable
  24. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  25. def getName(default: String): String
    Definition Classes
    NameableByComponent → Nameable
  26. def getName(): String
    Definition Classes
    NameableByComponent → Nameable
  27. def getPartialName(): String
    Definition Classes
    Nameable
  28. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  29. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  30. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  31. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  32. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  33. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  34. def hart(hartId: Int): CsrHartApi
    Definition Classes
    CsrService
  35. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  36. var host: PluginHost
    Definition Classes
    FiberPlugin
  37. val hostLock: Lock
    Definition Classes
    FiberPlugin
  38. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  39. final def isNamed: Boolean
    Definition Classes
    Nameable
  40. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  41. val isReadingCsrMap: LinkedHashMap[Any, CsrIsReadingCsr]
    Definition Classes
    CsrService
  42. val isReadingHartIdCsrMap: LinkedHashMap[(Int, Any), Bool]
    Definition Classes
    CsrService
  43. def isUnnamed: Boolean
    Definition Classes
    NameableByComponent → Nameable
  44. val layer: LaneLayer
  45. val lockables: LinkedHashSet[() ⇒ Lock]
    Definition Classes
    FiberPlugin
  46. val logic: Handle[Area { ... /* 19 definitions in type refinement */ }]
  47. val name: String
    Definition Classes
    Nameable
  48. def onDecode(csrFilter: Any, priority: Int = 0)(body: ⇒ Unit): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  49. def onRead(csrFilter: Any, onlyOnFire: Boolean)(body: ⇒ Unit): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  50. def onReadToWrite(csrFilter: Any)(body: ⇒ Unit): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  51. val onReadingHartIdMap: LinkedHashMap[Int, Bool]
    Definition Classes
    CsrService
  52. def onWrite(csrFilter: Any, onlyOnFire: Boolean)(body: ⇒ Unit): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  53. val onWritingHartIdMap: LinkedHashMap[Int, Bool]
    Definition Classes
    CsrService
  54. def overrideLocalName(name: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  55. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  56. var pluginEnabled: Boolean
    Definition Classes
    FiberPlugin
  57. def read(csrAddress: Int, thats: (Int, Data)*): Unit
    Definition Classes
    CsrService
  58. def read[T <: Data](value: T, csrFilter: Any, bitOffset: Int = 0): Unit
    Definition Classes
    CsrService
  59. def readAlways[T <: Data](value: T, bitOffset: Int = 0): Unit
    Definition Classes
    CsrService
  60. def readToWrite[T <: Data](value: T, csrFilter: Any, bitOffset: Int = 0): Unit
    Definition Classes
    CsrService
  61. def readWrite(csrAddress: Int, thats: (Int, Data)*): Unit
    Definition Classes
    CsrService
  62. def readWrite[T <: Data](value: T, csrId: Int, bitOffset: Int = 0): T
    Definition Classes
    CsrService
  63. def readingCsr(csrFilter: Any): Bool
    Definition Classes
    CsrService
  64. def readingHartId(hartId: Int): Bool
    Definition Classes
    CsrService
  65. def readingHartIdCsr(hartId: Int, csrFilter: Any): Bool
    Definition Classes
    CsrService
  66. val reads: ArrayBuffer[CsrOnReadData]
    Definition Classes
    CsrService
  67. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  68. def reflectNames(): Unit
    Definition Classes
    Nameable
  69. def retains(head: Any, tail: Any*): RetainerGroup
    Definition Classes
    FiberPlugin
  70. def retains(that: Seq[Any]): RetainerGroup
    Definition Classes
    FiberPlugin
  71. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  72. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  73. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  74. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  75. def setCompositeName(nameable: Nameable, postfix: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  76. def setCompositeName(nameable: Nameable, namePriority: Byte): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  77. def setCompositeName(nameable: Nameable, weak: Boolean): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  78. def setCompositeName(nameable: Nameable): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  79. def setHost(h: PluginHost): Unit
    Definition Classes
    FiberPlugin → Hostable
  80. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  81. def setName(name: String, namePriority: Byte): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  82. def setName(name: String, weak: Boolean): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  83. def setName(name: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  84. def setNameAsWeak(): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  85. def setPartialName(name: String, namePriority: Byte, owner: Any): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  86. def setPartialName(name: String, namePriority: Byte): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  87. def setPartialName(name: String, weak: Boolean): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  88. def setPartialName(owner: Nameable, name: String, namePriority: Byte): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  89. def setPartialName(owner: Nameable, name: String, weak: Boolean): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  90. def setPartialName(name: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  91. def setPartialName(owner: Nameable, name: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  92. def setPartialName(owner: Nameable): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  93. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  94. def setScalaLocated(source: ScalaLocated): CsrAccessPlugin.this.type
    Definition Classes
    ScalaLocated
  95. def setWeakName(name: String): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  96. def setupRetain(l: ⇒ Lock): Unit
    Definition Classes
    FiberPlugin
  97. val spec: ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  98. val subservices: ArrayBuffer[Any]
    Definition Classes
    FiberPlugin
  99. def toString(): String
    Definition Classes
    Area → Nameable → AnyRef → Any
  100. val trapNextOnWrite: LinkedHashSet[Any]
    Definition Classes
    CsrService
  101. def unsetName(): CsrAccessPlugin.this.type
    Definition Classes
    Nameable
  102. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  103. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  104. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    Area → ValCallbackRec
  105. def waitElaborationDone(): Unit
    Definition Classes
    CsrAccessPluginCsrService
  106. def withPrefix(prefix: String): FiberPlugin
    Definition Classes
    FiberPlugin
  107. def write(csrAddress: Int, thats: (Int, Data)*): Unit
    Definition Classes
    CsrService
  108. def write[T <: Data](value: T, csrId: Int, bitOffset: Int = 0): T
    Definition Classes
    CsrService
  109. def writeCancel(csrFilter: Any, cond: Bool): ArrayBuffer[CsrSpec]
    Definition Classes
    CsrService
  110. def writeWhen[T <: Data](value: T, cond: Bool, csrId: Int, bitOffset: Int = 0): T
    Definition Classes
    CsrService
  111. def writingHartId(hartId: Int): Bool
    Definition Classes
    CsrService