mirror of https://github.com/VLSIDA/OpenRAM.git
Fix config for tests 30
This commit is contained in:
parent
0b3d2fe9de
commit
aca99b87bc
|
|
@ -283,13 +283,15 @@ def read_config(config_file, is_unit_test=True):
|
||||||
# it is already not an abs path, make it one
|
# it is already not an abs path, make it one
|
||||||
if not os.path.isabs(config_file):
|
if not os.path.isabs(config_file):
|
||||||
config_file = os.getcwd() + "/" + config_file
|
config_file = os.getcwd() + "/" + config_file
|
||||||
# Make it a python file if the base name was only given
|
|
||||||
config_file = re.sub(r'\.py$', "", config_file)
|
# Make it a python file if the base name was only given
|
||||||
|
config_file = re.sub(r'\.py$', "", config_file)
|
||||||
|
|
||||||
|
|
||||||
# Expand the user if it is used
|
# Expand the user if it is used
|
||||||
config_file = os.path.expanduser(config_file)
|
config_file = os.path.expanduser(config_file)
|
||||||
OPTS.config_file = config_file
|
|
||||||
|
OPTS.config_file = config_file + ".py"
|
||||||
# Add the path to the system path
|
# Add the path to the system path
|
||||||
# so we can import things in the other directory
|
# so we can import things in the other directory
|
||||||
dir_name = os.path.dirname(config_file)
|
dir_name = os.path.dirname(config_file)
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class sram():
|
||||||
# Write the config file
|
# Write the config file
|
||||||
start_time = datetime.datetime.now()
|
start_time = datetime.datetime.now()
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
copyfile(OPTS.config_file + '.py', OPTS.output_path + OPTS.output_name + '.py')
|
copyfile(OPTS.config_file, OPTS.output_path + OPTS.output_name + '.py')
|
||||||
debug.print_raw("Config: Writing to {0}".format(OPTS.output_path + OPTS.output_name + '.py'))
|
debug.print_raw("Config: Writing to {0}".format(OPTS.output_path + OPTS.output_name + '.py'))
|
||||||
print_time("Config", datetime.datetime.now(), start_time)
|
print_time("Config", datetime.datetime.now(), start_time)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class openram_back_end_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
|
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
|
||||||
config_file = "{}/tests/{}/config".format(os.getenv("OPENRAM_HOME"), OPTS.tech_name)
|
config_file = "{}/tests/{}/config_back_end".format(os.getenv("OPENRAM_HOME"), OPTS.tech_name)
|
||||||
globals.init_openram(config_file)
|
globals.init_openram(config_file)
|
||||||
|
|
||||||
debug.info(1, "Testing top-level back-end openram.py with 2-bit, 16 word SRAM.")
|
debug.info(1, "Testing top-level back-end openram.py with 2-bit, 16 word SRAM.")
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class openram_front_end_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
|
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
|
||||||
config_file = "{}/tests/{}/config".format(os.getenv("OPENRAM_HOME"), OPTS.tech_name)
|
config_file = "{}/tests/{}/config_front_end".format(os.getenv("OPENRAM_HOME"), OPTS.tech_name)
|
||||||
globals.init_openram(config_file)
|
globals.init_openram(config_file)
|
||||||
|
|
||||||
debug.info(1, "Testing top-level front-end openram.py with 2-bit, 16 word SRAM.")
|
debug.info(1, "Testing top-level front-end openram.py with 2-bit, 16 word SRAM.")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue