|
|
|
|
|
by ekiwi
1784 days ago
|
|
> At best you can do the same with one reduced canonical simplified verilog source-to-source translation. Parsing Verilog and generating valid Verilog is fairly difficult. If you want to stay with Verilog, the most realistic alternative to firrtl right now is the RTL-IL representation used inside of yosys. > at worst it does not do the primary function of "being" IR for RTL, because it should've been a graph, not another language with simplified syntax. Canonicalized LoFirrtl (i.e., the representation the compiler lowers Chisel to) is essentially SSA (single static assignment) which encodes a dataflow DAG. So on a per module level, firrtl does represent the circuit as a graph. What you might be talking about is the fact that this graph isn't global. Having a global circuit graph could make some analyses easier, but it might require essentially in-lining the whole circuit which is something a lot of designers are opposed to.
Even small optimizations like removing unused pins from internal modules are often times opposed. Chris Lattner and others are currently working on an "industry" version of firrtl as part of the CIRCT hardware compiler framework: https://github.com/llvm/circt
As you can see they did not decide to go with a global graph based IR and instead opted to just represent local data-flow graphs as SSA. |
|