You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packagepkg_aistypemy_type_tis (A, B, C)
endpackage pkg_a;
and a second package pkg_b in a file pkg_b.vhd which scopes an object from pkg_a
packagepkg_bisalias mytype is work.pkg_a.mytype;
endpackagepkg_b;
When used in above way VUnit doesn't detect dependency between pkg_b.vhd and pkg_a.vhd even though this is a valid use case in VHDL. The outcome will be that the pkg_bwon't compile due topkg_a not being compiled yet due to wrong compilation order.
However if type is imported directly through use clause, the dependency is detected.
-- any of the below worksuse work.pkg_a.all;
use work.pkg_a.mytype;
packagepkg_bis-- direct designation is ofcourse now not needed since the type is imported already by `use` clausealias mytype is work.pkg_a.mytype;
endpackagepkg_b;
The text was updated successfully, but these errors were encountered:
Yes, there are legal VHDL/SV constructs that VUnit can't detect. Our ambition has not been to create a complete parser as that would increase the analysis time and it would also be a major effort considering that HDLs are hard to parse. Our aim is to have a parser that covers the more common cases which leaves you with two options. Either write your VHDL in a "VUnit friendly" way (as you suggested) or use add_dependency_on if you're not in control of how the RTL is written.
I also see a future where we could make use of an external open source parser that fits our purposes. A dedicated parser project may give us a more complete parser without sacrificing performance.
Assume having a package in a file
pkg_a.vhd
:and a second package
pkg_b
in a filepkg_b.vhd
which scopes an object frompkg_a
When used in above way
VUnit
doesn't detect dependency betweenpkg_b.vhd
andpkg_a.vhd
even though this is a valid use case in VHDL. The outcome will be that thepkg_b
won't compile due topkg_a
not being compiled yet due to wrong compilation order.However if type is imported directly through
use
clause, the dependency is detected.The text was updated successfully, but these errors were encountered: