blob: d667ddfe0dc2afec3a3207e41d4ce8f206cba732 (
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
|
library ieee;
use ieee.std_logic_1164.all;
entity identity is
port (
x: in std_logic_vector(7 downto 0);
y: out std_logic_vector(7 downto 0)
);
end entity;
architecture a of identity is
begin
y <= x;
end architecture;
---
library ieee;
use ieee.std_logic_1164.all;
entity ent is
port (
a: in std_logic_vector(7 downto 0);
b: out std_logic_vector(7 downto 0)
);
end entity;
architecture a of ent is
function transform(val: std_logic_vector) return std_logic_vector is
begin
return (7 downto 0 => '0');
end function;
begin
identity: entity work.identity port map (x => transform(a), y => b);
end architecture;
|