Repository navigation
Conversation
ae85275 to
f6c7ad4
Compare
f6c7ad4 to
6ac9cc2
Compare
78760a7 to
673c58a
Compare
673c58a to
f2f6bbf
Compare
7ec9d3d to
ad2504a
Compare
| - Python 3.15 is supported, with a prebuilt bridge DLL for Windows. | ||
| - The bridge library is no longer built in or copied to the VUnit output path, which may not allow executing files, but to `~/.vunit-python-bridge` in the home directory of the user, on every platform. This includes the prebuilt Windows DLLs. `VUNIT_PYTHON_BRIDGE_LIBRARY_DIR` selects another directory on every platform. When the directory cannot be written, the setup fails and asks for the variable to be set. | ||
| - A library directory the simulator cannot load the bridge library from is reported as such when the package is set up: on Linux and macOS one on a file system mounted `noexec`, e.g. a tmpfs in a container, and on Windows one where an execution policy (AppLocker, Windows Defender Application Control) blocks the library. The simulator only reports that it failed to load it. Any other reason the library does not load is reported by the setup with the reason the system gives, rather than by NVC or GHDL as "cannot load VHPIDIRECT shared library" with no reason. | ||
| - The Riviera-PRO/Active-HDL VHPI application builds on Linux. It was linked against the Windows import libraries (`-lpython311`, `-l_tkinter`) on every platform, so `ld` failed, and it is now `libraries/python.so` there. On Windows, `_tkinter` is only linked when the Python has it. |
There was a problem hiding this comment.
Shorten this to what feature was actually added.
There was a problem hiding this comment.
Claude (AI assistant) here, on behalf of @ru551n:
Fixed in ddafeb8: the release note is now "Riviera-PRO supports the whole API, through the VUnit Python bridge."
| # The embedded interpreter starts as this one, to use the same virtual environment. A header, | ||
| # since ccomp passes its arguments on through a shell, which would strip quotes from a -D. | ||
| (target.parent / "vunit_python_executable.h").write_text( | ||
| f"#define VUNIT_PYTHON_EXECUTABLE {json.dumps(sys.executable)}\n", encoding="utf-8" | ||
| ) |
There was a problem hiding this comment.
Why is this needed for riviera pro?
There was a problem hiding this comment.
| def post_run(results): | ||
| verify(results, expected_failures) | ||
| run_file_base_tests(args) | ||
| if simulator_name in BRIDGE_SIMULATORS: |
There was a problem hiding this comment.
Why do we need this when we have all simulators working soon?
fa05b6f to
139a950
Compare
Riviera-PRO has no direct binding (VHPIDIRECT), and was served by a separate VHPI application with a subset of the API. It now calls the bridge like the other simulators, through a VHPI front end, native/vhpi.c, that registers a foreign subprogram per entry point of bridge.h. The front end is compiled into a variant of the library, like the FLI one for Questa, against the vhpi_user.h of the simulator, and the generated attributes name the library by absolute path without its suffix. Strings cross as vectors of character positions, since Riviera-PRO ends a string value at a line feed. The VUnit interface of Riviera-PRO has no run environment hook, so the setup sets VUNIT_PYTHON_BRIDGE_CONFIG in the environment of the VUnit process, which vsim inherits. The VHPI application (python_pkg_vhpi.vhd, native/vhpi/, foreign_application.py) and the expected failures of the tests on VHPI are removed. Two test names lose their brackets, which VUnit's Tcl scripts for Riviera-PRO evaluate as commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
139a950 to
ddafeb8
Compare
| @@ -1,5 +1,6 @@ | |||
| ## Changes | |||
|
|
|||
| - Riviera-PRO supports the whole API, through the VUnit Python bridge. | |||
There was a problem hiding this comment.
Just claim riviera pro as a supported simulator.
| if simulator_name is not None and simulator_name not in BRIDGE_SIMULATORS: | ||
| raise PythonBridgeError( | ||
| f"The vunit-python-bridge package requires NVC, GHDL or Questa/ModelSim, " | ||
| f"The vunit-python-bridge package requires NVC, GHDL, Questa/ModelSim, Riviera-PRO or Active-HDL, " |
There was a problem hiding this comment.
Remove Active HDL as it is untested.
|
|
||
|
|
||
| def prepare_library(root: Path, simulator_prefix: Optional[Path] = None) -> Path: | ||
| def prepare_library(root: Path, simulator_prefix: Optional[Path] = None, front_end: str = "fli") -> Path: |
There was a problem hiding this comment.
Why do we have a default here, it should be explicit.
There was a problem hiding this comment.
|
|
||
|
|
||
| def _build_windows_library(root: Path, simulator_prefix: Optional[Path] = None) -> Path: | ||
| def _build_windows_library(root: Path, simulator_prefix: Optional[Path] = None, front_end: str = "fli") -> Path: |
There was a problem hiding this comment.
again, why do we need a default here
| built only when there is no prebuilt DLL. | ||
|
|
||
| Untested: this environment has no Windows installation. | ||
| The Questa variant is untested. |
There was a problem hiding this comment.
Remove this from the code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Riviera-PRO support through the VUnit Python bridge, with the same API as on NVC, GHDL and Questa. It replaces the separate, limited VHPI application used before.
What was added
native/vhpi.c, a VHPI front end. Riviera-PRO has no VHPIDIRECT, so this registers one foreign subprogram per bridge entry point, likenative/fli.cdoes for Questa. Strings are passed as character vectors, because Riviera-PRO cuts avhpiStrValat a line feed.vhpi_user.hand cached in~/.vunit-python-bridge. On Windows it is built with Riviera-PRO's bundled MinGW and linked againstaldecpli."VHPI <dir>/libvunit_python_bridge_vhpi vpy_begin".VUNIT_PYTHON_BRIDGE_CONFIG, set in the VUnit process, because VUnit's Riviera-PRO interface has no run-environment hook.Tested
🤖 Generated with Claude Code