platforms: make sure all Xilinx/Altera platforms have a create_programmer method, use OpenOCD on Spartan6 and 7-Series.
This commit is contained in:
parent
588bbac719
commit
ea0eda9f75
|
@ -2,7 +2,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -222,7 +223,7 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("set_property INTERNAL_VREF 0.750 [get_iobanks 35]")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a200t.bit")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -116,3 +117,6 @@ class Platform(XilinxPlatform):
|
|||
self.toolchain.additional_commands = \
|
||||
["write_cfgmem -force -format bin -interface spix4 -size 16 "
|
||||
"-loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"]
|
||||
|
||||
def create_programmer(self):
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a200t.bit")
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -257,4 +258,5 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("set_property INTERNAL_VREF 0.675 [get_iobanks 34]")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer(flash_part="n25q128-3.3v-spi-x1_x2_x4")
|
||||
bscan_spi = "bscan_spi_xc7a100t.bit" if "xc7a100t" in self.device else "bscan_spi_xc7a35t.bit"
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", bscan_spi)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import Pins, Subsignal, IOStandard, Misc
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -210,4 +211,5 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("set_property INTERNAL_VREF 0.675 [get_iobanks 34]")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer(flash_part="n25q128-3.3v-spi-x1_x2_x4")
|
||||
bscan_spi = "bscan_spi_xc7s50.bit" if "xc7s50" in self.device else "bscan_spi_xc7a25.bit"
|
||||
return OpenOCD("openocd_xilinx.cfg", bscan_spi)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.altera import AlteraPlatform
|
||||
from litex.build.altera.programmer import USBBlaster
|
||||
|
||||
# IOs ------------------------------------------------------------------
|
||||
|
||||
|
@ -41,3 +42,6 @@ class Platform(AlteraPlatform):
|
|||
|
||||
def __init__(self):
|
||||
AlteraPlatform.__init__(self, "5CSEMA5F31C6", _io)
|
||||
|
||||
def create_programmer(self):
|
||||
return USBBlaster()
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.altera import AlteraPlatform
|
||||
from litex.build.altera.programmer import USBBlaster
|
||||
|
||||
# IOs ------------------------------------------------------------------
|
||||
|
||||
|
@ -41,3 +42,6 @@ class Platform(AlteraPlatform):
|
|||
|
||||
def __init__(self):
|
||||
AlteraPlatform.__init__(self, "EP4CE115F29C7", _io)
|
||||
|
||||
def create_programmer(self):
|
||||
return USBBlaster()
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -116,7 +117,7 @@ class Platform(XilinxPlatform):
|
|||
XilinxPlatform.__init__(self, "xc7k325t-ffg900-2", _io, _connectors, toolchain="vivado")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a325t.bit")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# This file is Copyright (c) 2015 Yann Sionneau <ys@m-labs.hk>
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -548,7 +549,7 @@ set_property CONFIG_VOLTAGE 2.5 [current_design]
|
|||
self.toolchain.additional_commands = ["write_cfgmem -force -format bin -interface spix4 -size 16 -loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"]
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a325t.bit")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -72,4 +73,4 @@ class Platform(XilinxPlatform):
|
|||
XilinxPlatform.__init__(self, " xc7k160tffg676-2", _io, toolchain="vivado")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7k160t.bit")
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -290,3 +291,6 @@ class Platform(XilinxPlatform):
|
|||
|
||||
def __init__(self):
|
||||
XilinxPlatform.__init__(self, "xc6slx16-2-ftg256", _io, _connectors)
|
||||
|
||||
def create_programmer(self):
|
||||
return OpenOCD("openocd_xilinx_xc6.cfg", "bscan_spi_xc6slx16.bit")
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -182,4 +183,4 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("set_property INTERNAL_VREF 0.675 [get_iobanks 34]")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer(flash_part="n25q128-3.3v-spi-x1_x2_x4")
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a50t.bit")
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, XC3SProg, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -400,5 +401,4 @@ set_property CONFIG_VOLTAGE 3.3 [current_design]
|
|||
"-loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"]
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer(flash_part="n25q128-3.3v-spi-x1_x2_x4")
|
||||
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7k160t.bit")
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -189,3 +190,7 @@ class Platform(XilinxPlatform):
|
|||
def __init__(self, device="xc7a35t"):
|
||||
assert device in ["xc7a35t", "xc7a100t"]
|
||||
XilinxPlatform.__init__(self, device + "-fgg484-2", _io, toolchain="vivado")
|
||||
|
||||
def create_programmer(self):
|
||||
bscan_spi = "bscan_spi_xc7a100t.bit" if "xc7a100t" in self.device else "bscan_spi_xc7a35t.bit"
|
||||
return OpenOCD("openocd_netv2_rpi.cfg", bscan_spi)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -131,4 +132,4 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("set_property INTERNAL_VREF 0.750 [get_iobanks 34]")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a100t.bit")
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -230,9 +231,8 @@ class Platform(XilinxPlatform):
|
|||
"-loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"]
|
||||
self.add_platform_command("set_property INTERNAL_VREF 0.750 [get_iobanks 35]")
|
||||
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer(flash_part="n25q128-3.3v-spi-x1_x2_x4")
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a200t.bit")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.xilinx.programmer import XC3SProg
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
@ -151,3 +150,6 @@ class Platform(XilinxPlatform):
|
|||
def __init__(self):
|
||||
XilinxPlatform.__init__(self, "xc6slx45-csg324-3", _io, _connectors)
|
||||
self.toolchain.bitgen_opt += " -g Compress -g ConfigRate:6"
|
||||
|
||||
def create_programmer(self):
|
||||
return OpenOCD("openocd_xilinx_xc6.cfg", "bscan_spi_xc6slx45.bit")
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, iMPACT
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
_io = [
|
||||
("user_led", 0, Pins("D17"), IOStandard("LVCMOS25")),
|
||||
|
@ -161,4 +162,4 @@ class Platform(XilinxPlatform):
|
|||
XilinxPlatform.__init__(self, "xc6slx45t-fgg484-3", _io, _connectors, toolchain="ise")
|
||||
|
||||
def create_programmer(self):
|
||||
return iMPACT()
|
||||
return OpenOCD("openocd_xilinx_xc6.cfg", "bscan_spi_xc6slx45.bit")
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -165,3 +166,6 @@ class Platform(XilinxPlatform):
|
|||
self.toolchain.additional_commands = \
|
||||
["write_cfgmem -force -format bin -interface spix4 -size 16 "
|
||||
"-loadbit \"up 0x0 {build_name}.bit\" -file {build_name}.bin"]
|
||||
|
||||
def create_programmer(self):
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "bscan_spi_xc7a200t.bit")
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.lattice import LatticePlatform
|
||||
from litex.build.lattice.programmer import LatticeProgrammer
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
# License: BSD
|
||||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer, XC3SProg
|
||||
from litex.build.xilinx import XilinxPlatform
|
||||
from litex.build.openocd import OpenOCD
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -643,7 +644,7 @@ class Platform(XilinxPlatform):
|
|||
self.add_platform_command("""set_property CONFIG_VOLTAGE 2.5 [current_design]""")
|
||||
|
||||
def create_programmer(self):
|
||||
return VivadoProgrammer()
|
||||
return OpenOCD("openocd_xilinx_xc7.cfg", "xc7vx485t.bit")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from litex.build.generic_platform import *
|
||||
from litex.build.lattice import LatticePlatform
|
||||
from litex.build.lattice.programmer import LatticeProgrammer
|
||||
|
||||
# IOs ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue