Skip to content

[FIRRTL][CAPI] Update RefType creation to support layers#9600

Merged
unlsycn merged 1 commit intollvm:mainfrom
unlsycn:layer-capi
Feb 4, 2026
Merged

[FIRRTL][CAPI] Update RefType creation to support layers#9600
unlsycn merged 1 commit intollvm:mainfrom
unlsycn:layer-capi

Conversation

@unlsycn
Copy link
Member

@unlsycn unlsycn commented Feb 3, 2026

Update firrtlTypeGetRef to accept a layer attribute. This takes over #8093.

@rwy7
Copy link
Contributor

rwy7 commented Feb 3, 2026

Thanks for taking a look at this! I think it would be better to add a new function for getting "layer-coloured ref types", and the original getter can continue to return uncoloured ref types. How does that sound?

@rwy7 rwy7 self-requested a review February 3, 2026 17:24
@unlsycn
Copy link
Member Author

unlsycn commented Feb 3, 2026

Thanks for taking a look at this! I think it would be better to add a new function for getting "layer-coloured ref types", and the original getter can continue to return uncoloured ref types. How does that sound?

That makes complete sense, actually I had considered that but not decided. I've made the change, thanks for the suggestion!

Expose `firrtlTypeGetColoredRef` to allow creating `RefType` with an
associated layer attribute via the C API.

This enables creating reference types that are constrained to specific
layers, mirroring the functionality available in the C++ API.

Signed-off-by: unlsycn <unlsycn@unlsycn.com>
@unlsycn unlsycn merged commit 2c5f3f3 into llvm:main Feb 4, 2026
7 checks passed
Arya-Golkari pushed a commit to Arya-Golkari/circt that referenced this pull request Feb 7, 2026
Expose `firrtlTypeGetColoredRef` to allow creating `RefType` with an
associated layer attribute via the C API.

This enables creating reference types that are constrained to specific
layers, mirroring the functionality available in the C++ API.

Signed-off-by: unlsycn <unlsycn@unlsycn.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants