add hub75 port mapping

This commit is contained in:
saji 2024-04-24 17:14:39 -05:00
parent ab8ef2c3d3
commit 49e395653e

26
groovylight/hub75.py Normal file
View file

@ -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