Repository navigation
Conversation
ru551n
force-pushed
the
fix/riviera-linux
branch
from
October 13, 2026 16:04
ae85275 to
f6c7ad4
Compare
ru551n
force-pushed
the
fix/riviera-linux
branch
from
October 13, 2026 16:23
f6c7ad4 to
6ac9cc2
Compare
ru551n
force-pushed
the
fix/riviera-linux
branch
3 times, most recently
from
October 13, 2026 16:28
78760a7 to
673c58a
Compare
ru551n
force-pushed
the
fix/riviera-linux
branch
from
October 13, 2026 18:00
673c58a to
f2f6bbf
Compare
This was referenced Oct 14, 2026
ru551n
force-pushed
the
fix/riviera-linux
branch
2 times, most recently
from
October 14, 2026 21:10
7ec9d3d to
ad2504a
Compare
ru551n
commented
Oct 14, 2026
| - 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. |
Collaborator
Author
There was a problem hiding this comment.
Shorten this to what feature was actually added.
Collaborator
Author
Comment on lines
+58
to
+62
| # 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" | ||
| ) |
Collaborator
Author
There was a problem hiding this comment.
Why is this needed for riviera pro?
Collaborator
Author
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: |
Collaborator
Author
There was a problem hiding this comment.
Why do we need this when we have all simulators working soon?
Collaborator
Author
ru551n
force-pushed
the
fix/riviera-linux
branch
4 times, most recently
from
October 14, 2026 21:55
139a950 to
ddafeb8
Compare
ru551n
commented
Oct 14, 2026
| @@ -1,5 +1,6 @@ | |||
| ## Changes | |||
|
|
|||
| - Riviera-PRO supports the whole API, through the VUnit Python bridge. | |||
Collaborator
Author
There was a problem hiding this comment.
Just claim riviera pro as a supported simulator.
Collaborator
Author
| 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, " |
Collaborator
Author
There was a problem hiding this comment.
Remove Active HDL as it is untested.
Collaborator
Author
|
|
||
|
|
||
| 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: |
Collaborator
Author
There was a problem hiding this comment.
Why do we have a default here, it should be explicit.
Collaborator
Author
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: |
Collaborator
Author
There was a problem hiding this comment.
again, why do we need a default here
Collaborator
Author
| built only when there is no prebuilt DLL. | ||
|
|
||
| Untested: this environment has no Windows installation. | ||
| The Questa variant is untested. |
Collaborator
Author
There was a problem hiding this comment.
Remove this from the code
Collaborator
Author
ru551n
force-pushed
the
fix/riviera-linux
branch
2 times, most recently
from
October 15, 2026 15:10
32bcb3a to
0cbab2c
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ru551n
force-pushed
the
fix/riviera-linux
branch
from
October 15, 2026 15:21
0cbab2c to
e2ba702
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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