2017-11-16 02:02:53 +01:00
|
|
|
import os
|
|
|
|
|
import debug
|
|
|
|
|
from globals import OPTS,find_exe,get_tool
|
2018-05-12 01:32:00 +02:00
|
|
|
from .lib import *
|
|
|
|
|
from .delay import *
|
|
|
|
|
from .setup_hold import *
|
2017-11-16 02:02:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
debug.info(2,"Initializing characterizer...")
|
|
|
|
|
|
2018-01-26 22:00:25 +01:00
|
|
|
OPTS.spice_exe = ""
|
2017-11-16 02:02:53 +01:00
|
|
|
|
2018-01-05 17:32:23 +01:00
|
|
|
if not OPTS.analytical_delay:
|
2017-11-23 00:57:29 +01:00
|
|
|
if OPTS.spice_name != "":
|
2018-01-26 22:00:25 +01:00
|
|
|
OPTS.spice_exe=find_exe(OPTS.spice_name)
|
|
|
|
|
if OPTS.spice_exe=="":
|
2017-11-23 00:57:29 +01:00
|
|
|
debug.error("{0} not found. Unable to perform characterization.".format(OPTS.spice_name),1)
|
2017-11-16 02:02:53 +01:00
|
|
|
else:
|
2018-01-26 22:00:25 +01:00
|
|
|
(OPTS.spice_name,OPTS.spice_exe) = get_tool("spice",["xa", "hspice", "ngspice", "ngspice.exe"])
|
2017-11-16 02:02:53 +01:00
|
|
|
|
|
|
|
|
# set the input dir for spice files if using ngspice
|
2017-11-23 00:57:29 +01:00
|
|
|
if OPTS.spice_name == "ngspice":
|
2017-11-16 02:02:53 +01:00
|
|
|
os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp)
|
|
|
|
|
|
2018-01-26 22:00:25 +01:00
|
|
|
if OPTS.spice_exe == "":
|
2017-11-16 02:02:53 +01:00
|
|
|
debug.error("No recognizable spice version found. Unable to perform characterization.",1)
|
|
|
|
|
|
|
|
|
|
|
2018-01-26 22:00:25 +01:00
|
|
|
|