circt icon indicating copy to clipboard operation
circt copied to clipboard

[HW] Canonicalization creates invalid aggregate constant

Open uenoku opened this issue 1 year ago • 0 comments

$ cat bar.mlir
module {
  hw.module @test(out o : !hw.array<1x!seq.clock>) {
    %0 = seq.const_clock  high
    %1 = hw.array_create %0 : !seq.clock
    hw.output %1 : !hw.array<1x!seq.clock>
  }
}

$ circt-opt bar.mlir -canonicalize 
bar.mlir:3:8: error: 'hw.aggregate_constant' op unknown element type'!seq.clock'
  %0 = hw.array_create %high : !seq.clock
       ^
bar.mlir:3:8: note: see current operation: %0 = "hw.aggregate_constant"() {fields = [#seq<clock_constant high>]} : () -> !hw.array<1x!seq.clock>

uenoku avatar Oct 18 '24 10:10 uenoku