ALSRU_4LUT comment is unclear
I am willing to accept that this may be clear to other people but the comment for the class ALSRU_4LUT left me confused. I read it as “here’s a great function but you need to do something different for an iCE40”.
file: alsru.py
class ALSRU_4LUT(ALSRU, Elaboratable):
"""ALSRU optimized for 4-LUT architecture with no adder pre-inversion.
On iCE40 with Yosys, ABC, and -relut this synthesizes to the optimal 4n+3 LUTs.
"""
Whereas I think the meaning is more like: “This code will synthesise to the optimal 4*width+3 LUTs (Look Up Table) when targeting the Lattice iCE40 family and using Yosys with the ABC tool and -relut”
Your tweet gave me the insight that I needed to understand the above along with the Yosys documentation.
I am not sure what “-relut” is exactly and I assume that Yosys has to be run with a specific set of options to get this optimal outcome.
Whereas I think the meaning is more like: “This code will synthesise to the optimal 4*width+3 LUTs (Look Up Table) when targeting the Lattice iCE40 family and using Yosys with the ABC tool and -relut”
Your understanding is correct, but I, uhm, don't understand what you don't understand. Could you suggest a rephrasing? Then we could change the comment.
I am not sure what “-relut” is exactly and I assume that Yosys has to be run with a specific set of options to get this optimal outcome.
I think it means running synth_ice40 -relut. I'm not sure if it's still necessary, there have been some upstream improvements since then, but I don't know exactly if they targeted this area.