Skip to content

Commit 6657cd8

Browse files
Merge pull request #701 from maass-hamburg/efinix_tz170--move-platform-inside-BaseSoC
efinix_tz170: move platform inside BaseSoC
2 parents ef6c0dd + 8c466f5 commit 6657cd8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

litex_boards/targets/efinix_tz170_j484_dev_kit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ def generate():
219219
# BaseSoC ------------------------------------------------------------------------------------------
220220

221221
class BaseSoC(SoCCore):
222-
def __init__(self, platform, sys_clk_freq, cpu_clk_freq, with_spi_flash=False, spi_flash_number=0, spi_flash_rate="1:1", with_led_chaser=True, **kwargs):
222+
def __init__(self, sys_clk_freq=100e6, cpu_clk_freq=175e6, with_spi_flash=False, spi_flash_number=0, spi_flash_rate="1:1", with_led_chaser=True, **kwargs):
223+
platform = efinix_tz170_j484_dev_kit.Platform()
223224

224225
# CRG --------------------------------------------------------------------------------------
225226
self.crg = _CRG(platform, sys_clk_freq, cpu_clk_freq)
@@ -285,8 +286,7 @@ def __init__(self, platform, sys_clk_freq, cpu_clk_freq, with_spi_flash=False, s
285286

286287
def main():
287288
from litex.build.parser import LiteXArgumentParser
288-
platform = efinix_tz170_j484_dev_kit.Platform()
289-
parser = LiteXArgumentParser(platform=platform, description="LiteX SoC on Efinix Tz170 J484 Dev Kit.")
289+
parser = LiteXArgumentParser(platform=efinix_tz170_j484_dev_kit.Platform, description="LiteX SoC on Efinix Tz170 J484 Dev Kit.")
290290
parser.add_target_argument("--flash", action="store_true", help="Flash bitstream.")
291291
parser.add_target_argument("--sys-clk-freq", default=100e6, type=float, help="System clock frequency.")
292292
parser.add_target_argument("--cpu-clk-freq", default=175e6, type=float, help="CPU clock frequency.")
@@ -300,7 +300,7 @@ def main():
300300
parser.add_target_argument("--with-led-chaser", action="store_true", help="Enable LED Chaser.")
301301
args = parser.parse_args()
302302

303-
soc = BaseSoC(platform, args.sys_clk_freq, args.cpu_clk_freq, args.with_spi_flash,
303+
soc = BaseSoC(args.sys_clk_freq, args.cpu_clk_freq, args.with_spi_flash,
304304
args.spi_flash_number, args.spi_flash_rate, args.with_led_chaser, **parser.soc_argdict)
305305

306306
if args.with_spi_sdcard:

0 commit comments

Comments
 (0)