Automatic sourcing of nxdesignsuite

This commit is contained in:
Adam 2025-02-24 13:35:37 +01:00
parent 5e0db1ad3a
commit 9706030ab2
2 changed files with 9 additions and 3 deletions

View File

@ -49,14 +49,14 @@ def synth(
topdef: Annotated[str, typer.Argument(help="Top Definition entity to synthesize")] = "",
library: Annotated[str, typer.Option("--library", "-l", help="Library to compile from, defaults to \"work\"")] = "work"
):
proc = subprocess.run(["nxpython", f"{gantry_install_path}/nxp_script.py", "synthDesign", library, topdef])
proc = subprocess.run(["source_and_run.sh", f"{gantry_install_path}/nxp_script.py", "synthDesign", library, topdef])
@hardware.command(help="Places the provided top level design using NXPython. Make sure you run this with NXPython.")
def place(
topdef: Annotated[str, typer.Argument(help="Top Definition entity to synthesize")] = "",
library: Annotated[str, typer.Option("--library", "-l", help="Library to compile from, defaults to \"work\"")] = "work"
):
proc = subprocess.run(["nxpython", f"{gantry_install_path}/nxp_script.py", "placeDesign", library, topdef])
proc = subprocess.run(["source_and_run.sh", f"{gantry_install_path}/nxp_script.py", "placeDesign", library, topdef])
@hardware.command(help="Routes the provided top level design using NXPython. Make sure you run this with NXPython.")
@ -64,7 +64,7 @@ def route(
topdef: Annotated[str, typer.Argument(help="Top Definition entity to synthesize")] = "",
library: Annotated[str, typer.Option("--library", "-l", help="Library to compile from, defaults to \"work\"")] = "work"
):
proc = subprocess.run(["nxpython", f"{gantry_install_path}/nxp_script.py", "routeDesign", library, topdef])
proc = subprocess.run(["source_and_run.sh", f"{gantry_install_path}/nxp_script.py", "routeDesign", library, topdef])
@hardware.command(help="")
def build():

6
scripts/source_and_run.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
source /gsl/cad/modules/init/bash
module add /gsl/cad/modules/modulefiles/nanoxplore/nxdesignsuite/24.3.0.0
nxpython $@