Class

spinal.core

BlackBox

Related Doc: package core

Permalink

abstract class BlackBox extends Component

A blackbox allows the user to integrate an existing VHDL/Verilog component into the design by just specifying the interfaces.

Example:
  1.  class Ram_1w_1r(wordWidth: Int, wordCount: Int) extends BlackBox {
         val generic = new Generic {
             val wordCount = Ram_1w_1r.this.wordCount
             val wordWidth = Ram_1w_1r.this.wordWidth
         }
         val io = new Bundle {
             val clk = in Bool()
             val wr = new Bundle {
                 val en   = in Bool()
                 val addr = in UInt (log2Up(wordCount) bit)
                 val data = in Bits (wordWidth bit)
             }
             val rd = new Bundle {
                 val en   = in Bool()
                 val addr = in UInt (log2Up(wordCount) bit)
                 val data = out Bits (wordWidth bit)
             }
         }
         mapClockDomain(clock=io.clk)
    }
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BlackBox
  2. Component
  3. ValCallbackRec
  4. ValCallback
  5. OverridedEqualsHashCode
  6. SpinalTagReady
  7. Stackable
  8. PostInitCallback
  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 BlackBox()

    Permalink

Type Members

  1. case class PrePopTask(task: () ⇒ Unit) extends Product with Serializable

    Permalink

    Class used to create a task that must be executed after the creation of the component

    Class used to create a task that must be executed after the creation of the component

    Definition Classes
    Component
  2. abstract type RefOwnerType

    Permalink
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var _spinalTags: LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  5. def addAttribute(attribute: Attribute): BlackBox.this.type

    Permalink
    Definition Classes
    ComponentSpinalTagReady
  6. def addAttribute(name: String, value: Int): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  7. def addAttribute(name: String, value: String): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  8. def addAttribute(name: String): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  9. def addComment(str: String): Component

    Permalink
    Definition Classes
    Component
  10. def addGeneric(name: String, that: Any): Unit

    Permalink
  11. def addGenerics(l: (String, Any)*): Unit

    Permalink
  12. def addPrePopTask(task: () ⇒ Unit): ArrayBuffer[PrePopTask]

    Permalink

    Add a new prePopTask

    Add a new prePopTask

    Definition Classes
    Component
  13. def addRTLPath(path: String): LinkedHashSet[String]

    Permalink

    Add the path of the rtl file

  14. def addTag[T <: SpinalTag](spinalTag: T): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  15. def addTags[T <: SpinalTag](tags: Iterable[T]): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  16. def afterElaboration(body: ⇒ Unit): ArrayBuffer[PrePopTask]

    Permalink
    Definition Classes
    Component
  17. def asFormalDut(): BlackBox.this.type

    Permalink
    Definition Classes
    Component
  18. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  19. val children: ArrayBuffer[Component]

    Permalink

    Contains an array of all children Component

    Contains an array of all children Component

    Definition Classes
    Component
  20. def clearBlackBox(): Unit

    Permalink
  21. val clockDomain: Handle[ClockDomain]

    Permalink

    Get the current clock domain (null if there is no clock domain already set )

    Get the current clock domain (null if there is no clock domain already set )

    Definition Classes
    Component
  22. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  23. def component: Component

    Permalink
    Definition Classes
    ContextUser
  24. val definition: $anon forSome {type $anon <: SpinalTagReady { def addComment(str: String): $anon }}

    Permalink
    Definition Classes
    Component
  25. var definitionName: String

    Permalink

    Definition Name (name of the entity (VHDL) or module (Verilog))

    Definition Name (name of the entity (VHDL) or module (Verilog))

    Definition Classes
    Component
  26. var definitionNameNoMerge: Boolean

    Permalink
    Definition Classes
    Component
  27. val dslBody: ScopeStatement

    Permalink
    Definition Classes
    Component
  28. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  30. def existsTag(cond: (SpinalTag) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  31. def filterTag(cond: (SpinalTag) ⇒ Boolean): Iterable[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  32. def findTag(cond: (SpinalTag) ⇒ Boolean): Option[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  33. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Nameable
  34. def foreachTag(body: (SpinalTag) ⇒ Unit): Unit

    Permalink
    Definition Classes
    SpinalTagReady
  35. val genericElements: ArrayBuffer[(String, Any)]

    Permalink
  36. def getAllIo: Set[BaseType]

    Permalink

    Get a set of all IO available in the component

    Get a set of all IO available in the component

    Definition Classes
    Component
  37. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  38. def getDisplayName(): String

    Permalink
    Definition Classes
    ComponentNameable
  39. def getGeneric: Generic

    Permalink

    Return the generic of the blackbox

  40. def getGroupedIO(ioBundleBypass: Boolean): Seq[Data]

    Permalink
    Definition Classes
    Component
  41. def getInstanceCounter: Int

    Permalink
    Definition Classes
    ContextUser
  42. def getMode: Byte

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  43. def getName(default: String): String

    Permalink
    Definition Classes
    NameableByComponentNameable
  44. def getName(): String

    Permalink
    Definition Classes
    NameableByComponentNameable
  45. def getOrdredNodeIo: List[BaseType]

    Permalink

    Sort all IO regarding instanceCounter

    Sort all IO regarding instanceCounter

    Definition Classes
    Component
  46. def getParentsPath(sep: String = "/"): String

    Permalink

    Return the path of the parent

    Return the path of the parent

    Definition Classes
    Component
    Example:
    1. toplevel/[myComponent1] // Current component is myComponent2
  47. def getPartialName(): String

    Permalink
    Definition Classes
    Nameable
  48. def getPath(sep: String = "/"): String

    Permalink

    Return the path of the component

    Return the path of the component

    Definition Classes
    Component
    Example:
    1. toplevel/[myComponent1]/[myComponent2] // Current component is myComponent2
  49. def getPath(from: Component, to: Component): Seq[Component]

    Permalink
    Definition Classes
    NameableByComponent
  50. def getRefOwnersChain(): List[Any]

    Permalink
    Definition Classes
    OwnableRef
  51. def getRtlPath(separator: String = "/"): String

    Permalink
    Definition Classes
    Component
  52. def getScalaLocationLong: String

    Permalink
    Definition Classes
    ScalaLocated
  53. def getScalaLocationShort: String

    Permalink
    Definition Classes
    ScalaLocated
  54. def getScalaTrace(): Throwable

    Permalink
    Definition Classes
    ScalaLocated
  55. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]

    Permalink
    Definition Classes
    SpinalTagReady
  56. def getTags(): LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  57. val globalData: GlobalData

    Permalink
    Definition Classes
    GlobalDataUser
  58. def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  59. def hasTag(spinalTag: SpinalTag): Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  60. def hashCode(): Int

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  61. var impl: BlackBoxImpl

    Permalink
  62. def instanceAttributes(language: Language): Iterable[Attribute]

    Permalink
    Definition Classes
    SpinalTagReady
  63. def instanceAttributes: Iterable[Attribute]

    Permalink
    Definition Classes
    SpinalTagReady
  64. def isBlackBox: Boolean

    Permalink
  65. def isCompletelyUnnamed: Boolean

    Permalink
    Definition Classes
    Nameable
  66. def isDefaultGenericValue: Boolean

    Permalink
  67. def isEmptyOfTag: Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  68. var isFormalTester: Boolean

    Permalink
    Definition Classes
    Component
  69. def isInBlackBoxTree: Boolean

    Permalink
    Definition Classes
    BlackBoxComponent
  70. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  71. def isLogicLess: Boolean

    Permalink
    Definition Classes
    Component
  72. def isNamed: Boolean

    Permalink
    Definition Classes
    NameableByComponentNameable
  73. def isPriorityApplicable(namePriority: Byte): Boolean

    Permalink
    Definition Classes
    Nameable
  74. var isSpinalSimWb: Boolean

    Permalink
  75. def isUnnamed: Boolean

    Permalink
    Definition Classes
    Nameable
  76. def isUsingNoNumericType: Boolean

    Permalink

    Return true if the blackbox used the tag noNumericType

  77. def isUsingULogic: Boolean

    Permalink

    Return true if the blackbox used std_ulogic

  78. val librariesUsages: HashSet[String]

    Permalink
  79. val listRTLPath: LinkedHashSet[String]

    Permalink
  80. var localNamingScope: NamingScope

    Permalink

    Name allocation

    Name allocation

    Definition Classes
    Component
  81. def mapClockDomain(clockDomain: ClockDomain = ClockDomain.current, clock: Bool = null, reset: Bool = null, enable: Bool = null, resetActiveLevel: Polarity = HIGH, enableActiveLevel: Polarity = HIGH): Unit

    Permalink

    Map clock domain signals (clock, reset, enable) to a clockDomain

  82. def mapCurrentClockDomain(clock: Bool, reset: Bool = null, enable: Bool = null, resetActiveLevel: Polarity = HIGH, enableActiveLevel: Polarity = HIGH): Unit

    Permalink

    Map clock domains signal to the current ClockDomain

  83. var name: String

    Permalink
    Definition Classes
    Nameable
  84. var nameableRef: Nameable

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  85. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  86. def noIoPrefix(): BlackBox.this.type

    Permalink

    No "io_" prefix in front of the in/out signals

    No "io_" prefix in front of the in/out signals

    Definition Classes
    Component
  87. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  88. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  89. def onBody[T](body: ⇒ T): T

    Permalink
    Definition Classes
    Component
  90. def onEachAttributes(doIt: (Attribute) ⇒ Unit): Unit

    Permalink
    Definition Classes
    SpinalTagReady
  91. def overrideLocalName(name: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  92. def parent: Component

    Permalink

    Get the parent component (null if there is no parent)

    Get the parent component (null if there is no parent)

    Definition Classes
    Component
  93. var parentScope: ScopeStatement

    Permalink
    Definition Classes
    ContextUser
  94. def parents(of: Component = this, list: List[Component] = Nil): List[Component]

    Permalink

    Return a list of all parents of the components

    Return a list of all parents of the components

    Definition Classes
    Component
  95. def postInitCallback(): BlackBox.this.type

    Permalink
    Definition Classes
    Component → PostInitCallback
  96. def postPopEvent(): Unit

    Permalink
    Definition Classes
    Stackable
  97. def postPushEvent(): Unit

    Permalink
    Definition Classes
    ComponentStackable
  98. def prePop(): Unit

    Permalink
    Definition Classes
    Component
  99. def prePopEvent(): Unit

    Permalink
    Definition Classes
    ComponentStackable
  100. var pulledDataCache: Map[Data, Data]

    Permalink
    Definition Classes
    Component
  101. var refOwner: RefOwnerType

    Permalink
    Definition Classes
    OwnableRef
  102. def reflectBaseType(name: String): BaseType

    Permalink
    Definition Classes
    Component
  103. def reflectNames(): Unit

    Permalink
    Definition Classes
    Nameable
  104. def removeTag(spinalTag: SpinalTag): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  105. def removeTags(tags: Iterable[SpinalTag]): BlackBox.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  106. def replaceStdLogicByStdULogic(): BlackBox

    Permalink

    Replace std_logic by std_ulogic

  107. def rework[T](gen: ⇒ T): T

    Permalink
    Definition Classes
    Component
  108. var scalaTrace: Throwable

    Permalink
    Definition Classes
    ScalaLocated
  109. val scopeProperties: Capture

    Permalink

    Rework the component

    Rework the component

    Definition Classes
    Component
  110. def setBlackBox(): Unit

    Permalink
  111. def setBlackBoxName(name: String): BlackBox.this.type

    Permalink

    Set the name of the blackbox

  112. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  113. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  114. def setCompositeName(nameable: Nameable, postfix: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  115. def setCompositeName(nameable: Nameable, namePriority: Byte): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  116. def setCompositeName(nameable: Nameable, weak: Boolean): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  117. def setCompositeName(nameable: Nameable): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  118. def setDefinitionName(name: String, noMerge: Boolean = true): BlackBox.this.type

    Permalink

    Set the definition name of the component

    Set the definition name of the component

    Definition Classes
    Component
  119. def setFormalTester(): Unit

    Permalink
    Definition Classes
    Component
  120. def setInline(impl: BlackBoxImpl): Unit

    Permalink
  121. def setInlineVerilog(str: String): Unit

    Permalink
  122. def setInlineVhdl(str: String): Unit

    Permalink
  123. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  124. def setName(name: String, namePriority: Byte): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  125. def setName(name: String, weak: Boolean): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  126. def setName(name: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  127. def setNameAsWeak(): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  128. def setPartialName(name: String, namePriority: Byte, owner: Any): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  129. def setPartialName(name: String, namePriority: Byte): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  130. def setPartialName(name: String, weak: Boolean): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  131. def setPartialName(owner: Nameable, name: String, namePriority: Byte): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  132. def setPartialName(owner: Nameable, name: String, weak: Boolean): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  133. def setPartialName(name: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  134. def setPartialName(owner: Nameable, name: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  135. def setPartialName(owner: Nameable): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  136. def setRefOwner(that: Any): Unit

    Permalink
    Definition Classes
    OwnableRef
  137. def setScalaLocated(source: ScalaLocated): BlackBox.this.type

    Permalink
    Definition Classes
    ScalaLocated
  138. def setWeakName(name: String): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  139. def spinalSimWhiteBox(): Unit

    Permalink
  140. def spinalTags: LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  141. def stub(): BlackBox.this.type

    Permalink

    Empty Component, remove logic in component and assign zero on output port as stub

    Empty Component, remove logic in component and assign zero on output port as stub

    Definition Classes
    Component
    Example:
    1. val dut = (new MyComponent).stub()
  142. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  143. def toString(): String

    Permalink
    Definition Classes
    Nameable → AnyRef → Any
  144. def traceDisable(recursive: Boolean = true): BlackBox.this.type

    Permalink
    Definition Classes
    Component
  145. def traceEnable(recursive: Boolean = true): BlackBox.this.type

    Permalink
    Definition Classes
    Component
  146. var traceEnabled: Boolean

    Permalink
    Definition Classes
    Component
  147. def unsetName(): BlackBox.this.type

    Permalink
    Definition Classes
    Nameable
  148. val userCache: Map[Any, Any]

    Permalink

    Used to store arbitrary object related to the component

    Used to store arbitrary object related to the component

    Definition Classes
    Component
  149. def valCallback[T](ref: T, name: String): T

    Permalink
    Definition Classes
    ValCallbackRec → ValCallback
  150. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit

    Permalink
    Definition Classes
    ValCallbackRec
  151. def valCallbackRec(ref: Any, name: String): Unit

    Permalink
    Definition Classes
    ComponentValCallbackRec
  152. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  153. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  154. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  155. def walkComponents(body: (Component) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Component
  156. def withAutoPull(): Unit

    Permalink
    Definition Classes
    Component
  157. var withHierarchyAutoPull: Boolean

    Permalink
    Definition Classes
    Component
  158. def withKeywords(): Unit

    Permalink
    Definition Classes
    Component
  159. var withVitalOutputs: Boolean

    Permalink
    Definition Classes
    Component
  160. def withoutKeywords(): Unit

    Permalink
    Definition Classes
    Component
  161. var withoutReservedKeywords: Boolean

    Permalink
    Definition Classes
    Component

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Component

Inherited from ValCallbackRec

Inherited from ValCallback

Inherited from OverridedEqualsHashCode

Inherited from SpinalTagReady

Inherited from Stackable

Inherited from PostInitCallback

Inherited from NameableByComponent

Inherited from Nameable

Inherited from ContextUser

Inherited from ScalaLocated

Inherited from GlobalDataUser

Inherited from OwnableRef

Inherited from AnyRef

Inherited from Any

Ungrouped