llvm / circt

Circuit IR Compilers and Tools
https://circt.org
Other
1.57k stars 277 forks source link

[FIRRTL] Constant will be elimated on the DPI Path #7228

Open sequencer opened 6 days ago

sequencer commented 6 days ago

I'm not sure if this is a bug. If a constant e.g. channelId propagating to DPI function, it will be eliminated. I'm currently using a dontTouch to work around, but I think this should be resolved in CIRCT.

dtzSiFive commented 2 days ago

Can you provide an example or maybe elaborate a bit?

What does it mean that they are eliminated? They're fed to DPI calls but the inputs to the DPI function are dropped (?) if the input is a constant, ...?