Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "black-box" (ie no-implementation) entities #244

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tools/hdl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ vhdl_unit = rule(
),
default=False,
),
"is_black_box": attrs.bool(
doc=(
"Set to true for code that will get dropped from synth and sim, but\
is used for LSP analysis (like generated IP shims)"
),
default=False,
),
"codec_package": attrs.string(
doc=(
"Set to True when you want to generate VUnit codec package\
Expand Down Expand Up @@ -252,4 +259,11 @@ def sim_only_model(**kwargs):
# user doesn't have to do so
def third_party(**kwargs):
kwargs.update({"is_third_party": True})
vhdl_unit(**kwargs)

# A helper macro for declaring empty entities in BUCK files
# to keep the LSP happy (no missing entities) but these entities
# are dropped from synthesis and simulation outputs
def black_box(**kwargs):
kwargs.update({"is_black_box": True})
vhdl_unit(**kwargs)
1 change: 0 additions & 1 deletion tools/multitool/multitool_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def vunit_files():
try:
import vunit
vunit_install_dir = Path(vunit.__file__).parent
print(vunit_install_dir)
except:
print("Error attempting to import vunit module."
" Check tools/requirements.txt and install deps as necessary"
Expand Down