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

WARNING - failed to find a primary design unit 'scoreboardpkg_int' in library 'osvvm' #752

Closed
rafaelnp opened this issue Oct 5, 2021 · 2 comments · Fixed by #753
Closed

Comments

@rafaelnp
Copy link
Contributor

rafaelnp commented Oct 5, 2021

When using the following setup:

Linux:
Linux archlinux 5.10.64-1-lts #1 SMP Sun, 12 Sep 2021 09:11:21 +0000 x86_64 GNU/Linux

Python:

python --version
Python 3.9.7

VUnit (installed using pip):

pip show vunit_hdl
Name: vunit-hdl
Version: 4.5.0

GHDL (archlinux package):

ghdl -v
GHDL 1.0.0 (tarball) [Dunoon edition]
 Compiled with GNAT Version: 11.1.0
 GCC back-end code generator
Written by Tristan Gingold.

I am experiencing the following warning when running VUnit + OSVVM (that leads to an error):

❯ python run.py -l
lib.test_tb.all
Listed 1 tests
❯ python run.py
WARNING - /home/rnp/src/fpga/vhdl/misc/test_tb/test_tb.vhd: failed to find a primary design unit 'scoreboardpkg_int' in library 'osvvm'
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_pkg.vhd                     passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/string_ops/src/string_ops.vhd                               passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/path/src/path.vhd                                           passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/VendorCovApiPkg.vhd                                   passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/TranscriptPkg.vhd                                     passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/TextUtilPkg.vhd                                       passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/NamePkg.vhd                                           passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/OsvvmGlobalPkg.vhd                                    passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/AlertLogPkg.vhd                                       passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/SortListPkg_int.vhd                                   passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/ResolutionPkg.vhd                                     passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/TbUtilPkg.vhd                                         passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/RandomBasePkg.vhd                                     passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/RandomPkg.vhd                                         passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/MessagePkg.vhd                                        passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/MemoryPkg.vhd                                         passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/CoveragePkg.vhd                                       passed
Compiling into osvvm:     ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/osvvm/OsvvmContext.vhd                                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/print_pkg.vhd                                   passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/types.vhd                                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/codec_builder.vhd                            passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/codec_builder-2008p.vhd                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/codec.vhd                                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/codec-2008p.vhd                              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/api/external_string_pkg.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/string_ptr_pkg.vhd                           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/ansi_pkg.vhd                                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/log_levels_pkg.vhd                              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/string_ptr_pkg-body-2002p.vhd                passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/byte_vector_ptr_pkg.vhd                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/api/external_integer_vector_pkg.vhd          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/integer_vector_ptr_pkg.vhd                   passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/log_handler_pkg.vhd                             passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/print_pkg-body.vhd                              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/logger_pkg.vhd                                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/memory_pkg.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/memory_pkg-body.vhd             passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/dictionary/src/dictionary.vhd                               passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/run/src/run_types.vhd                                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/file_pkg.vhd                                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/log_handler_pkg-body.vhd                        passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/integer_vector_ptr_pkg-body-2002p.vhd        passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/integer_array_pkg.vhd                        passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/memory_utils_pkg.vhd            passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/queue_pkg.vhd                                passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/string_ptr_pool_pkg.vhd                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/queue_pkg-body.vhd                           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/queue_pkg-2008p.vhd                          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/integer_vector_ptr_pool_pkg.vhd              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_statistics_pkg.vhd          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/run/src/runner_pkg.vhd                                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/run/src/run_api.vhd                                         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/queue_pool_pkg.vhd                           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/integer_array_pkg-body.vhd                   passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/dict_pkg.vhd                                 passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/data_types/src/data_types_context.vhd                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/core/src/stop_pkg.vhd                                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/core/src/stop_body_2008p.vhd                                passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/core/src/core_pkg.vhd                                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/run/src/run.vhd                                             passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/logger_pkg-body.vhd                             passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/log_levels_pkg-body.vhd                         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/logging/src/log_deprecated_pkg.vhd                          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_types.vhd                                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_api.vhd                                         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/check/src/checker_pkg.vhd                                   passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/run/src/run_deprecated_pkg.vhd                              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/vunit_run_context.vhd                                       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/check/src/checker_pkg-body.vhd                              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/check/src/check_api.vhd                                     passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/check/src/check_deprecated_pkg.vhd                          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/vunit_context.vhd                                           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_support.vhd                                     passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_messenger.vhd                                   passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_common.vhd                                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_deprecated.vhd                                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_debug_codec_builder.vhd                         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_string.vhd                                      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/com/src/com_context.vhd                                     passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/wishbone_pkg.vhd                passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/wishbone_slave.vhd              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/sync_pkg.vhd                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/sync_pkg-body.vhd               passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/stream_slave_pkg.vhd            passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/stream_slave_pkg-body.vhd       passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/stream_master_pkg.vhd           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/uart_pkg.vhd                    passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/uart_slave.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/uart_master.vhd                 passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/stream_master_pkg-body.vhd      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/signal_checker_pkg.vhd          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/std_logic_checker.vhd           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/bus_master_pkg.vhd              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/wishbone_master.vhd             passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/ram_master.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/bus_master_pkg-body.vhd         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/bus2memory.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_pkg.vhd              passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_protocol_checker.vhd passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_private_pkg.vhd      passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_monitor.vhd          passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_slave.vhd            passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_stream_master.vhd           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_slave_pkg.vhd               passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/axi_lite_master_pkg.vhd         passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/avalon_stream_pkg.vhd           passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/avalon_source.vhd               passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/avalon_sink.vhd                 passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/avalon_pkg.vhd                  passed
Compiling into vunit_lib: ../../../../../.local/lib/python3.9/site-packages/vunit/vhdl/verification_components/src/vc_context.vhd                  passed
Compiling into lib:       test_tb.vhd                                                                                                              failed
=== Command used: ===
/usr/bin/ghdl -a --workdir=/home/rnp/src/fpga/vhdl/misc/test_tb/vunit_out/ghdl/libraries/lib --work=lib --std=08 -P/home/rnp/src/fpga/vhdl/misc/test_tb/vunit_out/ghdl/libraries/vunit_lib -P/home/rnp/src/fpga/vhdl/misc/test_tb/vunit_out/ghdl/libraries/osvvm -P/home/rnp/src/fpga/vhdl/misc/test_tb/vunit_out/ghdl/libraries/lib /home/rnp/src/fpga/vhdl/misc/test_tb/test_tb.vhd

