Skip to content

Conversation

seldridge
Copy link
Member

Make the chisel3.layer.addLayer API public. This is useful if a user wants to guarantee that a layer will show up in CHIRRTL even if no layer block refers to this layer.

This solves a problem where downstream build flows want to expect that certain layers will always exist. However, without this API, there is no way to do this other than to create dummy layer blocks. This is slightly cleaner without the empty layer block trick. Additionally, there is no real harm to having this API public.

Release Notes

Add chisel3.layer.addLayer API. This can be used to cause a layer to be emitted in FIRRTL even if it has no layer block users. This API is added (it was private before) so that users can make their custom layers always be there. This is important for downstream build flows which may want to enable layers or specialize them away and having the unpredictability of whether or not a layer will exist is not ideal and complicates the build system.

Make the `chisel3.layer.addLayer` API public.  This is useful if a user
wants to guarantee that a layer will show up in CHIRRTL even if no layer
block refers to this layer.

This solves a problem where downstream build flows want to expect that
certain layers will always exist.  However, without this API, there is no
way to do this other than to create dummy layer blocks.  This is slightly
cleaner without the empty layer block trick.  Additionally, there is no
real harm to having this API public.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge added the Feature New feature, will be included in release notes label Aug 15, 2024
Copy link
Member

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@seldridge seldridge merged commit f05df92 into main Aug 15, 2024
18 checks passed
@seldridge seldridge deleted the dev/seldridge/publicize-addLayer-API branch August 15, 2024 15:39
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