build/sim: cleanup run_as_root
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 15 Nov 2019 09:57:31 +0000 (10:57 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 15 Nov 2019 09:57:31 +0000 (10:57 +0100)
litex/build/sim/verilator.py

index 3f9b40fc7bbc8f3eb9d3d09f30a3860f42661a63..530d6a668d6ea968f1823940542f7eb475bca2e9 100644 (file)
@@ -206,8 +206,12 @@ class SimVerilatorToolchain:
         # run
         if run:
             _compile_sim(build_name, verbose)
-            _run_sim(build_name, as_root=sim_config.has_module("ethernet") or
-                     sim_config.has_module("xgmii_ethernet"))
+            run_as_root = False
+            if sim_config.has_module("ethernet"):
+                run_as_root = True
+            if sim_config.has_module("xgmii_ethernet"):
+                run_as_root = True
+            _run_sim(build_name, as_root=run_as_root)
 
         os.chdir("../../")