circt
circt copied to clipboard
[HW][Seq] Allow typed attr to be an element of aggregate_constant and make seq.const_clock typed attr
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.
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.