mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-03 08:27:11 +02:00
Move verify into a module. Make characterizer a module. Move exe searching to modules.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
import debug
|
||||
from globals import OPTS,find_exe,get_tool
|
||||
import lib
|
||||
import delay
|
||||
import setup_hold
|
||||
|
||||
|
||||
debug.info(2,"Initializing characterizer...")
|
||||
|
||||
spice_exe = ""
|
||||
|
||||
if OPTS.analytical_delay:
|
||||
debug.info(1,"Using analytical delay models (no characterization)")
|
||||
else:
|
||||
if OPTS.spice_version != "":
|
||||
spice_exe=find_exe(OPTS.spice_version)
|
||||
if spice_exe=="":
|
||||
debug.error("{0} not found. Unable to perform characterization.".format(OPTS.spice_version),1)
|
||||
else:
|
||||
(choice,spice_exe) = get_tool("spice",["xa", "hspice", "ngspice", "ngspice.exe"])
|
||||
OPTS.spice_version = choice
|
||||
|
||||
# set the input dir for spice files if using ngspice
|
||||
if OPTS.spice_version == "ngspice":
|
||||
os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp)
|
||||
|
||||
if spice_exe == "":
|
||||
debug.error("No recognizable spice version found. Unable to perform characterization.",1)
|
||||
|
||||
|
||||
@@ -278,21 +278,22 @@ def run_sim():
|
||||
temp_stim = "{0}stim.sp".format(OPTS.openram_temp)
|
||||
|
||||
|
||||
from characterizer import spice_exe
|
||||
if OPTS.spice_version == "xa":
|
||||
cmd = "{0} {1} -o {2}xa -mt 20".format(OPTS.spice_exe,
|
||||
cmd = "{0} {1} -o {2}xa -mt 20".format(spice_exe,
|
||||
temp_stim,
|
||||
OPTS.openram_temp)
|
||||
valid_retcode=0
|
||||
elif OPTS.spice_version == "hspice":
|
||||
# TODO: Should make multithreading parameter a configuration option
|
||||
cmd = "{0} -mt 2 -i {1} -o {2}timing".format(OPTS.spice_exe,
|
||||
cmd = "{0} -mt 2 -i {1} -o {2}timing".format(spice_exe,
|
||||
temp_stim,
|
||||
OPTS.openram_temp)
|
||||
valid_retcode=0
|
||||
else:
|
||||
cmd = "{0} -b -o {2}timing.lis {1}".format(OPTS.spice_exe,
|
||||
temp_stim,
|
||||
OPTS.openram_temp)
|
||||
cmd = "{0} -b -o {2}timing.lis {1}".format(spice_exe,
|
||||
temp_stim,
|
||||
OPTS.openram_temp)
|
||||
# for some reason, ngspice-25 returns 1 when it only has acceptable warnings
|
||||
valid_retcode=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user