Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSRU_4LUT comment is unclear #9

Open
jchidley opened this issue Apr 2, 2020 · 1 comment
Open

ALSRU_4LUT comment is unclear #9

jchidley opened this issue Apr 2, 2020 · 1 comment

Comments

@jchidley
Copy link

jchidley commented Apr 2, 2020

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.

@whitequark
Copy link
Owner

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.

Sorry, something went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants