Something
public text v1 · immutable
entity fibonacci is
Port ( n : in integer;
fib: out integer);
end fibonacci;
architecture Behavioral of fibonacci is
begin
fibbo:process(n)
variable fib_last : integer := 1;
variable fib_lasttolast : integer :=0;
variable fib_temp: integer := 0;
begin
for i in 2 to n loop
fib_temp := fib_last + fib_lasttolast;
fib_lasttolast := fib_last;
fib_last := fib_temp;
end loop;
fib <= fib_temp;
end process;
end Behavioral;