Skip to content

Instantly share code, notes, and snippets.

@gibiansky
Created December 9, 2012 21:50
Show Gist options
  • Save gibiansky/4247182 to your computer and use it in GitHub Desktop.
Save gibiansky/4247182 to your computer and use it in GitHub Desktop.
Verilog Fibonacci Module
module fib(input clock, reset, input [5:0] n, output ready, output [31:0] value)
reg [31:0] previous, current;
reg [5:0] counter;
always @(posedge reset)
begin
previous <= 32'd0;
current <= 32'd1;
counter <= 32'd1;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment