Fixed-point Implementation of FIR coefficients
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I am using Matlab R2010a (R2009b) and I installed the fixed-point toolbox. To redesign a filter I am taking the following steps:
1. specify the filters parameters in FDA tool 2. export the coefficients (double values) to workspace 3. Run coesave.m and coewrite.m codes to change these values from double to fixed-point suitable for Xilinx implementation.
However, I encounter several errors:
1. set(hq,'arithmetic','fixed'); I also tried hq.Arithmetic='fixed'; but the same error occurs: ??? Changing the 'Arithmetic' property of dfilt.dffir is not allowed.
2. I used hq.Numerator = fi(hq.Numerator); instead but then inside coewrite.m: if ~isfixed(Hq.coefficientformat), ??? No appropriate method, property, or field coefficientformat for class dfilt.dffir.
3. I commented out the line related to error #2. Then on line: strheader = sptfileheader('XILINX CORE Generator(tm) Distributed Arithmetic FIR filter coefficient (.COE) File', ... 'filterdesign', ';'); the following error occurred: ??? Index exceeds matrix dimensions.
4. I commented out error #3 as well. On line: fprintf(fid,'Coefficient_Width = %d; \n',Hq.coefficientformat.wordlength);
??? No appropriate method, property, or field coefficientformat for class dfilt.dffir.
5. After commented out the error #4. Another error on line: q = get(Hq,'CoefficientFormat');
??? There is no 'CoefficientFormat' property in the 'dffir' class.
I would appreciate it if you could help me find a solution for this problem.
Thanks,
Nazila
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Fixed Point finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!