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 VHDL testbench for the next entity Entity dec3to8 is PORT( AA: IN std_logic_vector(2 downto 0);...
Write VHDL testbench for the next entity Entity dec3to8 is PORT( AA: IN std_logic_vector(2 downto 0); BB: OUT std_logic_vector(7 downto 0); Enable: IN std_logic ); End entity;
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?...
ARM Assembly Code The Fibonacci Sequence is a series of integers. The first two numbers in...
ARM Assembly Code The Fibonacci Sequence is a series of integers. The first two numbers in the sequence are both 1; after that, each number is the sum of the preceding two numbers. 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ... For example, 1+1=2, 1+2=3, 2+3=5, 3+5=8, etc. The nth Fibonacci number is the nth number in this sequence, so for example fibonacci(1)=1, fibonacci(2)=1, fibonacci(3)=2, fibonacci(4)=3, etc. Do not use zero-based counting; fibonacci(4)is 3, not...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT