Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

matrix transpose code for Implementation of 2D fft

Status
Not open for further replies.

shan14

Member level 3
Member level 3
Joined
Aug 18, 2014
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
393
Hi


I am doing 2D fft in VHDL . My algorithm is
1) 1D fft then
2) transpose of the output of 1D fft
3)again 1D ft of those transpose output
4)again transpose the 1D fft

So in this, I am using following matrix transpose code .

My question is that,is this matrix transpose code correct for doing 2D fft???
 

Attachments

  • Transpose.txt
    1.9 KB · Views: 96

Have you made a testbench? That would be the best way to test it.

There is one error in that x is never reset back to 0, so if X overflows the simulation will error.
 

Hello shan14,

in regards to your code, did you synthesize it successfully? I just copy and paste the code and I got an error due to size mismatch. It is just the size of "t1", you have to set it to 2 downto 0.

From my point of view, there are couple of things I would coded differently. In the process sensitivity list, I would put just the clock signal and reset. I think, maybe you can put the assignation "output_there <= '1'" inside the "elsif(rising_edge(clk)) then".

Also, as TrickyDicky suggested you, a testbench is the best way to test if your design behaves as you expect

Best regards.
 

I am doing 2D fft in VHDL . My algorithm is
1) 1D fft then
2) transpose of the output of 1D fft
3)again 1D ft of those transpose output
4)again transpose the 1D fft

Are you sure this is the correct algorithm? I ran across this method on stackexchange. It seems that the OP changed their code and verified that it worked with the algorithm given by Paul R.

I also don't understand where your input matrix is, the input is just a single vector. Is your data streaming? If so how do you determine where the rows/columns of your matrix are located in the stream?
 
  • Like
Reactions: shan14

    shan14

    Points: 2
    Helpful Answer Positive Rating
Hi

I am taking 16 point FFT. so 16 inputs are coming one by one. I am considering it as a 4*4 matrix.

so while doing transpose of the output of 1D FFT, I am getting transposed output which is correct.

My doubt is that is this way correct??
 

Hi shan14,

I guess you are using the signal "output_there" to indicate that you have buffered the entire matrix and you are going to output it. So, in my opinion you should add a "start" input port in your design to indicate your block to start receiving each point of the 4*4 matrix, otherwise it considers every input data as matrix data.

After adding the start input port I would say the code is correct.

Anyhow in a sequential process, I would not add any signal at the sensitivity list other than clock and reset. And if possible, in my opinion is a good practice not to have many nested if statements.

Kind regards.
 
  • Like
Reactions: shan14

    shan14

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top