google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.22k stars 181 forks source link

Remove proc inlining #1508

Open grebe opened 4 months ago

grebe commented 4 months ago

Proc inlining as currently envisioned is complex, needs to re-implement some of what codegen does, and in many cases produces procs which cannot be pipelined well.

With multi-proc codegen #950 coming, many of our current proc-inlining usecases can be ported to use multi-proc codegen.

Ideally, we will remove proc inlining and replace it with smaller, easier-to-understand replacements. For example:

rw1nkler commented 4 months ago

What about the situation when you have a proc interacting with RamModel, that instantiates two sub-procs - one for reading, and one for writing to the memory. I believe that the top-level proc, as for now, has to be inlined, otherwise the RAM rewriting step will fail, because only half of the interface is available for each child proc. (see the discussion started by https://github.com/google/xls/issues/1455#issuecomment-2193983042)

grebe commented 1 month ago

Proc inlining shouldn't be needed if you multi-proc codegen the same top-level proc- the idea is that multi-proc codegen will have the same interface at the top, but instead of inlining all procs into one module, it will separately instantiate each proc as sub-modules.