targets/simple: add GPIO LED
This commit is contained in:
parent
96600ad9d7
commit
b49e6f07b2
|
@ -1,5 +1,6 @@
|
||||||
from migen.fhdl.std import *
|
from migen.fhdl.std import *
|
||||||
|
|
||||||
|
from misoclib import gpio
|
||||||
from misoclib.gensoc import GenSoC, IntegratedBIOS
|
from misoclib.gensoc import GenSoC, IntegratedBIOS
|
||||||
|
|
||||||
class SimpleSoC(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.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.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):
|
def get_default_subtarget(platform):
|
||||||
return SimpleSoC
|
return SimpleSoC
|
||||||
|
|
Loading…
Reference in New Issue