From 6e205be83b4d1658cb72d069791a539ca30070f9 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Sun, 4 Dec 2022 17:58:20 -0800 Subject: [PATCH] Add LedChaser to iCEBreaker-bitsy. Signed-off-by: Tim Callahan --- litex_boards/targets/icebreaker_bitsy.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/litex_boards/targets/icebreaker_bitsy.py b/litex_boards/targets/icebreaker_bitsy.py index 2f11b2f..bb65e42 100755 --- a/litex_boards/targets/icebreaker_bitsy.py +++ b/litex_boards/targets/icebreaker_bitsy.py @@ -28,6 +28,8 @@ from litex.soc.cores.clock import iCE40PLL from litex.soc.integration.soc_core import * from litex.soc.integration.soc import SoCRegion from litex.soc.integration.builder import * +from litex.soc.cores.led import LedChaser + kB = 1024 mB = 1024*kB @@ -98,7 +100,7 @@ class _CRG(LiteXModule): # BaseSoC ------------------------------------------------------------------------------------------ class BaseSoC(SoCCore): - def __init__(self, bios_flash_offset, sys_clk_freq=24e6, revision="v1", **kwargs): + def __init__(self, bios_flash_offset, sys_clk_freq=24e6, revision="v1", with_led_chaser=True, **kwargs): platform = icebreaker_bitsy.Platform(revision=revision) # CRG -------------------------------------------------------------------------------------- @@ -128,6 +130,13 @@ class BaseSoC(SoCCore): linker = True) ) + # LED Chaser -------------------------------------------------------------------------------- + if with_led_chaser: + self.leds = LedChaser( + pads = platform.request_all("user_led_n"), + sys_clk_freq = sys_clk_freq, + polarity = 1) + # SPI Flash -------------------------------------------------------------------------------- from litespi.modules import W25Q128JV from litespi.opcodes import SpiNorFlashOpCodes as Codes