Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- Video and Audio
- :
- Re: fftshift using system generator

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

salman866

Contributor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-01-2010 11:58 PM

3,955 Views

Registered:
11-26-2010

hi

To shift the zero frequency component towards center we use fftshift command in matlab.

But I was unable to find any block for this in system generator.

So I want to ask do Ihave to write the whole algorithm to implement this or is there any other way.

SALMAN

1 Solution

Accepted Solutions

eschei

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-02-2010 12:28 AM

4,362 Views

Registered:
02-09-2009

Hi,

There is no dedicated block in system generator that will implement the fftshift function. To implement this, again it is just about how you read from memory. The most straight forward way is to write the results in Block RAM, then read the results in the order that the fftshift will output. You would have to wait until 1/2 of the FFT result is written, then for example for a 1024pt fft, start reading from 513-1024, then 1-512. You just have to build an address generator that addresses the Block RAM this way from counters/comparators etc.

One thing to think about, the FFT algorithm will initially output the results in bit-reversed order. Internally, there is a Block RAM buffer that is used to re-order the results into natural order (1-n). This buffereing is optional and adds latency. At the expense of a more complicated address generator, you can take the bit-reversed output of the fft and directly re-order the output so DC is in the center as the fftshift function does. This would reduce the amount of memory required and reduce latency, but require a bit more complex control logic.

Cheers,

-es

1 Reply

eschei

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-02-2010 12:28 AM

4,363 Views

Registered:
02-09-2009

Hi,

There is no dedicated block in system generator that will implement the fftshift function. To implement this, again it is just about how you read from memory. The most straight forward way is to write the results in Block RAM, then read the results in the order that the fftshift will output. You would have to wait until 1/2 of the FFT result is written, then for example for a 1024pt fft, start reading from 513-1024, then 1-512. You just have to build an address generator that addresses the Block RAM this way from counters/comparators etc.

One thing to think about, the FFT algorithm will initially output the results in bit-reversed order. Internally, there is a Block RAM buffer that is used to re-order the results into natural order (1-n). This buffereing is optional and adds latency. At the expense of a more complicated address generator, you can take the bit-reversed output of the fft and directly re-order the output so DC is in the center as the fftshift function does. This would reduce the amount of memory required and reduce latency, but require a bit more complex control logic.

Cheers,

-es