blob: c309ab52c90e2858b12f62f3e9c35cd8a368f6a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package chisel3.experimental
package object hierarchy {
/** Classes or traits which will be used with the [[Definition]] + [[Instance]] api should be marked
* with the [[@instantiable]] annotation at the class/trait definition.
*
* @example {{{
* @instantiable
* class MyModule extends Module {
* ...
* }
*
* val d = Definition(new MyModule)
* val i0 = Instance(d)
* val i1 = Instance(d)
* }}}
*/
class instantiable extends chisel3.internal.instantiable
/** 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 {{{
* @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
* }}}
*/
class public extends chisel3.internal.public
}
|