Change compiler name for unit tests

This commit is contained in:
Eren Dogan 2022-11-06 14:05:08 -08:00
parent 2ba49fd96f
commit 845f32805f
8 changed files with 12 additions and 12 deletions

View File

@ -95,7 +95,7 @@ model: $(STAMPS)
$(eval bname=$(basename $(notdir $@))) $(eval bname=$(basename $(notdir $@)))
$(eval config_path=$(CONFIG_DIR)/$(addsuffix .py, $(notdir $(basename $@)))) $(eval config_path=$(CONFIG_DIR)/$(addsuffix .py, $(notdir $(basename $@))))
mkdir -p $(SIM_DIR)/$(bname) mkdir -p $(SIM_DIR)/$(bname)
-python3 $(OPENRAM_HOME)/openram.py $(OPTS) -p $(SIM_DIR)/$(bname) -o $(bname) -t $(TECH) $(config_path) 2>&1 > /dev/null -python3 $(OPENRAM_HOME)/../sram_compiler.py $(OPTS) -p $(SIM_DIR)/$(bname) -o $(bname) -t $(TECH) $(config_path) 2>&1 > /dev/null
touch $@ touch $@
clean_model: clean_model:

View File

@ -131,7 +131,7 @@ def bp():
An empty function so you can set soft breakpoints in pdb. An empty function so you can set soft breakpoints in pdb.
Usage: Usage:
1) Add a breakpoint anywhere in your code with "import debug; debug.bp()". 1) Add a breakpoint anywhere in your code with "import debug; debug.bp()".
2) Run "python3 -m pdb openram.py config.py" or "python3 -m pdb 05_bitcell_array.test" (for example) 2) Run "python3 -m pdb sram_compiler.py config.py" or "python3 -m pdb 05_bitcell_array.test" (for example)
3) When pdb starts, run "break debug.bp" to set a SOFT breakpoint. (Or you can add this to your ~/.pdbrc) 3) When pdb starts, run "break debug.bp" to set a SOFT breakpoint. (Or you can add this to your ~/.pdbrc)
4) Then run "cont" to continue. 4) Then run "cont" to continue.
5) You can now set additional breakpoints or display commands 5) You can now set additional breakpoints or display commands

View File

@ -24,7 +24,7 @@ import subprocess
VERSION = "1.2.0" VERSION = "1.2.0"
NAME = "OpenRAM v{}".format(VERSION) NAME = "OpenRAM v{}".format(VERSION)
USAGE = "openram.py [options] <config file>\nUse -h for help.\n" USAGE = "sram_compiler.py [options] <config file>\nUse -h for help.\n"
OPTS = options.options() OPTS = options.options()
CHECKPOINT_OPTS = None CHECKPOINT_OPTS = None

View File

@ -13,7 +13,7 @@ class options(optparse.Values):
""" """
Class for holding all of the OpenRAM options. All Class for holding all of the OpenRAM options. All
of these options can be over-riden in a configuration file of these options can be over-riden in a configuration file
that is the sole required command-line positional argument for openram.py. that is the sole required command-line positional argument for sram_compiler.py.
""" """
################### ###################

View File

@ -35,7 +35,7 @@ class code_format_test(openram_test):
continue continue
if re.search("debug.py$", code): if re.search("debug.py$", code):
continue continue
if re.search("openram.py$", code): if re.search("sram_compiler.py$", code):
continue continue
if re.search("testutils.py$", code): if re.search("testutils.py$", code):
continue continue

View File

@ -23,7 +23,7 @@ class openram_back_end_test(openram_test):
config_file = "{}/tests/configs/config_back_end".format(os.getenv("OPENRAM_HOME")) config_file = "{}/tests/configs/config_back_end".format(os.getenv("OPENRAM_HOME"))
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 sram_compiler.py with 2-bit, 16 word SRAM.")
out_file = "testsram" out_file = "testsram"
out_path = "/tmp/testsram_{0}_{1}_{2}/".format(OPTS.tech_name, getpass.getuser(), os.getpid()) out_path = "/tmp/testsram_{0}_{1}_{2}/".format(OPTS.tech_name, getpass.getuser(), os.getpid())
@ -54,9 +54,9 @@ class openram_back_end_test(openram_test):
# Always perform code coverage # Always perform code coverage
if OPTS.coverage == 0: if OPTS.coverage == 0:
debug.warning("Failed to find coverage installation. This can be installed with pip3 install coverage") debug.warning("Failed to find coverage installation. This can be installed with pip3 install coverage")
exe_name = "{0}/openram.py ".format(OPENRAM_HOME) exe_name = "{0}/../sram_compiler.py ".format(OPENRAM_HOME)
else: else:
exe_name = "{0}{1}/openram.py ".format(OPTS.coverage_exe, OPENRAM_HOME) exe_name = "{0}{1}/../sram_compiler.py ".format(OPTS.coverage_exe, OPENRAM_HOME)
config_name = "{0}/tests/configs/config_back_end.py".format(OPENRAM_HOME) config_name = "{0}/tests/configs/config_back_end.py".format(OPENRAM_HOME)
cmd = "{0} -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name, cmd = "{0} -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name,
out_file, out_file,

View File

@ -23,7 +23,7 @@ class openram_front_end_test(openram_test):
config_file = "{}/tests/configs/config_front_end".format(os.getenv("OPENRAM_HOME")) config_file = "{}/tests/configs/config_front_end".format(os.getenv("OPENRAM_HOME"))
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 sram_compiler.py with 2-bit, 16 word SRAM.")
out_file = "testsram" out_file = "testsram"
out_path = "/tmp/testsram_{0}_{1}_{2}".format(OPTS.tech_name, getpass.getuser(), os.getpid()) out_path = "/tmp/testsram_{0}_{1}_{2}".format(OPTS.tech_name, getpass.getuser(), os.getpid())
@ -54,9 +54,9 @@ class openram_front_end_test(openram_test):
# Always perform code coverage # Always perform code coverage
if OPTS.coverage == 0: if OPTS.coverage == 0:
debug.warning("Failed to find coverage installation. This can be installed with pip3 install coverage") debug.warning("Failed to find coverage installation. This can be installed with pip3 install coverage")
exe_name = "{0}/openram.py ".format(OPENRAM_HOME) exe_name = "{0}/../sram_compiler.py ".format(OPENRAM_HOME)
else: else:
exe_name = "{0}{1}/openram.py ".format(OPTS.coverage_exe, OPENRAM_HOME) exe_name = "{0}{1}/../sram_compiler.py ".format(OPTS.coverage_exe, OPENRAM_HOME)
config_name = "{0}/tests/configs/config_front_end.py".format(OPENRAM_HOME) config_name = "{0}/tests/configs/config_front_end.py".format(OPENRAM_HOME)
cmd = "{0} -n -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name, cmd = "{0} -n -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name,
out_file, out_file,

View File

@ -65,7 +65,7 @@ OPENRAM_TMP=/openram/macros/$*/tmp
%.ok: configs/%.py %.ok: configs/%.py
@echo "Building $*" @echo "Building $*"
@mkdir -p $* @mkdir -p $*
@$(DOCKER_CMD) python3 -u /openram/compiler/openram.py $(OPENRAM_OPTS) -o $* -p /openram/macros/$* /openram/macros/$< && touch $@ @$(DOCKER_CMD) python3 -u /openram/sram_compiler.py $(OPENRAM_OPTS) -o $* -p /openram/macros/$* /openram/macros/$< && touch $@
.DELETE_ON_ERROR: $(STAMPS) .DELETE_ON_ERROR: $(STAMPS)