2023-02-26 19:40:56 +00:00
|
|
|
from migen import *
|
|
|
|
from migen.genlib.misc import WaitTimer
|
|
|
|
|
|
|
|
from litex.soc.interconnect.csr import *
|
|
|
|
|
|
|
|
# Test LED Module ----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class TestLed(Module, AutoCSR):
|
|
|
|
def __init__(self, platform, pads):
|
|
|
|
self.pads = pads
|
|
|
|
leds = Signal(3)
|
2023-03-03 17:05:53 +00:00
|
|
|
|
|
|
|
# # #
|
|
|
|
|
2023-02-26 19:40:56 +00:00
|
|
|
self.comb += pads.eq(leds)
|
|
|
|
self.specials += Instance("flip",
|
2023-03-03 17:05:53 +00:00
|
|
|
i_i_clk = ClockSignal("dac"),
|
|
|
|
o_o_ledr = leds[0],
|
|
|
|
o_o_ledg = leds[1],
|
|
|
|
o_o_ledb = leds[2]
|
2023-02-26 19:40:56 +00:00
|
|
|
)
|
|
|
|
platform.add_source("rtl/flip.sv")
|
|
|
|
|