Packages

object DataMirror

Experimental hardware construction reflection API

Source
Data.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataMirror
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def checkTypeEquivalence(x: Data, y: Data): Boolean

    Check if two Chisel types are the same type.

    Check if two Chisel types are the same type. Internally, this is dispatched to each Chisel type's typeEquivalent function for each type to determine if the types are intended to be equal.

    For most types, different parameters should ensure that the types are different. For example, UInt(8.W) and UInt(16.W) are different. Likewise, Records check that both Records have the same elements with the same types.

    x

    First Chisel type

    y

    Second Chisel type

    returns

    true if the two Chisel types are equal.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def directionOf(target: Data): ActualDirection
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fullModulePorts(target: BaseModule): Seq[(String, Data)]

    Returns a recursive representation of a module's ports with underscore-qualified names

    Returns a recursive representation of a module's ports with underscore-qualified names

    class MyModule extends Module {
      val io = IO(new Bundle {
        val in = Input(UInt(8.W))
        val out = Output(Vec(2, UInt(8.W)))
      })
      val extra = IO(Input(UInt(8.W)))
      val delay = RegNext(io.in)
      io.out(0) := delay
      io.out(1) := delay + extra
    }
    val mod = Module(new MyModule)
    DataMirror.fullModulePorts(mod)
    // returns: Seq(
    //   "clock" -> mod.clock,
    //   "reset" -> mod.reset,
    //   "io" -> mod.io,
    //   "io_out" -> mod.io.out,
    //   "io_out_0" -> mod.io.out(0),
    //   "io_out_1" -> mod.io.out(1),
    //   "io_in" -> mod.io.in,
    //   "extra" -> mod.extra
    // )
    Note

    The returned ports are redundant. An Aggregate port will be present along with all of its children.

    See also

    DataMirror.modulePorts for a non-recursive representation of the ports.

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def modulePorts(target: BaseModule): Seq[(String, Data)]

    Returns the ports of a module

    Returns the ports of a module

    class MyModule extends Module {
      val io = IO(new Bundle {
        val in = Input(UInt(8.W))
        val out = Output(Vec(2, UInt(8.W)))
      })
      val extra = IO(Input(UInt(8.W)))
      val delay = RegNext(io.in)
      io.out(0) := delay
      io.out(1) := delay + extra
    }
    val mod = Module(new MyModule)
    DataMirror.modulePorts(mod)
    // returns: Seq(
    //   "clock" -> mod.clock,
    //   "reset" -> mod.reset,
    //   "io" -> mod.io,
    //   "extra" -> mod.extra
    // )
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def specifiedDirectionOf(target: Data): SpecifiedDirection
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. def widthOf(target: Data): Width
  26. object internal

Inherited from AnyRef

Inherited from Any

Ungrouped