package hierarchy
- Alphabetic
- By Inheritance
- hierarchy
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class Clone[+T](isClone: IsClone[T]) extends Underlying[T] with Product with Serializable
A clone of a real implementation
- final case class Definition[+A] extends IsLookupable with SealedHierarchy[A] with Product with Serializable
User-facing Definition type.
User-facing Definition type. Represents a definition of an object of type A which are marked as @instantiable Can be created using Definition.apply method.
These definitions are then used to create multiple Instances.
- sealed trait Hierarchy[+A] extends AnyRef
Super-trait for Instance and Definition
Super-trait for Instance and Definition
Enables writing functions which are Instance/Definition agnostic
- case class ImportDefinitionAnnotation[T <: BaseModule with IsInstantiable](definition: Definition[T], overrideDefName: Option[String] = None) extends NoTargetAnnotation with Product with Serializable
Stores a Definition that is imported so that its Instances can be compiled separately.
- trait InsideHierarchyLibraryExtension extends AnyRef
- Annotations
- @implicitNotFound()
- final case class Instance[+A] extends SealedHierarchy[A] with Product with Serializable
User-facing Instance type.
User-facing Instance type. Represents a unique instance of type A which are marked as @instantiable Can be created using Instance.apply method.
- trait IsInstantiable extends AnyRef
While this is public, it is not recommended for users to extend directly.
While this is public, it is not recommended for users to extend directly. Instead, use the @instantiable annotation on your trait or class.
This trait indicates whether a class can be returned from an Instance.
- trait IsLookupable extends AnyRef
A User-extendable trait to mark metadata-containers, e.g.
A User-extendable trait to mark metadata-containers, e.g. parameter case classes, as valid to return unchanged from an instance.
This should only be true of the metadata returned is identical for ALL instances!
For instances of the same proto, metadata or other construction parameters may be useful to access outside of the instance construction. For parameters that are the same for all instances, we should mark it as IsLookupable
case class Params(debugMessage: String) extends IsLookupable class MyModule(p: Params) extends MultiIOModule { printf(p.debugMessage) } val myParams = Params("Hello World") val definition = Definition(new MyModule(myParams)) val i0 = Instance(definition) val i1 = Instance(definition) require(i0.p == i1.p) // p is only accessable because it extends IsLookupable
Example: - trait Lookupable[-B] extends AnyRef
Represents lookup typeclass to determine how a value accessed from an original IsInstantiable should be tweaked to return the Instance's version Sealed.
Represents lookup typeclass to determine how a value accessed from an original IsInstantiable should be tweaked to return the Instance's version Sealed.
- Annotations
- @implicitNotFound()
- final case class Proto[+T](proto: T) extends Underlying[T] with Product with Serializable
An actual implementation
- sealed trait Underlying[+T] extends AnyRef
Represents the underlying implementation of a Definition or Instance
- macro class instantiable extends internal.instantiable
Classes or traits which will be used with the Definition + Instance api should be marked with the @instantiable annotation at the class/trait definition.
Classes or traits which will be used with the Definition + Instance api should be marked with the @instantiable annotation at the class/trait definition.
- Annotations
- @compileTimeOnly("macro annotation could not be expanded (since these are experimental, you must enable them with -Ymacro-annotations)")
@instantiable class MyModule extends Module { ... } val d = Definition(new MyModule) val i0 = Instance(d) val i1 = Instance(d)
Example: - class public extends internal.public
Classes marked with @instantiable can have their vals marked with the @public annotation to enable accessing these values from a Definition or Instance of the class.
Classes marked with @instantiable can have their vals marked with the @public annotation to enable accessing these values from a Definition or Instance of the class.
Only vals of the the following types can be marked @public:
- IsInstantiable 2. IsLookupable 3. Data 4. BaseModule 5. Iterable/Option containing a type that meets these requirements 6. Basic type like String, Int, BigInt etc.
@instantiable class MyModule extends Module { @public val in = IO(Input(UInt(3.W))) @public val out = IO(Output(UInt(3.W))) .. } val d = Definition(new MyModule) val i0 = Instance(d) val i1 = Instance(d) i1.in := i0.out
Example:
Value Members
- object Definition extends SourceInfoDoc with Serializable
Factory methods for constructing Definitions
- object Hierarchy
- object Instance extends SourceInfoDoc with Serializable
Factory methods for constructing Instances
- object IsInstantiable
- object LibraryHooks
- object Lookupable
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
, 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.