circt icon indicating copy to clipboard operation
circt copied to clipboard

[HW][Seq] Allow typed attr to be an element of aggregate_constant and make seq.const_clock typed attr

Open uenoku opened this issue 1 year ago • 1 comments

This fixes https://github.com/llvm/circt/issues/7716. Aggregate constant verifier rejects unknown attributes hence hw.aggregate_constant cannot be used for attributes defined by other dialects (in this case seq.const_clock) was rejected even when hw.aggregate_create allows users to create clock type arrays. This PR loosen the restriction by allowing TypedAttribute.

This PR also adds TypedAttrInterface to seq.const_clock and support its lowering.

uenoku avatar Oct 21 '24 10:10 uenoku

It doesn't introduce any new circular dependencies or anything like that right?

Yes, it uses TypedAttr instead of directly using seq.clock to avoid circular dependency between HW and Seq.

uenoku avatar Oct 21 '24 15:10 uenoku