Fixed-point Implementation of FIR coefficients
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fixed Point에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!