blob: edbdee79b2bdd461f9eafd17734c15891d2426fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
library ieee;
use ieee.std_logic_1164.all;
package type_user_pkg is
generic (
type thetype;
function transition(val : thetype) return thetype
);
procedure unity_proc(signal clk : in std_ulogic; signal inVal : in thetype; signal outVal : out theType);
end package type_user_pkg;
package body type_user_pkg is
procedure unity_proc(signal clk : in std_ulogic; signal inVal : in thetype; signal outVal : out theType) is
begin
wait until rising_edge(clk);
outVal <= transition(inVal);
end procedure unity_proc;
end package body;
|