aboutsummaryrefslogtreecommitdiff
path: root/amaranth_boards/numato_mimas.py
blob: a3f89309a778cc444e8d27819d5b2ccb0328d74f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
import subprocess

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


__all__ = ["NumatoMimasPlatform"]


class NumatoMimasPlatform(XilinxSpartan6Platform):
    device      = "xc6slx9"
    package     = "tqg144"
    speed       = "2"
    default_clk = "clk100"
    resources   = [
        Resource("clk100", 0, Pins("P126", dir="i"),
                 Clock(100e6), Attrs(IOSTANDARD="LVCMOS33")),

        *LEDResources(pins="P119 P118 P117 P116 P115 P114 P112 P111",
                      attrs=Attrs(IOSTANDARD="LVCMOS33")),
        *ButtonResources(pins="P124 P123 P121 P120",
                         attrs=Attrs(IOSTANDARD="LVCMOS33", PULLUP="TRUE")),

        *SPIFlashResources(0,
            cs_n="P38", clk="P70", copi="P64", cipo="65",
            attrs=Attrs(IOSTANDARD="LVCMOS33")
        ),
    ]
    connectors  = [
        Connector("p", 1,
            "-    -    P35  P34  P33  P32  P30  P29  P27  P26  "
            "P24  P23  P22  P21  P17  P16  P15  P14  P12  P11  "
            "P10  P9   P8   P7   P6   P5   P2   P1   P142 P141 "
            "P140 P139 P138 P137 P134 P133 P132 P131 -    -    "
        ),
        Connector("p", 2,
            "-    -    P43  P44  P45  P46  P47  P48  P50  P51  "
            "P55  P56  P74  P75  P78  P79  P80  P81  -    -    "
            "P82  P83  P84  P85  P87  P88  P92  P93  P94  P95  "
            "P97  P98  P99  P100 P101 P102 P104 P105 -    -    "
        )
    ]

    # Programming this board is not currently supported.


if __name__ == "__main__":
    from .test.blinky import *
    NumatoMimasPlatform().build(Blinky())