aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue476/repro/test_op1.vhd
blob: b5416f704003b0fe5207e84ce1c20b168d2cd359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity test_op1 is
    generic (
        NBITS                       : natural := 1;
        NBR_OF_CHROMA               : natural := 1;
        NBR_OF_ROW                  : natural := 1;
        NBR_OF_COL                  : natural := 1;
        NBR_OF_MATRIX               : natural := 1);
    port (
        signal clock, rst             : in  std_logic;
        signal in_data                : in  std_logic_vector(NBR_OF_MATRIX*NBR_OF_COL*NBR_OF_ROW*NBR_OF_CHROMA*NBITS-1 downto 0));
end entity test_op1;

architecture rtl of test_op1 is

    package local_pixel_pkg is new work.pixel_pkg
      generic map (
            NBITS                       => NBITS,
            NBR_OF_CHROMA               => NBR_OF_CHROMA
      );

    package local_pixel_column_pkg is new work.pixel_column_pkg
      generic map (
            NBITS                       => NBITS,
            NBR_OF_CHROMA               => NBR_OF_CHROMA,
            NBR_OF_ROW                  => NBR_OF_ROW,
            local_pixel_pkg                => local_pixel_pkg
      );

    use local_pixel_column_pkg.all;
    signal input_pixel_column : TYPE_PIXEL_COLUMN;
begin

    -- As soon as a function from the local_pixel_matrix_pkg is used it breaks
    input_pixel_column <= std_logic_vector_to_pixel_column(in_data(NBR_OF_ROW*NBR_OF_CHROMA*NBITS-1 downto 0));
end architecture rtl;