You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FIRRTL] Rewrite, extend InstanceInfo for GC Views
Rewrite the `CheckLayers` pass to more directly rely on the `InstanceInfo`
analysis. Instead of the top-down walk (which was there from the original
architecture which did not have access to `InstanceInfo` and was
originally pushing layer information down), use only a bottom-up walk and
rely on the `InstanceInfo` analysis to determine when modules could be
problematic. This preserves a similar style of the original verbose
errors/notes which reports transitive errors (modules which do not contain
layers, but instantiate modules that do), but switches to something that
is easier to work with.
Extend the `CheckLayers` pass to now properly handle Grand Central
companion modules. These are conceptually the same as layers and are
now lumped under the "under layer" bucket by `InstanceInfo`.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
// A Grand Central companion cannot contain layerblocks.
158
+
firrtl.circuit"Foo" {
159
+
firrtl.layer@Abind {}
160
+
// expected-error @below {{is a Grand Central companion that either contains layerblocks or has at least one instance that is or contains a Grand Central companion or layerblocks}}
161
+
firrtl.module@Bar() attributes {
162
+
annotations = [
163
+
{
164
+
class = "sifive.enterprise.grandcentral.ViewAnnotation.companion",
// A Grand Central companion cannot contain layerblocks.
182
+
firrtl.circuit"Foo" {
183
+
firrtl.layer@Abind {}
184
+
// expected-error @below {{is a Grand Central companion that either contains layerblocks or has at least one instance that is or contains a Grand Central companion or layerblocks}}
185
+
firrtl.module@Bar() attributes {
186
+
annotations = [
187
+
{
188
+
class = "sifive.enterprise.grandcentral.ViewAnnotation.companion",
189
+
defName = "GroundView",
190
+
id = 0 : i64,
191
+
name = "GroundView"
192
+
}
193
+
]
194
+
} {
195
+
}
196
+
firrtl.module@Foo() {
197
+
firrtl.layerblock@A {
198
+
// expected-note @below {{illegal instantiation under a layerblock here}}
0 commit comments