new-sonar/gateware/led_gpio.py
David Lenfesty a6673297d4 gateware: failed attempt to add my own peripheral to litex
moving to amaranth because it at least has API docs :(
2023-01-10 20:30:00 -07:00

15 lines
354 B
Python

from migen import *
from litex.soc.interconnect.csr import *
from pathlib import Path
class LedGpio(AutoCSR, Module):
def __init__(self, platform, led: Signal):
#source = Path(__file__).parent / "led_gpio.v"
#platform.add_source(source)
self.register = CSRStorage(8)
self.comb += led.eq(self.register.storage[0])