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

Please add iCESugar.Pro support #197

Open
gromas opened this issue Mar 12, 2022 · 2 comments
Open

Please add iCESugar.Pro support #197

gromas opened this issue Mar 12, 2022 · 2 comments
Labels

Comments

@gromas
Copy link

gromas commented Mar 12, 2022

icesugar_pro.zip

board has some more resources but this is basics for tests

ryankurte added a commit to ryankurte/amaranth-boards that referenced this issue Apr 11, 2022
ryankurte added a commit to ryankurte/amaranth-boards that referenced this issue Apr 21, 2022
@josuah
Copy link

josuah commented Mar 17, 2023

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
Copy link

josuah commented Mar 17, 2023

@gromas thank you, this helped consolidating #198

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

No branches or pull requests

3 participants