-
Notifications
You must be signed in to change notification settings - Fork 348
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
Exception TYPES.INTERNAL_ERROR : trans-chap9.adb:1922 #606
Comments
I cloned your repository twice and got different versions of the hardware/vhdl/utils/Utils.vhd file, varying by whether or not bodies for functions matched their declarations (the bodies missing the explicit mode in that had been added to the declarations. VHDL IEEE Std 1076-2008 requires they match: 4.3 Subprogram bodies
4.10 Conformance rules
Mind this could be due to Github server distribution around the globe. After adding the missing mode ins (see attached vhdl.zip)
will demonstrate the error.
Without quite so much abstraction. While it's interesting to see complex designs this one looks like it could be simplified a bit further to demonstrate the issue more concisely. |
Did you checkout the
Agree. I'll try to find some time to extract the problematic logic to produce a minimal example. My thinking was that maybe someone can already point me towards a probable cause based on the exception. |
I can reproduce the crash, and I am investigating. |
The crash is due to the use of indirect recursion; not a common pattern. Working on a fix. |
I now have a simple reproducer. Work in progress... |
Thanks for the quick fix. Awesome 👍 |
You're welcome. I am often surprised by issues like this, that shows bugs that were present since the beginning.
|
Description
ghdl -i
+ghdl -m
fails with an exception.Context
Additional context
I forked https://github.com/johanpel/fletcher in https://github.com/mbrobbel/fletcher where I made some modifications in a
simulation
branch. My goal is to use ghdl for simulation.There is an entity (
ColumnReader
) which takes a configuration string in the generic map (https://github.com/johanpel/fletcher/blob/master/hardware/vhdl/arrow/ColumnReader.vhd#L67), and based on this generates the required logic (https://github.com/johanpel/fletcher/blob/master/hardware/vhdl/arrow/ColumnReaderLevel.vhd#L146).However, as can be seen here:
https://github.com/johanpel/fletcher/blob/master/hardware/vhdl/arrow/ColumnReaderLevel.vhd#L219
and here:
https://github.com/johanpel/fletcher/blob/master/hardware/vhdl/arrow/ColumnReaderArb.vhd#L355
ColumnReaderLevel
can add anotherColumnReaderArb
which adds anotherColumnReaderLevel
which can add anotherColumnReaderArb
which adds anotherColumnReaderLevel
and so forth.My guess is that this logic somehow is causing the exception. This is the condition triggering the exception:
https://github.com/ghdl/ghdl/blob/master/src/vhdl/translate/trans-chap9.adb#L1918-L1922
I'm using the
ghdl/ghdl
docker images to runghdl
like this:docker run --rm -v `pwd`:/src ghdl/ghdl:ubuntu18-llvm-5.0 bash -c "shopt -s globstar && ghdl -i /src/**/*.vhd && ghdl -m -v --ieee=synopsys ..."
How to reproduce?
This seems relevant: #2
The text was updated successfully, but these errors were encountered: