Open
Description
I haven't thought through what should happen here, yet.
Consider the following FIRRTL which contains layerblocks under an instance choice:
FIRRTL version 4.2.0
circuit Top :
option Target :
X
layer A, bind :
extmodule Foo :
module Bar enablelayer A :
public module Top enablelayer A :
instchoice divider of Foo, Target :
X => Bar
When compiled, this errors out with:
# firtool Foo.fir
Foo.fir:14:5: error: 'firrtl.instance_choice' op layers must be [@A], but got []
instchoice divider of Foo, Target :
^
Foo.fir:14:5: note: see current operation: "firrtl.instance_choice"() <{annotations = [], caseNames = [@Target::@X], layers = [], moduleNames = [@Foo, @Bar], name = "divider", nameKind = #firrtl<name_kind interesting_name>, portAnnotations = [], portDirections = array<i1>, portNames = []}> : () -> ()
Foo.fir:10:3: note: original module declared here
module Bar enablelayer A :