blob: 91ee057cf0fb97480b88d999a8d07bb8fdd68250 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
library ieee;
use ieee.std_logic_1164.all;
entity e is
port (p1 : out std_logic_vector((3+1)+1 downto 0);
p2 : out std_logic_vector((3-1)+1 downto 0);
p3 : out std_logic_vector((3 )+1 downto 0));
end e;
architecture rtl of e is
function f (a : integer) return integer is
begin
return a;
end function;
signal s1 : std_logic_vector(3+1 downto 0) := (others=>'0');
signal s2 : std_logic_vector(3-1 downto 0) := (others=>'0');
signal s3 : std_logic_vector(f(3) downto 0) := (others=>'0');
begin
p1 <= ('0',s1);
p2 <= ('0',s2);
p3 <= ('0',s3);
end architecture;
|