library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

use work.math_pkg.all;
use work.rtps_package.all;

package Type2_package is
    
    
    
    constant TESTSEQUENCE_MAX_DEPTH             : natural := 4;
    constant TESTSEQUENCE_ADDR_WIDTH            : natural := log2c(TESTSEQUENCE_MAX_DEPTH);
    constant TESTSEQUENCE_TESTARRAY_MAX_DEPTH   : natural := 5;
    constant TESTSEQUENCE_TESTARRAY_ADDR_WIDTH  : natural := log2c(TESTSEQUENCE_TESTARRAY_MAX_DEPTH);
    constant TESTSTRING_MAX_DEPTH               : natural := 12;
    constant TESTSTRING_ADDR_WIDTH              : natural := log2c(TESTSTRING_MAX_DEPTH);
    constant TESTMAP_MAX_DEPTH                  : natural := 4;
    constant TESTMAP_ADDR_WIDTH                 : natural := log2c(TESTMAP_MAX_DEPTH);
    
    constant TESTUNION_LONGU_D  : std_logic_vector(CDR_CHAR_WIDTH-1 downto 0) := x"61";
    
    constant TESTBITMASK_WIDTH      : natural := 9;
    constant TESTBITMASK_CDR_WIDTH  : natural := CDR_SHORT_WIDTH;
    constant TESTBITMASK_POS1       : natural := 0;
    constant TESTBITMASK_POS3       : natural := 3;
    constant TESTBITMASK_POS4       : natural := 4;
    
    constant TESTENUM_WIDTH     : natural := 7;
    constant TESTENUM_CDR_WIDTH : natural := CDR_INT8_WIDTH;
    constant TESTENUM_A         : std_logic_vector(TESTENUM_WIDTH-1 downto 0) := "0000001";
    constant TESTENUM_B         : std_logic_vector(TESTENUM_WIDTH-1 downto 0) := "0000010";
    constant TESTENUM_C         : std_logic_vector(TESTENUM_WIDTH-1 downto 0) := "0000011";
    constant TESTENUM_D         : std_logic_vector(TESTENUM_WIDTH-1 downto 0) := "0000100";
    
    constant MAX_ID_SIZE                            : natural := 4;
    constant MAX_TESTSEQUENCE_TESTARRAY_SIZE        : natural := 5;
    constant MAX_TESTSEQUENCE_TESTCHAR_SIZE         : natural := 1;
    constant MAX_TESTSEQUENCE_TESTWCHAR_SIZE        : natural := 2;
    constant MAX_TESTSEQUENCE_TESTLONGLONG_SIZE     : natural := 8;
    constant MAX_TESTSEQUENCE_TESTLONGDOUBLE_SIZE   : natural := 20;
    constant MAX_TESTSEQUENCE_SIZE                  : natural := 148;   -- 152
    constant MAX_TESTMAP_SIZE                       : natural := 20;    -- 172
    constant MAX_TESTENUM_SIZE                      : natural := 1;     -- 173
    constant MAX_TESTUNION_SIZE                     : natural := 7;     -- 180
    constant MAX_TESTBITMASK_SIZE                   : natural := 4;     -- 184
    constant MAX_TESTSTRING_SIZE                    : natural := 17;    -- 201
    constant MAX_TYPE2_SIZE                         : natural := 201;
    
    constant MAX_TYPE2_KEY_HOLDER_SIZE  : natural := 28;
    
end package;