Skip to content

Commit cbb729f

Browse files
committed
add vunit
1 parent 7ecdda4 commit cbb729f

File tree

6 files changed

+72
-2
lines changed

6 files changed

+72
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.build
22
*.swp
3+
vunit_out

Pipfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
8+
[packages]
9+
vunit-hdl = "*"
10+
11+
[requires]
12+
python_version = "3.5"

Pipfile.lock

+35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
-- TODO: Write test bench using VUnit.
1+
-- TODO: Write test bench to test bit multiplier using vunit.
2+
library vunit_lib;
3+
context vunit_lib.vunit_context;
4+
5+
entity tb_example is
6+
generic (runner_cfg : string);
7+
end entity;
8+
9+
architecture tb of tb_example is
10+
begin
11+
main : process
12+
begin
13+
test_runner_setup(runner, runner_cfg);
14+
report "Hello world!";
15+
test_runner_cleanup(runner); -- Simulation ends here
16+
end process;
17+
end architecture;
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
builder = msim
22
target_dir = .build
33

4-
vhdl work bit_multiplier.vhd -2002
4+
vhdl work bit_multiplier.vhd -2008

run.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from vunit import VUnit
2+
3+
vu = VUnit.from_argv()
4+
lib = vu.add_library('lib')
5+
lib.add_source_files("components/arithmetic/array-multiplier/*.vhd")
6+
vu.main()

0 commit comments

Comments
 (0)