eine on master
docs/about: fixed typo from "GD… (compare)
LarsAsplund on issue-833-type-generic-dict
WIP: Added generic type support… (compare)
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
library OSVVM ;
context osvvm.OsvvmContext ;
package ScoreBoardPkg_myslv is new
OSVVM.ScoreboardGenericPkg generic map(
ExpectedType => std_logic_vector,
ActualType => std_logic_vector,
Match => std_match,
expected_to_string => to_hstring,
actual_to_string => to_hstring
);
library vunit_lib;
context vunit_lib.vunit_context;
entity mwe_tb is
generic (runner_cfg : string);
end entity mwe_tb;
architecture tb of mwe_tb is
begin
main_proc : process begin
test_runner_setup(runner, runner_cfg);
if run("test1") then
--noop
end if;
test_runner_cleanup(runner);
end process;
test_runner_watchdog(runner, 1 ms);
end tb;
#!/usr/bin/env python3
from pathlib import Path
from vunit import VUnit
ROOT = Path(__file__).parent
VU = VUnit.from_argv()
VU.add_osvvm()
VU.add_library("lib").add_source_files([ROOT / "tb_apanella.vhd"])
VU.main()
py run.py '<library_name_set>.<testbench_name_set>.<test-case-name_set>' -v
You can pass the dictionary as string or as the path to a file. Optionally, you can encode the string:
TB.get_tests("stringified*")[0].set_generic("tb_cfg", JSON_STR)
TB.get_tests("b16encoded stringified*")[0].set_generic("tb_cfg", b16encode(JSON_STR))
TB.get_tests("JSON file*")[0].set_generic("tb_cfg", JSON_FILE)
TB.get_tests("b16encoded JSON file*")[0].set_generic("tb_cfg", b16encode(str(TEST_PATH / JSON_FILE)))
You only need one of those. The four of them are used in the example for illustration.
Q> While running simulation using ModelSim, I am always getting the warning: " Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es)." and I want to get rid of this warning. How can I do it?
What I did and is not working>
Is there any other things I can try out from run.py?
@dpaul24 You're using
allow_empty=True
. Is that because it didn't find any testbenches? Note that the sim option only applies to testbenches added before the sim option was set.
Well I did not give it much thought, I just think it would be safe to use the TRUE setting. btw - All my TBs are loaded I use vu_prj.set_sim_option("disable_ieee_warnings", True, allow_empty=True)