Packages

c

spinal.core

Interface

class Interface extends Bundle

system verilog interface

Example

case class MyIf(width: Int = 8) extends Interface with IMasterSlave {
 val wParam = addGeneric("WIDTH", width, default = "8")
 val a = Bits(width bits)
 tieGeneric(a, wParam)
 val b = Bool()
 val c = SInt(8 bits)

 override def asMaster = mst
 @modport
 def mst = {
   out(a, b, c)
 }

 @modport
 def slv = {
   in(a, b, c)
 }

}
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Interface
  2. Bundle
  3. ValCallbackRec
  4. ValCallback
  5. MultiData
  6. Data
  7. InComponent
  8. OverridedEqualsHashCode
  9. SpinalTagReady
  10. Assignable
  11. NameableByComponent
  12. Nameable
  13. OwnableRef
  14. ContextUser
  15. ScalaLocated
  16. GlobalDataUser
  17. AnyRef
  18. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Interface()

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def ##(right: Data): Bits

    Concatenation between two data

    Concatenation between two data

    Definition Classes
    Data
  3. final def ##(): Int
    Definition Classes
    AnyRef → Any
  4. def #*(count: Int): Bits
    Definition Classes
    Data
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. val IFGeneric: LinkedHashMap[(Data, String), String]
  7. def IFparent: Data
    Definition Classes
    Data
  8. val _spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  9. def addAttribute(attribute: Attribute): Interface.this.type
    Definition Classes
    DataSpinalTagReady
  10. def addAttribute(name: String, value: Int): Interface.this.type
    Definition Classes
    SpinalTagReady
  11. def addAttribute(name: String, value: String): Interface.this.type
    Definition Classes
    SpinalTagReady
  12. def addAttribute(name: String): Interface.this.type
    Definition Classes
    SpinalTagReady
  13. def addGeneric(name: String, that: Any, default: String = null): String
  14. def addParameter(name: String, that: Any, default: String = null): String
  15. def addTag[T <: SpinalTag](spinalTag: T): Interface.this.type
    Definition Classes
    MultiDataSpinalTagReady
  16. def addTags(h: SpinalTag, tail: SpinalTag*): Interface.this.type
    Definition Classes
    SpinalTagReady
  17. def addTags[T <: SpinalTag](tags: Iterable[T]): Interface.this.type
    Definition Classes
    SpinalTagReady
  18. def allModPort: List[String]
  19. def allowDirectionLessIo(): Interface.this.type

    Allow a Data of an io Bundle to be directionless

    Allow a Data of an io Bundle to be directionless

    See https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Design%20errors/iobundle.html

    Definition Classes
    Data
  20. def allowOverride(): Interface.this.type

    Allow a Data to be overriden

    Allow a Data to be overriden

    See https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Design%20errors/assignment_overlap.html

    Definition Classes
    Data
  21. def allowPartialyAssigned(): Interface.this.type

    Allow a register to be partially assigned

    Allow a register to be partially assigned

    Definition Classes
    Data
  22. def allowPruning(): Interface.this.type
    Definition Classes
    Data
  23. def allowSimplifyIt(): Interface.this.type
    Definition Classes
    Data
  24. def allowUnsetRegToAvoidLatch(): Interface.this.type

    Allow a register to have only an init (no assignments)

    Allow a register to have only an init (no assignments)

    See https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Design%20errors/unassigned_register.html#register-with-only-init

    Definition Classes
    Data
  25. def as[T <: Data](dataType: HardType[T]): T
    Definition Classes
    Data
  26. def asBits: Bits

    Cast data to Bits

    Cast data to Bits

    Definition Classes
    MultiDataData
  27. def asData: Data
    Definition Classes
    Data
  28. def asInOut(): Interface.this.type

    set a data as inout

    set a data as inout

    Definition Classes
    MultiDataData
  29. def asInput(): Interface.this.type

    Set a data as input

    Set a data as input

    Definition Classes
    MultiDataData
  30. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  31. def asOutput(): Interface.this.type

    Set a data as output

    Set a data as output

    Definition Classes
    MultiDataData
  32. def assignAllByName(that: Bundle): Unit

    Assign the bundle with an other bundle by name

    Assign the bundle with an other bundle by name

    Definition Classes
    Bundle
  33. def assignDontCare(): Interface.this.type
    Definition Classes
    Data
  34. def assignDontCareToUnasigned(): Interface.this.type
    Definition Classes
    Data
  35. def assignFormalRandom(kind: RandomExpKind): Unit
    Definition Classes
    MultiDataData
  36. final def assignFrom(that: AnyRef, target: AnyRef = this)(implicit loc: Location): Unit
    Definition Classes
    Data
  37. def assignFromBits(bits: Bits, hi: Int, lo: Int): Unit
    Definition Classes
    MultiDataData
  38. def assignFromBits(bits: Bits): Unit
    Definition Classes
    MultiDataData
  39. def assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit
    Definition Classes
    Data
  40. def assignFromImpl(that: AnyRef, target: AnyRef, kind: AnyRef)(implicit loc: Location): Unit
    Attributes
    protected
    Definition Classes
    BundleAssignable
  41. def assignSomeByName(that: Bundle): Unit

    Assign all possible signal fo the bundle with an other bundle by name

    Assign all possible signal fo the bundle with an other bundle by name

    Definition Classes
    Bundle
  42. def assignUnassignedByName(that: MultiData): Unit
    Definition Classes
    MultiData
  43. def bundleAssign(that: Bundle)(f: (Data, Data) ⇒ Unit): Unit
    Definition Classes
    Bundle
  44. def callModPort(s: String): Unit
  45. def checkDir(that: Bundle): Boolean

    for interface find modport

    for interface find modport

    Definition Classes
    Bundle
  46. def checkModport(): List[String]
  47. def clearAll(): Interface.this.type
    Definition Classes
    Data
  48. def clone(): Interface
    Definition Classes
    InterfaceBundleData → AnyRef
  49. def component: Component
    Definition Classes
    ContextUser
  50. final def compositAssignFrom(that: AnyRef, target: AnyRef, kind: AnyRef)(implicit loc: Location): Unit
    Definition Classes
    Assignable
  51. val compositeAssign: Assignable
    Definition Classes
    Assignable
  52. def copyDirectionOfImpl(that: Data): Interface.this.type
    Definition Classes
    MultiDataData
  53. var definitionName: String
  54. def dirString(): String
    Definition Classes
    Data
  55. def dontSimplifyIt(): Interface.this.type
    Definition Classes
    Data
  56. def elements: ArrayBuffer[(String, Data)]
    Definition Classes
    BundleMultiData
  57. var elementsCache: ArrayBuffer[(String, Data)]
    Definition Classes
    Bundle
  58. def elementsString: String
    Definition Classes
    MultiData
  59. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  60. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  61. def existsTag(cond: (SpinalTag) ⇒ Boolean): Boolean
    Definition Classes
    SpinalTagReady
  62. def filterTag(cond: (SpinalTag) ⇒ Boolean): Iterable[SpinalTag]
    Definition Classes
    SpinalTagReady
  63. def find(name: String): Data
    Definition Classes
    MultiData
  64. def findTag(cond: (SpinalTag) ⇒ Boolean): Option[SpinalTag]
    Definition Classes
    SpinalTagReady
  65. def flatten: Seq[BaseType]
    Definition Classes
    MultiDataData
  66. def flattenForeach(body: (BaseType) ⇒ Unit): Unit
    Definition Classes
    MultiDataData
  67. def flattenLocalName: Seq[String]
    Definition Classes
    MultiDataData
  68. def flip(): Interface.this.type

    flip the direction of the data

    flip the direction of the data

    Definition Classes
    MultiDataData
  69. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  70. def foreachTag(body: (SpinalTag) ⇒ Unit): Unit
    Definition Classes
    SpinalTagReady
  71. def freeze(): Interface.this.type
    Definition Classes
    MultiDataData
  72. val genericElements: ArrayBuffer[(String, Any, String)]
  73. def getAheadValue(): Interface.this.type

    For a register, get the value it will have at the next clock, as a combinational signal.

    For a register, get the value it will have at the next clock, as a combinational signal.

    Definition Classes
    Data
  74. def getBitsWidth: Int

    Return the width of the data

    Return the width of the data

    Definition Classes
    MultiDataData
  75. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  76. def getComponent(): Component
    Definition Classes
    DataInComponentNameableByComponent
  77. def getComponents(): Seq[Component]

    Get current component with all parents

    Get current component with all parents

    Definition Classes
    InComponent
  78. def getDirection: IODirection
    Definition Classes
    Data
  79. def getDisplayName(): String
    Definition Classes
    Nameable
  80. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  81. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  82. def getMuxType[T <: Data](list: TraversableOnce[T]): HardType[T]
    Definition Classes
    Data
  83. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  84. def getName(): String
    Definition Classes
    NameableByComponentNameable
  85. def getPartialName(): String
    Definition Classes
    Nameable
  86. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  87. def getRealSource: Any
    Definition Classes
    Assignable
  88. def getRealSourceNoRec: Any
    Definition Classes
    DataAssignable
  89. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  90. def getRootParent: Data
    Definition Classes
    Data
  91. def getRtlPath(separator: String = "/"): String
    Definition Classes
    Data
  92. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  93. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  94. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  95. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]
    Definition Classes
    SpinalTagReady
  96. def getTags(): LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  97. def getTypeString: String
    Definition Classes
    Bundle
  98. def getZero: Interface.this.type

    Create a data set to 0

    Create a data set to 0

    Definition Classes
    MultiDataData
  99. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  100. var hardtype: HardType[_]
    Definition Classes
    Bundle
  101. def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean
    Definition Classes
    SpinalTagReady
  102. def hasTag(spinalTag: SpinalTag): Boolean
    Definition Classes
    SpinalTagReady
  103. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  104. final def initFrom(that: AnyRef, target: AnyRef = this): Unit
    Definition Classes
    Data
  105. def instanceAttributes(language: Language): Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  106. def instanceAttributes: Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  107. def isAnalog: Boolean
    Definition Classes
    Data
  108. def isComb: Boolean
    Definition Classes
    Data
  109. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  110. def isDirectionLess: Boolean
    Definition Classes
    Data
  111. def isEmptyOfTag: Boolean
    Definition Classes
    SpinalTagReady
  112. def isInOut: Boolean
    Definition Classes
    Data
  113. def isInput: Boolean
    Definition Classes
    Data
  114. def isInputOrInOut: Boolean
    Definition Classes
    Data
  115. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  116. final def isNamed: Boolean
    Definition Classes
    Nameable
  117. def isOutput: Boolean
    Definition Classes
    Data
  118. def isOutputOrInOut: Boolean
    Definition Classes
    Data
  119. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  120. def isReg: Boolean
    Definition Classes
    Data
  121. def isRegOnAssign: Boolean
    Definition Classes
    Data
  122. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  123. val name: String
    Definition Classes
    Nameable
  124. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  125. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  126. def noBackendCombMerge(): Interface.this.type

    Put the combinatorial logic driving this signal in a separate process

    Put the combinatorial logic driving this signal in a separate process

    Definition Classes
    Data
  127. def noCombLoopCheck(): Interface.this.type

    Disable combinatorial loop checking for this Data

    Disable combinatorial loop checking for this Data

    See https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Design%20errors/combinatorial_loop.html

    Definition Classes
    Data
  128. def notSVIF(): Unit
  129. def notSVIFthisLevel(): Unit
  130. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  131. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  132. def onEachAttributes(doIt: (Attribute) ⇒ Unit): Unit
    Definition Classes
    SpinalTagReady
  133. def overrideLocalName(name: String): Interface.this.type
    Definition Classes
    Nameable
  134. val parent: Data
    Definition Classes
    Data
  135. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  136. def pull(propagateName: Boolean): Interface.this.type
    Definition Classes
    Data
  137. def pull(): Interface.this.type

    Pull a signal to the top level (use for debugging)

    Pull a signal to the top level (use for debugging)

    Definition Classes
    Data
  138. def purify(): Interface.this.type
    Definition Classes
    Data
  139. def randBoot(u: Unit): Interface.this.type

    Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)

    Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)

    Definition Classes
    Data
  140. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  141. def reflectNames(): Unit
    Definition Classes
    Nameable
  142. def removeAssignments(data: Boolean = true, init: Boolean = true, initial: Boolean = true): Interface.this.type
    Definition Classes
    Data
  143. def removeDataAssignments(): Interface.this.type
    Definition Classes
    Data
  144. def removeInitAssignments(): Interface.this.type
    Definition Classes
    Data
  145. def removeTag(spinalTag: SpinalTag): Interface.this.type
    Definition Classes
    SpinalTagReady
  146. def removeTags(tags: Iterable[SpinalTag]): Interface.this.type
    Definition Classes
    SpinalTagReady
  147. def resized: Interface.this.type

    Resized data regarding target

    Resized data regarding target

    Definition Classes
    Data
  148. def rootIF(): Interface

    root interface

    root interface

    Definition Classes
    Data
  149. def rootIFList(): List[Interface]
    Definition Classes
    Data
  150. def rootIFrec(now: Data, lastRoot: List[Interface]): List[Interface]
    Definition Classes
    Data
  151. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  152. def setAll(): Interface.this.type
    Definition Classes
    Data
  153. def setAsAnalog(): Interface.this.type
    Definition Classes
    Data
  154. def setAsComb(): Interface.this.type

    Set baseType to Combinatorial

    Set baseType to Combinatorial

    Definition Classes
    MultiDataData
  155. def setAsDirectionLess(): Interface.this.type

    remove the direction (in,out,inout) to a data

    remove the direction (in,out,inout) to a data

    Definition Classes
    MultiDataData
  156. def setAsReg(): Interface.this.type

    Set baseType to reg

    Set baseType to reg

    Definition Classes
    MultiDataData
  157. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): Interface.this.type
    Definition Classes
    Nameable
  158. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): Interface.this.type
    Definition Classes
    Nameable
  159. def setCompositeName(nameable: Nameable, postfix: String): Interface.this.type
    Definition Classes
    Nameable
  160. def setCompositeName(nameable: Nameable, namePriority: Byte): Interface.this.type
    Definition Classes
    Nameable
  161. def setCompositeName(nameable: Nameable, weak: Boolean): Interface.this.type
    Definition Classes
    Nameable
  162. def setCompositeName(nameable: Nameable): Interface.this.type
    Definition Classes
    Nameable
  163. def setDefinitionName(name: String): Interface.this.type

    Set the definition name of the component

  164. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): Interface.this.type
    Definition Classes
    Nameable
  165. def setName(name: String, namePriority: Byte): Interface.this.type
    Definition Classes
    Nameable
  166. def setName(name: String, weak: Boolean): Interface.this.type
    Definition Classes
    Nameable
  167. def setName(name: String): Interface.this.type
    Definition Classes
    Nameable
  168. def setNameAsWeak(): Interface.this.type
    Definition Classes
    Nameable
  169. def setOutputAsReg(): Interface.this.type

    Recursively set baseType to reg only for output

    Recursively set baseType to reg only for output

    Definition Classes
    Data
  170. def setPartialName(name: String, namePriority: Byte, owner: Any): Interface.this.type
    Definition Classes
    Nameable
  171. def setPartialName(name: String, namePriority: Byte): Interface.this.type
    Definition Classes
    Nameable
  172. def setPartialName(name: String, weak: Boolean): Interface.this.type
    Definition Classes
    Nameable
  173. def setPartialName(owner: Nameable, name: String, namePriority: Byte): Interface.this.type
    Definition Classes
    Nameable
  174. def setPartialName(owner: Nameable, name: String, weak: Boolean): Interface.this.type
    Definition Classes
    Nameable
  175. def setPartialName(name: String): Interface.this.type
    Definition Classes
    Nameable
  176. def setPartialName(owner: Nameable, name: String): Interface.this.type
    Definition Classes
    Nameable
  177. def setPartialName(owner: Nameable): Interface.this.type
    Definition Classes
    Nameable
  178. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  179. def setScalaLocated(source: ScalaLocated): Interface.this.type
    Definition Classes
    ScalaLocated
  180. def setWeakName(name: String): Interface.this.type
    Definition Classes
    Nameable
  181. def spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  182. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  183. var thisIsNotSVIF: Boolean
  184. def tieGeneric[T <: BitVector](signal: T, generic: String): LinkedHashMap[BitVector, String]
  185. def tieIFParameter[T <: Interface](signal: T, signalParam: String, inputParam: String): LinkedHashMap[(Data, String), String]
  186. def tieParameter[T <: BitVector](signal: T, parameter: String): LinkedHashMap[BitVector, String]
  187. def toIo(): Interface.this.type
    Definition Classes
    Data
  188. def toMuxInput[T <: Data](muxOutput: T): T
    Definition Classes
    Data
  189. def toString(): String
    Definition Classes
    BundleNameable → AnyRef → Any
  190. def unfreeze(): Interface.this.type
    Definition Classes
    MultiDataData
  191. def unsetName(): Interface.this.type
    Definition Classes
    Nameable
  192. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  193. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  194. def valCallbackRec(ref: Any, name: String): Unit
    Definition Classes
    InterfaceBundleValCallbackRec
  195. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  196. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  197. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  198. val widthGeneric: LinkedHashMap[BitVector, String]
  199. def wrapNext(): Interface.this.type
    Definition Classes
    Data
  200. def zipByName(that: MultiData, rec: ArrayBuffer[(BaseType, BaseType)] = ArrayBuffer()): ArrayBuffer[(BaseType, BaseType)]
    Definition Classes
    MultiData

Deprecated Value Members

  1. def asDirectionLess(): Interface.this.type
    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    (Since version ???) use setAsDirectionLess instead

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated
  3. def genIf(cond: Boolean): Interface.this.type

    Generate this if condition is true

    Generate this if condition is true

    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    does not work with <>, use 'someBool generate Type()' or 'if(condition) Type() else null' instead

Inherited from Bundle

Inherited from ValCallbackRec

Inherited from ValCallback

Inherited from MultiData

Inherited from Data

Inherited from InComponent

Inherited from OverridedEqualsHashCode

Inherited from SpinalTagReady

Inherited from Assignable

Inherited from NameableByComponent

Inherited from Nameable

Inherited from OwnableRef

Inherited from ContextUser

Inherited from ScalaLocated

Inherited from GlobalDataUser

Inherited from AnyRef

Inherited from Any

Ungrouped