Compare commits

...

3 Commits

Author SHA1 Message Date
5d5cef8803 Fixed bug in elab script 2025-02-12 10:53:04 +01:00
aeb8a3f52c fixed gantry module import 2025-02-12 10:36:50 +01:00
5a19e817b1 Merge pull request 'Somewhat missnamed branch build-scripts merge with main' (#3) from build-scripts into main
Reviewed-on: #3
Reviewed-by: Adam <admag2001@gmail.com>
2025-02-12 10:30:49 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ def runDesign(topDef: str, arch: str, lib: str, std: str):
wavePath = os.path.join(os.getcwd(), "wave") wavePath = os.path.join(os.getcwd(), "wave")
command = [ ## may add -v for verbose command = [ ## may add -v for verbose
"ghdl", "-r", f"{topDef}", f"{arch}", "ghdl", "-r", f"{topDef}", f"{arch}",
f"--wave={os.path.join(libPath, topDef)}-{arch}.ghw" ##, "--read-wave-opt=<See" f"--wave=../wave/{topDef}-{arch}.ghw" ##, "--read-wave-opt=<See"
] ]
subprocess.run(command, cwd=libPath) subprocess.run(command, cwd=libPath)
command = [ command = [

View File

@ -1,5 +1,5 @@
import typer import typer
import elab import elab as elaborate
import build_env import build_env
from typing_extensions import Annotated from typing_extensions import Annotated
@ -28,7 +28,7 @@ def elab(
std: Annotated[str, typer.Option(help="Which VHDL standard to use. 87, 93, 93c, 00, 02 or 08", autocompletion=complete_vhdl_ver)] = "93c" std: Annotated[str, typer.Option(help="Which VHDL standard to use. 87, 93, 93c, 00, 02 or 08", autocompletion=complete_vhdl_ver)] = "93c"
): ):
print(f"Elaborating {topdef} with arch {arch} in library {library}. VHDL {std}") print(f"Elaborating {topdef} with arch {arch} in library {library}. VHDL {std}")
return elab.elabDesign(topdef, arch, library, std) return elaborate.elabDesign(topdef, arch, library, std)
@software.command(help="Simulates elaborated design in GHDL and views waves in gtkwave. Automatically runs `gantry elab` on the same top def and arch.") @software.command(help="Simulates elaborated design in GHDL and views waves in gtkwave. Automatically runs `gantry elab` on the same top def and arch.")
def run( def run(
@ -38,7 +38,7 @@ def run(
std: Annotated[str, typer.Option(help="Which VHDL standard to use. 87, 93, 93c, 00, 02 or 08", autocompletion=complete_vhdl_ver)] = "93c" std: Annotated[str, typer.Option(help="Which VHDL standard to use. 87, 93, 93c, 00, 02 or 08", autocompletion=complete_vhdl_ver)] = "93c"
): ):
print(f"Running (and synthesizing if needed) {topdef} with arch {arch} in library {library}. VHDL {std}") print(f"Running (and synthesizing if needed) {topdef} with arch {arch} in library {library}. VHDL {std}")
return elab.runDesign(topdef, arch, library, std) return elaborate.runDesign(topdef, arch, library, std)
@hardware.command() @hardware.command()
def build(): def build():