object Instantiate extends InstantiateIntf
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
- Alphabetic
- By Inheritance
- Instantiate
- InstantiateIntf
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def _definition[K, A <: BaseModule](args: K, f: (K) => A)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Definition[A]
This is not part of the public API, do not call directly!
This is not part of the public API, do not call directly!
- Definition Classes
- InstantiateIntf
- def _definitionImpl[K, A <: BaseModule](args: K, f: (K) => A, tt: Any): Definition[A]
This is not part of the public API, do not call directly!
This is not part of the public API, do not call directly!
- Attributes
- protected
- def _instance[K, A <: BaseModule](args: K, f: (K) => A)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[A], sourceInfo: SourceInfo): Instance[A]
- Definition Classes
- InstantiateIntf
- def _instanceImpl[K, A <: BaseModule](args: K, f: (K) => A, tt: Any)(implicit sourceInfo: SourceInfo): Instance[A]
- Attributes
- protected
- macro def apply[A <: BaseModule](con: => A): Instance[A]
Create an
Instance
of aModule
Create an
Instance
of aModule
This is similar to
Module(...)
except that it returns anInstance[_]
object.- con
module construction, must be actual call to constructor (
new MyModule(...)
)- returns
constructed module
Instance
- Definition Classes
- InstantiateIntf
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- macro def definition[A <: BaseModule](con: => A): Definition[A]
- Definition Classes
- InstantiateIntf
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
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
,Clock
, andReg
, the abstract typesBits
,Aggregate
, andData
, and the aggregate typesBundle
andVec
.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.