Skip to content

Commit

Permalink
add compile only arg
Browse files Browse the repository at this point in the history
  • Loading branch information
M0stafaRady committed Jul 23, 2024
1 parent 90d3485 commit dcfc043
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions cocotb/caravel_cocotb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def main():
parser.add_argument("--run_defaults", action="store_true", help=argparse.SUPPRESS) # this used to run the default tests the flag is hidden because it just used with caravel verification flow
parser.add_argument("--CI", action="store_true", help=argparse.SUPPRESS) # used only for CI to run docker in non interactive mode
parser.add_argument("--progress", action="store_true", help=argparse.SUPPRESS) # used only for external CI to run docker in non interactive mode
parser.add_argument("--compile_only", action="store_true", help=argparse.SUPPRESS) # used to only compile without running
parser.add_argument("-no_gen_defaults", action="store_true", help="don't run gen_gpio_defaults script")
# Add a --version option
parser.add_argument('--version', action='version', version='%(prog)s ' + __version__)
Expand Down
3 changes: 3 additions & 0 deletions cocotb/caravel_cocotb/scripts/verify_cocotb/RunFlow.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def __init__(
run_defaults=False,
CI=False,
progress=False,
compile_only=False,
no_gen_defaults=False
) -> None:
self.test = test
Expand Down Expand Up @@ -269,6 +270,7 @@ def __init__(
self.run_defaults = run_defaults
self.CI = CI
self.progress = progress
self.compile_only = compile_only
self.no_gen_defaults = no_gen_defaults

def argparse_to_CocotbArgs(self, args):
Expand Down Expand Up @@ -296,4 +298,5 @@ def argparse_to_CocotbArgs(self, args):
self.run_defaults = args.run_defaults
self.CI = args.CI
self.progress = args.progress
self.compile_only = args.compile_only
self.no_gen_defaults = args.no_gen_defaults
6 changes: 4 additions & 2 deletions cocotb/caravel_cocotb/scripts/verify_cocotb/RunTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def runTest_iverilog(self):
self.write_iverilog_includes_file()
if not os.path.isfile(f"{self.test.compilation_dir}/sim.vvp") or self.args.compile:
self.iverilog_compile()
self.iverilog_run()
if not self.args.compile_only:
self.iverilog_run()

def write_iverilog_includes_file(self):
self.iverilog_dirs = " "
Expand Down Expand Up @@ -179,7 +180,8 @@ def runTest_vcs(self):
os.environ["MODULE"] = "module_trail"
if not os.path.isfile(f"{self.test.compilation_dir}/simv") or self.args.compile:
self.vcs_compile()
self.vcs_run()
if not self.args.compile_only:
self.vcs_run()

def write_vcs_includes_file(self):
# self.vcs_dirs = f'+incdir+\\"{self.paths.PDK_ROOT}/{self.paths.PDK}\\" '
Expand Down

0 comments on commit dcfc043

Please sign in to comment.