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

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- AI Engine, DSP IP and Tools
- :
- Re: FIR compiler

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

misha2020

Observer

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

11-03-2020 12:31 AM

641 Views

Registered:
02-26-2020

FIR compiler

Hello to forum

I have a question concerning coefficient sets (coefficient reload) in FIR compiler in decimation mode of operation:

Could FIR compiler support different decimation factors simultaneously with different sets of filter coefficients:

Namely, I would like to use a same core that depending on mode of operation performs different decimations of the input data using different set of coefficients (the same bit width, different number of lags)

Thanks to advance

Michael

0
Kudos

Reply

9 Replies

nathanx

Moderator

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

11-03-2020 01:30 AM

626 Views

Registered:
08-01-2007

0
Kudos

Reply

misha2020

Observer

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

11-03-2020 01:53 AM

618 Views

Registered:
02-26-2020

Ok, it was predictable, Nathanx

Have you any idea or may be examples for SYSGEN how I can make decimation filter that support different decimation factors with corresponding different filter orders, having in mind that clock can be much higher than data rate.

Thanks

Michael

Addition question : I found in Forum example of using coefficient reload with LPF and HPF.

After generating coeff2=xlfda_numerator('HPF')

I try to change coefficient order and obtain an error below (my SYSGEN version is 2019.2 and Matlab 2019.b). What is a problem??

Num = (xlGetReOrderedCoeff(coeff2,'coeff', gcbh));

Expected coefficient length :

0

Ignoring extra coefficient values

Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix

matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'.

Error in xlGetReOrderedCoeff

Thanks again

Michael

0
Kudos

Reply

bruce_karaffa

Scholar

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

11-03-2020 02:49 AM

601 Views

Registered:
06-21-2017

If you only want simple decimation, that is decimate by an integer factor, why not just create a reloadable filter and follow it with a decimator written in your favorite RTL? A programmable decimator shouldn't be hard to write. You won't get the efficiencies of a polyphase filter, but the FIR compiler is pretty efficient with resources, so it may not matter.

If you are looking to decimate by a rational ratio such as 3/2 or 5/3, you will have a more difficult design. I wrote one that involved instantiating the DSP blocks and a state machine or two to control the flow through the DSP chain.

0
Kudos

Reply

misha2020

Observer

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

11-03-2020 03:05 AM

594 Views

Registered:
02-26-2020

OK, thanks

0
Kudos

Reply

nathanx

Moderator

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

11-03-2020 05:55 PM

528 Views

Registered:
08-01-2007

Hi @misha2020 ,

If any of the reply answers your question, can you accept it as solution or give kudos? This can help the other users who has same questions.

0
Kudos

Reply

misha2020

Observer

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

11-12-2020 02:04 AM

457 Views

Registered:
02-26-2020

Hi, Nathan

Sorry for delay

Unfortunately the proposal of using FIR compiler with reloadable coefficients and after that use variable decimation does not very elegant.

Furthermore, I struggle with MATlAB routine xlGetReOrderedCoeff(coeff2,'coeff', gcbh) that should reorders filter coefficients, but it fails in versions that I used.

So, could you please explain how I can automatically make filter coefficient reordering?

Thanks

Michael

0
Kudos

Reply

nathanx

Moderator

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

11-15-2020 08:51 PM

415 Views

Registered:
08-01-2007

Can you take a look at page 57 on PG149 June 10, 2020? The section "Coefficient Reload" has details.

*To minimize the resources required to implement the coefficient reload feature, it is necessary for users to re-order the coefficients that are to be reloaded to correctly pass each coefficient to its correct storage location in the filter structure. The Vivado IDE offers the facility to generate re-ordered coefficient files for use with the RELOAD channel and during core generation delivers an informational text file to the project area named _reload_order.txt, which lists the indexes of the coefficients, Coefficient x, in the order they should be reloaded into the filter through the reload channel Reload index x.*

0
Kudos

Reply

misha2020

Observer

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

11-16-2020 01:01 AM

396 Views

Registered:
02-26-2020

Thanks Nathan

I have read this paragraph, but my question was concerning the routine that one can use in MATLAB for implementing the reordering in System Generator:

function reOrderedCoeff = xlGetReOrderedCoeff(new_coeff_set,returnType,handle)

The hep of this routing exists, but unfortunately it does not make its job, at least I was not succeeded.

Any idea?

Regards

Michael

0
Kudos

Reply

nathanx

Moderator

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

11-25-2020 09:19 PM

293 Views

Registered:
08-01-2007

The FIR Compiler block in System Generator is the same with FIR Compiler IP core in Vivado.

This function is needed in the sequence of events to reload new filter coefficients.

A = xlGetReOrderedCoeff(new_coeff_set, ReturnType, block_handle)

where

new_coeff_set = New coefficient set to be loaded

block_handle = FIR Compiler block handle in the design which can be specified as 'gcbh'

ReturnType = Coeff or Index

The parameter ‘gcb’ should be the FIR block name and include a complete path to the block.

If you still have problem using this, let me know. @vkanchan , can you help on this question?

0
Kudos

Reply