Skip to content

Conversation

seldridge
Copy link
Member

Add an argument to layer.block which can be used to prevent a layer block from being created if the current builder state indicates that we are already inside a layer block. This API is intended to be used for library writers to provide a way to maybe put an operation into a layer block. Specifically, this is intended for verification statements which should go into a default layer block (e.g., Verification.Assert), but should not do this if the Chisel user is already in another layer block.

Release Notes

Add skipIfAlreadyInLayerBlock: Boolean parameter to layer.block. This is a more advanced API for a library writer to write an API where hardware is, by default, created in a layer block. However, if the user wraps the API in a layer block, then the layer block the API would create is elided.

Add an argument to `layer.block` which can be used to prevent a layer
block from being created if the current builder state indicates that we
are already inside a layer block.  This API is intended to be used for
library writers to provide a way to _maybe_ put an operation into a layer
block.  Specifically, this is intended for verification statements which
should go into a default layer block (e.g., `Verification.Assert`), but
should not do this if the Chisel user is already in another layer block.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge added the Feature New feature, will be included in release notes label Aug 2, 2024
@seldridge seldridge requested a review from jackkoenig August 2, 2024 22:18
@jackkoenig jackkoenig added this to the 7.0 milestone Aug 2, 2024
@seldridge seldridge merged commit 557bc50 into main Aug 2, 2024
18 checks passed
@seldridge seldridge deleted the dev/seldridge/add-skipIfAlreadyInLayerBlock-parameter-to-layer.block branch August 2, 2024 22:38
SpriteOvO pushed a commit that referenced this pull request Aug 6, 2024
Add an argument to `layer.block` which can be used to prevent a layer
block from being created if the current builder state indicates that we
are already inside a layer block.  This API is intended to be used for
library writers to provide a way to _maybe_ put an operation into a layer
block.  Specifically, this is intended for verification statements which
should go into a default layer block (e.g., `Verification.Assert`), but
should not do this if the Chisel user is already in another layer block.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants