targets/simple: add GPIO LED
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 25 Nov 2013 11:16:20 +0000 (12:16 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 25 Nov 2013 11:16:20 +0000 (12:16 +0100)
targets/simple.py

index 7cefa6d96f9fbc4e151a7b10df0c1474f940c9c1..5829af46bb84c0b696994deac184d91331a89106 100644 (file)
@@ -1,5 +1,6 @@
 from migen.fhdl.std import *
 
+from misoclib import gpio
 from misoclib.gensoc import GenSoC, IntegratedBIOS
 
 class SimpleSoC(GenSoC, IntegratedBIOS):
@@ -15,5 +16,7 @@ class SimpleSoC(GenSoC, IntegratedBIOS):
                self.comb += self.cd_sys.clk.eq(platform.request("clk32"))
                self.specials += Instance("FD", p_INIT=1, i_D=0, o_Q=self.cd_sys.rst, i_C=ClockSignal())
 
+               self.submodules.leds = gpio.GPIOOut(platform.request("user_led"))
+
 def get_default_subtarget(platform):
        return SimpleSoC