Skip to content

Commit

Permalink
[minor] Add enablelayer to Modules
Browse files Browse the repository at this point in the history
Add the ability for a module to be declared with layers enabled.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
  • Loading branch information
seldridge committed Feb 12, 2024
1 parent c6bab1a commit d41a75c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/firrtl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<item>intrinsic</item>
<item>propassign</item>
<item>public</item>
<item>enablelayer</item>
</list>
<list name="types">
<item>UInt</item>
Expand Down
16 changes: 16 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,22 @@ Probe types may be colored with a layer.
Layer coloring indicates which layers must be enabled for a probe to be used.
For more information on layer-colored probes see [@sec:probe-types] and [@sec:layer-coloring].

### Modules with Enabled Layers

Modules may be declared with enabled layers.
A module with enabled layers colors the body of the module with the color of all enabled layers.
This affects the legality of operations which use probes.
See [@sec:probes-and-layers] for more information on layer coloring.

To declare a module with layers enabled, use the `enablelayer`{.firrtl} keyword.
The circuit below shows a module with one layer enabled:

``` firrtl
circuit Foo :
layer A, bind :
module Foo enablelayer A :
```

# Circuit Components

Circuit components are the named parts of a module corresponding to hardware.
Expand Down

0 comments on commit d41a75c

Please sign in to comment.