-
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 manual addition of VHDL configurations.
- Loading branch information
1 parent
b7fcc7f
commit 6f0615f
Showing
15 changed files
with
195 additions
and
14 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,18 @@ | ||
-- 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-2023, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
architecture arch1 of ent is | ||
begin | ||
arch <= "arch1"; | ||
end; | ||
|
||
configuration cfg1 of tb_with_vhdl_configuration is | ||
for tb | ||
for ent_inst : ent | ||
use entity work.ent(arch1); | ||
end for; | ||
end for; | ||
end; |
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,18 @@ | ||
-- 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-2023, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
architecture arch2 of ent is | ||
begin | ||
arch <= "arch2"; | ||
end; | ||
|
||
configuration cfg2 of tb_with_vhdl_configuration is | ||
for tb | ||
for ent_inst : ent | ||
use entity work.ent(arch2); | ||
end for; | ||
end for; | ||
end; |
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,9 @@ | ||
-- 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-2023, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
entity ent is | ||
port(arch : out string(1 to 5)); | ||
end; |
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
46 changes: 46 additions & 0 deletions
46
tests/acceptance/artificial/vhdl/tb_with_vhdl_configuration.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,46 @@ | ||
-- 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-2023, Lars Asplund lars.anders.asplund@gmail.com | ||
|
||
library vunit_lib; | ||
context vunit_lib.vunit_context; | ||
|
||
use std.textio.all; | ||
|
||
entity tb_with_vhdl_configuration is | ||
generic(runner_cfg : string); | ||
end entity; | ||
|
||
architecture tb of tb_with_vhdl_configuration is | ||
component ent | ||
port(arch : out string(1 to 5)); | ||
end component; | ||
|
||
signal arch : string(1 to 5); | ||
|
||
begin | ||
test_runner : process | ||
file result_fptr : text; | ||
variable result_line : line; | ||
begin | ||
test_runner_setup(runner, runner_cfg); | ||
|
||
file_open(result_fptr, join(output_path(runner_cfg), "result.txt"), write_mode); | ||
write(result_line, arch); | ||
writeline(result_fptr, result_line); | ||
file_close(result_fptr); | ||
|
||
info(arch); | ||
|
||
test_runner_cleanup(runner); | ||
wait; | ||
end process; | ||
|
||
ent_inst : ent | ||
port map( | ||
arch => arch | ||
); | ||
|
||
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
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
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
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
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