All pastes #2053764 Raw Edit

Something

public text v1 · immutable
#2053764 ·published 2011-05-04 11:00 UTC
rendered paste body

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;