From: Florent Kermarrec Date: Tue, 4 Aug 2020 13:37:56 +0000 (+0200) Subject: build/sim/config: add default_clk/default_clk_freq parameters for retro-compatibility... X-Git-Tag: 24jan2021_ls180~30 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ca99b798fccec85d689188d5846d160c183adff;p=litex.git build/sim/config: add default_clk/default_clk_freq parameters for retro-compatibility with previous API. --- diff --git a/litex/build/sim/config.py b/litex/build/sim/config.py index 43eeb156..154cf680 100644 --- a/litex/build/sim/config.py +++ b/litex/build/sim/config.py @@ -6,8 +6,10 @@ import json import math class SimConfig(): - def __init__(self): + def __init__(self, default_clk=None, default_clk_freq=int(1e6)): self.modules = [] + if default_clk is not None: + self.add_clocker(default_clk, default_clk_freq) def _format_interfaces(self, interfaces): if not isinstance(interfaces, list):