-
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.
Added support for parallel threads with vopt
- Loading branch information
1 parent
b1faae5
commit 1ce6bba
Showing
7 changed files
with
271 additions
and
62 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
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,35 @@ | ||
-- 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_a is | ||
generic ( | ||
runner_cfg : string); | ||
end entity; | ||
|
||
architecture tb of tb_a is | ||
begin | ||
main : process | ||
function recurse(value : integer) return integer is | ||
begin | ||
if value <= 0 then | ||
return 0; | ||
elsif value mod 2 = 0 then | ||
return 1 + recurse(value - 1); | ||
else | ||
return recurse(value - 1); | ||
end if; | ||
end; | ||
begin | ||
test_runner_setup(runner, runner_cfg); | ||
|
||
info("Running tb_a: " & to_string(recurse(17))); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-- 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_b is | ||
generic ( | ||
runner_cfg : string); | ||
end entity; | ||
|
||
architecture tb of tb_b is | ||
begin | ||
main : process | ||
function recurse(value : integer) return integer is | ||
begin | ||
if value <= 0 then | ||
return 0; | ||
elsif value mod 2 = 0 then | ||
return 1 + recurse(value - 1); | ||
else | ||
return recurse(value - 1); | ||
end if; | ||
end; | ||
begin | ||
test_runner_setup(runner, runner_cfg); | ||
|
||
info("Running tb_b: " & to_string(recurse(17))); | ||
|
||
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
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
Oops, something went wrong.