move ls180io.py back into ls180.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 4 Oct 2020 14:37:25 +0000 (15:37 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 4 Oct 2020 14:37:25 +0000 (15:37 +0100)
src/soc/litex/florent/libresoc/ls180.py
src/soc/litex/florent/libresoc/ls180io.py [deleted file]

index 8d32a9076a1bdc9695b18ec084ba02aecca918e9..dceb406796c751febecd67de7eea0ed4ab28c7b7 100644 (file)
@@ -24,6 +24,25 @@ from libresoc.ls180io import make_uart, make_gpio
 import os
 
 
+def make_uart(name, num):
+    return (name, num,
+        Subsignal("tx", Pins("L4"), IOStandard("LVCMOS33")),
+        Subsignal("rx", Pins("M1"), IOStandard("LVCMOS33"))
+    )
+
+def make_gpio(name, num, n_gpio):
+    pins = []
+    for i in range(n_gpio):
+        pins.append("X%d" % i)
+    pins = ' '.join(pins)
+    return (name, 0,
+             Subsignal("i", Pins(pins), Misc("PULLMODE=UP")),
+             Subsignal("o", Pins(pins), Misc("PULLMODE=UP")),
+             Subsignal("oe", Pins(pins), Misc("PULLMODE=UP")),
+            IOStandard("LVCMOS33"))
+
+
+
 # IOs ---------------------------------------------------------------------
 
 def io():
diff --git a/src/soc/litex/florent/libresoc/ls180io.py b/src/soc/litex/florent/libresoc/ls180io.py
deleted file mode 100644 (file)
index 03d2cdc..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# This file is part of LiteX.
-#
-# Copyright (c) 2018-2019 Florent Kermarrec <florent@enjoy-digital.fr>
-# SPDX-License-Identifier: BSD-2-Clause
-
-"""ls180 ASIC platform
-
-conceptually similar to the following:
-
-* https://github.com/enjoy-digital/liteeth/blob/master/liteeth/gen.py
-* https://github.com/enjoy-digital/litepcie/blob/master/litepcie/gen.py
-
-Total I/O pins: 84.
-Fits in a JEDEC QFP-100
-
-"""
-
-from litex.build.generic_platform import (GenericPlatform, Pins,
-                                        Subsignal, IOStandard, Misc,
-                                        )
-import os
-
-def make_uart(name, num):
-    return (name, num,
-        Subsignal("tx", Pins("L4"), IOStandard("LVCMOS33")),
-        Subsignal("rx", Pins("M1"), IOStandard("LVCMOS33"))
-    )
-
-def make_gpio(name, num, n_gpio):
-    pins = []
-    for i in range(n_gpio):
-        pins.append("X%d" % i)
-    pins = ' '.join(pins)
-    return (name, 0,
-             Subsignal("i", Pins(pins), Misc("PULLMODE=UP")),
-             Subsignal("o", Pins(pins), Misc("PULLMODE=UP")),
-             Subsignal("oe", Pins(pins), Misc("PULLMODE=UP")),
-            IOStandard("LVCMOS33"))
-