Question

Write VHDL Code to implement Fibonacci series with testbench and tcl file?

Write VHDL Code to implement Fibonacci series with testbench and tcl file?

Homework Answers

Answer #1
ENTITY fibonacci IS
GENERIC (N: INTEGER := 16); ------number of bits
PORT (clk, rst : IN BIT;
fibo_series : OUT INTEGER RANGE 0 TO 2**N-1);
END fibonacci;
------------------------------------------------------------
ARCHITECTURE fibonacci OF fibonacci IS
SIGNAL a,b,c: INTEGER RANGE 0 TO 2**N-1;
BEGIN
PROCESS (clk,rst)
BEGIN
IF (rst='1') THEN
b <= 1;
c <= 0;
ELSIF (clk'EVENT AND clk-'1') THEN
c <= b;
b <= a;
END IF;
a <= b +c;
END PROCESS;
fibo_series <= c;
END fibonacci;
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please write the testbench of T-flip flop in VHDL with using assert or wait function. thank...
Please write the testbench of T-flip flop in VHDL with using assert or wait function. thank you. Here my Tff code: module Tff (e,clk,re,q); input e,clk,re; ouput q; always_ff@(posedge clk) begin if (re) q=0; else q<=q+1; end endmodule
Write down the VERILOG code for an AND gate and the testbench code to test it
Write down the VERILOG code for an AND gate and the testbench code to test it
Write verilog code for Huffman Decoder with testbench.
Write verilog code for Huffman Decoder with testbench.
Write a VHDL code for a Traffic Light
Write a VHDL code for a Traffic Light
Write the code for a static Huffman decoder in verilog with testbench.
Write the code for a static Huffman decoder in verilog with testbench.
Write down the VERILOG code for a tri-state buffer and the testbench code to test it
Write down the VERILOG code for a tri-state buffer and the testbench code to test it
Write down the VERILOG code for a 2-to-4 decoder and the testbench code to test it
Write down the VERILOG code for a 2-to-4 decoder and the testbench code to test it
VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can)....
VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can). F(A,B,C,D)=(A'+B+C). (A+B'+D'). (B+C'+D') . (A+B+C+D) 2. What will be the no. of rows in the truth table of N variables? 3. What are the advantages of VHDL? 4. Design Ex-OR gate using behavioral model? 5. Implement the following function using VHDL code f=AB+CD. 6. What are the differences between half adder and full adder? 7. What are the advantages of minimizing the logical expressions?...
Write a VHDL code for a 4-bit shift register that shifts from right to left.
Write a VHDL code for a 4-bit shift register that shifts from right to left.
Write the VHDL code implementing a 6-bit synchronous counter with enable. The design should include the...
Write the VHDL code implementing a 6-bit synchronous counter with enable. The design should include the output to be connected to the next stage Then update the code to include an asynchronous reset