Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

matrix transpose code for Implementation of 2D fft

Status
Not open for further replies.

shan14

Member level 3
Joined
Aug 18, 2014
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
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


TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,036
Helped
2,063
Reputation
4,143
Reaction score
2,013
Trophy points
1,393
Activity points
38,691
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.
 

waso

Newbie level 3
Joined
Jan 19, 2015
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
21
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.
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,689
Helped
1,779
Reputation
3,566
Reaction score
1,730
Trophy points
1,393
Location
USA
Activity points
58,081
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

shan14

Member level 3
Joined
Aug 18, 2014
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
393
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??
 

waso

Newbie level 3
Joined
Jan 19, 2015
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
21
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top