Skip to content

Commit

Permalink
adapt builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 22, 2019
1 parent b5320b1 commit eb9c94d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vunit/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,24 @@ def _add_data_types(self, pkgs=None, impls=None):
implementations[ind] = val

files = [
["external_byte_vector-novhpi.vhd", "external_byte_vector-body.vhd"],
["external_string-novhpi.vhd", "external_string-body.vhd"],
["external_integer_vector-novhpi.vhd", "external_integer_vector-body.vhd"],
# ["external_memory-novhpi.vhd", "external_memory-body.vhd"]
]

for val in packages:
if val and not simulator_check(lambda simclass: simclass.supports_vhpi()):
if val and simulator_check(lambda simclass: not simclass.supports_vhpi()):
raise RuntimeError("the selected simulator does not support VHPI; must use non-VHPI packages...")

for pkg in range(0, len(files)):
if packages[pkg]:
# if implementations[pkg] is not None:
# files[pkg] = implementations[pkg]
# else:
files[pkg][0] = "external_byte_vector-vhpi.vhd"
if pkg == 0:
files[pkg][0] = "external_string-vhpi.vhd"
if pkg == 1:
files[pkg][0] = "external_integer_vector-vhpi.vhd"

for pkg in range(0, len(files)):
for name in files[pkg]:
Expand Down

0 comments on commit eb9c94d

Please sign in to comment.