aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vpi/vpi002/mydesign.vhdl
blob: c542f5fa9e0d79a1576eb5d525d7d9bdcf4f6f87 (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
40
41
42
43
44
45
46
library ieee ;
use ieee.std_logic_1164.all;

package mypackage is
  type myenum is (ONE, TWO, THREE);
  subtype myarray is bit_vector(2 downto 0);
  type myarray5 is array(1 downto 0) of bit;
end package;

library ieee ;
use ieee.std_logic_1164.all;
use work.mypackage.all;

entity myentity is
  generic (
    width: integer := 2;
    genenum: myenum := ONE;
    genarray1: bit_vector(1 downto 0) := "01";
    genarray3: myarray := "010";
    genarray5: myarray5 := ('1', '0')
    );
  port (
    portenum: in myenum;
    portarray1: in bit_vector(1 downto 0);
    portarray2: in bit_vector(width downto 0);
    portarray3: in myarray;
    portarray5: in myarray5
    );
end myentity;

architecture arch of myentity is
  subtype myarray4 is bit_vector(width downto 0);
  signal sigenum: myenum; 
  constant constenum: myenum := ONE;
  signal sigarray1: bit_vector(1 downto 0); 
  constant constarray1: bit_vector(1 downto 0) := "10";
  signal sigarray2: bit_vector(width downto 0); 
  constant constarray2: bit_vector(width downto 0) := (others => '1');
  signal sigarray3: myarray; 
  constant constarray3: myarray := "101";
  signal sigarray4: myarray4;
  constant constarray4: myarray4:= (others => '1');
  signal sigarray5: myarray5;
  constant constarray5: myarray5:= (others => '1');
begin
end arch;