chisel3.experimental.hierarchy.core

Members list

Type members

Classlikes

final case class Clone[+T](isClone: IsClone[T]) extends Underlying[T]

A clone of a real implementation

A clone of a real implementation

Attributes

Source
Underlying.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Underlying[T]
class Object
trait Matchable
class Any
Show all
final case class Definition[+A] extends IsLookupable

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.

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.

Value parameters

underlying

The internal representation of the definition, which may be either be directly the object, or a clone of an object

Attributes

Companion
object
Source
Definition.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Hierarchy[A]
trait HierarchyIsA[A]
trait HierarchyProto[A]
trait IsLookupable
class Object
trait Matchable
class Any
Show all
object Definition extends SourceInfoDoc

Factory methods for constructing Definitions

Factory methods for constructing Definitions

Attributes

Companion
class
Source
Definition.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
Definition.type
sealed trait Hierarchy[+A] extends HierarchyIsA[A]

Super-trait for Instance and Definition

Super-trait for Instance and Definition

Enables writing functions which are Instance/Definition agnostic

Attributes

Companion
object
Source
Hierarchy.scala
Supertypes
trait HierarchyIsA[A]
trait HierarchyProto[A]
class Object
trait Matchable
class Any
object Hierarchy

Attributes

Companion
trait
Source
Hierarchy.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Hierarchy.type
trait HierarchyIsA[+A] extends HierarchyProto[A]

Attributes

Source
IsA.scala
Supertypes
trait HierarchyProto[A]
class Object
trait Matchable
class Any
Known subtypes
trait Hierarchy[A]
trait HierarchyProto[+A]

Attributes

Source
IsA.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HierarchyIsA[A]
trait Hierarchy[A]
case class ImportDefinitionAnnotation[T <: BaseModule & IsInstantiable](definition: Definition[T], overrideDefName: Option[String] = ...) extends NoTargetAnnotation

Stores a Definition that is imported so that its Instances can be compiled separately.

Stores a Definition that is imported so that its Instances can be compiled separately.

Attributes

Source
Definition.scala
Supertypes
trait Serializable
trait Annotation
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Instance[+A]

User-facing Instance type. Represents a unique instance of type A which are marked as @instantiable Can be created using Instance.apply method.

User-facing Instance type. Represents a unique instance of type A which are marked as @instantiable Can be created using Instance.apply method.

Value parameters

underlying

The internal representation of the instance, which may be either be directly the object, or a clone of an object

Attributes

Companion
object
Source
Instance.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Hierarchy[A]
trait HierarchyIsA[A]
trait HierarchyProto[A]
class Object
trait Matchable
class Any
Show all
object Instance extends SourceInfoDoc

Factory methods for constructing Instances

Factory methods for constructing Instances

Attributes

Companion
class
Source
Instance.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
Instance.type
trait IsClone[+T]

Represents a clone of an underlying object. This is used to support CloneModuleAsRecord and Instance/Definition.

Represents a clone of an underlying object. This is used to support CloneModuleAsRecord and Instance/Definition.

Attributes

Note

We don't actually "clone" anything in the traditional sense but is a placeholder so we lazily clone internal state

Source
IsClone.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes

While this is public, it is not recommended for users to extend directly. Instead, use the instantiable annotation on your trait or class.

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.

Attributes

Companion
object
Source
IsInstantiable.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BaseModule
class Class
class FixedIOExtModule[A]
class AutoBlackBox
class FixedIOModule[A]
class FixedIORawModule[A]
class CIRCTSRAM[T]
class TestHarness[M]
class RawModule
class AllUnitTests
class Module
class PRNG
class GaloisLFSR
trait LFSR
class Arbiter[T]
class LockingArbiter[T]
class LockingRRArbiter[T]
class RRArbiter[T]
class Pipe[T]
class Queue[T]
Show all

Attributes

Companion
trait
Source
IsInstantiable.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait IsLookupable

A User-extendable trait to mark metadata-containers, e.g. parameter case classes, as valid to return unchanged from an instance.

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!

Attributes

Example

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 Module {
 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
Source
IsLookupable.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Definition[A]
trait Lookupable[-B]

Typeclass used to recontextualize values from an original Definition to an Instance

Typeclass used to recontextualize values from an original Definition to an Instance

Implementations for Chisel types and other common Scala types are provided in the companion object. Users can define Lookupable for their own types.

Attributes

Example
case class Foo[T <: Data](name: String, data: T)
object Foo {
 implicit def lookupable[T <: Data]: Lookupable.Simple[Foo[T]] =
   Lookupable.product2[Foo[T], String, T](
     x => (x.name, x.data),
     Foo.apply
   )
}
Companion
object
Source
Lookupable.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SimpleLookupable[X]
object Lookupable

Attributes

Companion
trait
Source
Lookupable.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Lookupable.type
final case class Proto[+T](proto: T) extends Underlying[T]

An actual implementation

An actual implementation

Attributes

Source
Underlying.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Underlying[T]
class Object
trait Matchable
class Any
Show all
sealed trait Underlying[+T]

Represents the underlying implementation of a Definition or Instance

Represents the underlying implementation of a Definition or Instance

Attributes

Source
Underlying.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Clone[T]
class Proto[T]