From 8b5166f294b79ca2867ef33625abd55e50ce76b6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 2 Dec 2016 17:24:13 +0100 Subject: [PATCH] litex/boards: add machxo3 starter kit platform --- litex/boards/platforms/machxo3.py | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 litex/boards/platforms/machxo3.py diff --git a/litex/boards/platforms/machxo3.py b/litex/boards/platforms/machxo3.py new file mode 100644 index 00000000..a2a2233e --- /dev/null +++ b/litex/boards/platforms/machxo3.py @@ -0,0 +1,92 @@ +# This file is Copyright (c) 2016 Florent Kermarrec +# License: BSD + +from litex.build.generic_platform import * +from litex.build.lattice import LatticePlatform +from litex.build.lattice.programmer import LatticeProgrammer + + +_io = [ + ("clk12", 0, Pins("C8"), IOStandard("LVCMOS33")), + ("rst_n", 0, Pins("B3"), IOStandard("LVCMOS33")), + + ("user_led", 0, Pins("H11"), IOStandard("LVCMOS33")), + ("user_led", 1, Pins("J13"), IOStandard("LVCMOS33")), + ("user_led", 2, Pins("J11"), IOStandard("LVCMOS33")), + ("user_led", 3, Pins("L12"), IOStandard("LVCMOS33")), + ("user_led", 4, Pins("K11"), IOStandard("LVCMOS33")), + ("user_led", 5, Pins("L13"), IOStandard("LVCMOS33")), + ("user_led", 6, Pins("N15"), IOStandard("LVCMOS33")), + ("user_led", 7, Pins("P16"), IOStandard("LVCMOS33")), + + ("user_dip_btn", 0, Pins("N2"), IOStandard("LVCMOS33")), + ("user_dip_btn", 1, Pins("P1"), IOStandard("LVCMOS33")), + ("user_dip_btn", 2, Pins("M3"), IOStandard("LVCMOS33")), + ("user_dip_btn", 3, Pins("N1"), IOStandard("LVCMOS33")), + + ("serial", 0, + Subsignal("tx", Pins("C11"), IOStandard("LVCMOS33")), + Subsignal("rx", Pins("A11"), IOStandard("LVCMOS33")), + ), +] + + +class Platform(LatticePlatform): + default_clk_name = "clk12" + default_clk_period = 83 + + def __init__(self): + LatticePlatform.__init__(self, "LCMXO3L-6900C-5BG256C", _io) + + def create_programmer(self): + _xcf_template = """ + + + + + + JTAG + + + 1 + Lattice + MachXO3L + LCMXO3L-6900C + 0x412bd043 + All + LCMXO3L-6900C + + 8 + 11111111 + 1 + 0 + + {bitstream_file} + N/A + SRAM Fast Configuration + + + + + SEQUENTIAL + ENTIRED CHAIN + No Override + TLR + TLR + + + + USB2 + FTUSB-0 + Lattice XO3L Starter Kit A Location 0000 Serial A + + +""" + return LatticeProgrammer(_xcf_template) -- 2.30.2