From 49e395653ec1b36930f02aab40bfa2d684588764 Mon Sep 17 00:00:00 2001 From: saji Date: Wed, 24 Apr 2024 17:14:39 -0500 Subject: [PATCH] add hub75 port mapping --- groovylight/hub75.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 groovylight/hub75.py diff --git a/groovylight/hub75.py b/groovylight/hub75.py new file mode 100644 index 0000000..5990f34 --- /dev/null +++ b/groovylight/hub75.py @@ -0,0 +1,26 @@ + + +# r0 g0 b0 gnd r1 g1 b1 e a b c d clk stb oe gnd +from litex.build.generic_platform import Signal, Subsignal, Pins +from litex.build.io import Module + +def make_hub75_iodevice(index, basename): + b = basename + signals = ("hub75_iodev", index, + Subsignal("r0", Pins(f"{b}:1")), + Subsignal("g0", Pins(f"{b}:2")), + Subsignal("b0", Pins(f"{b}:3")), + Subsignal("r1", Pins(f"{b}:5")), + Subsignal("g1", Pins(f"{b}:6")), + Subsignal("b1", Pins(f"{b}:7")), + Subsignal("addr", Pins(f"{b}:9 {b}:10 {b}:11 {b}:12 {b}:8")), + Subsignal("clk", Pins(f"{b}:13")), + Subsignal("stb", Pins(f"{b}:14")), + Subsignal("oe", Pins(f"{b}:15")), + ) + return [signals] + + +class Hub75Driver(Module): + count = Signal(8) # fsm counter +