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.

simulate a FIR filter core in frequency domain

Status
Not open for further replies.

ya_montazar

Member level 2
Member level 2
Joined
Feb 24, 2014
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
342
hi,
Is there any tools relevant to ISE to simulate a FIR filter core ,which its coefficient has extracted from Matlab and synthesizd by VHDL code in ISE, in frequency domain
I design a LPF. and I don't know is it good in passing the low frequency...
could I compose test bench something for it? :thinker:

- - - Updated - - -

another question is what type of FIR filter is suitable for lpf?
I have used hamming window?
 

So u can add it in Simulink as a VHDL blackbox or
U can generate changing in time frequency sinus in matlab, write it to file and feed this signal to FIR vhdl testbench, and examine the output magitude.
 
"So u can add it in Simulink as a VHDL blackbox"
how can I import a vhdl component in matlab?
 

"So u can add it in Simulink as a VHDL blackbox"
how can I import a vhdl component in matlab?

If you have the HDL coder, you have access to the Modelsim co-simulation block. It allows simulink to drive modelsim, and pass data into and out of modelsim. It can be hard work but can allow you to simulate your VHDL code using your simulink test harness.

Much easier is capturing the data from the harness into a text file, and then using this text file as your VHDL testbench stimulus. Its basically the same as above, but does not require HDL coder.
 
If the VHDL is time domain based, then you cannot simulate it in F domain...
I'm sorry but I don't undrestand. I wanna give a signal test which it is possible to see it as graph either in t-domain and f-domain, to a fir filter block composed as vhdl and see the output signal either in f-domain or t-domain,? is it impossible? :)
 

The basic answer is simple, in- and output signals of the FIR filter are sample sequences, to get a frequency domain representation, apply a fourier transform.

An interesting question is however the type of input signal applied to the filter, at least if you want to test for rounding and truncation effects. If not, you can simply transform the FIR impulse response (= coefficient vector) and have the frequency response.
 
The basic answer is simple, in- and output signals of the FIR filter are sample sequences, to get a frequency domain representation, apply a fourier transform.
do you mean use fft core something, to monitor input or output in f-domain? and should it be seen in ISIM or MODELSIM???
 

T&he fourier transform should be performed with full resolution not to introduce additional errors, an IP core won't do that. Postprocessing the Modelsim output in an external program is the straightfoward way, e.g. in a spreadsheet calculator or Matlab/Octave. Calculating the fourier transform in Modelsim would be possible, but I think the coding effort doesn't pay.
 
why don't you just take the simple approach...
You have matlab so...

Generate data in matlab an save it in a file one data word per line in hex fixed point.
Create testbench that reads that data file and applies the data to your VHDL FIR filter and writes the FIR filter output data to another file.
Read the FIR output data file into matlab and perform a FFT on it and get your frequency domain representation.

This is a lot easier than using an FFT core and ISIM/Modelsim. Also it will be a lot faster to generate data, capture outputs and use matlab to analyze the data. If you make sure matlab computes bit-for-bit equivalent data you can even compare your FIR output data with matlab computed data. Or you could use floating point precision in matlab to check how much error there is using fixed point and limited bit width data.


Regards
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top