Add LedChaser to DE1-SoC
This commit is contained in:
parent
1d5bbb4c7f
commit
cbeb2a3792
|
@ -19,6 +19,7 @@ from litex_boards.platforms import de1soc
|
||||||
from litex.soc.cores.clock import CycloneVPLL
|
from litex.soc.cores.clock import CycloneVPLL
|
||||||
from litex.soc.integration.soc_core import *
|
from litex.soc.integration.soc_core import *
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
|
from litex.soc.cores.led import LedChaser
|
||||||
|
|
||||||
from litedram.modules import IS42S16320
|
from litedram.modules import IS42S16320
|
||||||
from litedram.phy import GENSDRPHY
|
from litedram.phy import GENSDRPHY
|
||||||
|
@ -49,7 +50,7 @@ class _CRG(Module):
|
||||||
# BaseSoC ------------------------------------------------------------------------------------------
|
# BaseSoC ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
class BaseSoC(SoCCore):
|
||||||
def __init__(self, sys_clk_freq=int(50e6), **kwargs):
|
def __init__(self, sys_clk_freq=int(50e6), with_led_chaser=True, **kwargs):
|
||||||
platform = de1soc.Platform()
|
platform = de1soc.Platform()
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
|
@ -70,6 +71,12 @@ class BaseSoC(SoCCore):
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192)
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
if with_led_chaser:
|
||||||
|
self.submodules.leds = LedChaser(
|
||||||
|
pads = platform.request_all("user_led"),
|
||||||
|
sys_clk_freq = sys_clk_freq)
|
||||||
|
|
||||||
# Build --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue