circt icon indicating copy to clipboard operation
circt copied to clipboard

[HW][SV] Factor out inline utils

Open uenoku opened this issue 1 year ago • 1 comments

There is fragmentation regarding inlining HW modules. ExtractTestCode has an ad hoc implementation of inlining empty modules and https://github.com/llvm/circt/pull/6450 is implementing a functionality to inline memory modules for optimizing empty modules. Also I see another inliner implementation in sifive internally. Since it's somewhat tricky to implement inliner right because of inner symbols or hierpath, so it would be necessary to create single correct implementation of inliner utils in CIRCT.

The inliner has to:

  • Correctly update inner symbols in the inlined module and instance
  • Correctly update hierpath
  • Remove sv.bind

uenoku avatar Dec 05 '23 09:12 uenoku

The internal sifive implementation of inlining should be upstreamed as a HW-level inliner.

nandor avatar Dec 07 '23 08:12 nandor