diff options
| author | whitequark <whitequark@whitequark.org> | 2019-06-06 20:43:40 +0000 |
|---|---|---|
| committer | whitequark <whitequark@whitequark.org> | 2019-06-06 20:43:40 +0000 |
| commit | bb52dfb9575c4aabf8e7dd9ddd780bf342ee0a71 (patch) | |
| tree | 1acb50b7ad7f4e5a0d00aa8298c9eab25e532587 /nmigen_boards/icestick.py | |
| parent | d21c2e2e964dda2d277b069087726ab007a2d17b (diff) | |
Factor out SPI flash resource definition.
Diffstat (limited to 'nmigen_boards/icestick.py')
| -rw-r--r-- | nmigen_boards/icestick.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nmigen_boards/icestick.py b/nmigen_boards/icestick.py index a60f8c9..cf5c81c 100644 --- a/nmigen_boards/icestick.py +++ b/nmigen_boards/icestick.py @@ -3,6 +3,7 @@ import subprocess from nmigen.build import * from nmigen.vendor.lattice_ice40 import * +from .dev import * __all__ = ["ICEStickPlatform"] @@ -39,12 +40,10 @@ class ICEStickPlatform(LatticeICE40Platform): Attrs(IO_STANDARD="SB_LVCMOS33") ), - Resource("spiflash", 0, - Subsignal("cs_n", Pins("71", dir="o")), - Subsignal("clk", Pins("70", dir="o")), - Subsignal("mosi", Pins("67", dir="o")), - Subsignal("miso", Pins("68", dir="i")), - Attrs(IO_STANDARD="SB_LVCMOS33") + *SPIFlashResources(0, + cs_n="71", clk="70", + mosi="67", miso="68", + attrs=Attrs(IO_STANDARD="SB_LVCMOS33") ), ] connectors = [ |