=== Command output: ===
/home/rnp/src/fpga/vhdl/misc/test_tb/test_tb.vhd:11:11: unit "scoreboardpkg_int" not found in library "osvvm"
/home/rnp/src/fpga/vhdl/misc/test_tb/test_tb.vhd:21:20: entity 'test_tb' was not analysed
/usr/bin/ghdl: compilation error

minimal example:

library ieee;
use ieee.std_logic_1164.all;

library vunit_lib;
context vunit_lib.vunit_context;
context vunit_lib.vc_context;

library osvvm;
use osvvm.RandomPkg.all;
use osvvm.ScoreboardPkg_int.all;
use osvvm.TranscriptPkg.all;
use osvvm.AlertLogPkg.all;
use osvvm.CoveragePkg.all;

entity test_tb is
	generic (runner_cfg : string);
end entity test_tb;

architecture tb of test_tb is

	shared variable scoreboard : ScoreboardPType;
	shared variable coverage   : CovPType;

begin
	process begin
		test_runner_setup(runner, runner_cfg);
		wait for 100 ns;
		test_runner_cleanup(runner);
	end process;
end architecture tb;

and the run.py to run it:

from vunit import VUnit

VU = VUnit.from_argv()
VU.add_osvvm()
VU.add_verification_components()
VU.set_compile_option('ghdl.a_flags', ['-Wno-hide'])
VU.add_library("lib").add_source_files(["*.vhd"])
VU.main()

When using ModelSim Intel FPGA Starter Edition 2020.1, this problem does not show up. I suppose I am missig some configuration or minor detail regarding GHDL. Thanks in advance. :)

@umarcor
Copy link
Member

umarcor commented Oct 6, 2021

I think the solution is to override supports_vhdl_package_generics in the GHDL sim_if: https://github.com/VUnit/vunit/blob/6114f044401d7fe94098ed5bbfb8f6d575dcfcac/vunit/sim_if/ghdl.py. Currently, GHDL is using the default False.

Hence, this is a legit bug to be fixed in VUnit.

@rafaelnp
Copy link
Contributor Author

rafaelnp commented Oct 7, 2021

@umarcor I tested here your changes and it worked. Thanks for your reply and pull resquest. 👍

@eine eine closed this as completed in #753 Oct 8, 2021
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

Successfully merging a pull request may close this issue.

2 participants