Catch exception
All checks were successful
Publish Package / Build Package (push) Successful in 8s
Publish Package / Deploy Package (push) Successful in 8s

This commit is contained in:
Byron Lathi
2025-11-22 16:27:19 -08:00
parent f0bc193271
commit 61360509b0
2 changed files with 16 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ name = "fpga-sim" # REQUIRED, is the only field that cannot be marked as dynami
# https://packaging.python.org/guides/single-sourcing-package-version/
# dynamic = ["version"]
version = "0.5.0" # REQUIRED, although can be dynamic
version = "0.5.1" # REQUIRED, although can be dynamic
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:

View File

@@ -3,6 +3,8 @@ import sys
import argparse
import subprocess
from cocotb_tools.runner import get_runner, VerilatorControlFile
from rtl_manifest import rtl_manifest
@@ -108,15 +110,19 @@ def fpga_sim_main():
if test["waves"]:
build_args.append("--trace-fst")
runner.build(
sources=sources,
includes=incdirs,
hdl_toplevel=test["toplevel"],
build_dir=f"{test['base_path']}/sim_build",
waves=test["waves"],
defines=defines,
build_args=build_args
)
try:
runner.build(
sources=sources,
includes=incdirs,
hdl_toplevel=test["toplevel"],
build_dir=f"{test['base_path']}/sim_build",
waves=test["waves"],
defines=defines,
build_args=build_args
)
except subprocess.CalledProcessError:
print("Failed to compile")
return
result_xml = f"../sim_build/{test['name']}_results.xml".replace(" ", "_")