diff --git a/compiler/characterizer/__init__.py b/compiler/characterizer/__init__.py index 3f3b8b60..00ad3b3e 100644 --- a/compiler/characterizer/__init__.py +++ b/compiler/characterizer/__init__.py @@ -33,6 +33,12 @@ if not OPTS.analytical_delay: else: (OPTS.spice_name, OPTS.spice_exe) = get_tool("spice", ["Xyce", "ngspice", "ngspice.exe", "hspice", "xa"]) + if OPTS.spice_name == "Xyce": + (OPTS.mpi_name, OPTS.mpi_exe) = get_tool("mpi", ["mpirun"]) + else: + OPTS.mpi_name = None + OPTS.mpi_exe = "" + # set the input dir for spice files if using ngspice if OPTS.spice_name == "ngspice": os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index e0a37e74..f49f636b 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -358,6 +358,19 @@ class stimuli(): temp_stim, OPTS.openram_temp) valid_retcode=0 + elif OPTS.spice_name == "Xyce": + if OPTS.num_sim_threads > 1 and OPTS.mpi_name: + mpi_cmd = "{0} -np {1}".format(OPTS.mpi_exe, + OPTS.num_sim_threads) + else: + mpi_cmd = "" + + cmd = "{0} {1} -o {3}timing.lis {2}".format(mpi_cmd, + OPTS.spice_exe, + temp_stim, + OPTS.openram_temp) + + valid_retcode=0 else: # ngspice 27+ supports threading with "set num_threads=4" in the stimulus file or a .spiceinit # Measurements can't be made with a raw file set in ngspice