How to show the generic form for ops in CIRCT dialects

Hello everyone! I’m new to MLIR and CIRCT, and I’m trying to generate the generic form of operations for the HW dialect using mlir-opt --mlir-print-op-generic. However, it seems that the HW dialect is not registered, as I encountered the following error:

mlir-opt --mlir-print-op-generic circt/test/Dialect/HW/basic.mlir

circt/test/Dialect/HW/basic.mlir:4:1: error: Dialect `hw' not found for custom op 'hw.module'
hw.module @test1(%arg0: i3, %arg1: i1, %arg2: !hw.array<1000xi8>) -> (result: i50) {
^
circt/test/Dialect/HW/basic.mlir:4:1: note: Registered dialects: acc, affine, amdgpu, amx, arith, arm_neon, arm_sve, async, bufferization, builtin, cf, complex, dlti, emitc, func, gpu, index, irdl, linalg, llvm, math, memref, ml_program, nvgpu, nvvm, omp, pdl, pdl_interp, quant, rocdl, scf, shape, sparse_tensor, spirv, tensor, test, test_dyn, tosa, transform, vector, x86vector; for more info on dialect registration see https://mlir.llvm.org/getting_started/Faq/#registered-loaded-dependent-whats-up-with-dialects-management

Could you please guide me on how to generate the generic form of operations for the dialects in CIRCT? Thank you in advance!

The issue is that the HW dialect isn’t registered for mlir-opt. You can use circt-opt for this, which registers all the CIRCT associated dialects (specific code is here).