fpga: tools: Add --build-dir to repeat_fpga_build
Original-commit: 1d1c889c15b407c2dcc5c509e3dab59aa45320e8
This commit is contained in:
@@ -195,6 +195,14 @@ def parse_args():
|
|||||||
required=False,
|
required=False,
|
||||||
help="Specifies the FPGA directory to pass to rfnoc_image_builder using the -F argument.",
|
help="Specifies the FPGA directory to pass to rfnoc_image_builder using the -F argument.",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--build-dir",
|
||||||
|
"-B",
|
||||||
|
type=str,
|
||||||
|
default=None,
|
||||||
|
required=False,
|
||||||
|
help="Specifies the build directory to pass to rfnoc_image_builder using the -B argument.",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--vivado-path",
|
"--vivado-path",
|
||||||
"-P",
|
"-P",
|
||||||
@@ -287,6 +295,7 @@ def rfnoc_image_builder_cmd(
|
|||||||
image_core,
|
image_core,
|
||||||
image_core_name,
|
image_core_name,
|
||||||
fpga_dir,
|
fpga_dir,
|
||||||
|
build_dir,
|
||||||
vivado_path,
|
vivado_path,
|
||||||
ignore_warnings,
|
ignore_warnings,
|
||||||
build_num=None,
|
build_num=None,
|
||||||
@@ -303,6 +312,9 @@ def rfnoc_image_builder_cmd(
|
|||||||
if image_core_name:
|
if image_core_name:
|
||||||
cmd += f"--image-core-name {image_core_name}"
|
cmd += f"--image-core-name {image_core_name}"
|
||||||
cmd += " " if build_num == None else f"_{build_num:02} "
|
cmd += " " if build_num == None else f"_{build_num:02} "
|
||||||
|
if build_dir:
|
||||||
|
cmd += f"--build-dir {build_dir}"
|
||||||
|
cmd += " " if build_num == None else f"/{image_core_name}_{build_num:02} "
|
||||||
if fpga_dir:
|
if fpga_dir:
|
||||||
cmd += f"--fpga-dir {fpga_dir} "
|
cmd += f"--fpga-dir {fpga_dir} "
|
||||||
if vivado_path:
|
if vivado_path:
|
||||||
@@ -321,6 +333,7 @@ def run_fpga_build(
|
|||||||
image_core,
|
image_core,
|
||||||
image_core_name,
|
image_core_name,
|
||||||
fpga_dir,
|
fpga_dir,
|
||||||
|
build_dir,
|
||||||
vivado_path,
|
vivado_path,
|
||||||
ignore_warnings,
|
ignore_warnings,
|
||||||
parallel_builds,
|
parallel_builds,
|
||||||
@@ -336,6 +349,7 @@ def run_fpga_build(
|
|||||||
image_core: --image-core argument to be passed
|
image_core: --image-core argument to be passed
|
||||||
image_core_name: --image-core-name argument to be passed
|
image_core_name: --image-core-name argument to be passed
|
||||||
fpga_dir: --fpga-dir argument to be passed
|
fpga_dir: --fpga-dir argument to be passed
|
||||||
|
build_dir: --build-dir argument to be passed
|
||||||
vivado_path: --vivado-path argument to be passed
|
vivado_path: --vivado-path argument to be passed
|
||||||
ignore_warnings: --ignore-warnings argument to be passed
|
ignore_warnings: --ignore-warnings argument to be passed
|
||||||
parallel_builds: Indicates if we are doing builds in parallel
|
parallel_builds: Indicates if we are doing builds in parallel
|
||||||
@@ -354,6 +368,7 @@ def run_fpga_build(
|
|||||||
image_core,
|
image_core,
|
||||||
image_core_name,
|
image_core_name,
|
||||||
fpga_dir,
|
fpga_dir,
|
||||||
|
build_dir,
|
||||||
vivado_path,
|
vivado_path,
|
||||||
ignore_warnings,
|
ignore_warnings,
|
||||||
cmd_build_num,
|
cmd_build_num,
|
||||||
@@ -402,7 +417,14 @@ def run_fpga_build(
|
|||||||
|
|
||||||
|
|
||||||
def run_ip_build(
|
def run_ip_build(
|
||||||
ip_jobs, target, image_core, image_core_name, fpga_dir, vivado_path, ignore_warnings
|
ip_jobs,
|
||||||
|
target,
|
||||||
|
image_core,
|
||||||
|
image_core_name,
|
||||||
|
fpga_dir,
|
||||||
|
build_dir,
|
||||||
|
vivado_path,
|
||||||
|
ignore_warnings,
|
||||||
):
|
):
|
||||||
"""Performs the IP build.
|
"""Performs the IP build.
|
||||||
|
|
||||||
@@ -415,6 +437,7 @@ def run_ip_build(
|
|||||||
image_core: --image-core argument to be passed
|
image_core: --image-core argument to be passed
|
||||||
image_core_name: --image-core-name argument to be passed
|
image_core_name: --image-core-name argument to be passed
|
||||||
fpga_dir: --fpga-dir argument to be passed
|
fpga_dir: --fpga-dir argument to be passed
|
||||||
|
build_dir: --build-dir argument to be passed
|
||||||
vivado_path: --vivado-path argument to be passed
|
vivado_path: --vivado-path argument to be passed
|
||||||
ignore_warnings: --ignore-warnings argument to be passed
|
ignore_warnings: --ignore-warnings argument to be passed
|
||||||
|
|
||||||
@@ -428,6 +451,7 @@ def run_ip_build(
|
|||||||
image_core,
|
image_core,
|
||||||
image_core_name,
|
image_core_name,
|
||||||
fpga_dir,
|
fpga_dir,
|
||||||
|
build_dir,
|
||||||
vivado_path,
|
vivado_path,
|
||||||
ignore_warnings,
|
ignore_warnings,
|
||||||
None,
|
None,
|
||||||
@@ -497,6 +521,7 @@ def main():
|
|||||||
args.image_core,
|
args.image_core,
|
||||||
args.image_core_name,
|
args.image_core_name,
|
||||||
args.fpga_dir,
|
args.fpga_dir,
|
||||||
|
args.build_dir,
|
||||||
args.vivado_path,
|
args.vivado_path,
|
||||||
args.ignore_warnings,
|
args.ignore_warnings,
|
||||||
)
|
)
|
||||||
@@ -525,6 +550,7 @@ def main():
|
|||||||
args.image_core,
|
args.image_core,
|
||||||
args.image_core_name,
|
args.image_core_name,
|
||||||
args.fpga_dir,
|
args.fpga_dir,
|
||||||
|
args.build_dir,
|
||||||
args.vivado_path,
|
args.vivado_path,
|
||||||
args.ignore_warnings,
|
args.ignore_warnings,
|
||||||
args.fpga_jobs > 1,
|
args.fpga_jobs > 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user