forked from VUnit/vunit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
vunit/test/acceptance/artificial/vhdl/tb_same_sim_all_pass_nonzero.vhd
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,40 @@ | ||
-- 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-2019, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
library vunit_lib; | ||
context vunit_lib.vunit_context; | ||
|
||
entity tb_same_sim_all_pass_nonzero is | ||
generic ( | ||
output_path : string; | ||
runner_cfg : string); | ||
end entity; | ||
|
||
architecture vunit_test_bench of tb_same_sim_all_pass_nonzero is | ||
begin | ||
test_runner : process | ||
variable counter : integer := 1; | ||
begin | ||
test_runner_setup(runner, runner_cfg); | ||
while test_suite loop | ||
if run("Test 1") then | ||
wait for 10 ns; | ||
report "Test 1"; | ||
assert counter = 1; | ||
counter := counter + 1; | ||
elsif run("Test 2") then | ||
wait for 10 ns; | ||
report "Test 2"; | ||
assert counter = 2; | ||
counter := counter + 1; | ||
end if; | ||
end loop; | ||
vunit_lib.runner_pkg.p_disable_simulation_exit(runner_state); | ||
test_runner_cleanup(runner); | ||
assert false severity error; | ||
wait; | ||
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