Skip to content

[FIRRTL] Disabling an enabled layer on the main module can trip the verifierΒ #8816

@seldridge

Description

@seldridge

Consider the following circuit:

FIRRTL version 5.2.0
circuit Foo:
  layer A, bind:
  public module Foo enablelayer A:

If this is compiled with the option to disable layer A, then the main module is deleted and the circuit is invalid:

# firtool Foo.fir -disable-layers=A
Foo.fir:2:1: error: 'firrtl.circuit' op does not contain module with same name as circuit
circuit Foo:
^
Foo.fir:2:1: note: see current operation: 
"firrtl.circuit"() <{annotations = [], name = "Foo"}> ({
^bb0:
}) : () -> ()

If the circuit continues to require that there exists a main module in it with the same name, then this should produce a better error. However, I think the better approach is likely to not require a main module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FIRRTLInvolving the `firrtl` dialectbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions