-
Notifications
You must be signed in to change notification settings - Fork 637
Labels
Description
Currently, the way that extract layers are included or excluded from a Chiselsim simulation is through the LayerControl
API which will cause the bind file (the part of the FIRRTL ABI which says that a file will be provided which, when included in the build, will enable the layer) to be included or excluded from the compilation.
However, all the files associated with the extract layer will still be included in the compilation and not used. This is problematic for two reasons:
- It is inefficient to compile things that are known to not be used.
- If the extract layer is being used to guard constructs which the simulator cannot support, then the compilation will fail. E.g., Verilator does not support the
s_eventually
SystemVerilog construct which can be emitted by theltl.eventually
API.
Change this so that the way LayerControl
is handled by ChiselSim will instead only compile what is needed.
As a workaround, this type of feature can be put in an inline layer which will result in an `ifdef
macro guarded region which will be excluded from the build.