-
Hey everyone, A quick question here about using custom techmap on a hierarchical model. It seems like running opt passes on a flattened module that was techmapped to custom cells doesn't work as effectively as when the module is not techmapped to the custom cells. Background: These unused wires appear after running However, our modules are very large (1.7M cells), and if we run
Reproducer Take this hierarchical module with this map file:
Running
If we run
The unused wire from the submodule and assignments go away. Questions (0) Why does the custom techmap prevent Yosys opt steps from removing the unused wires? (1) If I run custom techmap on the flattened module, sometimes I run into a hash table size exception: why does the custom techmap (which is just rewriting LUT1 and LUT 2 to custom LUT 3) require this? (2) Is there any way to indicate more info in the custom techmap to allow opt passes to fully optimize the module in the way it does before flatten? Alternatively, because the map file is rewriting LUT 1 and LUT 2 both as LUT 3, is there a way to specify only LUT 3? (3) Is there some way of running the techmap step with a configuration that would allow it to avoid the hash map exception after I run flatten? I am running opt passes before the techmap, so I'm not sure what else to do here. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Quick note -- have you tried |
Beta Was this translation helpful? Give feedback.
-
Is there a good reason why techmap is using up so much RAM? I thought it was doing a local transformation per cell (matching against the rules in the techmap file), and I imagine the only reason this would exhaust RAM is if it were building an index of the entire module. |
Beta Was this translation helpful? Give feedback.
-
I am working directly with @asraa on this. One possibility is that the desired optimization isn't happening because we haven't provided a black box model for lut3 (so Yosys doesn't know which pins are inputs vs output). |
Beta Was this translation helpful? Give feedback.
I am working directly with @asraa on this. One possibility is that the desired optimization isn't happening because we haven't provided a black box model for lut3 (so Yosys doesn't know which pins are inputs vs output).