Packages

c

spinal.core

BlackBox

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)
    }
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. Protected

Instance Constructors

  1. new BlackBox()

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef
  2. case class PrePopTask(task: () => Unit) extends Product with Serializable

    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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val _spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  5. def addAttribute(attribute: Attribute): BlackBox.this.type
    Definition Classes
    ComponentSpinalTagReady
  6. def addAttribute(name: String, value: Int): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  7. def addAttribute(name: String, value: String): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  8. def addAttribute(name: String): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  9. def addGeneric(name: String, that: Any): Unit
  10. def addGenerics(l: (String, Any)*): Unit
  11. def addPrePopTask(task: () => Unit): ArrayBuffer[PrePopTask]

    Add a new prePopTask

    Add a new prePopTask

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

    Add the path of the rtl file

  13. def addTag[T <: SpinalTag](spinalTag: T): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  14. def addTags[T <: SpinalTag](tags: Iterable[T]): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  15. def afterElaboration(body: => Unit): ArrayBuffer[PrePopTask]
    Definition Classes
    Component
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. val children: ArrayBuffer[Component]

    Contains an array of all children Component

    Contains an array of all children Component

    Definition Classes
    Component
  18. def clearBlackBox(): Unit
  19. val clockDomain: Handle[ClockDomain]

    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
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  21. def component: Component
    Definition Classes
    ContextUser
  22. val definition: SpinalTagReady
    Definition Classes
    Component
  23. var definitionName: String

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

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

    Definition Classes
    Component
  24. var definitionNameNoMerge: Boolean
    Definition Classes
    Component
  25. val dslBody: ScopeStatement
    Definition Classes
    Component
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  28. def existsTag(cond: (SpinalTag) => Boolean): Boolean
    Definition Classes
    SpinalTagReady
  29. def filterTag(cond: (SpinalTag) => Boolean): Iterable[SpinalTag]
    Definition Classes
    SpinalTagReady
  30. def findTag(cond: (SpinalTag) => Boolean): Option[SpinalTag]
    Definition Classes
    SpinalTagReady
  31. def foreachReflectableNameables(doThat: (Any) => Unit): Unit
    Definition Classes
    Nameable
  32. def foreachTag(body: (SpinalTag) => Unit): Unit
    Definition Classes
    SpinalTagReady
  33. val genericElements: ArrayBuffer[(String, Any)]
  34. def getAllIo: Set[BaseType]

    Get a set of all IO available in the component

    Get a set of all IO available in the component

    Definition Classes
    Component
  35. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  36. def getDisplayName(): String
    Definition Classes
    ComponentNameable
  37. def getGeneric: Generic

    Return the generic of the blackbox

  38. def getGroupedIO(ioBundleBypass: Boolean): Seq[Data]
    Definition Classes
    Component
  39. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  40. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  41. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  42. def getName(): String
    Definition Classes
    NameableByComponentNameable
  43. def getOrdredNodeIo: List[BaseType]

    Sort all IO regarding instanceCounter

    Sort all IO regarding instanceCounter

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

    Return the path of the parent

    Return the path of the parent

    Definition Classes
    Component
    Example:
    1. toplevel/[myComponent1] // Current component is myComponent2
  45. def getPartialName(): String
    Definition Classes
    Nameable
  46. def getPath(sep: String = "/"): String

    Return the path of the component

    Return the path of the component

    Definition Classes
    Component
    Example:
    1. toplevel/[myComponent1]/[myComponent2] // Current component is myComponent2
  47. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  48. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  49. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  50. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  51. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]
    Definition Classes
    SpinalTagReady
  52. def getTags(): LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  53. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  54. def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean
    Definition Classes
    SpinalTagReady
  55. def hasTag(spinalTag: SpinalTag): Boolean
    Definition Classes
    SpinalTagReady
  56. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  57. var impl: BlackBoxImpl
  58. def instanceAttributes(language: Language): Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  59. def instanceAttributes: Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  60. def isBlackBox: Boolean
  61. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  62. def isDefaultGenericValue: Boolean
  63. def isEmptyOfTag: Boolean
    Definition Classes
    SpinalTagReady
  64. def isInBlackBoxTree: Boolean
    Definition Classes
    BlackBoxComponent
  65. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  66. def isLogicLess: Boolean
    Definition Classes
    Component
  67. def isNamed: Boolean
    Definition Classes
    NameableByComponentNameable
  68. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  69. var isSpinalSimWb: Boolean
  70. def isUnnamed: Boolean
    Definition Classes
    Nameable
  71. def isUsingNoNumericType: Boolean

    Return true if the blackbox used the tag noNumericType

  72. def isUsingULogic: Boolean

    Return true if the blackbox used std_ulogic

  73. val librariesUsages: HashSet[String]
  74. val listRTLPath: LinkedHashSet[String]
  75. var localNamingScope: NamingScope

    Name allocation

    Name allocation

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

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

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

    Map clock domains signal to the current ClockDomain

  78. val name: String
    Attributes
    protected
    Definition Classes
    Nameable
  79. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  80. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  81. def noIoPrefix(): BlackBox.this.type

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

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

    Definition Classes
    Component
  82. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  83. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  84. def onBody[T](body: => T): T
    Definition Classes
    Component
  85. def onEachAttributes(doIt: (Attribute) => Unit): Unit
    Definition Classes
    SpinalTagReady
  86. def overrideLocalName(name: String): BlackBox.this.type
    Definition Classes
    Nameable
  87. def parent: Component

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

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

    Definition Classes
    Component
  88. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  89. def parents(of: Component = this, list: List[Component] = Nil): List[Component]

    Return a list of all parents of the components

    Return a list of all parents of the components

    Definition Classes
    Component
  90. def postInitCallback(): BlackBox.this.type
    Definition Classes
    Component → PostInitCallback
  91. def postPopEvent(): Unit
    Definition Classes
    Stackable
  92. def postPushEvent(): Unit
    Definition Classes
    ComponentStackable
  93. def prePop(): Unit
    Definition Classes
    Component
  94. def prePopEvent(): Unit
    Definition Classes
    ComponentStackable
  95. var pulledDataCache: Map[Data, Data]

    Reference owner type

    Reference owner type

    Definition Classes
    Component
  96. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  97. def reflectBaseType(name: String): BaseType
    Definition Classes
    Component
  98. def reflectNames(): Unit
    Definition Classes
    Nameable
  99. def removeTag(spinalTag: SpinalTag): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  100. def removeTags(tags: Iterable[SpinalTag]): BlackBox.this.type
    Definition Classes
    SpinalTagReady
  101. def replaceStdLogicByStdULogic(): BlackBox

    Replace std_logic by std_ulogic

  102. def rework[T](gen: => T): T
    Definition Classes
    Component
  103. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  104. val scopeProperties: Capture

    Rework the component

    Rework the component

    Definition Classes
    Component
  105. def setBlackBox(): Unit
  106. def setBlackBoxName(name: String): BlackBox.this.type

    Set the name of the blackbox

  107. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): BlackBox.this.type
    Definition Classes
    Nameable
  108. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): BlackBox.this.type
    Definition Classes
    Nameable
  109. def setCompositeName(nameable: Nameable, postfix: String): BlackBox.this.type
    Definition Classes
    Nameable
  110. def setCompositeName(nameable: Nameable, namePriority: Byte): BlackBox.this.type
    Definition Classes
    Nameable
  111. def setCompositeName(nameable: Nameable, weak: Boolean): BlackBox.this.type
    Definition Classes
    Nameable
  112. def setCompositeName(nameable: Nameable): BlackBox.this.type
    Definition Classes
    Nameable
  113. def setDefinitionName(name: String, noMerge: Boolean = true): BlackBox.this.type

    Set the definition name of the component

    Set the definition name of the component

    Definition Classes
    Component
  114. def setInline(impl: BlackBoxImpl): Unit
  115. def setInlineVerilog(str: String): Unit
  116. def setInlineVhdl(str: String): Unit
  117. def setName(name: String, namePriority: Byte): BlackBox.this.type
    Definition Classes
    Nameable
  118. def setName(name: String, weak: Boolean): BlackBox.this.type
    Definition Classes
    Nameable
  119. def setName(name: String): BlackBox.this.type
    Definition Classes
    Nameable
  120. def setNameAsWeak(): BlackBox.this.type
    Definition Classes
    Nameable
  121. def setPartialName(name: String, namePriority: Byte, owner: Any): BlackBox.this.type
    Definition Classes
    Nameable
  122. def setPartialName(name: String, namePriority: Byte): BlackBox.this.type
    Definition Classes
    Nameable
  123. def setPartialName(name: String, weak: Boolean): BlackBox.this.type
    Definition Classes
    Nameable
  124. def setPartialName(owner: Nameable, name: String, namePriority: Byte): BlackBox.this.type
    Definition Classes
    Nameable
  125. def setPartialName(owner: Nameable, name: String, weak: Boolean): BlackBox.this.type
    Definition Classes
    Nameable
  126. def setPartialName(name: String): BlackBox.this.type
    Definition Classes
    Nameable
  127. def setPartialName(owner: Nameable, name: String): BlackBox.this.type
    Definition Classes
    Nameable
  128. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  129. def setScalaLocated(source: ScalaLocated): BlackBox.this.type
    Definition Classes
    ScalaLocated
  130. def setWeakName(name: String): BlackBox.this.type
    Definition Classes
    Nameable
  131. def spinalSimWhiteBox(): Unit
  132. def spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  133. def stub(): BlackBox.this.type

    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()
  134. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  135. def toString(): String
    Definition Classes
    Nameable → AnyRef → Any
  136. def unsetName(): BlackBox.this.type
    Definition Classes
    Nameable
  137. val userCache: Map[Any, Any]

    Used to store arbitrary object related to the component

    Used to store arbitrary object related to the component

    Definition Classes
    Component
  138. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  139. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  140. def valCallbackRec(ref: Any, name: String): Unit
    Definition Classes
    ComponentValCallbackRec
  141. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  142. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  143. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  144. def walkComponents(body: (Component) => Unit): Unit
    Definition Classes
    Component
  145. def withKeywords(): Unit
    Definition Classes
    Component
  146. def withoutKeywords(): Unit
    Definition Classes
    Component
  147. var withoutReservedKeywords: Boolean
    Definition Classes
    Component

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Component

Inherited from ValCallbackRec

Inherited from ValCallback

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