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

Add in colorlight v8.2 board support #635

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions litex_boards/platforms/colorlight_5a_75b.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ class Platform(LatticeECP5Platform):
default_clk_period = 1e9/25e6

def __init__(self, revision="7.0", toolchain="trellis"):
assert revision in ["6.1", "7.0", "8.0"]
assert revision in ["6.1", "7.0", "8.0", "8.2"]
self.revision = revision
device = {"6.1": "LFE5U-25F-6BG381C", "7.0": "LFE5U-25F-6BG256C", "8.0": "LFE5U-25F-6BG256C"}[revision]
io = {"6.1": _io_v6_1, "7.0": _io_v7_0, "8.0": _io_v8_0}[revision]
connectors = {"6.1": _connectors_v6_1, "7.0": _connectors_v7_0, "8.0": _connectors_v8_0}[revision]
device = {"6.1": "LFE5U-25F-6BG381C", "7.0": "LFE5U-25F-6BG256C", "8.0": "LFE5U-25F-6BG256C", "8.2": "LFE5U-25F-7BG256I"}[revision]
io = {"6.1": _io_v6_1, "7.0": _io_v7_0, "8.0": _io_v8_0, "8.2": _io_v8_0}[revision]
connectors = {"6.1": _connectors_v6_1, "7.0": _connectors_v7_0, "8.0": _connectors_v8_0, "8.2": _connectors_v8_0}[revision]
LatticeECP5Platform.__init__(self, device, io, connectors=connectors, toolchain=toolchain)

def create_programmer(self):
Expand Down
4 changes: 2 additions & 2 deletions litex_boards/targets/colorlight_5a_75x.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __init__(self, board, revision, sys_clk_freq=60e6, toolchain="trellis",
if not self.integrated_main_ram_size:
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
self.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
if board == "5a-75e" and revision == "6.0":
if (board == "5a-75e" and revision == "6.0") or (board == "5a-75b" and (revision == "8.0" or revision == "8.2")):
sdram_cls = M12L64322A
else:
sdram_cls = M12L16161A
Expand Down Expand Up @@ -222,7 +222,7 @@ def main():
from litex.build.parser import LiteXArgumentParser
parser = LiteXArgumentParser(platform=colorlight_5a_75b.Platform, description="LiteX SoC on Colorlight 5A-75X.")
parser.add_target_argument("--board", default="5a-75b", help="Board type (5a-75b, 5a-75e or i5a-907).")
parser.add_target_argument("--revision", default="7.0", help="Board revision (6.0, 6.1, 7.0 or 8.0).")
parser.add_target_argument("--revision", default="7.0", help="Board revision (6.0, 6.1, 7.0, 8.0, or 8.2).")
parser.add_target_argument("--sys-clk-freq", default=60e6, type=float, help="System clock frequency.")
ethopts = parser.target_group.add_mutually_exclusive_group()
ethopts.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support.")
Expand Down