I know that "coewrite" in matlab could give out the coe file for Xilinx DA FIR core. but it seems that the same method does not suit for MAC FIR core.
then...how could I get the coe file for a MAC FIR?
I know that "coewrite" in matlab could give out the coe file for Xilinx DA FIR core. but it seems that the same method does not suit for MAC FIR core.
then...how could I get the coe file for a MAC FIR?
Hi AdamS,
You can, for instance, export the coefficients from the FDA tool in MatLab to the workspace. Find out how much you should multiply the coefficients with to acheive the bit width you use. (That is, if you have 16-bit coefficients the largest coefficient should have the value
32767 in order to optimize the filter). Multiply the coeff. vector by the number. Next you can copy the coefficients from the variable viewer in MatLab and paste them in a file that looks something like this:radix=10; coefdata=352, 256, 332, 410, 484, 547, 595, ... ;
and save it as a .coe file. (You do have to do a replacement of all tab characters to ", " before saving, but that shouldn't be any problem i any decent editor.
For more info, see the filter documentation in coregen.
/Johan
Have something to add? Share your thoughts — no account required.
Ask the community — no account required