chisel6.4.0 < Back


# Packages

-  package root
  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 dataview
  Definition Classes
    experimental
-  package hierarchy
  Definition Classes
    experimental
-  package core
- InsideHierarchyLibraryExtension
- InstantiableClone
- Instantiate
- LibraryHooks
- instantiable
- public

p

chisel3.experimental

# hierarchy

#### package hierarchy

Source
  package.scala

Linear Supertypes
AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. hierarchy
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Package Members

1.  package core

### Type Members

1.  type Definition[P] = hierarchy.core.Definition[P]
2.  type Hierarchy[P] = hierarchy.core.Hierarchy[P]
3.  trait InsideHierarchyLibraryExtension extends AnyRef
   Annotations
     @implicitNotFound()
4.  type Instance[P] = hierarchy.core.Instance[P]
5.  trait InstantiableClone[T <: IsInstantiable] extends IsClone[T]

   Note

     If we are cloning a non-module, we need another object which has the proper _parent set!

6.  type IsInstantiable = hierarchy.core.IsInstantiable
7.  type IsLookupable = hierarchy.core.IsLookupable
8.  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)")
   Example:

   1.     @instantiable
          class MyModule extends Module {
            ...
          }

          val d = Definition(new MyModule)
          val i0 = Instance(d)
          val i1 = Instance(d)

9.  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:

   1. 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.
   Example:

   1.     @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

### Value Members

1.  val Definition: hierarchy.core.Definition.type
2.  val Hierarchy: hierarchy.core.Hierarchy.type
3.  val Instance: hierarchy.core.Instance.type
4.  object Instantiate

   Create an Instance of a Module

   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.
5.  object LibraryHooks

### Inherited from AnyRef

### Inherited from Any

### Ungrouped