VHDLで関数を定義しようとしていますが、
エラー:tst.vhd(4):「サブタイプ」の近く:構文エラー
これがコードです
subtype word10 is bit_vector(9 downto 0);
subtype word8 is bit_vector(7 downto 0);
function tst (input : in word10) return word10 is
variable tmp : word10;
-- code here
begin
return tmp;
end tst;
entity tester is
end;
architecture tst of tester is
begin
end;
VHDLでコーディングするのは初めてで、エラーが何であるかわかりません。
何か案は?