-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vhpidirect: add 'wrapping/exitcb' #15
Merged
Merged
Conversation
This file contains 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
umarcor
force-pushed
the
wrapping-exitcb
branch
2 times, most recently
from
April 21, 2020 14:45
040f2ed
to
ec5153a
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
April 30, 2020 08:34
ec5153a
to
8f3a921
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
2 times, most recently
from
May 3, 2020 20:23
6cb968d
to
56bbc97
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
September 1, 2020 03:46
78757b1
to
7681910
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
September 17, 2020 02:54
7681910
to
5e60b4a
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
October 23, 2020 05:36
5e60b4a
to
074014a
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
October 23, 2020 05:58
074014a
to
4c5fd01
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
November 27, 2020 06:02
4c5fd01
to
36aadcf
Compare
3 tasks
umarcor
force-pushed
the
wrapping-exitcb
branch
from
January 21, 2021 01:33
36aadcf
to
878a4a2
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
January 27, 2021 01:57
878a4a2
to
fff5062
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
January 27, 2021 02:01
fff5062
to
403ec14
Compare
umarcor
force-pushed
the
wrapping-exitcb
branch
from
January 27, 2021 02:12
403ec14
to
de0b36e
Compare
After ghdl/ghdl@0978b48, all C only examples do work now. I split Python and VUnit examples, and marked them as xfail. Those work on MSYS2, but fail on Linux (consistently, but differently on the containers or on the host). The failure when using the upstream MSYS2 package is expected, since the patch was not uploaded yet. |
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.
The purpose of this PR is to document how to execute code after calling
ghdl_main
, that is, how to set an exit callback. Ref ghdl/ghdl#894.EDIT: This can also be reproduced using C only by changing https://github.com/ghdl/ghdl-cosim/blob/master/vhpidirect/shared/shghdl/tb.vhd#L7 from severity
note
tofailure.
However, currently, this is mostly a reproducer for the
Aborted (core dumped)
issue reported in ghdl/ghdl#803. In this example:main
function calls a function namedwrapper
, which callsghdl_main
.wrapper
, an exit handler is set.main
functions. In one of them, a signal handler is set, in order to catch SIGABRT.Up to eleven different output items are expected:
./tb08_fail:error: report failed
in process .tb(fail).P0
./tb08_fail:error: simulation failed
These are the results:
Conclusions:
ghdl_main
or in caller functions is properly executed (columns 7-11).ghdl_main
is NOT executed (column 7), but it is possible to work around it with an exit handler (column 8), and code in caller functions is preserved (column 9-11). I would expect column 7 to be executed too.Aborted
orAborted (core dumpled)
is produced. Nothing is executed after it (columns 7-11).For completeness, VUnit uses a report of severity failure as the standard procedure to force a VHDL 1993 simulation to end; as reporting failing/passing tests is handled independently of the exit code. In the current status, it is not possible to use VUnit along with GHDL to produce and execute shared libraries. All VHDL 1993 tests and any failing VHDL 2008 tests will produce an abortion, forcing any surrounding Python code to exit inmediately.
All these tests are executed in CI. See
test / vunit (vhpidirect/wrapping/exitcb, ./run.sh)
andtest / vunit (vhpidirect/wrapping/exitcb/py, ./vunit_run.sh)
below.