diff options
author | Marlon James <marlon.james@gmail.com> | 2021-03-03 10:33:56 -0800 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-03-04 07:49:28 +0100 |
commit | 783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e (patch) | |
tree | 929ab92aac895ec39b5e7780e1fe8cea3edf3be1 /doc/using | |
parent | a03aedddf650f923b06ebacb441a713930cd63e1 (diff) | |
download | ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.tar.gz ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.tar.bz2 ghdl-783cbac7ba4c14aa7e27f28755dccd7e4ee4d54e.zip |
VHPI: add initial minimal implementation
Minimal implementation of VHPI provides library loading and
error support. Calling most vhpi_* functions will raise a
VHPI error condition.
Incorporates VHPI thunks into libghdlvpi for linking.
Diffstat (limited to 'doc/using')
-rw-r--r-- | doc/using/InvokingGHDL.rst | 6 | ||||
-rw-r--r-- | doc/using/Simulation.rst | 19 |
2 files changed, 22 insertions, 3 deletions
diff --git a/doc/using/InvokingGHDL.rst b/doc/using/InvokingGHDL.rst index 1b5b144e6..29f5e1681 100644 --- a/doc/using/InvokingGHDL.rst +++ b/doc/using/InvokingGHDL.rst @@ -661,10 +661,10 @@ Make a local copy of an existing library. This is very useful if you want to add .. _VPI_build_commands: -VPI build commands -================== +VPI/VHPI build commands +======================= -These commands simplify the compile and the link of a user vpi module. They are all wrappers: the arguments are in fact a +These commands simplify the compile and the link of a user VPI or VHPI module. They are all wrappers: the arguments are in fact a whole command line that is executed with additional switches. Currently a unix-like compiler (like `cc`, `gcc` or `clang`) is expected: the additional switches use their syntax. The only option is `-v` which displays the command before its execution. diff --git a/doc/using/Simulation.rst b/doc/using/Simulation.rst index 807a634e2..6f062a95d 100644 --- a/doc/using/Simulation.rst +++ b/doc/using/Simulation.rst @@ -161,6 +161,25 @@ Here is the list of the most useful options. For further info, see :ref:`DEV:Deb Trace vpi calls. Trace is printed to :file:`FILENAME` if provided, otherwise to stdout. +.. option:: --vhpi=<FILENAME>[:<ENTRYPOINT>] + + Load VHPI library. This option can be used multiple times to load different libraries. + + If an ``ENTRYPOINT`` registration function is provided, it will be called. + Otherwise, any registration functions in the ``vhpi_startup_routines`` array in the library will be called: + + .. code-block:: c + + void (*vhpi_startup_routines[])() = { + register_foreign_app, + register_foreign_func, + 0 + }; + +.. option:: --vhpi-trace[=<FILENAME>] + + Trace vhpi calls. Trace is printed to :file:`FILENAME` if provided, otherwise to stdout. + .. option:: --help Display a short description of the options accepted by the runtime library. |