2019-06-01 19:20:09 -06:00
|
|
|
from ..build import *
|
|
|
|
from .fpga.lattice_ice40 import LatticeICE40Platform, TinyProgrammerMixin
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ["TinyFPGABPlatform"]
|
|
|
|
|
|
|
|
|
|
|
|
class TinyFPGABPlatform(TinyProgrammerMixin, LatticeICE40Platform):
|
|
|
|
device = "lp8k"
|
|
|
|
package = "cm81"
|
|
|
|
clocks = [
|
|
|
|
("clk16", 16e6),
|
|
|
|
]
|
|
|
|
resources = [
|
2019-06-01 22:04:07 -06:00
|
|
|
Resource("clk16", 0, Pins("B2", dir="i"), extras=["IO_STANDARD=SB_LVCMOS33"]),
|
2019-06-01 19:20:09 -06:00
|
|
|
|
2019-06-01 22:04:07 -06:00
|
|
|
Resource("user_led", 0, Pins("B3", dir="o"), extras=["IO_STANDARD=SB_LVCMOS33"]),
|
2019-06-01 19:20:09 -06:00
|
|
|
|
|
|
|
Resource("usb", 0,
|
|
|
|
Subsignal("d_p", Pins("B4", dir="io")),
|
|
|
|
Subsignal("d_n", Pins("A4", dir="io")),
|
|
|
|
Subsignal("pull_up", Pins("A3", dir="o")),
|
|
|
|
extras=["IO_STANDARD=SB_LVCMOS33"]
|
|
|
|
),
|
|
|
|
|
|
|
|
Resource("spiflash", 0,
|
|
|
|
Subsignal("cs_n", Pins("F7", dir="o")),
|
|
|
|
Subsignal("clk", Pins("G7", dir="o")),
|
|
|
|
Subsignal("mosi", Pins("G6", dir="io")),
|
|
|
|
Subsignal("miso", Pins("H7", dir="io")),
|
|
|
|
extras=["IO_STANDARD=SB_LVCMOS33"]
|
|
|
|
),
|
|
|
|
]
|