fix to nmutil workaround for detecting new Simulator API
[nmutil.git] / src / nmutil / sim_tmp_alternative.py
index 2b2e3a2af2139c78b07c32ade0e1ea502516498e..a90b6e78c5139153b7ab9e01ff1e56c25fcae2d4 100644 (file)
@@ -47,7 +47,7 @@ nmigen_sim_environ_variable = os.environ.get("NMIGEN_SIM_MODE") \
 
 def Simulator(*args, **kwargs):
     """Wrapper that allows run-time selection of simulator engine"""
-    if detected_new_api:
+    if detected_new_api and 'engine' not in kwargs:
         kwargs['engine'] = nmigen_sim_environ_variable
     return RealSimulator(*args, **kwargs)