From: Cesar Strauss Date: Sun, 27 Sep 2020 21:31:29 +0000 (-0300) Subject: Report cxxsim selected, only when using the new API X-Git-Tag: 24jan2021_ls180~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db4088828b690a82372325268c9eadff7823da1a;p=nmutil.git Report cxxsim selected, only when using the new API --- diff --git a/src/nmutil/sim_tmp_alternative.py b/src/nmutil/sim_tmp_alternative.py index e615ad5..b0ed141 100644 --- a/src/nmutil/sim_tmp_alternative.py +++ b/src/nmutil/sim_tmp_alternative.py @@ -53,12 +53,12 @@ def Simulator(*args, **kwargs): def is_engine_cxxsim(): """Returns ``True`` if the selected engine is cxxsim""" - return nmigen_sim_environ_variable == "cxxsim" + return detected_new_api and nmigen_sim_environ_variable == "cxxsim" def is_engine_pysim(): """Returns ``True`` if the selected engine is pysim""" - return nmigen_sim_environ_variable == "pysim" + return not detected_new_api or nmigen_sim_environ_variable == "pysim" nmigen_sim_top_module = "top." if is_engine_pysim() else ""