Report cxxsim selected, only when using the new API
authorCesar Strauss <cestrauss@gmail.com>
Sun, 27 Sep 2020 21:31:29 +0000 (18:31 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Sun, 27 Sep 2020 21:31:29 +0000 (18:31 -0300)
src/nmutil/sim_tmp_alternative.py

index e615ad5b8405e27510c4a192bf9113cfa403c1a6..b0ed14196fbf886f22a0920ab381cbc4d2971c8d 100644 (file)
@@ -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 ""