From: Florent Kermarrec Date: Fri, 2 Dec 2016 16:24:13 +0000 (+0100) Subject: litex/boards: add machxo3 starter kit platform X-Git-Tag: 24jan2021_ls180~1922 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b5166f294b79ca2867ef33625abd55e50ce76b6;p=litex.git litex/boards: add machxo3 starter kit platform --- 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)