Add skipIfLayersEnabled param to layer.block #4346
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a second control parameter to
layer.block
that will cause no layer to be created if the current module has any layers enabled. This is intended as a safe default for library writers that are putting operations into layer blocks. Certain verification operations do not work well with other verification operations (e.g., force and assert) due to interactions where layers may result in the creation of multiple always blocks. This option allows operations to be placed in the body of a testbench (the likely module that has layers enabled) and avoid any of the interactions of disjoint always blocks.Release Notes
Add
skipIfLayersEnabled
parameter tolayer.block
which will elide the block if any layers are currently enabled. This is an advanced library-writer API that only comes up when a library writer wants to provide default layers for operations, but wants to allow the user to override this default choice.