-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial effort to support three-step flow. Related to #899.
Known limitation is that parallel threads aren't supported.
- Loading branch information
1 parent
80bba05
commit b1faae5
Showing
3 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright (c) 2014-2024, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
from pathlib import Path | ||
from vunit import VUnit | ||
|
||
vu = VUnit.from_argv() | ||
vu.add_vhdl_builtins() | ||
|
||
lib = vu.add_library("lib") | ||
lib.add_source_files(Path(__file__).parent / "*.vhd") | ||
|
||
tb = lib.test_bench("tb_example") | ||
test = tb.test("test 2") | ||
|
||
for value in range(3): | ||
test.add_config(name=f"{value}", generics=dict(value=value)) | ||
|
||
vu.set_sim_option("modelsim.three_step_flow", True) | ||
|
||
vu.main() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- This Source Code Form is subject to the terms of the Mozilla Public | ||
-- License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
-- You can obtain one at http://mozilla.org/MPL/2.0/. | ||
-- | ||
-- Copyright (c) 2014-2024, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
library vunit_lib; | ||
context vunit_lib.vunit_context; | ||
|
||
entity tb_example is | ||
generic ( | ||
runner_cfg : string; | ||
value : natural := 42); | ||
end entity; | ||
|
||
architecture tb of tb_example is | ||
begin | ||
main : process | ||
begin | ||
test_runner_setup(runner, runner_cfg); | ||
|
||
while test_suite loop | ||
if run("test 1") then | ||
elsif run("test 2") then | ||
end if; | ||
|
||
info("Running " & running_test_case & " with generic value = " & to_string(value)); | ||
end loop; | ||
|
||
test_runner_cleanup(runner); | ||
end process; | ||
end architecture; |
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