mirror of https://github.com/VLSIDA/OpenRAM.git
run_pex argument is now use_pex. Each unit test must RESET its options before assertions for consistent start state.
This commit is contained in:
parent
e95e9e8229
commit
cbc0f7c5d2
|
|
@ -22,10 +22,6 @@ import re
|
||||||
import importlib
|
import importlib
|
||||||
import globals
|
import globals
|
||||||
|
|
||||||
global OPTS
|
|
||||||
|
|
||||||
(OPTS, args) = globals.parse_args()
|
|
||||||
|
|
||||||
# These depend on arguments, so don't load them until now.
|
# These depend on arguments, so don't load them until now.
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
|
|
@ -34,11 +30,11 @@ if len(args) < 1:
|
||||||
print globals.USAGE
|
print globals.USAGE
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
|
globals.init_openram(args[0])
|
||||||
|
|
||||||
if OPTS.print_banner:
|
if OPTS.print_banner:
|
||||||
print globals.BANNER
|
print globals.BANNER
|
||||||
|
|
||||||
globals.init_openram(args[0])
|
|
||||||
|
|
||||||
# Check if all arguments are integers for bits, size, banks
|
# Check if all arguments are integers for bits, size, banks
|
||||||
if type(OPTS.config.word_size)!=int:
|
if type(OPTS.config.word_size)!=int:
|
||||||
debug.error("{0} is not an integer in config file.".format(OPTS.config.word_size))
|
debug.error("{0} is not an integer in config file.".format(OPTS.config.word_size))
|
||||||
|
|
@ -94,7 +90,7 @@ s.gds_write(gdsname)
|
||||||
|
|
||||||
# Run Characterizer on the design
|
# Run Characterizer on the design
|
||||||
sram_file = spname
|
sram_file = spname
|
||||||
if OPTS.run_pex:
|
if OPTS.use_pex:
|
||||||
sram_file = OPTS.out_path + "temp_pex.sp"
|
sram_file = OPTS.out_path + "temp_pex.sp"
|
||||||
calibre.run_pex(s.name, gdsname, spname, output=sram_file)
|
calibre.run_pex(s.name, gdsname, spname, output=sram_file)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class options(optparse.Values):
|
||||||
# The spice executable being used which is derived from the user PATH.
|
# The spice executable being used which is derived from the user PATH.
|
||||||
spice_exe = ""
|
spice_exe = ""
|
||||||
# Run with extracted parasitics
|
# Run with extracted parasitics
|
||||||
run_pex = False
|
use_pex = False
|
||||||
# Trim noncritical memory cells for simulation speed-up
|
# Trim noncritical memory cells for simulation speed-up
|
||||||
trim_noncritical = False
|
trim_noncritical = False
|
||||||
# Define the output file paths
|
# Define the output file paths
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class timing_sram_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="hspice"
|
OPTS.spice_version="hspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class timing_setup_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="hspice"
|
OPTS.spice_version="hspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ class timing_setup_test(unittest.TestCase):
|
||||||
|
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="hspice"
|
OPTS.spice_version="hspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class timing_sram_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="ngspice"
|
OPTS.spice_version="ngspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
@ -33,7 +32,11 @@ class timing_sram_test(unittest.TestCase):
|
||||||
num_banks=OPTS.config.num_banks,
|
num_banks=OPTS.config.num_banks,
|
||||||
name="test_sram1")
|
name="test_sram1")
|
||||||
|
|
||||||
|
# reset these options
|
||||||
OPTS.check_lvsdrc = True
|
OPTS.check_lvsdrc = True
|
||||||
|
OPTS.spice_version="hspice"
|
||||||
|
OPTS.force_spice = False
|
||||||
|
globals.set_spice()
|
||||||
|
|
||||||
import delay
|
import delay
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class timing_setup_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="ngspice"
|
OPTS.spice_version="ngspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
@ -33,7 +32,11 @@ class timing_setup_test(unittest.TestCase):
|
||||||
sh = setup_hold.setup_hold()
|
sh = setup_hold.setup_hold()
|
||||||
[one_setup_time, zero_setup_time] = sh.hold_time()
|
[one_setup_time, zero_setup_time] = sh.hold_time()
|
||||||
|
|
||||||
|
# reset these options
|
||||||
OPTS.check_lvsdrc = True
|
OPTS.check_lvsdrc = True
|
||||||
|
OPTS.spice_version="hspice"
|
||||||
|
OPTS.force_spice = False
|
||||||
|
globals.set_spice()
|
||||||
|
|
||||||
if OPTS.tech_name == "freepdk45":
|
if OPTS.tech_name == "freepdk45":
|
||||||
self.assertTrue(isclose(one_setup_time,-0.0048828125))
|
self.assertTrue(isclose(one_setup_time,-0.0048828125))
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class timing_setup_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
OPTS.spice_version="ngspice"
|
OPTS.spice_version="ngspice"
|
||||||
OPTS.force_spice = True
|
OPTS.force_spice = True
|
||||||
globals.set_spice()
|
globals.set_spice()
|
||||||
|
|
@ -33,7 +32,12 @@ class timing_setup_test(unittest.TestCase):
|
||||||
sh = setup_hold.setup_hold()
|
sh = setup_hold.setup_hold()
|
||||||
[one_setup_time, zero_setup_time] = sh.setup_time()
|
[one_setup_time, zero_setup_time] = sh.setup_time()
|
||||||
|
|
||||||
|
# reset these options
|
||||||
OPTS.check_lvsdrc = True
|
OPTS.check_lvsdrc = True
|
||||||
|
OPTS.spice_version="hspice"
|
||||||
|
OPTS.force_spice = False
|
||||||
|
globals.set_spice()
|
||||||
|
|
||||||
if OPTS.tech_name == "freepdk45":
|
if OPTS.tech_name == "freepdk45":
|
||||||
self.assertTrue(isclose(one_setup_time,0.0146484375))
|
self.assertTrue(isclose(one_setup_time,0.0146484375))
|
||||||
self.assertTrue(isclose(zero_setup_time,0.008544921875))
|
self.assertTrue(isclose(zero_setup_time,0.008544921875))
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class sram_func_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
|
|
||||||
import sram
|
import sram
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class lib_test(unittest.TestCase):
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
# we will manually run lvs/drc
|
# we will manually run lvs/drc
|
||||||
OPTS.check_lvsdrc = False
|
OPTS.check_lvsdrc = False
|
||||||
OPTS.use_pex = False
|
|
||||||
|
|
||||||
import sram
|
import sram
|
||||||
import lib
|
import lib
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue