Guest User

Untitled

a guest
May 9th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.98 KB | None | 0 0
  1. import os
  2. import subprocess
  3.  
  4. from nmigen.build import *
  5. from nmigen.vendor.xilinx_spartan_3_6 import *
  6. from nmigen_boards.resources import *
  7.  
  8.  
  9. __all__ = ["NumatoMimasV2Platform"]
  10.  
  11.  
  12. class NumatoMimasV2Platform(XilinxSpartan6Platform):
  13.   device      = "xc6slx9"
  14.   package     = "csg324"
  15.   speed       = "2"
  16.   default_clk = "clk"
  17.   resources   = [
  18.     Resource("clk", 0, Pins("V10", dir="i"), Clock(100e6), Attrs(IOSTANDARD="LVCMOS33")),
  19.     *LEDResources(pins="P15 P16 N15 N16 U17 U18 T17 T18", attrs=Attrs(IOSTANDARD="LVCMOS33")),
  20.     *ButtonResources(pins="M18 L18 M16 L17 K17 K18", attrs=Attrs(IOSTANDARD="LVCMOS33", PULLUP="TRUE")),
  21.     *SPIFlashResources(0, cs="V3", clk="R15", mosi="T13", miso="R13", attrs=Attrs(IOSTANDARD="LVCMOS33"))
  22.   ]
  23.  
  24.   # TODO Programming this board is not currently supported.
  25.   def toolchain_program(self, products, name):
  26.     pass
  27.  
  28. if __name__ == "__main__":
  29.   from nmigen_boards.test.blinky import *
  30.   NumatoMimasV2Platform().build(Blinky())
Add Comment
Please, Sign In to add comment