or with_slopes_0.div_0.div_0.divSqrtRecFN_small_0.divSqrtRecFNToRaw.sExpQuot_S_div_CCU2C_S0_3_B0_LUT4_Z_C_CCU2C_S0_B0_CCU2C_S0_B1_LUT4_Z_D_LUT4_Z_D_CCU2C_S0_CIN_CCU2C_COUT_S1_LUT4_Z_4_C_CCU2C_S1_COUT_CCU2C_CIN_S0_CCU2C_S0_S1_CCU2C_S0_S1_CCU2C_S0_A0_PFUMX_Z_BLUT_LUT4_Z
Is there a way to reliably detect what parts of the name are cell details and what part is my hierarchy so I could shorten the cell details down to with_slopes_0.div_0.div_0.divSqrtRecFN_small_0.divSqrtRecFNToRaw.sExpQuot_S_div...? which is already quite long and unwieldy
I’m not very familiar with nextpnr so I’m not sure if there is a better way, but based purely on what you’ve provided it looks like there are no .s in the cell details, so everything up to the last . is hierarchy, and then for the last element you’re looking for the part where it starts _<celltype> a la _CCU2C or _LUT4…
Ah, this is an unfortunate interaction between flatten and autoname. flatten needs to prefix the instance names to avoid name collisions in case there are multiple instances of the same module in the design. I suppose it would be possible to add an option to flatten to use module->uniquify(...) instead, which appends a number at the end of the wire name instead. That would make it near impossible to tell which logic comes from which instance, but be more readable in the cases like yours where that’s not a concern.
Edit: no wait you wanted the opposite, to suppress the part of the naming generated by autoname. That’s even easier, just needs an option in synth_ecp5 to not call that at all, or call some variant of rename -wire instead.