amaranth-boards icon indicating copy to clipboard operation
amaranth-boards copied to clipboard

Please add iCESugar.Pro support

Open gromas opened this issue 3 years ago • 2 comments

icesugar_pro.zip

board has some more resources but this is basics for tests

gromas avatar Mar 12 '22 05:03 gromas

I think this is this board from Muse Labs: https://github.com/wuxx/icesugar-pro

Content of the .zip for convenience:

import subprocess

from amaranth.build import *
from amaranth.vendor.lattice_ecp5 import *
from .resources import *


__all__ = ["ICESugarProPlatform"]


class ICESugarProPlatform(LatticeECP5Platform):
    device      = "LFE5U-25F"
    package     = "BG256"
    speed = "6"
    default_clk = "clk25"
    default_rst = "rst"
    resources   = [
        Resource("clk25", 0, Pins("P6", dir="i"), 
                 Clock(25e6), Attrs(IO_STANDARD="LVCMOS33")),
        Resource("rst", 0, Pins("L14",dir="i"), Attrs(IO_TYPE = "LVCMOS33")),

        RGBLEDResource(0, r="B11", g="A11", b="A12", attrs=Attrs(IOSTANDARD="LVCMOS33"))

    ]

    def toolchain_program(self, products, name):
        with products.extract("{}.bin".format(name)) as bitstream_filename:
            subprocess.check_call(["icesprog", bitstream_filename])


if __name__ == "__main__":
    from .test.blinky import *
    ICESugarProPlatform().build(Blinky(), do_program=True)

A pull-request with it would have been easier to work with for the maintainers maybe.

[EDIT: my bad, there is already one based on top of this work!]

josuah avatar Mar 17 '23 12:03 josuah

@gromas thank you, this helped consolidating #198

josuah avatar Mar 17 '23 16:03 josuah