diff --git a/vunit/builtins.py b/vunit/builtins.py index 0f7c6e7de..377e57064 100644 --- a/vunit/builtins.py +++ b/vunit/builtins.py @@ -72,7 +72,6 @@ def _add_data_types(self): """ Add data types packages """ - self._add_files(join(VHDL_PATH, "data_types", "src", "types", "*.vhd")) self._add_files(join(VHDL_PATH, "data_types", "src", "*.vhd")) def _add_array_util(self): diff --git a/vunit/vhdl/data_types/src/integer_vector_ptr_pkg.vhd b/vunit/vhdl/data_types/src/integer_vector_ptr_pkg.vhd index b61337c19..f90fa0f77 100644 --- a/vunit/vhdl/data_types/src/integer_vector_ptr_pkg.vhd +++ b/vunit/vhdl/data_types/src/integer_vector_ptr_pkg.vhd @@ -11,8 +11,7 @@ -- into a singleton datastructure of integer vector access types. -- -use work.integer_vector_pkg.all; - +use work.types_pkg.all; use work.codec_pkg.all; use work.codec_builder_pkg.all; diff --git a/vunit/vhdl/data_types/src/string_ptr_pkg.vhd b/vunit/vhdl/data_types/src/string_ptr_pkg.vhd index 19d2381a6..17ac7ef83 100644 --- a/vunit/vhdl/data_types/src/string_ptr_pkg.vhd +++ b/vunit/vhdl/data_types/src/string_ptr_pkg.vhd @@ -10,8 +10,7 @@ -- into a singleton datastructure of string access types. -- -use work.string_pkg.all; - +use work.types_pkg.all; use work.codec_pkg.all; use work.codec_builder_pkg.all; diff --git a/vunit/vhdl/data_types/src/types/integer_vector_pkg.vhd b/vunit/vhdl/data_types/src/types.vhd similarity index 69% rename from vunit/vhdl/data_types/src/types/integer_vector_pkg.vhd rename to vunit/vhdl/data_types/src/types.vhd index 3cbab03ea..7e0667320 100644 --- a/vunit/vhdl/data_types/src/types/integer_vector_pkg.vhd +++ b/vunit/vhdl/data_types/src/types.vhd @@ -4,7 +4,13 @@ -- -- Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com -package integer_vector_pkg is +package types_pkg is + subtype byte_t is integer range 0 to 255; + + type string_access_t is access string; + type string_access_vector_t is array (natural range <>) of string_access_t; + type string_access_vector_access_t is access string_access_vector_t; + type integer_vector_t is array (natural range <>) of integer; type integer_vector_access_t is access integer_vector_t; type integer_vector_access_vector_t is array (natural range <>) of integer_vector_access_t; diff --git a/vunit/vhdl/data_types/src/types/string_pkg.vhd b/vunit/vhdl/data_types/src/types/string_pkg.vhd deleted file mode 100644 index 55be22bab..000000000 --- a/vunit/vhdl/data_types/src/types/string_pkg.vhd +++ /dev/null @@ -1,11 +0,0 @@ --- This Source Code Form is subject to the terms of the Mozilla Public --- License, v. 2.0. If a copy of the MPL was not distributed with this file, --- You can obtain one at http://mozilla.org/MPL/2.0/. --- --- Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com - -package string_pkg is - type string_access_t is access string; - type string_access_vector_t is array (natural range <>) of string_access_t; - type string_access_vector_access_t is access string_access_vector_t; -end package; diff --git a/vunit/vhdl/verification_components/src/memory_pkg.vhd b/vunit/vhdl/verification_components/src/memory_pkg.vhd index eb4675be4..f8394643a 100644 --- a/vunit/vhdl/verification_components/src/memory_pkg.vhd +++ b/vunit/vhdl/verification_components/src/memory_pkg.vhd @@ -9,8 +9,9 @@ library ieee; use ieee.std_logic_1164.all; -use work.integer_vector_ptr_pkg.all; +use work.types_pkg.all; use work.string_ptr_pkg.all; +use work.integer_vector_ptr_pkg.all; use work.logger_pkg.all; package memory_pkg is @@ -51,7 +52,6 @@ package memory_pkg is ----------------------------------------------------- -- Memory data read and write functions ----------------------------------------------------- - subtype byte_t is integer range 0 to 255; procedure write_byte(memory : memory_t; address : natural; byte : byte_t); diff --git a/vunit/vhdl/verification_components/test/tb_memory.vhd b/vunit/vhdl/verification_components/test/tb_memory.vhd index 02c5190d5..754b8302c 100644 --- a/vunit/vhdl/verification_components/test/tb_memory.vhd +++ b/vunit/vhdl/verification_components/test/tb_memory.vhd @@ -10,6 +10,7 @@ use ieee.std_logic_1164.all; library vunit_lib; context vunit_lib.vunit_context; +use work.types_pkg.byte_t; use work.memory_pkg.all; use work.string_ptr_pkg.all; use work.random_pkg.all;