Packages

  • package root

    This is the documentation for Chisel.

    This is the documentation for Chisel.

    Package structure

    The chisel3 package presents the public API of Chisel. It contains the concrete core types UInt, SInt, Bool, FixedPoint, Clock, and Reg, the abstract types Bits, Aggregate, and Data, and the aggregate types Bundle and Vec.

    The Chisel package is a compatibility layer that attempts to provide chisel2 compatibility in chisel3.

    Utility objects and methods are found in the util package.

    The testers package defines the basic interface for chisel testers.

    Definition Classes
    root
  • package chisel3

    This package contains the main chisel3 API.

    This package contains the main chisel3 API.

    Definition Classes
    root
  • package experimental

    Package for experimental features, which may have their API changed, be removed, etc.

    Package for experimental features, which may have their API changed, be removed, etc.

    Because its contents won't necessarily have the same level of stability and support as non-experimental, you must explicitly import this package to use its contents.

    Definition Classes
    chisel3
  • package hierarchy
    Definition Classes
    experimental
  • package core
    Definition Classes
    hierarchy
  • InsideHierarchyLibraryExtension
  • InstantiableClone
  • Instantiate
  • LibraryHooks
  • instantiable
  • public

object Instantiate

Create an Instance of a Module

Acts as a nicer API wrapping Definition and Instance. Used in a similar way to traditional module instantiation using Module(...).

val inst0: Instance[MyModule] = Instantiate(new MyModule(arg1, arg2))

// Note that you cannot pass arguments by name (this will not compile)
val inst1 = Instantiate(new OtherModule(n = 3))

// Instead, only pass arguments positionally
val inst2 = Instantiate(new OtherModule(3))

Limitations

  • The caching does not work for Modules that are inner classes. This is due to the fact that the WeakTypeTags for instances will be different and thus will not hit in the cache.
  • Passing parameters by name to module constructors is not supported.
  • User-defined types that wrap up Data will use the default Data equality and hashCode implementations which use referential equality, thus will not hit in the cache.
Source
Instantiate.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Instantiate
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def _impl[K, A <: BaseModule](args: K, f: (K) => A)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[A], sourceInfo: SourceInfo, compileOptions: CompileOptions): Instance[A]

    This is not part of the public API, do not call directly!

  5. macro def apply[A <: RawModule](con: => A): Instance[A]

    Create an Instance of a Module

    Create an Instance of a Module

    This is similar to Module(...) except that it returns an Instance[_] object.

    con

    module construction, must be actual call to constructor (new MyModule(...))

    returns

    constructed module Instance

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped