Skip to content

Commit

Permalink
ui: remove vunit.verilog (VUnit#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 23, 2023
1 parent 6181ccd commit d779de3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 39 deletions.
4 changes: 3 additions & 1 deletion examples/verilog/uart/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
"""

from pathlib import Path
from vunit.verilog import VUnit
from vunit import VUnit

SRC_PATH = Path(__file__).parent / "src"

VU = VUnit.from_argv()
VU.add_verilog_builtins()

VU.add_library("uart_lib").add_source_files(SRC_PATH / "*.sv")
VU.add_library("tb_uart_lib").add_source_files(SRC_PATH / "test" / "*.sv")

Expand Down
4 changes: 3 additions & 1 deletion examples/verilog/user_guide/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
"""

from pathlib import Path
from vunit.verilog import VUnit
from vunit import VUnit

ROOT = Path(__file__).parent

VU = VUnit.from_argv()
VU.add_verilog_builtins()

VU.add_library("lib").add_source_files(ROOT / "*.sv")

VU.main()
4 changes: 3 additions & 1 deletion examples/verilog/verilog_ams/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
# Copyright (c) 2014-2023, Lars Asplund lars.anders.asplund@gmail.com

from pathlib import Path
from vunit.verilog import VUnit
from vunit import VUnit

ROOT = Path(__file__).parent

VU = VUnit.from_argv()
VU.add_verilog_builtins()

LIB = VU.add_library("lib")
LIB.add_source_files(ROOT / "*.sv")
LIB.add_source_files(ROOT / "*.vams").set_compile_option("modelsim.vlog_flags", ["-ams"])
Expand Down
10 changes: 7 additions & 3 deletions tests/acceptance/artificial/verilog/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@

from pathlib import Path
from glob import glob
from vunit.verilog import VUnit
from vunit import VUnit


root = Path(__file__).parent

vu = VUnit.from_argv()
VU.add_verilog_builtins()

lib = vu.add_library("lib")
lib2 = vu.add_library("lib2")
files = glob(str(root / "*.sv"))
for file in files:

for file in glob(str(root / "*.sv")):
if "tb_with_parameter_config" in file:
lib2.add_source_files(file, defines={"DEFINE_FROM_RUN_PY": ""})
else:
Expand Down Expand Up @@ -65,4 +68,5 @@ def post_check(output_path):
configure_tb_with_parameter_config()
configure_tb_same_sim_all_pass(vu)
lib.module("tb_other_file_tests").scan_tests_from_file(str(root / "other_file_tests.sv"))

vu.main()
4 changes: 2 additions & 2 deletions vunit/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,8 @@ def add_verilog_builtins(self):
Add VUnit Verilog builtin libraries.
.. IMPORTANT::
Class ``vunit.verilog`` is deprecated and it will be removed in an upcoming release.
Verilog users will need to call this method explicitly in order to preserve the functionality.
As of VUnit v5, class ``vunit.verilog`` is removed.
Verilog users need to call this method explicitly in order to preserve the functionality.
See :vunit_issue:`777`.
"""
self._builtins.add_verilog_builtins()
Expand Down
31 changes: 0 additions & 31 deletions vunit/verilog.py

This file was deleted.

0 comments on commit d779de3

Please sign in to comment.