From c39d35de835cab7cf1f721a2c23931621ed62234 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 9 Nov 2022 08:45:12 +0100 Subject: [PATCH] build/sim/platform: Add fill_args/get_argdict methods. --- litex/build/sim/platform.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/litex/build/sim/platform.py b/litex/build/sim/platform.py index bae83f907..79a8cc6a3 100644 --- a/litex/build/sim/platform.py +++ b/litex/build/sim/platform.py @@ -62,6 +62,37 @@ class SimPlatform(GenericPlatform): module.submodules.sim_finish = SimFinish() self.trace = None + @classmethod + def fill_args(cls, toolchain, parser): + """ + pass parser to the specific toolchain to + fill this with toolchain args + + Parameters + ========== + toolchain: str + toolchain name + parser: argparse.ArgumentParser + parser to be filled + """ + verilator.verilator_build_args(parser) + + @classmethod + def get_argdict(cls, toolchain, args): + """ + return a dict of args + + Parameters + ========== + toolchain: str + toolchain name + + Return + ====== + a dict of key/value for each args or an empty dict + """ + return verilator.verilator_build_argdict(args) + # Sim debug modules -------------------------------------------------------------------------------- class SimTrace(Module, AutoCSR):