Skip to content
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

GHDL Crashes when using UVVM AXILITE BFM (MCODE only) #2510

Open
stfarley opened this issue Oct 5, 2023 · 11 comments
Open

GHDL Crashes when using UVVM AXILITE BFM (MCODE only) #2510

stfarley opened this issue Oct 5, 2023 · 11 comments

Comments

@stfarley
Copy link

stfarley commented Oct 5, 2023

Description
Attempting to use the AXILITE BFM with an MCODE GHDL Build results in the following Error
GCC and LLVM builds work as expected

Expected behaviour
The TC should just run and do basically nothing

How to reproduce?
./comp_run

******************** GHDL Bug occurred ***************************
Please report this bug on https://github.com/ghdl/ghdl/issues
GHDL release: 4.0.0-dev (3.0.0.r592.g522dc4317.dirty) [Dunoon edition]
Compiled with GNAT Version: Community 2020 (20200818-93)
Target: x86_64-pc-linux-gnu
/projects/ghdl_issues/new/
Command line:
ghdl --elab-run --std=08 -frelaxed-rules --work=work tb --stop-time=200ns --wave=gsim.ghw
Exception CONSTRAINT_ERROR raised
Exception information:
raised CONSTRAINT_ERROR : elab-vhdl_context.adb:674 access check failed
tc.zip

@tgingold
Copy link
Member

tgingold commented Oct 5, 2023

The comp_run file is missing

@stfarley
Copy link
Author

stfarley commented Oct 5, 2023

comp_run.txt

Sorry about that. I thought I had added it to the zip. (added the .txt ext so I could upload it.

@tgingold
Copy link
Member

tgingold commented Oct 5, 2023

I think I also need the reference to uvvm. I don't know which version you are using.

@stfarley
Copy link
Author

stfarley commented Oct 5, 2023

I am using the current version from the "master" branch. the latest tag is v2023.03.21
git describe
v1.5.1-215-g6953b15

@tgingold
Copy link
Member

tgingold commented Oct 6, 2023

I can reproduce the crash.

@tgingold
Copy link
Member

tgingold commented Oct 8, 2023

I will fix the crash, but it is due to issues in osvvm:
in file vvc_methods_pkg.vhd line 133, a shared variable is declared using a protected type from a package instantiated just before.
This is not allowed: the body of the package and thus the body of the protected type are elaborated within the body of the vvc_methods_pkg and thus after the shared variable. So the shared variable cannot be built.

There is a warning for this mistake, but it is disabled in osvvm.

tgingold added a commit that referenced this issue Oct 8, 2023
@stfarley
Copy link
Author

With this TC and Code build I get a different error now. (LLVM and GCC works properly)
The UVVM libraries are compiled with the GHDL scripts.

/projects/uvvm/UVVM_ALL/bitvis_vip_scoreboard/src/generic_sb_pkg.vhd:546:14:error: type of variable "vr_sb_queue" referenced before its elaboration
variable vr_sb_queue : sb_queue_pkg.t_generic_queue;

GHDL 4.0.0-dev (3.0.0.r634.g649af4117.dirty) [Dunoon edition]
Compiled with GNAT Version: Community 2020 (20200818-93)
static elaboration, mcode code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2023 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@tgingold
Copy link
Member

tgingold commented Oct 18, 2023 via email

@stfarley
Copy link
Author

OK Thanks,
I didn't dig any deeper when I saw it didn't happen with LLVM of GCC.

Best if I log these with the UVVM team?

@tgingold
Copy link
Member

Yes, please it should be reported to the UVVM team. Please add a reference to this issue.

@stfarley
Copy link
Author

This is fixed in UVVM 2024.03.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants