add amaranth-boards to pdm, add platform pins

This commit is contained in:
saji 2024-09-22 10:55:52 -05:00
parent 3188fdefa5
commit 63811b929a
3 changed files with 29 additions and 26 deletions

View file

@ -5,7 +5,7 @@
groups = ["default", "dev"]
strategy = ["inherit_metadata"]
lock_version = "4.5.0"
content_hash = "sha256:00a75da930aaa4d4233631525c1b6bb3c9642e99065be33cf83e74d4ad611d08"
content_hash = "sha256:fbfe1db54d73aa2641413610d5e62d87b02de247293e2af3cd53ee0c283318db"
[[metadata.targets]]
requires_python = "==3.12.*"
@ -29,11 +29,14 @@ files = [
[[package]]
name = "amaranth-boards"
version = "0"
summary = "Placeholder package name reserved for Amaranth HDL"
version = "0.1.dev250"
requires_python = "~=3.8"
git = "https://github.com/amaranth-lang/amaranth-boards.git"
revision = "19b97324ecf9111c5d16377af79f82aad761c476"
summary = "Board and connector definitions for Amaranth HDL"
groups = ["default"]
files = [
{file = "amaranth_boards-0-py3-none-any.whl", hash = "sha256:0cc6af682122197b532eef7c2d378a59905ac5e63ec5c69b9147b1e05bf2c600"},
dependencies = [
"amaranth<0.7,>=0.4",
]
[[package]]

View file

@ -7,7 +7,7 @@ authors = [
]
dependencies = [
"amaranth>=0.5.1",
"amaranth-boards>=0",
"amaranth-boards @ git+https://github.com/amaranth-lang/amaranth-boards.git",
]
requires-python = "==3.12.*"
readme = "README.md"

View file

@ -2,7 +2,7 @@ import os
import subprocess
from amaranth.vendor import LatticeECP5Platform
from amaranth.build import Resource, Pins, Attrs, Clock, Subsignal, PinsN, Connector
# from amaranth_boards.resources import SDRAMResource, LEDResources, ButtonResources
from amaranth_boards.resources import SDRAMResource, LEDResources, ButtonResources
class Colorlight_5A75B_R82Platform(LatticeECP5Platform):
@ -23,25 +23,25 @@ class Colorlight_5A75B_R82Platform(LatticeECP5Platform):
Subsignal("copi", Pins("T8", dir="o")),
Attrs(IO_TYPE="LVCMOS33"),
),
Resource("led", 0, PinsN("T6", dir="o"), Attrs(IO_TYPE="LVCMOS33")),
# *ButtonResources(
# pins="R7", invert=True, attrs=Attrs(IO_TYPE="LVCMOS33", PULLMODE="UP")
# ),
# SDRAMResource(
# 0,
# clk="C8",
# we_n="B5",
# cas_n="A6",
# ras_n="B6",
# ba="B7 A8",
# a="A9 B9 B10 C10 D9 C9 E9 D8 E8 C7 B8",
# dq="B2 A2 C3 A3 B3 A4 B4 A5 E7 C6 D7 D6 "
# "E6 D5 C5 E5 A11 B11 B12 A13 B13 A14 B14 D14 D13 "
# "E11 C13 D11 C12 D10 C11 D10",
# attrs=Attrs(
# PULLMODE="NONE", DRIVE="4", SLEWRATE="FAST", IO_TYPE="LVCMOS33"
# ),
# ),
*LEDResources(pins="T6", invert=True, attrs=Attrs(IO_TYPE="LVCMOS33", DRIVE="4")),
*ButtonResources(
pins="R7", invert=True, attrs=Attrs(IO_TYPE="LVCMOS33", PULLMODE="UP")
),
SDRAMResource(
0,
clk="C8",
we_n="B5",
cas_n="A6",
ras_n="B6",
ba="B7 A8",
a="A9 B9 B10 C10 D9 C9 E9 D8 E8 C7 B8",
dq="B2 A2 C3 A3 B3 A4 B4 A5 E7 C6 D7 D6 "
"E6 D5 C5 E5 A11 B11 B12 A13 B13 A14 B14 D14 D13 "
"E11 C13 D11 C12 D10 C11 D10",
attrs=Attrs(
PULLMODE="NONE", DRIVE="4", SLEWRATE="FAST", IO_TYPE="LVCMOS33"
),
),
Resource(
"eth_rgmii",
0,