UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer panospet
Observer
7,823 Views
Registered: ‎02-21-2012

Resample in Sysgen...

Any ideas of how can I implement the "resample" MATLAB code in a xilinx sygen design?

 

thank you in advance.

panospet

Tags (4)
0 Kudos
12 Replies
Xilinx Employee
Xilinx Employee
7,819 Views
Registered: ‎08-02-2011

Re: Resample in Sysgen...

Depending on exactly what you're trying to do, you could use a combination of FIR, CIC, upsample, and/or downsample blocks.

www.xilinx.com
0 Kudos
Xilinx Employee
Xilinx Employee
7,812 Views
Registered: ‎11-28-2007

Re: Resample in Sysgen...

If the rate change is fixed, you can use FIR comipler to generate a polyphase filter: set filter type to "interpolation" or "decimation", then set rate change type to "fixed_fractional". you can then set value for p and q.

 

ScreenHunter_270.jpg

 

 

Cheers,
Jim
0 Kudos
Observer panospet
Observer
7,810 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

Thanks a lot. 

 

Unfortunately I'm running an older version of sysgen, and I have up to FIR compiler 5.0. 

Is there a similar way with this? 

 

Can I also use FDA tool?

0 Kudos
Observer panospet
Observer
7,808 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

Sorry, I meant up to FIR compiler 4.0

0 Kudos
Observer panospet
Observer
7,806 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

And how do I choose my coefficient vector?

0 Kudos
Xilinx Employee
Xilinx Employee
7,798 Views
Registered: ‎11-28-2007

Re: Resample in Sysgen...

Sorry I don't have old versions installed any more to confirm. Can you attach a screenshot of what the FIR Compiler 4.0 GUI looks like?

 

 


@panospet wrote:

Sorry, I meant up to FIR compiler 4.0




Cheers,
Jim
0 Kudos
Xilinx Employee
Xilinx Employee
7,797 Views
Registered: ‎11-28-2007

Re: Resample in Sysgen...

You use FDATools to design your filter (choose coefficient vector) and use FIR Compiler to implement the filter in FPGA.

 


@panospet wrote:

And how do I choose my coefficient vector?




Cheers,
Jim
0 Kudos
Observer panospet
Observer
7,791 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

I will put [1] as my coefficient vector because I dont want any changes to my signal, I only want to resample it.

 

Do I need to change my clock to do this? That makes my odjective much more complicated. 

 

Ps. I attach my design, if it helps. The audio signal is imported in the design using wavread command in matlab, and then the "from workspace" block. My goal is to implement the "pitch shifting" effect, as the matlab code does.

0 Kudos
Observer panospet
Observer
7,788 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

Also, I want to do a 6/7 resampling to my signal.

 

When I set my interpolation rate value to "6" and decimation to "7", I get this error:

 

0 Kudos
Xilinx Employee
Xilinx Employee
3,727 Views
Registered: ‎11-28-2007

Re: Resample in Sysgen...

In your case, you need to set filter type to "Decimation"

 

Interpolation = resample rate > 1

Decimation = resample rate < 1

 

 

 

 


@panospet wrote:

Also, I want to do a 6/7 resampling to my signal.

 

When I set my interpolation rate value to "6" and decimation to "7", I get this error:

 




Cheers,
Jim
0 Kudos
Observer panospet
Observer
3,724 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

I also tried the "decimation" filter type, I get this error. (different than the previous).

 

Do I have to do something with my clock?

 

0 Kudos
Observer panospet
Observer
3,712 Views
Registered: ‎02-21-2012

Re: Resample in Sysgen...

anyone?

0 Kudos