litex icon indicating copy to clipboard operation
litex copied to clipboard

efinix: add synthesis options to a dictionary in the EfinityToolchain

Open jwise opened this issue 1 year ago • 2 comments

Sometimes the synthesis tool needs some help to successfully map a design, in the form of different synthesis options.

In my particular case, this didn't actually save me for my design, but it would be nice to have it available in the future if I need it again. I use this in my Platform like this:

class Platform(EfinixPlatform):
    default_clk_name   = "clk50"
    default_clk_period = 1e9/50e6

    def __init__(self, toolchain="efinity"):
        EfinixPlatform.__init__(self, "T20F256C4", _io, iobank_info=_bank_info, toolchain=toolchain)
        self.toolchain.map_opts['mode'] = 'area'

jwise avatar May 29 '24 23:05 jwise

Hi, Why not implementing efinity_args and efinity_argdict to allows users to specify/modify these parameters directly from the command line? See trellis toolchain and associated call from the platform?

Also one remark: using a dict and itertools allows to have a code more compact but its increase difficulties to read/update/maintain code.

trabucayre avatar May 30 '24 05:05 trabucayre

Thanks @jwise, I agree with @trabucayre about using something closer to what is already present on other platforms (and to favor readability vs code compactness).

enjoy-digital avatar May 30 '24 07:05 enjoy-digital

Hi @jwise. I have written this PR, with remarks. With this one it's possible to change synthesis parameters directly from the CLI at build time instead of having to modify the target or the platform. It also keep the original structure, more easy to read/maintain.

Thanks

trabucayre avatar Jul 08 '24 14:07 trabucayre

Thanks @jwise, @trabucayre. #2009 has been merged so we can close.

enjoy-digital avatar Jul 08 '24 15:07 enjoy-digital